Introduction to C Programming – Lesson 0 – Getting Setup

December 4th, 2011 No comments

Preface

This lesson is 1st of several on how  to program in the C language. If you do not know what programming is,  you may want  to briefly study [Introduction to Programming] first,  then come back to this lesson.   here we assume that you have a general understanding of what programming is, however you are not familiar with the C programming language, or systems programming.

If you have any previous programming experience, you may want to start with any of the Introduction to C programming for <…> lessons below

  • Introduction to C for Java programmers
  • Introduction to C for JavaScript programmers
  • Introduction to C for Python programmers
If the programming language of your choice is not listed here, and you want to get a feeling of how to program in C starting from that particular language, drop me a note  below, and I will endeavour to add a lesson around that language.

Format of Lessons

These lessons are in multimedia. I will use video, audio, text and downloadable examples in combination, to deliver the knowledge base.

Most lessons will follow the following format:

  • Introduction to a new concept in C programming
  • Examples of use of the concept
  • Practical ways of programming  that concept in real life examples; and
  • Exercises to try to apply the concept discussed

I will try and tie the lessons as well as the exercises with Khan Academy system  to help track your progress.

Accessibility

I will try my best to transcribe the videos and audios, for both visually-impaired and hearing-impaired students. However, since that takes quite a bit of effort, I will welcome any and all help in order to make that happen from anyone out there.

Glossary of terms

We are going to be using a lot of technical terms in these lessons. I’m going to define them, the  1st time where ever I use them.  hopefully  along the way, I will number to add them to the glossary of terms at the end.

 

Woman uses online dating to supplement food budget

November 30th, 2011 No comments

I think she’s doing just fine,   and that debt drives us down into the ground.   the following was my 1st reaction after reading this piece of news:

You know it’s tough life out there, and if the girl is creative enough to some how clear her debt without putting yourself in danger situations like stripping, I think she is doing all right. We all have to get very creative at times, and I have sympathy for her.

I don’t think that this should be held against her a lot of people do a lot of crazy things to get by. now of course a lot of guys will feel that they’re being misled, however I wonder how many of them have misled women into believing them really looking for relationship and not just trying to buy their way into someone’s panties with a meal And the $200 champagne bottle.

Keep going girl, always watch for number 1, but remember not to lose yourself completely in this game. There is something to be said about finding the right guy who you can share your life with. Believing is out there.

tell me what you guys think…

Categories: In the moment Tags:

Joanna, by Amanhã Talvez. Poetic translation for Michelle Phan

November 30th, 2011 No comments

Faz, que desse jeito
Só você sabe fazer
Olhos nos olhos
Tanta vida pra viver
Charminho doce
Pedacinho de você

Do to me, what only you can do
Just eye-to-eye
Seducing me
Bit by bit – reducing me

Diz a frase certa
Só você sabe me abrir
É só assim
Que eu consigo descobrir
Como é gostoso
Me entregar e te sentir

He always says the right words
Only you can reach me
In that place,
Where I can find
How sweet it is
to Surrender to your touch 

 

É, quando se ama
A gente finge que não vê
Que o tempo passa
E mais um pouco de você
Melhor assim.
Bom pra você, melhor pra mim

 

When we make love
 We pretend that
Time stands still,
 That you are fine
  And I am well

 

E amanhã
Quem sabe a gente outra vez
Só mais uma vez
Amanhã talvez
Só mais uma vez
O amor que a gente fez

Tomorrow
Maybe we can pretend to have
Just once more
 The love that we had

Categories: In the moment Tags: , ,

State of software development is broken: A pinhole view…

November 11th, 2011 No comments

…This is an account of some a personal experience and the trauma that follows….
A couple of weeks ago, I read something like this in a major piece of production code:

1
2
3
4
5
6
7
8
9
10
11
12
13
"]struct foo {
char a;
char *buf;
int flags; /* */
};
int some_function(struct foo *myfoo) {
...
size_t foosize = strlen((char *)myfoo); /* calculate the size to write */
...
fwrite(myfoo, 1, foosize, fp); /* fp was a file where the record was written */
}

Code snippet from production code that I had to “fix” 1

I had the distinct displeasure of running into the code snippet above.  Line 63 was the culprit code that was causing the customer intermittent issues.  What I find absolutely horrifying about this is that line 63 is not a subtle error buried in obscureness.  This use of strlen() is  scary because this kind of code disaster would never even enter the thought of a reasonable software programmer.  Yet here it was in all its hideous glory. What’s even more appalling is that this particular gem was produced by a team of so called software engineers that are graduates of good colleges and universities, and have been doing programming for several years.  As this  passed their unit tests, I am supremely scared to learn what else is going on in code developed by these folks that’s running out there.

One would think that this is a rare occurrence, and surely most coders wouldn’t code like this, I am afraid that the signs give an indication otherwise. Whilst I have not performed any empirical data analysis (may in a year), one can glean the trend from the type of questions asked and their answers on sites such as www.stackoverflow.com2 etc. that the state-of-the-art programming is on a terrible decline.

If this trend continues as is—and I am afraid it will unless something radical is done about it— we will have nothing but a fishnet for the proverbial water bottle in the stark dry desert that is our digital existence.

 


1 – If you want to know what the actual issue with this code is, I will discuss it as an addendum to this blog post later.

 

2 – Excellent forum for asking and getting answers to

 


References, Bibliography and Webliography

Some interesting posts on this topic are:

http://www.exmsft.com/~hanss/badcode.htm
http://www.codinghorror.com/blog/2006/05/code-smells.html

and of course the amazing WTF website at http://thedailywtf.com/

Categories: In the moment Tags: