Tuesday, December 29, 2009

NeoCubes: Best. Toy. Ever.

When I find something I like, I tell people about it. When I get payed for every person I convince to buy that something, I tell more people about it. For those two reasons, I want to tell you about NeoCubes, my new favorite time-wasting toy.

Each batch of NeoCubes includes 224 neodynium BBs and a faux velvet pouch. It's shockingly easy to lose track of time when you're playing with these addictive spheres. You can form them into anything: bands and rings, geometric shapes, flat patterns, or complex models. I've built a new model each time I've pulled them out of my pocket, and I'm not even close to the end of my creativity.

Here are a few of the models I built:

Eight-pointed star

Eight-pointed star

Four-pointed star

Four-pointed star

Truncated octahedron

Truncated octahedron

Truncated tetrahedron

Truncated tetrahedron

Large bomb

Large NeoCube bomb

Metal chu (my favorite)

Metal chu

I'm not the only one who enjoys them, either. After Christmas, I let a couple of my family members play with my set of 'cubes. Big mistake. After only a couple of minutes, even a close cousin would begin hunching over his 'cubes, casting suspicious glances at me, and mumbling to himself. Everybody came up with their own use for the NeoCubes: a cousin about my age used them to fashion herself bracelets and earings, but two younger cousins experimented with the interaction of rings of magnets on a smooth table. Even my seventy-nine-year-old grandfather enjoyed manipulating them with his fingers.

I carry my NeoCubes with me everywhere, pulling them out when my fingers become restless or when some metallic objects must be stuck together. Being a geek, both of these scenarios happen quite often.

You can buy a set of 224 NeoCubes for only $20 at Amazon. Compare that to about $70 if you purchase spherical magnets in bulk (I did). Buy some for you, your geeky friends, and everybody else you know and make me a rich man! If you're still not convinced, check out the demonstration video for the competing Buckyballs, but don't be fooled by the slick packaging and marketing. NeoCubes came out two years earlier, and they're $10 cheaper.

Saturday, December 5, 2009

Playing with SVG and Javascript

As a fan of ActionScript 3, Flash's vector-drawing scripting language, I've always been interested in the SVG standard. However, now that it's actually available to most of the web-browsing population, I have an excuse to learn more about it. I had stopped programming in AS3 because of the closed nature of the platform, its instability on Linux, and my inability to develop AS3 on Linux. However, I can now play with vector-drawing once again, thanks to the widespread adoption of SVG.

Anyway, this post is just a heads-up: I'm fiddling with SVG-scripting with Javascript, and I plan to write a tutorial about it soon. Thus far, I haven't found a basic tutorial on integrating HTML, SVG, and Javasript, and I hope my tutorial will remedy this perceived shortage. Of course, the tutorial is really just an excuse to play with Javascript and SVG, but I will continue to delude myself with words of altruism and selflessness. Helping people, that's what I'm doing...

Sunday, November 15, 2009

Origami accordion toys

One of my favorite ways to burn time is folding complex origami accordion patterns. I just uploaded an album of these paper accordions, and I've listed the different types of patterns below. I might make a tutorial on how to fold one if somebody asks nicely.

Expanded diagonal compound v-shaped

Expanded diagonal v-shaped origami accordion top
Top view

Expanded diagonal v-shaped origami accordion bottom
Bottom view

This pattern is a more complex version of the classic v-shaped accordion pattern.

Deep accordion

Deep origami accordion top
Top view

Deep origami accordion bottom
Bottom view

Deep origami accordion curled
Curled

This is probably my favorite pattern of all time; it's an incredibly time-consuming way to turn a piece of paper into a mesmerizing paper toy. It requires folding and pleating in three dimensions simultaneously.

Collapsed triangle base

Collapsed triangle base origami accordion top view
Top view

Collapsed triangle base origami accordion bottom view
Bottom view

This is just a weird test pattern I folded with some spare time and a magazine renewal card. It's unique because it doesn't like to flex.

Collapsed diagonal compound v-shaped

Collapsed diagonal v-shaped origami accordion top view
Top view

Collapsed diagonal v-shaped origami accordion bottom view
Bottom view

This one is more complex than the collapsed diagonal compound v-shaped pattern, because it requires an extra pleat for each row.

Collapsed compound v-shaped

Collapsed compound v-shaped origami accordion

This one is the same pattern as the collapsed diagonal compound v-shaped accordion, but it originates from the middle of a side of the paper, instead of the corner. It looks like a snow monster.

That's all the accordion patterns I have folded recently. I know this has nothing to do with technology, but I still don't have the time to work on any serious development projects. With luck, I'll be rejoining the coding community soon.

Update: I just opened an Etsy shop to sell some of the textures you see above. If you want one, visit my shop and buy one before they sell out! Yeah, right...

Saturday, November 7, 2009

A laughable argument against net neutrality

I don't generally stray into political topics, but some issues are too important and relevant to my future and the future of the internet. For example, I believe net neutrality is critical to protecting creative uses of the internet from the internet service providers' meddling. That's why I wrote a general summary of the net neutrality issue a couple weeks ago, and that's why I'm addressing some of net neutrality's critics today.

In the October 30 opinions section of the Wall Street Journal, I read an opinion against net neutrality that is too misguided for me to ignore. Republican senators Orrin Hatch and Jim DeMint wrote the piece, arguing that net neutrality policy will obstruct broadband investment and innovation by letting the government meddle in the affairs of the ISPs. That's simply not true.

I agree with the senators that over-regulation will prevent companies from innovating. The logic is obvious; if a company can't increase its profit by improving its services, it won't improve. However, the current regulation doesn't prevent ISPs from profiting from broadband investment. They are free to changes prices, set usage caps, and even offer higher internet speeds for higher prices. The only way in which the regulations limits ISPs network management options is by preventing them from discriminating against certain types of traffic.

I'm afraid that alarmist arguments like this one about net neutrality are obstructing important discussions on the effects of the regulations and the FCC's proper role in net neutrality enforcement.

Friday, October 30, 2009

Programming is more than pointers and recursion

I apologize for last week's dry and boring post. This isn't a news blog, and it won't become one. I chose that topic because I was desperate to write about something relevant to programmers and the tech community, not because I wanted to write about it. Now I will only write about topics that interest me, topics that I can offer a unique perspective on. I won't become a me-too blogger.

...and now, for the reason you're reading this.

Today, I read a 2005 post from the venerable software-development blog Joel on Software about the problems with colleges teaching Computer Science through Java. I recommend you read the article before this post, but, to summarize, Spolsky says that because Java doesn't emphasize pointers and recursion, it isn't a suitable language through which to teach Computer Science. Here's why he's wrong.

Programming is more than just solving puzzles

First and foremost, I disagree with his view on the purpose of a CS program. He thinks that the goal of a college's CS program should be to weed out the students who aren't smart enough to succeed as programmers. Furthermore, he recommends that pointers and recursion should be taught as soon as possible to scare off the posers. That's poppycock.

The goal of a CS program should be to teach students how to develop high-quality software. Far too many programmers have no idea how to write readable code, much less create a large, functional system with lots of moving parts. Programming is intrinsically difficult, but teaching students only the most arcane and complex parts of the programming discipline scares away many potentially great programmers.

According to Steve McConnell, author of Code Complete, the best programmers are not necessarily the most intelligent, but the most humble. Someone who understands his mental limitations will use every technique available to simplify his code, reducing its complexity and thereby increasing its quality. Complexity is probably the number-one enemy of software quality.

Pointers and recursion aren't intrinsic to programming

All the CS theory and most of the content on pointers and recursion will never be used by the average CS graduate. Spolsky even says so:

Now, I freely admit that programming with pointers is not needed in 90% of the code written today, and in fact, it's downright dangerous in production code. OK. That's fine. And functional programming is just not used much in practice. Agreed.

He then says that these concepts teach students the mental flexibility to view a problem at several levels of abstraction simultaneously. I think this type of "mental flexibility" might account for some of the bad code recent CS graduates write. A graduate's "mental flexibility" could tempt him to demonstrate his new CS skills by writing overly complex code that functions on multiple levels of abstraction. As I said above, intelligence doesn't correlate strongly with a programming success, but ego certainly correlates with failure.

