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

 PROGRAMMING


  The faster-than-fast Fourier transform

The Fourier transform is one of the most fundamental concepts in the information sciences. It’s a method for representing an irregular signal — such as the voltage fluctuations in the wire that connects an MP3 player to a loudspeaker — as a combination of pure frequencies. It’s universal in signal processing, but it can also be used to compress image and audio files, solve differential equations and price stock options, among other things.The reason the Fourier transform is so prevalent is an algorithm called the fast Fourier transform (FFT), devised in the mid-1960...

2,491 0       FFT FAST FOURIER TRANSFORM MIT COMPRESSION


  Before Python

This morning I had a chat with the students at Google's CAPE program. Since I wrote up what I wanted to say I figured I might as well blog it here. Warning: this is pretty unedited (or else it would never be published :-). I'm posting it in my "personal" blog instead of the "Python history" blog because it mostly touches on my career before Python. Here goes.Have you ever written a computer program? Using which language?HTMLJavascriptJavaPythonC++COther - which?[It turned out the students had used a mixture of Scratch, App Inventor, and Processing. A few students had also used Python or Java.]...

2,485 0       PROGRAMMING LANGUAGE PYTHON HISTORY B


  How I Program Stuff

I love programming. I can truly say that of all the things I enjoy, I enjoy programming the most. There's nothing quite like the feeling you get when you create something. Writing code is a lot like building your own little universe.When you build stuff, you're in complete control, and, no matter how hard you fight it, your code directly reflects yourself. If you write sloppy code, I can almost guarantee you'll be a sloppy person. If you haphazardly throw code around with any care or passion, it's likely you treat yourself the same way.I tend to think of myself as a passionate programmer ...

2,767 0       PROGRAMMING STEPS ISOLATE ELIMINATE


   Python – parallelizing CPU-bound tasks with multiprocessing

In a previous post on Python threads, I briefly mentioned that threads are unsuitable for CPU-bound tasks, and multiprocessing should be used instead. Here I want to demonstrate this with benchmark numbers, also showing that creating multiple processes in Python is just as simple as creating multiple threads.First, let’s pick a simple computation to use for the benchmarking. I don’t want it to be completely artificial, so I’ll use a dumbed-down version of factorization – breaking a number to its prime factors. Here is a very naive and un-optimized function that take...

3,742 0       PYTHON MULTITASKING MULTIPROCESSING CPU BOUND


  Will We Need Teachers Or Algorithms?

Editor’s note: This is Part III of a guest post written by legendary Silicon Valley investor Vinod Khosla, the founder of Khosla Ventures. In Part I, he laid the groundwork by describing how artificial intelligence is a combination of human and computer capabilities In Part II, he discussed how software and mobile technologies can augment and even replace doctors. Now, in Part III, he talks about how technology will sweep through education.In my last post, I argued that software will take over many of the tasks doctors do today. And what of education? ...

2,062 0       ALGORITHM DEVELOPMENT TEACHER


  Hey kids, just say NO to programming !

Cory Doctorow's latest talk 'The Coming War on General Purpose Computing' really puts things in perspective about life in the 21st century. This got me thinking more about functional programming languages and how they are related to the intentional limitation/crippling of turing machines by industry and government.What if Stallman is right about the intentional efforts to limit freedom of information ? What if it's even worse than we all think it is ?In relation to functional languages : might industry and academia intentionally not want them to become popular ? At least not yet ?Might powerfu...

2,464 0       PROGRAMMING FACTOR VIEW KIDS NO


  PHP to Objective C, where the f**k are parameters?

Javascript, PHP, Ruby functionsI assume you are very familiar with declaring functions in any of the languages above, if not, you should not be reading this. Let’s begin with a simple function to send email in these languages:// PHP or Javascriptdo_send_email (recipient, cc, subject, body);// Rubydo_send_email (recipient, cc, subject, body)So it’s clear by looking at the function’s signature that it takes 4 parameters and they could be optional, depends on your implementation. Even if you missed one parameter, in most cases it is fine, no complain, no fatal error.First enc...

3,793 0       PHP JAVASCRIPT PARAMETER OBJECTIVE-C FUNCTION NAME


  When to use STDERR instead of STDOUT

Every process is initialized with three open file descriptors, stdin, stdout, and stderr. stdin is an abstraction for accepting input (from the keyboard or from pipes) and stdout is an abstraction for giving output (to a file, to a pipe, to a console).That's a very simplified explanation but true nonetheless. Those three file descriptors are collectively called 'The Standard Streams'.Where does stderr come from?It's fairly straightforward to understand why stdin and stdout exist, however stderr seems like the odd one out. Why do we need another stream for errors?This is a quote from Doug McIll...

5,134 0       UNIX STDERR STDOUT DIFFERENCE