Archive for the ‘programming’ Category

freeing memory on exit

Thursday, May 22nd, 2008

Back when I was a TA, I found that a few people had a very curious misconception.  In C++, they thought, if you never deleted an object, that object would never ever get freed until you restarted your computer.  Basically, that a memory leak is memory that is lost and gone forever (for all intents and purposes).

(more…)

Getting over the hump

Wednesday, May 21st, 2008

Almost every person I work with has some type of programming project they work on at home.  Michael (last I checked) is writing a synthesizer to go along with the midi controller keyboard he now owns, Matthew is writing an application so that he can update his music library’s metadata more easily, and other people have other tiny projects that they work on when the go home at night.

Me?  I watch southpark until I fall asleep.

Some days, I wonder if something is wrong with me.  Like I’m a bad geek for not programming when I go home.  Hell, my own brother puts most of us to shame, having started what (I think) is the most popular linux PVR project in existence, MythTV.

So what’s wrong with me?

(more…)

Singularity and the MSR-LA

Wednesday, March 5th, 2008

Slashdot is running an article about how Singularity is now Open Source, and I’m surprised to see that, of all places, Slashdot missed the obvious point.

Return to the “sharing is caring” MSR-LA (before it was the MSR-SSLA or something like that):

4. That Microsoft is granted back, a non-exclusive, irrevocable, royalty-free, and sub-licensable license to, for any purpose, reproduce, publicly perform or display, install, use, modify, distribute, make and have made, sell and transfer modifications to and/or derivative works of the Software source code or data that you provide to Microsoft through the CodePlex tool or otherwise make directly available to Microsoft.

That’s right, ladies and gentlemen.  The polite “share-alike” continues.

Of course, if you want to, say, try out one that isn’t an assrape in disguise and runs actual applications, jump over to JNode.  No promises, but using this one won’t require you to sleep on your stomach for weeks afterwards.

how to not ask questions redux

Friday, December 7th, 2007

It never ends.  Today, somebody sent a question to a linux questions alias about some Microsoft specific compiler extension on Windows and what equivalent exists, if any, in gcc.  As always, the very first google search result for the name of the declaration and “gcc” yields the answer.

Then again, he probably used Live search, and the first answer probably was a picture of a goat or something.  Yay for smarter search!

Eric Meijer invented dumb.

Tuesday, November 27th, 2007

I just saw the funniest thing.

I’m watching this talk, by Eric Meijer, about Visual Basic.  During the talk, he keeps bringing up examples of where languages “stole” features from VB.  The first (and marginally less funny), is when he basically states that modules (i.e. collections of functions) were invented by Visual Basic. That’s right.

(more…)

C/C++ and sizes of types

Friday, October 26th, 2007

Every so often, I get asked questions along the lines of one of these:

Question type #1:

I need a type that is exactly n bytes/bits long. How do I get this?

Question type #2:

On machine x, the size of some type(usually wchar_t) is wrong! How do I fix it?

I actually just got the second question, hence the reason for this post (although that guy won’t see the answer, because he was a dick). The short answer is this:

(Most) types in C and C++ are either only relatively sized or implementation defined.

(more…)

it should be obvious how to use it

Friday, August 24th, 2007

I just thought of this, as I sat contemplating an issue I’m having at work. The issue, without getting too much into detail, is about the best practices for designing a certain pluggable component of a larger framework. As with much of the OO C-descendant world, the component is defined by an interface that someone implements, and the question has arisen, “How do we tell somebody to write one of these?”

(more…)

why languages matter (or: why that guy doesn’t understand the meaning of “syntactic sugar”)

Friday, August 17th, 2007

I’ve been thinking more about one of my coworker’s many (strong) opinions, that programming languages are nothing more than syntax. I worry that we get too far taken by this argument, that we start to think of languages as the brand of hammer we use to pound the nail instead of the tools we use to solve the problem. Then again, languages are even more than the tools we use to solve the problem, they are the problem.

(more…)

LINQ’s query syntax was created to make me angry

Tuesday, July 31st, 2007

Before you big C# fellaters out there get all pissed off, let me start by saying how cool some of the new C# features are. For those of you who aren’t tuned in to the Microsoft Kool-Aid bandwagon, C# is becoming, well, more Lispy (by which I mean is getting language features that will let it sit at the Adult Table next Thanksgiving). Features that C#, along with some other languages (Java, I’m looking at you, you red-headed stepchild of programming languages), have been needing.

(more…)

stop crapping on C++

Thursday, June 28th, 2007

I happened upon this article, about the double-casting anti-pattern in C#, and I couldn’t help but notice the little pot-shots taken at C++ (and Delphi), to the point that people who exhibit use of this anti-pattern probably came from those weakly-typed languages.

(more…)


Creative Commons License
This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 2.5 License.