Please don't misunderstand my point. I believe that some of the most difficult areas of programming are the most important (and interesting.) I look forward to learning about recursion and its power. I plan on taking plenty of CS theory classes, learning about even the most esoteric aspects of computer programming. However, I don't think every student would benefit from this type of information. Because these topics aren't necessary to write great applications, I don't think they should be necessary to graduate from a CS program.

This post may, in fact, be completely off-base and unsupported by the facts. However, I've decided to make this blog more personal by sharing more of my opinions and writing about things I care about. I have been worried about writing content that's relevant to my intended audience, but right now, I simply don't spend enough time writing code and playing with my computer to generate a suitable flow of relevant posts. I'm reclaiming this blog as a tool against my personal battle with obscurity.


Edit: I was sorely mistaken. This post is the misguided rant of a readability zealot. See my current position here.

Sunday, October 18, 2009

Net neutrality: Innovation protection or unnecessary regulation

I consider myself a Libertarian on most issues. I'm generally in favor of the government getting out of the way of private innovation. For that reason, I became opposed to net neutrality as soon as I learned that it involved government intervention into the affairs of (arguably) private businesses: the internet service providers.

However, after learning more about the net neutrality issue and reading about the FCC's new net neutrality rules, I have decided to write a brief summary of the issue in favor of net neutrality.

What is net neutrality?

The issue of net neutrality is about the internet service providers' handling of information flowing through the internet. Information is transmitted over the internet in packets of information. ISPs can examine these packets to determine what type of information they are carrying. For example, an ISP can tell whether a user is watching a YouTube video, downloading email, or browsing Amazon.

For the most part, ISPs don't care about what type of information is being transmitted, but that is beginning to change. ISPs have realized that they can reduce the load on their networks by slowing down certain types of packets. This practice makes sense as a way to combat piracy by slowing down illegal traffic, but several ISPs have begun to use it to arbitrarily discriminate against certain types of traffic.

For example, Cox recently decided to make all FTP and P2P traffic slower, ostensibly to increase the speed of its other services. Although this may improve the service to most of its customers, it could be used for more nefarious purposes. For example, data being delivered from its partner's websites could be prioritized, slowing down all other traffic. Cox could even slow down a particular type of data in order to offer the full speed for a higher price.

Net neutrality legislation and policy attempts to stop this practice by forbidding ISPs from discriminating for or against any type of traffic.

Why should the government get involved?

Until recently, I didn't have an adequate answer to this question, so I couldn't justify the expense to the government and ISPs that net neutrality policy would create. I thought that competition between ISPs would prevent any overbearing packet filtering. However, according to Congress' most recent net neutrality bill, "the overwhelming majority of residential consumers subscribe to Internet access service from 1 of only 2 wireline providers: the cable operator or the telephone company." If both of these all-important ISPs decide to moderate your traffic, you won't have any other options.

Who opposes net neutrality?

Two major groups of companies oppose net neutrality for two separate but similar reasons. Most major ISPs providing high-speed internet are opposed to net neutrality because it limits their ability to profit from their high-speed internet services. Not only would net neutrality prevent them from reducing network load by slowing down some types of traffic, but also it would keep them from differentiating themselves from other ISPs by offering extra speed on certain applications. For example, net neutrality would prevent an ISP from making videos stream faster by prioritizing them over other traffic.

In addition, the high-speed wireless ISPs Verizon and AT&T have teamed up to oppose net neutrality on different grounds. Because both operate massive wireless data networks, they want to reserve the right to manage their traffic. They argue that because there is a fundamental limit to how much data can be transmitted through the wireless spectrum, they should be able to reduce the strain on their networks by slowing down high-volume traffic.

The problem with their argument is that packet filtering isn't the only way to limit network traffic. Net neutrality would allow them to limit data usage by setting customer data limits or reducing the speed of all traffic. The only thing the plan prevents is slowing down packets based on the information they contain.

What can I do?

Contact your congressman in support of H.R.3458, the Internet Freedom Preservation Act of 2009 and the FCC's recent action on net neutrality. The second point is important because some congressmen believe the FCC has overstepped its boundaries by declaring net neutrality rules while the House of Representatives was debating the issue. The FCC's rules will accelerate the enforcement of net neutrality, and that can't happen soon enough.

Monday, September 28, 2009

Harnessing spam bots for cyber warfare

Disclaimer

I have not researched internet criminal law and I won't speculate on the legality of this idea. I'm not advocating any type of internet warfare or vandalism. Don't implement this idea unless you determine that it is completely legal.

Summary

With that disclaimer out of the way, I'd like to explain one of my most ambitious and long-planned idea: redirect spam bots to launch a DDoS attack on a website. Even small websites have to guard their forms against bot spam. Why shouldn't this enormous source of resource-wasting power be put to good use?

Background

Spam bots work on the economics of scale. Unscrupulous companies and criminal organizations pay spammers to use their servers to crawl the internet, looking for comment forms and public email addresses. When a spam server (or bot) finds a web form, it fills it out with a mix of garbage and spam links and moves on. If the data is posted on the website in some way (blog comment, forum posting, wiki entry), the bot has succeeded in exposing the link to more people. If even a minute percentage of the people who see the link click on it, the hiring organization can make money by infecting the unwary user's computer with malware and selling his personal information.

However, if the spam is detected by any part of the system, it is blocked and the bot has failed. Unfortunately, it has still consumed the bandwidth and computing power of the victim web server. In addition, the victim server's organization has to use its resources to harden its website against spam bots. On a low-traffic website, the spam bot traffic is negligible, but on larger sites, the cost of spam bots is significant. One only needs to examine the measures taken against bot spam to realize its power: reCaptcha, image rotation tests, and a few more esoteric schemes. Despite all these barriers, spammers can make money with spam bots.

Plan of action

Why should all those spam bot processing cycles be used for nefarious purposes? Right now, when a website detects a spam bot, it has several options: it can block the IP address of the bot, preventing the bot from coming back; it can simply reroute the bot to a dead-end page; or it can attempt to waste the spam bot's processing cycles by rerouting the bot to a bot trap. Typically, bot traps work by enticing the bot to fill out a never-ending line of forms or follow a web of garbage links.

What if this stream of spam bots was instead pointed at link farms or phishing sites? Web forms could reroute the spam bots they detect to a spam bot portal site that would reroute the spam bots to known nefarious sites. If a significant number of websites used the portal as a bot trap, the effect on the nefarious sites could be devastating. The spurious sites would be crushed by the traffic from their own advertising bots.

Eventually, the portal site could be automated to find and destroy targets on its own. It could pick its targets from the list of sites ejected from Google's index for phishing or link farming. Once it had chosen a site, it would redirect its traffic to that site, checking each minute to see if the site was still functioning. Perhaps it could crush multiple sites simultaneously by evaluating their stability and pointing just enough traffic at each to overwhelm it.

Obviously, this idea would be far more difficult to implement than to describe. How would the portal handle the massive amounts of traffic? Who would want to shoulder the cost of this plan? How would the predator portal get the list of sites rejected from Google's index?

Do you think this plan is viable?

Sunday, September 20, 2009

Scribblenauts: Accomplishment and potential

Although Scribblenauts is a terrifically fun and shockingly innovative game, its concept is even more compelling than its gameplay. Scribblenauts is a new game for the Nintendo DS in which you solve puzzles by summoning and using items. If your goal is encased in a block of ice, you could break the ice with a hammer, melt it with a flamethrower, or detonate it with a grenade. The game's hook is that you can summon almost any item imaginable.

Hidden machinery

Of course, the game is phenomenal, but the technology behind it is even more impressive. 5th Cell, the developers of Scribblenauts, managed to cram tens of thousands of interactive, animated characters and items on a tiny DS cartridge. On top of the actual pictures, they programmed in complex interactions between the items. For example, a toaster will turn bread into toast; monsters scare and attack people; cops shoot criminals and chase donuts; and beavers gnaw down trees. This game's backend is completely unprecedented.

Unlimited Possibilities

Imagine if the contents of the Scribblenauts asset database were accessible to all game developers. Designing a traditional game would be a breeze: lay out a level, populate it with items and characters, and show the player an objective. However, giving developers (and players) instantaneous access to a massive library of items would create entirely new gaming possibilities. An RPG could allow players to equip their teams with typical household items with different strengths and weaknesses. A point-and-click adventure could use the sprites and interactions to let the player pick up literally any item in a room and use it in the game. A platformer could use the vast selection of items and characters to make each level a unique experience. A universal resource database could fundamentally change process of creating and playing games.

