Today's Question:  What does your personal desk look like?        GIVE A SHOUT

 PROGRAMMING


  Obviously Correct

What do automatic memory management, static types and purity have in common? They are methods which take advantage of the fact that we can make programs obviously correct (for some partial definition of correctness) upon visual inspection. Code using automatic memory management is obviously correct for a class of memory bugs. Code using static types is obviously correct for a class of type bugs. Code using purity (no mutable references or side effects) isobviously correct for a class of concurrency bugs. When I take advantage of any of these techniques, I don...

2,365 0       CODE MEMORY MANAGEMENT STATIC PURITY


  Python: copying a list the right way

new = old[:]Those proficient in Python know what the previous line do. It copies the list old into new. This is confusing for beginners and should be avoided. Sadly the [:] notation is widely used, probably because most Python programmers don’t know a better way of copying lists.A little bit of pythonic theoryFirst we need to understand how Python manages objects & variables. Python doesn’t have variables like C. In C a variable is not just a name, it is a set of bits; a variable exists somewhere in memory. In Python variables are just tags ...

2,564 0       PYTHON LIST COPY REFERENCE [:] LIST()


  How NOT to teach a computer language

For the past year or so my wife has been taking online classes to get a computer science degree. For most of her classes she’s done great, she’s been flying through HTML and SQL, even up to the point where she can handle multilevel joins and optimizing through indexes. That was until she hit her vb.net class. I had no idea why she was having problems with a language has easy as vb.net so I started helping her out and find out why she was having so many problems. I’ve also added some recommendations in case you have the same problems, hopefully these will help you out. (Nam...

2,357 0       METHOD PROGRAMMING COMPUTER BOOK TEACH GRADE


  Taking C Seriously

Dennis Ritchie, a co-creator of Unix and C, passed away a few weeks ago, and was honored with many online tributes this weekend for a Dennis Ritchie Day advocated by Tim O’Reilly.It should hardly be necessary to state the importance of Ritchie’s work. C is the #2 language in use today according to the TIOBE rankings (which, while criticized in some quarters, are at least the best system we currently have for gauging such things). In fact, TIOBE’s preface to the October 2011 rankings predicted that a slow but consistent decline in Java will likely m...

2,948 0       C EFFICIENCY DENNIS RITCHIE MEMORIZATION


  Helping people find good Perl tutorials

If a co-worker comes to you and asks you: "I would like to learn Perl, where can I find a good Perl Tutorial?", I am sure your would have a few recommendations. If the same person did not know you she would have to type some search term in Google and hope she found the right learning material.Recently Christian Walde (Mithaldu) asked "How do newbies find Perl learning materials online?". Dave Cross responded by checking the top results when searching for "perl tutorial".It shows that many people using Google to find a Perl tutorial will find bad ones.To which Mithaldu replied with a long ...

3,568 0       WEBSITE PERL PERL TUTORIAL RESOURCE


  Installing Python Packages

Now that you have you system and project environment all setup you probably want to start developing. But you likely don’t want to start writing an entire project fully from scratch, as you dive in you’ll quickly realize theres many tools helping you build projects and sites faster. For example making a request to a website there’s Requests, for handling processing images there’s Python Imaging Library, or for a full framework to help you in building a site there’s Django. With all of these there’s one simple and common way to install ...

1,877 0       PYTHON UNIX PACKAGE INSTALLATION LIBRARY


  Ruby is beautiful (but I’m moving to Python)

The Ruby language is beautiful. And I think it deserves to break free from the Web. I think the future of Ruby is firmly stuck in Web development, though, so I’m going to invest in a new language for data analysis, at least for now. This is a look at the fantastic language I came to from Java and a look at a possible candidate. (Update: I’ve since written a followup.)Java to RubySix years ago, I added Ruby to my technical arsenal. I learned C++ and Java in high school, and I planned to use them for data analysis in college—mainly for research kung fu. But when I disco...

12,215 0       JAVA COMPARISON RUBY ADVANTAGE PYTHON RUBY VS PYTHON


  On Programming Deadlines

There are a lot of differences between programming, and programming professionally. The most notorious of which, is deadlines.DeadlinesWhen you're writing code for yourself, you can spend as much (or as little time) on it as you please--but when you're writing code for other people, you've got only a limited amount of time and resources to get the job done. In my experience, this typically leads to one of two situations:You've got to extend the deadline to finish the job properly.You've got to write some dirty hacks to finish the job.If you've ever done professional programming, you know what ...

2,576 0       PROGRAMMING DEADLINE TRANSPARENT TEST TODO