Entries Tagged ‘Programming’:
filed in Programming, Security on May.07, 2012
There’s an excellent thread going on over at stackoverflow.com about suggestions for what every programmer should know about security. Some of the more interesting highlights: Never trust user input! Validate input from all untrusted sources – use whitelists not blacklists Plan for security from the start – it’s not something you can bolt on at [...]
Tags: programmer, Programming, Security
filed in Perl, Programming, Scripts on Mar.17, 2012
Here is a very simple client/server example coded in Perl. This is an extremely basic application – the goal was merely for me to learn how to use sockets in Perl. You can check out the code on github here: github.com/darkmuck/SimplePerlSockets. After you’ve downloaded the client and server files follow these instructions to test it [...]
Tags: client, Perl, Programming, server, sockets
filed in Programming, Tips on Mar.12, 2012
source: Things You Should Never Do, Part I (joelonsoftware.com) For many reasons, it is almost never a good idea to throw away old code. It may seem like a good idea to start from fresh if the existing code base is bloated, slow, hard to maintain, etc. However, by starting from fresh you are losing [...]
Tags: code, Programming, tips
filed in Computer Science, Education, Programming on Feb.22, 2012
On the criteria to be used in decomposing systems into modules – David Parnas A Note On Distributed Computing – Jim Waldo, Geoff Wyant, Ann Wollrath, Sam Kendall The Next 700 Programming Languages – P. J. Landin Can Programming Be Liberated from the von Neumann Style? – John Backus Reflections on Trusting Trust – Ken [...]
Tags: education, papers, Programming
filed in Programming, SQL on Jan.11, 2012
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: cursor, database, dbms, iterate, Programming, result set, SQL, table, temp, temporary
filed in Programming, SQL on Jan.11, 2012
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: cursor, cursors, database, dbms, iterate, Programming, result set, rows, SQL, table, temp, temporary
filed in Javascript, Programming on Jan.11, 2012
“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: javascript, object oriented, oop, Programming, tutorial, tutorials
filed in C/C++, Programming on Jan.08, 2012
“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: C#, history, language, Programming
filed in Hardware, Linux, Programming on Jan.04, 2012
“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: cache, linux, memory, Programming
filed in C/C++, Programming on Dec.20, 2011
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: C#, efficiency, loop, loops, Programming