Making the concept a reality

Thinking about the possibilities if the Scribblenauts database was open is entertaining but unproductive. In order to give developers and users the power of instant item creation, steps must be taken.

  1. A lightweight format for interactively animated sprites must be established. Whether it's a particular arrangement of sprites on a sheet or an XML dialect for defining how a character's parts fit together and interact, there must be a standard for people to follow.
  2. A central database must be created to systematically store and retrieve the standardized sprites. It must be easy for people to contribute, but impossible for someone to damage or corrupt. The sprites and their interactions must be version-controlled.
  3. Developers must have access to the database from their games. Web-based technologies could access the database directly, but pc-based games should be able to use a copy of the database. It could be optimized and compressed, or developers could simply "check out" the portion of the database they intend to use. Perhaps, when a game using the entire database is started, it could check to see if any new items have been added to the database.

Conclusion

The game Scribblenauts is an enormous accomplishment, but it could be so much more. The technology behind Scribblenauts could revolutionize the resource management of game development, tearing down barriers for both designers and developers to create experiences. Nevertheless, in order for that to happen, 5th Cell must release the Scribblenauts' resource database for non-commercial use, or the independent developer community must unite to create their own asset database.

If you'd like to support the developers of Scribblenauts (and me), you can buy Scribblenauts for yourself.

Thursday, August 27, 2009

Adobe, Flash is unsustainable

Flash doesn't work well on Linux. It's a well-known fact in both the Flash-development and Linux communities. When I try to load a Flash-based video in Firefox 3.1 on Ubuntu, the video has about a fifty-percent chance of working and a twenty-five-percent chance of freezing my browser. Any games I attempt to play are likely to never load, and the ones that load are likely to run slowly, look ugly, or freeze.

Not just Linux users are experiencing these problems. As Flash increases its compatibility and pervasiveness, backlash against its instability and slowness grows. Here's an excerpt from Engadget's review of HTC's new Flash-compatible smartphone:

Unfortunately, in our testing, we found the inclusion actually hurts operation of the phone more than it helps. When browsing to a site heavy on Flash (there are many), the browser loading times were abysmal. Furthermore, trying to view videos in-window produced choppy, nearly unwatchable results. You may have a better experience with lighter kinds of content, but in our opinion the main reason to introduce Flash into a mobile environment is to allow for broader media viewing options, and in the current state of this Flash player, you're not really going to get much mileage out of it.

The push against Flash can also be seen in PC market. Savvy users, tired of Flash slowing their browser and displaying obnoxious ads, are saying no to the Flash plug-in. Cutting-edge web developers, taking advantage of the major advancements in browser technology, are abandoning Flash in favor of embedded fonts and slick Javascript animations that are now compatible with modern browsers.

Adobe could repair these problems with more time or more money, but it has neither. If Adobe slows development on new Flash versions to focus on increasing its compatibility and stability, Microsoft's Silverlight will gain ground with new features. Adobe simply doesn't have enough money and resources to ensure good performance across the numerous platforms to which Flash is spreading.

I only see one way for Adobe to ensure acceptable performance on all platforms while expanding Flash's reach: release the Flash Player and compiler source code under an open-source license. Open-sourcing Flash would benefit Adobe in three ways:

  1. The cost to maintain Flash would go down. The developer community would help to identify and patch bugs, freeing up Adobe's Flash developers to work on the next version.
  2. Flash's performance and stability would improve. Many people would report bugs and contribute patches, and a few developers would spend hundreds of hours fixing Flash problems and making improvements. Additionally, users on non-major platforms such as Linux distros and smartphone OSs would help to test Flash more thoroughly.
  3. More people would use Flash and more people would develop Flash apps. Developers know that open-source projects are more long-lasting than proprietary platforms. Even if Adobe goes away, Flash will remain a viable platforms for interactive web apps. More users would trust the stability and security of Flash if they knew that thousands of people were working to make Flash stable and secure.

Adobe, Flash is too expensive to be maintained and developed by a single company. If you truly want Flash to be the universal platforms for highly-interactive web apps, you'll give it to its rightful owners: the users.

I'm not the first one to suggest that Adobe should release the Flash source code. See this open letter to Adobe for another take on the matter.

Friday, August 21, 2009

Help people regain speech

Every year, thousands of people around the world lose their ability to speak. Some are struck dumb by strokes, while others' voices are stolen by degenerative diseases such as ALS or muscular dystrophy. These people can regain their ability to communicate by using speech augmentation software or devices to speak for them. Unfortunately, the obscene prices of both the software and hardware prevent many people from communicating.

I want to solve this problem by developing an open-source speech-augmentation program. My goal is to create a cross-platform speaking program with both a symbol-based and text-based interface. I plan to write the program in Python with an emphasis on flexibility and extensibility. I plan to abstract both the input and output interfaces, allowing the program to be independent of both its text-to-speech engine and its GUI framework.

Consider this post a project announcement and a call to action. If you'd like to help people regain the ability to speak and you have experience with Python, interface design, text-to-speech, or accessibility, send me an email. I need all the help I can get.

Thursday, August 20, 2009

Pygame2 example game finished

Early this summer, when my Google Summer of Code proposal to the Pygame project was rejected, I told the coordinator that I would nonetheless contribute to the project over the summer. I planned on writing examples and tutorials for the Pygame2 multimedia library. Unfortunately, events conspired to prevent me from writing the examples. I had tremendous difficulty installing Pygame2 properly and no time to find the problems: I finally overcame my installation problems only two weeks ago.

Composite screenshot of all four skins Four graphical skins for your gaming pleasure!

However, I spent a great deal of time over the last week writing my first example for Pygame2. It's based on the oldalien.py demo distributed with the original Pygame, but I greatly expanded its scope. I tried to demonstrate as much of the library as I could, but I ended up using only a sliver of the library's functionality. The finished example demonstrates Surface handling, vector drawing with pygame2.sdlext.draw, text rendering with pygame2.sdlttf, image loading with pygame2.sdlimage, and sound effects with pygame2.sdlmixer. It's not an exhaustive demonstration of those concepts, but I think it's a good starting point for exploration of the library.

In addition to showing off the Pygame2 library, I tried to demonstrate best practices. I encapsulated the object instantiation and sprite drawing in external factories, allowing users with incomplete installations of Pygame2 to still see parts of the example. I only have to switch factories to drastically change the look of the game. Most importantly, I expunged the global variables from all the classes. The game still uses a couple long-life variables, but I eliminated the unnecessary ones.

If you'd like to see my uber-example in action, you can get it from its SVN repository or download it as a .tar.gz archive. If you have any trouble with the game, let me know.

Friday, August 14, 2009

Need app developers? Give them respect.

According to Engadget, both Microsoft and Sony are attempting to lure iPhone developers away from the platform to develop apps for the Zune HD and the PSPgo, respectively. Allegedly, Sony is just asking developers to convert, but Microsoft is offering cash to defecting developers.

However, I don't anticipate that either of these strategies will attract many high-quality developers. Switching platforms is a major change that requires a great deal of time and effort. More importantly, the developer has to believe that there's a future for the platform.

Nonetheless, I believe that both companies could foster development environments as fertile as the Apple's by dropping development barriers and treating developers with respect.

Break down development barriers

Many great app developers have never written an app. Some don't have the cash to buy Macs and pay $99 to get their developer certificates from Apple. Some don't consider the investment worth the money. Some don't know how to develop an app. Whatever the reason, there is a large pool of potential developers who have never made it over Apple's speed bumps.

Sony and Microsoft need to make it free and easy to develop an app for their platforms. The SDK should be free, open-source, and cross-platform. It should be completely self-contained, but it should also be compatible with a major IDE. It should contain a thorough tutorial that takes the new developer from project creation to final compilation.

When it comes time to publish an app, the developer should pay less than fifty dollars to make the app available for purchase and absolutely nothing from that point on. Developers should be able to set their own prices and the platform should charge < 30%. If an app is free, the developer should not be charged when it is downloaded.

Respect developers

