The future of programming

This is an interesting time to be in the world of computers. The web is becoming more and more to everyday computing for the average user. Applications are moving off the PC and onto the web. Hardware is getting faster and faster (check this out, 80 cores on 1 chip for less that 100 watts!), and things like Operating Systems are beginning to take a back seat in the grand scheme of things.

With all of these changes coming around, I’m thinking that in the near future we programmers are going to have to start changing how we write our programs. We can no longer depend on gigahertz increases to drive the software faster. A point has been reached where the software needs to step up and be more efficient and utilize the new hardware more effectively.

Along those lines, I ran across this very cool article today: Functional Programming For The Rest of Us

Its a really good overview of functional programming and its many advantages (concurrency, etc.). With a lot of attention being placed on “functional” features in languages like Ruby, Haskell, Python, etc. this article is a good primer on what functional programming can do for you.

Loose code and other projects

I’ve got a bunch of little programs running around, and I decided to put them up all in one place for everyone who’s interested. (Some of them used to be on my old Geocities page, some I’ve just had hanging around on my heard drive.) They are mostly python scripts, and they do a lot of different things. The project page is located here at the Iron Bound Software code repository.

There’s a quick summary of what’s in the SVN repository after the jump. This is the same description that is on the front page. Thanks to Google for the awesome project space!

Continue reading →

Technorati skipping smaller blogs?

I’ve been reading The MineThatData Blog for a few weeks now, and the other day there was an interesting article about understanding the traffic that a website receives. The article talked about using sites like Alexa, Blog Juice, Bloglines, and Technorati to measure a site’s popularity.

Overall it seems like a good approach to aggregate this data together to get the “big picture” of where one’s website stands in the web. I’ve tried this but I’ve noticed that Technorati doesn’t seem to report the numbers I expect it would.

For example: I got a link to my blog from Hip Egg a few weeks ago, and this link has not been reported on Technorati. I know this blog is small potatoes in the grand scope of the universe, but it strikes me as odd that my more recent updates are featured in my “favorites” (as is Hip Egg’s posts), yet the link from him hasn’t shown up.

My working assumption is that Technorati has some kind of filter where lower popularity sites aren’t “updated” as often as the bigger sites. Either that or the link database is broken. But links for other sites seem to be working, although I’m not watching them as closely as I watch my own stats. :)
At any rate I wonder how many other blogs (or sites in general) are suffering from this problem. Metrics for websites are difficult to agree on, so a site or sites where a reputation can be established and measured becomes more and more important. Aggregating data from multiple sites is a good start, but if there are too many “issues” with how a site is ranked, then the data becomes suspect and it becomes harder to get a clear picture of what’s going on.

An open letter to the producers of Stargate

Today on Gateworld we received news about two Stargate movies that are in the works. As a huge fan of Stargate, I am most excited to hear that the adventure will continue in some form with the characters I and many others have grown to love over the years.

However, I must admit that my heart sank when I read the details of the second movie. To the rumored director (Martin Wood) and writer (Brad Wright) of this movie I saw this: Please, no more time travel.

Time travel is one of the most abused plot devices in Science Fiction today. While at first it seemed like an interesting way to introduce “what-if” scenarios into a story, the over use of it has led to complications that eventually degrade the quality of the series that it is used in.

For example: Star Trek has used time travel many, many times over the various movies and series. More times than not, it has been used to “fix” a problem that has been introduced such as bringing back popular characters, or some other contrived situation (i.e. the writers of Star Trek: Voyager using time travel to help the crew get home in the series finale).

The use of time travel became such a crutch that the writers/producers of Star Trek: Enterprise  wound up introducing time travel (and time shifting bad guys) in the series premier of the show. As soon as I heard the words (and I paraphrase) “they come not from where, but from when” I shut off my TV. I tried to watch a few more episodes, but the venom of “time travel” had already circulated into the very lifeblood of the show rendering it uninteresting and unwatchable to me. Why would I want to invest my time and interest into something that could very well change next week based on the whims of what the writers want bring back or fix?

Some people claim that using time travel in Sci-Fi is a mark of sophistication and it shows that the writers and the audience are “smart” because they are able to follow the intricate web that is spun. For some shows (Dr. Who) I would agree that this is true, but for most shows, movies, stories, games, etc. I will simply call “bullshit” and say that it is the equivalent of the writers/producers reserving the right to revise thier works (George Lucas, I’m looking at you).

