Entries in the ‘Programming’ Category:

How to iterate through a result set with SQL

Method 1: Using a cursor declare cursor1 cursor local for select * from tablename open cursor1 fetch next from cursor1 into #temptable while @@fetch_status = 0 begin if exists (select column from tablename where id = (select id from #temptable)) begin  /* do stuff here */  end else begin /* do other stuff here */ [...]

Tags: , , , , , , , , ,

Leave a Comment

How to iterate through a result set with SQL

Method 1: Using a cursor declare cursor1 cursor local for select * from tablename open cursor1 fetch next from cursor1 into #temptable while @@fetch_status = 0 begin if exists (select column from tablename where id = (select id from #temptable)) begin  /* do stuff here */  end else begin /* do other stuff here */ [...]

Tags: , , , , , , , , , , ,

Leave a Comment

Understanding JavaScript OOP

“JavaScript is an object oriented (OO) language, with its roots in the Self programming language, although it’s (sadly) designed to look like Java. This makes the language’s really powerful and sweet features stay covered by some pretty ugly and counter-intuitive work-arounds. One such affected feature is the implementation of prototypical inheritance. The concepts are simple [...]

Tags: , , , , ,

Leave a Comment

The Development of the C Language

“The C programming language was devised in the early 1970s as a system implementation language for the nascent Unix operating system. Derived from the typeless language BCPL, it evolved a type structure; created on a tiny machine as a tool to improve a meager programming environment, it has become one of the dominant languages of [...]

Tags: , , ,

Leave a Comment

What every programmer should know about memory

“In the early days computers were much simpler. The various components of a system, such as the CPU, memory, mass storage, and network interfaces, were developed together and, as a result, were quite balanced in their performance. For example, the memory and network interfaces were not (much) faster than the CPU at providing data. This [...]

Tags: , , ,

Leave a Comment

Why is 1 loop so much slower than 2 loops?

A really interesting in-depth question was posted over at stackoverflow.com asking why 1 loop seems to be so much slower than 2 loops. The discussion on the page goes into great and interesting detail on what’s going on behind the scenes and why there is such a decrease in speed between 1 and 2+ loops. [...]

Tags: , , , ,

Leave a Comment

Notes on Programming in C by Rob Pike

Really interesting article from Rob Pike, a member of the Unix team and Plan 9. Here’s a short excerpt from the article: “Kernighan and Plauger’s The Elements of Programming Style was an important and rightly influential book. But sometimes I feel its concise rules were taken as a cookbook approach to good style instead of [...]

Tags: , ,

Leave a Comment

“Yoda Conditions”, “Pokémon Exception Handling” and other programming classics

Just a few excellent responses from Stackoverflow.com to the question: “What programming terms have you coined that have taken off in your own circles (i.e. have heard others repeat it)? It might be within your own team, workplace or garnered greater popularity on the Internet.” Some examples being: “Yoda Conditions” and “Pokemon Exception Handling.” Dodgy [...]

Tags: , , ,

Leave a Comment

How-to Build Doom 3 Source Code on OS X

The Doom 3 source code has recently been released under the GPL license by iD Software and it appears that someone has been able to successfully build it under OS X! There is also a small/partial code review of sorts here too with plans for a complete code review in the future. Check out the [...]

Tags: , , , , ,

Leave a Comment

Dart Programming Language

Dart is a new web programming language developed by Google. It is set to be first unveiled at the GOTO conference, which is held between October 10-12, 2011. The primary intent of Dart is to replace JavaScript. The primary goals of Dart are to solve some of JavaScript’s problems while providing increased performance and security. [...]

Tags: , , , ,

Leave a Comment