Both Sony and Microsoft should capitalize on the current uproar about Apple's opaque and draconian app screening process by making their app screening as transparent and inclusive as possible. The application rules should be straightforward, comprehensive, and accessible to developers. Before the developer even downloads the SDK, he should be shown a summary of the rules.

Every developer whose app is rejected should receive a thorough and specific explanation. The app reviewer should say which rule the app broke, which part of the app broke the rule, and what can be done to fix the app. If the app store doesn't have the time to write these explanations, it's obviously rejecting too many apps.

Apple's iPhone development environment has its weaknesses, but to focus on luring away its developers with cash would be short-sighted. Sony and Microsoft must build their developer base with App Store cast-offs and new developers before they can offer the massive install base of the App Store. They need more than a just few money-motivated iPhone developers to launch their platforms.

Tuesday, August 11, 2009

Suggested reading for elected officials

Despite the politically charged name of this post, Welcome to Obscurity will remain a non-partisan blog. It just happens that my most recent idea relates to my elected officials.

How many times have you shared an article with your friends or followers? If you're like me, you've probably forwarded plenty of interesting stuff to your social network. On the other hand, how many times have you contacted one of your congressman? I've sent less than ten messages to my elected officials, and I consider myself relatively politically active.

Despite the massive improvement in communications technology, few people bother to communicate with their elected officials. And why should they? One person's suggestion is unlikely even to be considered. It takes a coordinated effort to make an impact on a powerful politician, and few people have the time or resources to gather support.

To solve this problem, I propose a website for people to suggest articles for their elected officials to read. A worried elector could use a website, bookmarklet, or browser extension to mark articles they believe should be read by their elected officials. He could send the article to a specific politician or to every politician responsible to the elector.

The first time an article is suggested to a politician, a page is created for him that contains a link to the article. As more and more articles are suggested, the system sorts the articles by their popularity and specificity. An article's popularity will be based on the number of people who have suggested it. An article's specificity, on the other hand, will be determined by the number of other people to whom the article has been suggested. If a voter suggests an article to every one of his politicians, that article will have a lower specificity than one that he forwarded to a specific politician.

A politician will be able to confirm his identity with the service and respond directly to the suggested articles or subscribe anonymously to the RSS feed of his reading material. The politician could set his suggestions to expire quickly if he has a large volume of them or stay on his page until he responds. Normal people could also subscribe to the RSS feeds of politicians to learn which political articles are popular.

What do you think? Is this idea a potential world-changer or an insignificant pebble thrown against a Mack truck?

Thursday, August 6, 2009

Universal scholarship application

It's hard to get money for college. I thought I had avoided the grab for cash by qualifying for Florida's comprehensive Bright Futures scholarship, but I recently discovered that my scholarship's funding was cut and I'm now liable for more than just the cost of my books. Now I have to devote some of my scarce and precious time to finding and applying to scholarships.

First, I have to find scholarships, sifting through pages of Google results to look for scholarships for which I'm eligible and capable of winning. Once I find some promising scholarships, I have to jump through their hoops, either filling out online forms or printing them out and faxing them in. Each essay prompt is slightly different, so each application requires a few modifications to my standard essay. When I'm done, I've lost several hours of my day to a few scholarships I'm not even sure I'll receive!

I've registered on FastWeb.com, but half of the scholarships are restricted to high school students. The rest are large, national scholarships with big prizes and even bigger requirements. Whether the scholarship requires me to write a detailed essay on a long book or create a high-quality Youtube video, I'll be competing against thousands of students across the country. Unless I'm a genius writer or videographer, I would only be wasting my time and effort on a 1-in-100 shot.

To ease the scholarship application process for students, I propose a government-funded academic-achievement matching system. The network would be a universal platform for all students to get scholarships. The network would be linked to each state's educational database, and each student would claim his information when he became interested in applying for scholarships. Most vital info would be visible from the start, but the student would be able to block certain pieces of information. However, the network would emphasize the positive aspects of students' records over the negative.

If I was a student in this system, all my major info would appear automatically: homeschooled from fourth grade, standardized testing every year, 4.0 college GPA, etc. In addition, I could list my community service hours by simply sending my service acknowledgement letter to the scholarship network office for confirmation. Of course, the office would also confirm things like my family history and SAT and ACT scores.

When an organization wished to offer a scholarship, it would simply set the eligibility requirements and offer the scholarship to whichever students met the requirements best. If a scholarship required a specialized essay or test, the organizations could wait for interested students to apply (each student could see the scholarships available to him) or ask specific groups of students to apply. For example, a company asking for an artsy Youtube drama could invite students who listed "videography" as one of their interests. Any student could apply to any scholarship he was eligible for, but he would have to take the initiative.

Of course, there are a number of pitfalls a project would need to avoid: government bureaucracy, spamming, application padding, and privacy issues. The network would have to be private to protect the students, but it would also need to be accessible to interested organizations without too much red tape. It would be a difficult project, but it could actually save government money. Students who would be eligible for government aid would instead finance their education with private money.

I know there are a hundred problems with this plan, so please point them out in the comments section. Anybody want to check this one out?

Monday, August 3, 2009

Idea Library: Spread Linux by revitalizing slow computers

I create lots of ideas. I'll think up a plan to accomplish a goal or start a business, ponder it for a couple of days, think of a problem with the idea, and move on to the next idea. However, I occasionally develop an idea that stands up to my scrutiny.

Until now, I've summarized these ideas in a Remember the Milk to-do list, planning to implement them myself "after this assignment" or "once I finish this project". However, I've now realized I simply don't have time to work on all of them, so I'm sharing them with you.

I'll publish the ideas here with the tag "idea library" so that you can easily find them. My idea posts won't have the same quality as the rest of my posts, and it's possible that my ideas will be full of glaring oversights or obvious flaws. Nonetheless, I think that some of my ideas have real potential, even if I don't have the time or resources to implement them.

That's why I chose the tag "idea library": I wanted to give other people the chance to use my ideas. If you'd like to implement one, please contact me at [redacted] so that we can discuss terms. Because I won't publish ideas I can execute myself, I will probably give you any published idea you ask for. I'm publishing these ideas not to entertain you but to give you a chance to use them.

My first idea addresses a problem for the open source community: Windows has a stranglehold on the OS market. Far too many people have no idea that they can leave Windows without buying a new computer, and most of the people who are aware of Linux don't have the skill or incentive to install it.

I propose that the Linux community should offer to speed up people's slow, obsolete, or damaged Windows computers by installing Ubuntu (or another desktop-focused Linux distro). People will agree to risk their computers if the computers aren't usable.

A flyer on a bulletin board could promise to redeem old computers by dramatically reducing start-up and loading times, allowing quick web browsing and email access, and eliminating malware of all types. The customer could pay $20 for installation plus $10 for the recovery CD and $40 for data preservation (through dual-booting). Many people would gladly pay $20 to give their old computer another chance at usefulness.

I would charge that little because I need the Linux experience and I'd like to encourage the adoption of Linux.I would also write a quick tutorial to show the new users how to use the essential functions. Ideally, I would convince a computer repair shop to refer customers with hopelessly obsolete computers to me. I don't think this could be a money-making project, but I would enjoy the experience.

Obviously, you don't have to contact me to use this idea, but I would still appreciate a comment if you decide to try it.

Thursday, July 23, 2009

Announcing Project 10^100 Now

Project 10100 Now is an organization I co-founded to bring attention to Google's ridiculous delay of Project 10100. This is the story of how it was started.

It all started with my post about Google's delay of Project 10100. After several days of silence, someone emailed me to ask if I'd like to collaborate on a project to make Google accelerate Project 10100. I liked the idea of calling out Project 10100's delay, but I didn't have the time or the skills to help with his plan. I told him that I wasn't up for such an arduous project, but I'd be glad to write an open letter to Google if he'd publish it.

He agreed to the arrangement, and I got to work. Over the next two weeks, I drafted two open letters, created our website, and started our blog and Facebook group. My collaborator set up the hosting account with his own money, gathered the email addresses and content forms of the major tech blogs, and set up our Twitter feed. In only two weeks, we had prepared to launch a full-scale social media advocacy campaign.

We decided to launch the project on Tuesday the twenty-first, so that the press would have plenty of time to pick up the story before the weekend. We sent out emails to tech blogs, filled out online forms, and followed notable tech commentators on Twitter. So far, we've received only three blog mentions, but I have great expectations.