Stargate (both SG-1 and Atlantis) have walked a fine line when it comes to time travel. Wormholes are a manipulation of the very fabric of time-space so it is conceivable that time travel of some type could happen as was seen in episodes like “1969″, “2010″ and “2001″. Other episodes such as “Before I Sleep” and “Moebius” were stretching and straining their credibility with their particular usage of time travel (i.e. “we need a ZPM, hey let’s travel back in time and steal one from an enemy we killed a long time ago!”).

The amazing talents that have come together to bring Stargate to life are better than this. The writers, the directors, the actors, the props and special effects departments, and everyone else involved have created so many episodes of both show that are head and shoulders better than the typical TV fare. Especially in the Sci-Fi realm. It would be a shame to tarnish that proud tradition at the end of one of TV’s most enduring shows. From the beginning, Stargate has been about exploration of new worlds, much like the original Star Trek. Please don’t let it end the same way that Star Trek has.
Though I am confident the Stargate universe will not come to halt if a movie centered on time travelling is created and released, I think things would be better if it never happened in the first place. Obviously if time travel were possible this letter would be a moot point. :)
In all seriousness, please reconsider any plans that are on the table for the use of time travel. There are so many other avenues in the Stargate universe that can be explored that would leave the fans feeling much more fulfilled (and possibly leading to future spin-off opportunities). A few examples would be: Contact with the Nox, a story about a mission that goes horribly wrong, or a story that focuses on the war for a planet other than Earth (such as “Lost City” focused on Aybdos).

In closing, Stargate is an engaging, delightful show of the highest caliber. Please, don’t bring any more time travel into it. There is a reason that butterflies are kept under glass, some things are perfect the way they are and just shouldn’t by touched.

Linux becoming the new Windows

My jaw hit the floor today when I read this: OpenOffice gets pre-load, update notification . I’m all for applications running/loading faster, but not pre-loading apps is one of the main things I like about about non-Windows operating systems. It looks like the bloating of Linux continues, which is a shame. (Yes, there are distro’s that are fighting this, but they don’t get enough press like the big guys do.)

Repeat after me: small, light, tight.

Graphing eBay users to find fraud

Here’s an interesting article about data mining and auction fraud.

Graphs, and what you can do with them, never ceases to amaze me. The article talks about how looking at the relationships between users on eBay can help uncover fraud and the accomplices that help keep it going. They do this by seeing if the relationship between groups of users turns into a biparte graph. That is, there is a concentration of links between two groups of users, and few links with other users.

The links between users refers to the “feedback scores” that eBay users use to determine a user’s trustworthiness. Usually, when someone begins ripping others off, they get bad feedback until it reaches a point where no one will do business with them. This is the way that community sites commonly work (i.e. letting the population of users determine each other’s rankings). The issue is that sometimes there are people lurking in the shadows assisting the fraudster, but because they are never the target of the bad feedback, they are able to keep going supporting new fraudsters (i.e. a new user id).

This setup allows a scammer to setup a new user id and get its feedback levels boosted quickly without having to engage in a lot of “legitimate” transactions. Think of it as passing a baton in a relay race: Instead of one person running a mile, why not let several people sprint as fast as they can for a quarter-mile and then hand off to someone “fresh”.

Think about it: When was the last time you checked someone’s feedback ratings on eBay? Probably right before your last purchase/bid. But, when was the last time you checked the people who gave the feedback to see what their reputation was? Probably never. I know I had never thought of this before reading the article.

This technique produces a graphical representation of this relationship which stands out quickly to a user. (Also, as side note, there are mathematical formulas that would/should see this also.) A normal user would probably have a relationship graph (over 2 or more degrees) that looks like a star-burst pattern. A potential scammer would show up in a clustered bipartite graph. This would give the community of users (eBay bidders) a powerful tool to determine who is the real deal and who is trying to give them a wooden nickel. Very cool stuff. Graph theory to the rescue!

Your Cocoa/XCode tip of the day

When working with a Cocoa project (in XCode), if you decide to add a .cpp file (and it’s .h file) to the project you might notice a problem when building. I banged my head into this for about an hour before figuring it out.

When I added the file(s), I did so by clicking on “New” and selecting a C++ file under “BSD” because it was the first option that I saw. It turns out when you do this, the Cocoa project settings will attempt to compile the files as Objective-C files (which they are not). This results in cryptic messages about a “parse error before” in you .h file.

The solution is to right click on the .cpp file, select info, then change the file type to “sourcecode.cpp.objcpp”. This tells XCode to use the Objective-C++ compiler to build the files, and from then on everything *seemed* to work ok. I’ve never worked with Objective-C (or Obj-C++), so I’m figuring this out as I go. If something bad seems to happen, I’ll post a follow up to let everyone know.

Penny Stock analysis