If you'd like to help, visit Project10tothe100Now.org. We need all the help we can get.

Tuesday, June 30, 2009

New Blogger template released

I'm finally satisfied with the quality of my blog's new style, so I'm releasing it as a Blogger template under the Apache 2.0 license. You can use it on your blog, modify it, or even sell it as long as I get credit.

Features

Here are some of the features of the new Blogger template "Whitespace is good":

  • Two sidebars This fantastic template comes with not one, but two versatile sidebars. You can fill them with as many widgets as you'd like!
  • Blog color manager I've plugged Blogger's color management code into the template, allowing you to modify the colors without changing the underlying CSS. If you want your headings to be purple, you can change them yourself!
  • High readability This template was designed to give your blog a clean, content-focused style. That's why I made the body text a colossal 16 pixels Arial and gave it a generous 30 pixel line height. Even an 80-year-old man looking using an old Eee PC could read from this Blogger template!
  • Easy accessibility What if the 80-year-old is reading from a PDA, you ask? He can scale up the text and the whole page will scale with it! I used all relative measurements in my site's fluid grid, permitting even IE6 users to enlarge the text. I've also added some hidden links at the top to let visitors with screen readers skip to the real content. This template's prepared for any eventuality!

Advanced Features

In addition to enabling the GUI-addicted users to remain in blissful ignorance, I'm giving enlightened users lots of control and convenience when modifying the template.

  • Scripts section For your coding convenience, I've created a special hidden div at the top of the page for you to easily add and remove scripts through the Blogger visual widget manager. I'm using it to hold my Google Analytics tracking code.
  • Strict baseline grid I tried to lay this website out right by following every classical design concept I could. This style tries to stick to a strict 30 pixel grid in its vertical and horizontal positioning. The baseline grid only fails when pictures' heights aren't multiples of 30 pixels and when two different sizes or types of text share a line (eg. monospaced font + standard font).
  • CSS variables I use two Blogger CSS variables that aren't accessible to standard users to give developers the option to change all the heading fonts and all the text fonts together. You can substitute your fonts for the defaults by modifying only two lines.
  • Apache 2.0 license I'm giving you full rights to modify and redistribute this template. You can port it to Wordpress, reuse parts for your personal website, or even sell a website template based off it. I'm not going to stop you.

Download and installation

You can download the "Whitespace is good" Blogger template as a compressed .zip file here. To use it, just copy the contents of the file template.xml into the "Edit HTML" box under "Layout" on the Blogger menu. If you don't have the "Layout" tab, click on the "Template" tab, then click "Customize Design" and pick a new template at random. Now you should be able to follow the instructions above. Note: If you paste the new template into the "Edit HTML" box under the "Template" tab, you won't be able to add widgets and change your the colors of your blog.

If you have any opinion on the new Blogger template or you have any problems with it, simply post a comment below. I'll try to fix any problems that don't have to do with Internet Explorer.

Update: I just fixed a bug in the template. All zero of you to download the template already should upgrade to the new version.

Update: I've added a massive two-column-spanning sidebar above the other two. The template looks just the same as it used to, unless you place a widget in the new section. Notify me of any problems.

Thursday, June 25, 2009

Under construction. Watch for falling debris.

I have been dissatisfied with my blog's layout for a long time, but I've never taken the time to work on it, until now. I present the new grid-based three-column blogger layout "Whitespace is good"! This is an alpha version, so there are plenty of problems to be solved and features to be implemented. I intend on allowing people to modify the text color and formatting through Blogger's layout feature, but I'm not quite there yet.

I'm going to release this template under the Apache 2.0 open source license, but I'm not satisfied with it yet. I still have to test all the major widgets on it, fix a couple of minor layout glitches, and actually allow users to modify the colors and font formatting.

If you don't use IE and you find layout problems with this style, tell me and I might be able to fix them. If you do use IE, this isn't the blog for you.

Monday, June 22, 2009

Wanna feel smart?

Few things give me the boost of solving a difficult puzzle. Whether I've rooted out a logical flaw in one of my scripts or finally grasped an unintuitive programming concept, I always feel best when I've conquered a challenging problem. From now on, anytime I figure out satisfying puzzle, I'll pass it along to you along with my rationale for solving it. If you have a better way, feel free to tell me.

Today, I found a real stumper on my favorite blog, Coding Horror. Jeff Atwood examined a probability conundrum related to the game show "Let's Make a Deal". Here's the setup, according to Jeff's post:

Suppose the contestants on a game show are given the choice of three doors: behind one door is a car; behind the others, goats. After a contestant picks a door, the host, who knows what's behind all the doors, opens one of the unchosen doors, which reveals a goat. He then asks the contestant, "Do you want to switch doors?"

Should the contestant switch doors?

Even though you know that the answer can't be the obvious "It doesn't matter", you probably can't think of any reason that it's not. One of Jeff's links supplied this totally unsatisfying explanation:

When you first selected a door, you had a 1/3 chance of being correct. You knew the host was going to open some other door which did not contain the car, so that doesn't change this probability. Hence, when all is said and done, there is a 1/3 chance that your original selection was correct, and hence a 1/3 chance that you will win by sticking. The remaining probability, 2/3, is the chance you will win by switching.

That explanation didn't assuage my doubts, so I started thinking of the problem in different terms. I finally convinced myself that 2/3 was the right answer by breaking the problem into cases.

In the first case, the car is behind door number one and you decided not to switch. If you chose door number one, you would win, but if you chose door number two or three, you would walk away with a goat.

In the second case, the car is still behind door number one, but you decided to switch no matter what. If you pick door number one and switch, you lose the game. However, if you pick door number two or door number three, you get to drive off in a brand new car.

I don't have the expertise or patience to posit why people tend to make the wrong decision, but I'm satisfied to have figured it out for myself. If I find any more head-scratching logic puzzles, I'll make sure to pass them on. I want you to feel smart, too!

Sunday, May 31, 2009

Support Google's plan to save the earth

In case you haven't noticed, I just put a new widget in my blog's sidebar. I call it the Google Day Counter, and I created it to try to motivate Google to proceed with its charitable contest, Project 10 to the 100. For those who don't want to follow the link, Project 10 to the 100 is a contest Google launched to spend ten million dollars toward ideas that are beneficial to the whole human race. Here was Google's plan: solicit big, earth-saving ideas from normal people, pick the best 100 of those ideas, let normal people vote for the best twenty of those ideas, and spend ten million dollars to launch best few of those twenty ideas. It was a good plan, if a bit un-democratic, but the execution has been problematic.

Google's initial goal was to collect entries until October 20 and announce the 100 finalists on January 27. However, due to the incredibly large number of proposals they received (over 150,000), they had to delay the announcement until March 17. Unfortunately, they had miscalculated again, and the announcement was delayed indefinitely.

The delays mattered to me because I submitted an idea to the contest. My idea was simple: design and develop an open source speech augmentation application for people who can't speak. The application would allow mute people to communicate by clicking on icons or typing in a box on the screen. This software is necessary because the de facto speech augmentation software, Say-it! SAM PC, is far too expensive for many mutes. My plan would ensure that nobody is too poor to communicate with their friends and family.

Because of my submitted proposal, I waited in eager anticipation for March 17, Google Day. When the day finally arrived and the final announcement was delayed indefinitely, I started jokingly measuring the date in relation to Google Day. If I was asked for the date on April 18, I would have responded "April 18, Google Day plus 32." Now that the date has passed Google Day +70, I'm worried that Google has placed Project 10 to the 100 on the back burner and that the project selection could take another six months.

Personally, I believe that that ten million dollars toward big-idea innovation would be most beneficial right now, in the middle of the economic crisis. Thanks to recent deflation, ten million dollars would probably accomplish far more now than six months from now. That's why I've decided to create the Google Day Counter widget and release it to the blogosphere. If you use Blogger to display your opinions to the world, you can add one of the widgets below to show your support.

...but if you use any other blogging system, you can simply cut-and-paste the code below into your sidebar div or *shudder* table cell.

<style type="text/css">
#googledaycounterdiv a {
font-size: 2em;
font-family: Arial, sans;
letter-spacing: -1px;
font-weight: bold;
color: rgb(0, 153, 0) !important;
}
</style>
<script type="text/javascript" language="Javascript">
// addEvent by Scott Andrew LePera
// http://www.scottandrew.com/weblog/articles/cbs-events
function addEvent(elm,evType,fn,useCapture){
 if(elm.addEventListener){
   elm.addEventListener(evType, fn, useCapture);
   return true;
 } else if (elm.attachEvent) {
   var r = elm.attachEvent('on' + evType, fn);
   return r;
 } else {
   elm['on' + evType] = fn;
 }
}
function googleDayCounterInit() {
 var googleDay = new Date('March 17, 2009');
 var today = new Date();
 var elapsed = Math.floor((today.getTime() - googleDay.getTime()) / 86400000);
 var elapsedDiv = document.getElementById('elapsed');
 elapsedDiv.removeChild(elapsedDiv.firstChild);
 elapsedDiv.appendChild(document.createTextNode(elapsed.toString()));
}
addEvent(window, 'load', googleDayCounterInit, false);
</script>
<div id="googledaycounterdiv"><a href="http://project10tothe100.com/">Google Day +<span id='elapsed'>?</span></a></div>

I hope you'll join me in prodding Google to devote its time and money to finally launching Project 10 to the 100.

Thursday, May 28, 2009

Google Summer of Code application tips

I have been meaning to write about my Google Summer of Code experience since I learned of my rejection, but I've only now found the free time to finally do it. For those who haven't heard about it, the Google Summer of Code is a program in which Google pays students $4500 to work on open source projects over the summer. (More info.) I learned about the Google Summer of Code on March 23, the first day that applications were being accepted. For the 28 days until the winners were announced, I devoted my life to perfecting my proposals, socializing with the mentoring organizations, and fantasizing about the immense heft that "GSoC student" would carry on my application to MIT.

Unfortunately, I simply wasn't good enough. I had only about 1.5 years of programming experience (none with open source projects), I was a freshman at Broward College, and I made several mistakes on my applications.

However, although I couldn't affect my programming experience or my enrolled college, I certainly could've improved my applications. Below, I've compiled a list of tips that I picked up from numerous IRC conversations, mailing list posts, and direct emails to mentoring organizations. Learn from my mistakes and net yourself that $4500 next summer!

Think inside the box

Although most of the Google documentation on the Summer of Code implies that each organization's ideas list is simply a loose guideline, you should write your proposal on a project explicitly listed on your target organization's ideas list. Resist the urge to set yourself apart from the crowd by proposing something new and revolutionary. Mentoring organizations carefully choose only the most useful projects to be listed on their ideas lists; you are unlikely to think up a project more important than the ones they chose.

Use all available tools

On the same day that I learned of my rejection, I stumbled across this invaluable resource page for GSoC applicants. It has a categorized list of mentoring organizations, a search engine for mentoring organizations, and tons more useful info. Even if the information isn't updated for GSoC 2010, it should still give you a good starting point in your search for a mentoring organization.

There's no safety in numbers

No canned applications! Sending out several generalized proposals will only waste the time you could be spending on your serious applications. You should use all your available time writing targeted, high-quality applications to specific organizations; spamming twenty organizations with your resume is simply a waste of your time and theirs.

Be professional

Don't crack any jokes unless you personally know the proposal reviewer at your target organization. When I wrote an application to Sunlight Labs in which I included one irrelevant but humorous fact and several corny lines, the proposal reviewer thought that the entire application was a joke. I promptly assured him that my proposal was in fact serious, but the damage was done.

Do the work

Unless you want a quick rejection, you should comply with all of your target organization's application requirements. If they ask you to fix a bug, you should actually fix one of their bugs, not just make a patch that somebody else suggested. If you can't dive headfirst into the development of your organization's project, you should probably find another organization. Nothing will get you rejected faster than an hole in your proposal.

Choose wisely

Only apply to organizations you know something about. Although the temptation is strong to apply to some of the obscure supercomputing or AI organizations, you can be sure that there's a bored Computer Science grad student ready to put your proposal to shame. If an organization doesn't get enough skilled students for their projects, they will return their slots to Google. However, if you apply to work on a small project you think you can handle, but the organization doesn't have enough slots for you, they might get one of the surplus slots from another organization. You have a much greater chance of success when you shoot for a project at your level.

Start now

From what I've seen, the majority of accepted Google Summer of Code students had participated in their organization before they even knew about the GSoC. The best way to increase the probability of your acceptance is to be involved in the organization before you apply to work with them. Organizations want to give their slots to students who will complete their projects over the summer and stick with them after the money stops. There's no better way to prove your commitment than to be committed, so find a project that interests you and jump in.

Sunday, May 10, 2009

Failed to build these modules: binascii zlib

It's very rare that I encounter a computer problem that I can't solve. I thrive on the challenge of rooting out the cause of an obscure error and finally getting my software to run properly. However, I thought I had been defeated by the error in the title of this post.

The trouble started when I tried to install Django on my Ubuntu Intrepid Ibex partition. I was unaware of the convenient apt-get method of installation, so I was going through Django's long list of dependencies, trying to find the initial critical library on which the entire list depended. I thought I had reached the end of the chain with Flup, a WSGI (Web Server Gateway Interface) library for Python. I tried to install it from its Python egg, but it threw several serious errors that indicated that I didn't have the necessary library to "hatch" the egg.

Of course, I found the required library and downloaded it, only to realize that it, too, was contained within a Python egg. The readme file clearly indicated that I could install the software by running a simple command: python [I forgot the name of the file].egg. Every time I tried, it would tell me that zlib wasn't installed and quit.

Of course, I looked up the "missing zlib" error and found some possible solutions. I tried to install the zlib python module from source and tried to download it from the repositories, but nothing would stop the fatal error.

I gave up.

Because my school work started to pick up, I didn't really have time to think about Ubuntu and my installation woes for about a month. The trouble started again as I was preparing for one of my Google Summer of Code proposals. When I attempted to install PGReloaded, an unstable development branch of the PyGame multimedia library, on my Intrepid Ibex partition, I encountered strange error after strange error, and I was completely unable to install the library. I thought that the problem might be related to my installation-from-source procedure, so I tried to install the standard Pygame library through apt-get and play a game that relied on it. The game couldn't find Pygame, even though I had just installed it.

I then remembered that installing Python 2.6 had given me an installation error: "Failed to build these modules: binascii zlib." I realized all my problems were caused by a faulty Python installation. First, I tried to verify the integrity of my Python installation. I checked md5 sums, ran tests, and reinstalled Python 2.6 from source. All the tests failed due to the absence of binascii and zlib. Looking for a fix, I started googling around, this time for Python installation message.

I found only one other instance of my problem in a post on a mailing list; unfortunately, the poster didn't get an answer. I thought that the gurus on the Python Help mailing list might be able to diagnose my problem and find a solution. Unfortunately, I hit a dead end there, too.

Now, the narrative flies off the tracks. If you want to read the whole convoluted tale and you have a taste for debugging narratives, you can take a look at Jaunty Jackalope released: Vista all over again. To summarize, I had to reinstall Intrepid Ibex and destroy all my files after an ill-advised "upgrade" to Jaunty Jackalope. I had to start from scratch.

Researching an entirely different problem, I stumbled across this Python 2.6 on Intrepid Ibex installation guide. Apparently, all my problems were caused by a conflict between the system default Python installation, 2.5, and the newer version, 2.6. I was thrilled to finally have my answer, but I wasn't looking forward to another lengthy, complex Python installation.

In the end, after a little advice from some python gurus, I decided to skip Python 2.6 entirely and stick with good ol' 2.5. This time, PGReloaded installed easily (for an unstable development library), and I don't expect any problems installing Django. I guess the moral of this story is "If a task becomes incredibly difficult, make sure that it's actually worth your time."

Sunday, May 3, 2009

Jaunty Jackalope released; Vista all over again

That's right, I put the release of Ubuntu's Jaunty Jackalope on the same level as Microsoft's launch of Windows Vista. Although Jaunty's release wasn't announced by a troupe of performance artists like Vista, its fanfare-filled launch ensnared many users who were unaware of its development-release instability and widespread incompatibility.