The stock market is one of those things that really intrigues me. An open system where everyone can see what’s going on, perhaps make some money, and perhaps influence the direction of the stock. Its a system that is ripe for data mining, something that seems to be equal parts analytical skill, part fortune teller, part industry expert, and often times being plain lucky.

I’ve talked with Hip Egg and Jym Khana about stocks before and one topic that I bring up every now and then are penny stocks. As I’m sure most people with an email account know, there’s a ton of stock related spam going around these days. Most of it appears to be the pump-and-dump variety in which the scammers hope that people will purchase the suggested stock causing the price to rise so that they can sell their shares (that they purchased before sending out the email) at an inflated price. This technique has been around for ever, but it seems to the flavor of the month for scam and con artists.

The main questions that we usually talk about are a)Does any one actually get rich doing this? and b)Just how “influence-able” are these low priced stocks? Well, today has been a banner day for answers, I came across two articles talking about the scams:

While reading these I saw the simplest idea yet to help stop those spams: Simply watch the stocks and see who bought a lot of stock before the email was sent, and who sold a lot right around the sell date in the email.

That idea is pure genius. It targets a potentially large group of people, but the probabilities are that a pattern will emerge that a small group of people are moving from one stock to another. At a minimum those groups would be a starting point for a fraud investigation. More than likely, those would be the people responsible for sending out the emails. And since the spammers are kind enough to send these messages to just about everyone on the planet, it shouldn’t take too long to gather a nice body of evidence (or actionable intelligence). From what I understand in the past scams like this have been hard to track because the scammers can move quickly. But now that they are announcing their moves in advance, it should be pretty easy to set up a system to monitor spams, then watch the stock activity… It just seems so simple, that it should work like a champ!

One person vs. Traffic Waves

Thanks to reddit, I read this article today about how one person can change traffic waves. This is a topic I wind up thinking about a lot as I sit in traffic. Compared to most people (if you believe the news reports), my commute isn’t too terribly bad (i.e. mine is less than 30 minutes most days), but reading this article did make me think.

Traffic waves are what happens when there is a slow down for some reason in the flow of traffic. The cause could be an accident, a glare from the sun that blinds people, or just about anything that causes traffic to slow down. As people slow down, the drivers behind them also have to slow down. As the first drivers pass the “distraction” that caused them to slow down, they begin to speed up. But this speed up does not get propagated to the other drivers right away, so the drivers further back in the pack are still going slow (and thus causing the drivers behind them to slow down). The result is a “standing wave” where the cars slow down. As long as there are more cars heading to wave, the wave will persist (assuming the original distraction is gone), once the rate of cars coming towards the wave slows, the wave breaks down and disappears.

Anyways… The article has an interesting idea of using Police patrol cars to help break up the wave by having them in the traffic (several miles before the slowdown) driving at a “slower” speed than the normal traffic flow. Because people are not likely to drive fast past a cop, this effectively slows the rate of cars flowing into the wave, which helps to break it up. Its a really interesting idea, and I think it could really work.

One thing that I’m not so sure about is the authors assertion that he could affect the same thing by driving at a steady rate (i.e. avoiding stop-and-go and trying to keep a good buffer distance between himself and the car in front of him). His idea is that once he does this it encourages the drivers behind him to do the same thing. I’m not sure I agree with this, I see a lot of impatient drivers on a daily basis. Maybe its just here in Atlanta, but if there’s a half a car length in front of you, and your lane is moving, someone is going to try and get in there.

Having said that, I do like the spirit of the idea and I’m going to try it out next week as I drive in traffic. Who knows, maybe a few other people will read that article and try the same thing. Anything that keeps the traffic moving is a good thing in my book.

Asynchronous events, programming, and real life

I saw this really great article about how Starbucks is a good model of asynchronous activities.

Its a really good correlation between programing and a “real-life” activity that I’ve seen recently. A lot of topics in computer science and programming are difficult to talk about with people outside of the industry (i.e. my wife gets bored if I talk shop). But at the same time, there’s a lot of parallels between real life and programming, it just finding the good examples that is hard to do.

Parallel processing is another one of those topics. Its one of those things that if you understand the principals of it, you will see examples of it in day-to-day life all the time. When doing laundry, you don’t wait for one load to completely dry before starting the next, you start the next load in the wash as soon as the first one is out! When making a lot of sandwiches, it is better to work in an assembly line fashion where one person puts on the mayo, another adds the meat, someone does the mustard, and someone puts the cheese on. In some cases, splitting up the job up lets you get it done faster. Its interesting that these real world events can be be modeled/explained with the mathematics of programming.