My awareness and rage toward this issue started with a single click. After my package manager had downloaded several updates, I noticed a button above the list of updates encouraging me to upgrade my system to the newest release of Linux. I obliged, just as any inexperienced user would when greeted by a safe, important-looking button.

The enticing Jaunty upgrade button

The installation took two or three hours, and it threw only a single minor error: the incompatible package libphoto (or something like that) wasn't installed. I shut down my system for the night, admiring the cool gradient loading bar before turning off the monitor.

When I booted up the next morning, I chose the newest kernel from the GRUB menu and expected a smooth startup. Instead, I was greeted by a total startup failure. My flashed between a black screen and a black screen with a red bar at the top several times before finally hanging on the glitchy red bar. Every time I tried to boot linux, I would get the same red bar of death followed by a permanent hang. Even if I attempted to fall back to an older version of the kernel, I would get the same result: total failure.

I decided to figure out what had happened and how to fix it, so I fired up Vista (GRUB still worked fine) and asked for help on the official Ubuntu forum. Instead of an explanation and instructions on how to fix my problem, I received this response from an experienced Ubuntu user:

Sorry to hear about your upgrade problems. 9.04 seems to be producing a lot more than its share of such problems (which is why we generally recommend against doing an upgrade).

As to reverting, sorry (again), there's no simple way to do that because an upgrade not only replaces packages it also removes them.

I was shocked. I had often heard tales of the stability of Linux relative to Windows, but now I realized those tales were just myths. I might expect to encounter this problem and response if I was installing Jaunty on an old, obscure, or esoteric system, but I never thought that my 64-bit Intel quad core PC wouldn't be supported by an Ubuntu distribution release.

I then began to notice all the encouragements for Ubuntu users to upgrade to Jaunty Jackalope: Jaunty has a plug on the Ubuntu forum index page, it is the default Ubuntu version for download on Ubuntu.com, and it also has that tantalizing upgrade button on the Package Manager. However, inexperienced users are supposed to ignore all that and instead ask the advice of an experienced Ubuntu user.

I find this incident startlingly similar to Microsoft's often-mocked Vista advertising blitz. Although Vista and Jaunty were unstable and had many incompatibilities, they were both released with much fanfare, enticing naive users to "upgrade" now. I understand that Ubuntu follows a strict six-month release schedule, but the trust of their users should be more important to them than an arbitrary schedule. On the other hand, Ubuntu could have officially released Jaunty but delayed the push for users to upgrade until after the OS was as stable as its predecessor.

I eventually had to destroy my Linux partition (along with all my data) and start again with Intrepid Ibex from my Live CD. After this incident, I might skip the Jaunty upgrade entirely and wait for the next long-term support release; I'm not anxious to "upgrade" Ubuntu again anytime soon.

Sunday, April 26, 2009

Cheap keyword-rich domain names for sale

Yes, I am actually going to try to sell some domain names through my blog. I registered these because my registrar offered a discount when you bought five or more domain names. They're unique domain names with plenty of keywords, but I simply can't use them all. Here's the list:

They're only one hundred dollars each, and they've got plenty of valuable keywords. Why not get one for your web design, programming, or software development business?

Monday, April 6, 2009

Google Trends: A powerful market analysis tool

It's not often that I find something to do that's both educational and incredibly addictive. However, Google Trends fits that description perfectly. I could spend hours scouring the data for market trends and checking the health of websites and industries. Essentially, this free web services gives anyone free access to the market data of the most widely used search engine in the world.

After spending only five minutes gazing at all the pretty graphs, I found an interesting trend. When I looked at the data for "nintendo wii", I noticed that the graph was on a general decreasing trend. I know that the Wii's popularity has steadily increased from its release, so I was puzzled by this result. However, a look at the graph for "wii" showed a more predictable upward trend. I believe that this incongruity between the search terms is caused by the public's increasing awareness of the Wii. As more and more people learn about the Wii, fewer and fewer use its full, formal name. Of course, this conclusion is strictly speculation, but it's an interesting theory, nonetheless.

Google Trends can turn anybody into a market analysis guru with access to possibly the largest consumer interest gauge in existence. You could use this service to pick which field of interest to study in, find the next big web service wave to ride, or pitch your web service to venture capitalists. However, one thing you won't find on Google Trends is this blog. It lives up to its name.

Sunday, April 5, 2009

Social networking for lazy bums

Although I greatly enjoy software development, I don't enjoy researching of social bookmarking site interfaces just to let people share my blog's content. Luckily for me, I found AddThis, an incredibly easy-to-use social bookmark widget that's compatible with more services than I could possibly imagine. It's free to use, but you have to sign up for an account at AddThis.com before you can use it. Fortunately, that free account supposedly grants you access to analytics on who bookmarks your site and how (I haven't tried it out yet).

This free web service is an incredibly easy way to add social bookmarking to your site: I had it set up on my blog in about ten minutes. Now I've got more time to devote to real programming challenges!

Monday, March 23, 2009

DirSlideShow and MultiSlideShow

These two scripts conceal all server-side directory indexing through a JSON interface, allowing you to set the location of the target pictures through the instantiation of one of the slide shows. If you'd like to see how to use DirSlideShow and MultiSlideShow, please check out this no-jargon tutorial.

DirSlideShow

DirSlideShow takes four arguments, which are listed below.

  • newPictureDir:String — The URL of the directory containing the pictures to be displayed.
  • newslideShowID:String — The id of the HTML element to which the slide show (and possibly control buttons) will be appended.
  • newRotateDelay:Number — The time (in milliseconds) until the next picture is displayed automatically. If the user clicks on one of the control buttons, the slide show will stop progressing automatically.
  • newControlButtons:Boolean — A boolean that determines if two buttons are displayed to allow the user can control the progression of the slide show.

Below is DirSlideShow's function signature:


DirSlideShow = function(newPictureDir, newSlideShowID, newRotateDelay, newControlButtons) {

MultiSlideShow

MultiSlideShow takes two arguments:

  • newPictureDir:String — The URL of a directory which contains the picture directories.
  • newContainerID:String — The id of the HTML element to which the thumbnails will be appended.

Below is the function signature of MultiSlideShow:

MultiSlideShow = function(newPictureDir, newContainerID) {

Download

I am releasing the source code of DirSlideShow and MultiSlideShow under the Apache 2.0 license.

DirSlideShow and MultiSlideShow Source Code

Demonstrations

DirSlideShow Demo

MultiSlideShow Demo

Saturday, March 21, 2009

Two Convenient Javascript Slideshows

I've decided to share two of my most useful Javascript "classes": DirSlideShow and MultiSlideShow. These classes encapsulate the necessary server-side directory indexing so that you can use the slide shows through a pure javascript interface. In other words, they're easy to use. If you'd like to see demonstrations of DirSlideShow and MultiSlideShow or download them now to follow along, please visit their project page.

How about a demonstration?

Let's say that you have a bunch of pictures in the folder images/travelpics of your web server, and you'd like to show them off to your visitors. For this task, you should use DirSlideShow. First, you need to link the scripts to the page, like so:

<script type="text/javascript" language="Javascript" src="scripts/Loader.js"> 
</script> 
<script type="text/javascript" language="Javascript" src="scripts/DirSlideShow.js"> 
</script> 
<script type="text/javascript" language="Javascript" src="scripts/ArraySlideShow.js"> 
</script> 
<script type="text/javascript" language="Javascript" src="scripts/addevent.js"> 
</script>

Once you have access to the classes on your page, you need to create a the slide show by passing in the name of the directory that contains the pictures, the HTML element that will contain your slide show, the time between each change of picture, and whether you want the slide show to have controls. It sounds complex, but it's actually very simple:

<script type="text/javascript" language="Javascript"> 
addEvent(window, "load", init, false);
function init() {
var slideShow = new DirSlideShow("images/travelpics", "travelpicsdiv", 5000, true);
}
</script>

As long as you have an element with an id of travelpicsdiv, the script will find it and put a slide show in it containing the pictures of the directory images/travelpics. It's that simple.

What about the other one?

The other script, MultiSlideShow, is more specialized but probably more useful. For this demo, let's assume that you have taken three trips and put the photos in three separate directories: dubai, honolulu, and newyork. Then, you put all three directories into the directory images. Before you could create a MultiSlideShow, you would have to link to the scripts:

<script type="text/javascript" language="Javascript" src="scripts/Loader.js"> 
</script> 
<script type="text/javascript" language="Javascript" src="scripts/MultiSlideShow.js"> 
</script> 
<script type="text/javascript" language="Javascript" src="scripts/ArraySlideShow.js"> 
</script> 
<script type="text/javascript" language="Javascript" src="scripts/addevent.js"> 
</script>

You would now start a MultiSlideShow by passing only two arguments: the name of the enclosing directory, images, and the id of the div to be filled, travelpicsdiv.

<script type="text/javascript" language="Javascript"> 
addEvent(window, "load", init, false);
function init() {
var slideShow = new MultiSlideShow("images/multislideshow", "multislideshowdiv");
}
</script>

Voila! Your div, travelpicsdiv, will now be dynamically populated with the pictures in dubai, honolulu, and newyork. Once again, there's nothing left to do. Almost.

Configuration

The one assumption that these scripts make is the location of the directory-indexing script relative to the page on which the slide show resides. If your page is in the directory www and your scripts are in the directory www/scripts, the setup will work fine right out of the .zip file. However, if you put your html in a directory www/html and your scripts in a directory www/js, you'll need to do a little configuration. Don't worry; it won't hurt a bit.

There are only two variables in one file that need to be configured: dirIndexURL and htmlPageURL, which are both in scripts/Loader.js. dirIndexURL contains the URL of the script dirindex.php relative to the HTML page that contains the slideshow. htmlPageURL contains the URL of the HTML page relative to the script dirindex.php.

Let's go back to our previous example, in which the page resides in www/html and the script resides in www/js. To re-configure the script, you would replace these lines:

// URL of directory-indexing script relative to HTML page
var dirIndexURL = 'scripts/dirindex.php';
 
// URL of HTML page relative to directory-indexing script
var htmlPageURL = '../';
…with these:
// URL of directory-indexing script relative to HTML page
var dirIndexURL = '../js/dirindex.php';
 
// URL of HTML page relative to directory-indexing script
var htmlPageURL = '../html/';
Now, just reset the script tags properly:
<script type="text/javascript" language="Javascript" src="scripts/Loader.js"> 
</script> 
<script type="text/javascript" language="Javascript" src="scripts/DirSlideShow.js"> 
</script> 
<script type="text/javascript" language="Javascript" src="scripts/ArraySlideShow.js"> 
</script> 
<script type="text/javascript" language="Javascript" src="scripts/addevent.js"> 
</script>

…and set the position of the images relative to the HTML page:

<script type="text/javascript" language="Javascript"> 
addEvent(window, "load", init, false);
function init() {
var slideShow = new DirSlideShow("../images/travelpics", "travelpicsdiv", 5000, true);
}
</script>

And you're done!

I know that there are much flashier slide show scripts available for both Javascript and ActionScript with fancy transitions and flashy picture ribbons. Nevertheless, I'm almost certain that few of those scripts are as convenient, robust, and secure as this one. You can find a full description of these classes' features and usage instructions in their project page.

Thursday, March 12, 2009

I love Remember the Milk!

Remember the Milk is a free task-management web application. When you start it up, it presents you with a series of lists on which you can post tasks. You can organize your tasks with priority levels, due dates, and tags or throw 'em in a pile and use the search function to find what you're looking for. The entire service can be operated through the keyboard, which makes adding and managing tasks incredibly quick.

If you would like to have your tasks on all your calendars, you can thanks to RTM's stellar integration with Google Calendar, iGoogle, your Blackberry or Windows Mobile phone, Twitter, or even through a bookmarklet (you remember those, right?)

Probably the most surprising thing about RTM is its general applicability. I didn't think I had much use for a task manager, but now I use it constantly to keep track of my school assignments, my work projects, and whatever ideas I want to save for later. Soon, I plan to write a quick-and-dirty widget to display my list of ideas on this blog.

If you want to organize your life, or you just want to keep all your notes in one place, Remember the Milk is the web application for you. Find it at RememberTheMilk.com.

Thursday, February 5, 2009

WebPattern & ControlPanel

I've finally finished my first visually impressive AS3 project: the WebPattern class. It takes four arrays as arguments: branches, which represents the number of branches originating from each node; branchAngles, which determines the angle between the two farthest branches of a node; branchLengths, which determines the length of the branches originating at a node; and jointWidths, which governs the width of the branches where they connect at a node. If you don't understand my explanation, you can check out a demo.

Here are a couple of warnings before you start fiddling. First, this program is relatively processor intensive, because each new layer of branches dramatically increases processing time. If you want a pattern with five layers, you had better make sure that none of the nodes has more than five branches. This program will kill your computer if you aren't careful.

Second, all of the arrays you pass in as arguments have to be the same length. Otherwise, you'll get silent failure, unless you have the debug Flash plug-in. Also make sure that all of the nodes have at least two branches and none of the other arrays have a zero in them.

WebPattern may be a unique and incredibly fun-to-play-with class, but ControlPanel is a very useful class for demoing classes and apps. That box in the top-right corner that lets you create patterns is an instance of ControlPanel. Creating that panel took only six lines of code: one for instantiation, one for each input field, and one to add it to the stage. It seals away most of the painful interface construction and data management steps.

For example, for this implementation, I had to do only three things to implement the control panel and hook it up to my web pattern drawer. First, I had to construct it:


fields = ['Branches:', 'Branch Angles', 'Branch Lengths:', 'Joint Widths:'];
defaults = ['2, 5, 3','180, 180, 60','50, 50, 50','6, 6, 2']
controlPanel = new ControlPanel('Arial');
for (var i:uint = 0, j:int = fields.length; i < j; i++) {
 controlPanel.addTextInput(fields[i], defaults[i]);
}
addChild(controlPanel);

I only used the arrays to abstract the naming of the fields; you can call it manually if you would like. Next, I added some event listeners:


controlPanel.addEventListener(ControlPanel.SUBMIT, submitListener, false, 0, true);
controlPanel.addEventListener(ControlPanel.CLOSE, closeListener, false, 0, true);

Finally, I created some listening functions. Notice how the submitListener() function only has to retrieve the data from controlPanel with data and access it through the input field names:


private function submitListener(evt:Event):void {
 destroyWebPattern();
 var arguments:Array = [];
 var rawData:Object = controlPanel.data;
 try {
  for (var i:uint = 0, j:int = fields.length; i < j; i++) {
   var fieldData:String = rawData[fields[i]];
   fieldData.replace(' ', '');
   arguments[i] = fieldData.split(',');
  }
  createWebPattern(arguments[0], arguments[1], arguments[2], arguments[3]);
 } catch (e:Error) {
  trace(e);
 }
}
  
private function closeListener(evt:Event):void {
 removeChild(controlPanel);
}

Even if you don't want to analyze that code, the lack of TextField, embedFonts, and defaultFormat should be apparent. Just remember that the ControlPanel relies on embedded fonts; make sure to embed whatever font you'd like it to use and export it for ActionScript.

Check out the demo and the source. I hope you'll have fun with my new toy and new tool.

Monday, January 26, 2009

MediaConverter.org

I consider myself a blogger, so I feel entitled to recommend services I've found useful to my reader(s). The other day, I was trying to embed a video file in a Power Point presentation, but the file was in the wrong format: .avi. I looked around for a free video conversion program, but most looked really shady and full of spyware. On a whim, I searched "online video converter" and stumbled across Media Converter.

Media Converter is a free online tool that lets you upload a video from your hard drive or off the internet, convert it to the format of your choice, and download it to your computer free, without registering. It worked perfectly for my short video, and it didn't take very long, either. I would highly recommend this site to anybody who doesn't want to take a chance on a shady freeware video converter or doesn't have the computer muscle to convert a video. Try it out for yourself at http://www.mediaconverter.org/.

Tuesday, January 20, 2009

Name this Object #1

Well, I've stumbled across another obscure item collecting dust in my bedroom, so it's time for round 2 of Name this Object! I know what this item is, thanks to the obvious label affixed to the side. Unfortunately for you, I've cleverly concealed the label, so you'll have to work with the object's appearance alone. Since I know what this one is, there will be no cash prize, just the recognition that you have some serious internet snooping skills. On to the thingamajig!

Side View:

Back View:

Bottom View:

Front View:

Brief video demonstration: