Monday, October 19, 2009

Is this really telling me something?

I was recently going through the October issue of Discover and tucked away in the back between pages of lame ads is the "September's What is This?" on page 75. It is a visualization of the Bible Chris Harrison at Carnegie Mellon that uses colored arcs to show references between the books of the Bible. It also throws in length in verses for the chapters of the books along the bottom, a secondary viz of sorts.

This is all fine and dandy but I have to ask: What is This? *How appropriate eh? nudge nudge* To be fair, Chris makes it clear that he put together this viz to be "something more beautiful than functional." I'll give him this because a nice rainbow pattern emerges due to the arcs being colored based on distance of the reference. But he then goes on to say "At the same time, we wanted something that honored and revealed the complexity of the data at every level –- as one leans in, smaller details should become visible."

This leads into something I've noticed with visualization in general: in the end all these fancy new ways of representing data aren't really helping me draw any conclusions. The golden oldies are much more effective at the actual goal of visualization: "Visualization is any technique for creating images, diagrams, or animations to communicate a message" (from Wikipedia).

It may be my untrained eye, but this graph is not revealing anything about the complexity of the data. Is it simply that there is a fairly even distribution of long and short arcs? Anyone familiar with the Bible could probably tell you that. What else is going on here to make it worthy of being in Discover? I'm not trying to pick on Chris here, he's just a high profile example of how I mostly feel about the "making graphs" part of the field. Especially while in grad school, I came across many projects that I simply looked at and said "So?"

Just to end on a positive note I think Chris's website design rocks.

Sunday, September 27, 2009

Conundrum of Choice

If you follow the Linux world at all you have seen the same questions asked and topics debated over and over again. Is this the year of the Linux desktop? What is holding Linux back? What's the best way to bring new people into the fold? Can grandma be happy with Linux? All free software or take a more accepting view of proprietary software?

While these are all important discussions I think the most important question discussed is whether there should be a "standard Linux." I've seen people get extremely flamed to Sunday and back for even having the guts to bring this up. But why is there such vitriol against the idea?

I've had family and friends ask me "how do you know all this stuff?" in amazement as I can tell them some way to fix their Windows problem from memory over the phone. How did I learn this stuff? Well, besides having to do it a million times, there is only one way to do it: "Open Explorer, go to Tools, ..."

In Linux this is not the case. At all. Sure, I can tell them to open up a terminal/console and type in some commands but uninformed user shudders at this; clicking buttons is their comfort zone. This leaves Konqueror as the way to do things. Oh wait, it's not just Konqueror. There's Dolphin, Nautilus, Midnight Commander, Thunar, and on and on. What prompted this whole thought process is this editorial at ZDNet that is a rundown of the 10 best Linux file managers.

Even an experienced computer scientist like myself cannot keep track of all the different ways to do something in Linux. This allows for a wealth of customization and allowing you to do things your way, but this is really only a benefit to tech people who, let's be honest, can switch distributions and such as they please. An instance of the flip side for normal users occurred this summer. My students were working in a Linux environment and, though I told them to set KDE as their default, some people who had seen Linux before wanted to use Gnome. I let them, but later when they had problems translating KDE-centric instructions to Gnome I had to shrug and say "I don't know." This is where the "one to rule them all distro" makes sense: avoiding the huge hurdle that new users experience of getting help. Everyone joining the party would be in the same boat, everyday users could give each other tips, online guides would be simplified and they'd never find one for the wrong environment, and techie people would only need to learn the generic way and then whatever way they prefer doing things.

Ah but that would make too much sense. People will continue to bicker for all eternity because they don't want Ubuntu to become the standard over their beloved Fedora (replace those two with any other distros to your pleasing). They'll say it isn't in the spirit of Linux or that it's against free software because this Joe Everyman distro would have to include graphics drivers and media codecs.

Look at the rising popularity of Linux Mint and PCLinuxOS, the two that seem to have gotten the closest to this ideal. New users don't care about our tired and pointless debates, they are worried about practicality and usability. An article about the 10 best file managers isn't going to get their juices flowing like the rest of us.

To satisfy the grognards, isn't the spirit having a distro to suit everyone's needs? This distro-for-everyone would serve the users who don't care about customization and choice, the people coming over from Windows or Mac that are used to being told how they should accomplish something. If we are honest with ourselves these people are not using Linux now, so this new distro probably would not hurt the existing distros that much.

Wednesday, August 12, 2009

Graphing in Python

To begin, let me explain the project briefly: I set out with this project to learn a little more about grabbing data from the web, processing csv/xls, and most importantly graphing in Python. I decided to investigate the question of whether gas and oil prices are tied very closely because we all notice how much gas jumps up and for apparently no reason. For more information about the results see my Sugary Donut blog entry.

What I want to discuss here is Python's graphing capabilities. There are no language features for it, but plenty of people have developed libraries for it. I initially considered cairoplot and matplotlib but dismissed them as being "too big and complicated." I wanted something simple, quick, and without dependent packages. gnuplot got rejected for similar reasons as well as just not looking cool enough (imagine that, an ugly gnu tool *rolls eyes*). I initially started with PyGoogleChart and I immediately hit the problem that the graphs were of limited (re: poor) quality. This made me move onto PyChart, which looked like a well maintained project. I again ran into graphs of small size but also had trouble displaying the data in the way needed. The largest stumbling block was getting the dates to display along the bottom. I found examples of this convoluted solution of associating values with each date (so the values are plotted and the dates become the labels along the axis) on the PyChart website. However, I never really got this to work the way I wanted and it felt like a hack.... the back kind. Thus I gave in and decided to give matplotlib a try and I wish I had chosen it to begin with. It easily handled date data for one of the axes and required no coaxing or hacks to get the graph I needed.

My complaint with matplotlib (as well as the others) is poor documentation. There's no "here's the easy explanation of how to do this stuff." To get the matplotlib stuff finalized I had to dig through FAQs, various examples, and the API documentation just to get a simple graph to look the way I wanted it to. Yuck.

Check out the code

Friday, July 24, 2009

Apple Snags Coveted Market Segment

Daily Tech mentions a Business Insider article that talks about Apple dominating the >$1000 computer market with a whopping 91% market share. I have to say that that percentage is impressive no matter what, but upon further thought it may not be as big a deal as some are making it out to be.

The first thing to note is that it says other makers are "stuck" in the sub-$500 range. In June the average computer price was $701 with PCs averaging $515 and Macs $1400. Because the average of these numbers is nowhere near the given average I'm not sure what they are including in those categories.

Anyway, I would say there are only a few types of PC buyers. Tech people (who could go either way), Mac lovers, and everyone else. "Everyone else" largely buys those cheap PCs for various reasons and Mac people try to steer them into Macland. Thanks largely to the success of the ipod-itunes combo along with the iphone Apple has been gaining a lot of users. But do these people have a choice? Apple doesn't exactly offer a cheap computer, so this for one skews their numbers. Side note to Apple: if OS X is so efficient and stable why not release a cheaper computer with toned down specs and try to gain even more market share? Might as well ride the "Apple is hip" wave while you can. I have a feeling they don't do it because it would cannibalize their high-price (and high-margin) hardware.

The second skewing point is the (probably larger) portion of the "tech people" crowd that opt for a regular PC, which include the gaming crowd. These people generally know their way around inside the computer and, as a result, are more likely to build a computer from scratch and then might upgrade rather than purchase a new one. They can even do this for the "everyone else" category. These numbers don't show up as a PC sale and I believe could make a significant impact on market share percentages, especially because few Apple users upgrade and Apple itself doesn't exactly make it easy.

A little food for thought when considering the market share. But, as I said, impressive for Apple nonetheless, who is on quite a run even in these dark economic times.

Thursday, July 2, 2009

The Minimalist's Assertions

The other day, Linux Today had a news item linking to this site. Yet another blog link of someone shouting at the ether that somehow made the news. Maybe I'm just jealous I don't make the news; that's good though, that means I'm still undiscovered and real. I'm not sure this particular piece should have because the points given are so hackneyed it's not even annoying anymore. It did make me think about the overall philosophy though. Why do the supporters of the minimal distros keep beating the same drum over and over?

The points this guys presents:

1. A slower release cycle.
2. Speed.
3. Stability.
4. Minimalist install.
I'll skip his last point about the brown color scheme because that's too much of a personal opinion thing.

I think his points are valid from a narrow point of view of a technology enthusiast, but my argument is that for the everyday user or even the lazy technologist like myself, these aren't all that important. We want an easy-to-use box that gets out of the way to let us do more important things, like waste time on Gmail.

These are obviously important to the community because, as I said, these points get reiterated every so often, but why? I have to wonder if it is because the new users coming into Linux are not interested in the "hardcore" distros and the people who love them are feeling threatened. Ubuntu, SUSE, PCLinuxOS, and others are all expanding the Linux audience and I am extremely excited about this. I think that the nerd market already knows about Linux and has been using it, so these new users will more and more become, by a large percentage, casual or non-tech people. And this means that Slackware and the like will continue to be pushed to the fringes, which always brings up the problem of irrelevancy over the horizon and exodus of developers/users. Yes, these casual people could eventually desire to learn more and try something like Slack, but let's be honest in the fact that this probably will not happen. Ease of use is number one for a lot of people and I think that's truly the divide between Slack and Ubuntu (and others that fall in each category).

To give a personal anecdote, I've been using Linux for many years now, have a graduate degree in computer science, and generally am patient enough with misbehaving technology to root out the problem and fix it. Twice now I've gotten the gumption to install Arch because I'll be in control. I'll make the decisions. It'll be MY computer. I'll "learn Linux" instead of "learn Ubuntu." But what happens is I get tired of messing with the OS instead of messing with whatever I'm trying to accomplish. I will admit my second go at Arch was much quicker and seemed to have a little more automagical configuration than I remembered from the first install. There is a fine line that Arch (Slack, etc.) take a small step over in pushing things onto the user that should happen automagically because it just doesn't matter. Setting up hardware is the best example I can give here: I don't care how my sound card is configured, just do it so I don't have to figure out that I have to unmute some channel in the command-line alsamixer.

But that's the beauty of Linux distros, there's something for everyone.

Monday, June 15, 2009

You eyeballin' me, snake?

A large part of my summer class at Duke TIP this year involves making games with PyGame. Not having used it before I've been teaching it to myself in preparation for class, so I have been on the site for tutorials and documentation quite a bit. I'll probably post a lot of my thoughts on both teaching with Python and Pygame and Pygame in general as I dig further into my course. For now, I just wanted to say the main snake logo on the top of the PyGame site surprised me yesterday. I noticed that the image is actually animated and the snake's left (the viewer's left, that is) moves every second or so. This "feature" may have been there for quite some time, but this is the first time I noticed it so it caught me off guard and made me smile!

Wednesday, June 10, 2009

Windows7: the right direction?

Lifehacker has an article about some techs that will "Rock Your World" out and one of the items is Windows 7. Note that OS X Snow Leopard is also on the list and the following commentary applies in a general sense.

So I can see how Windows 7 would be a significant improvement over Vista, but is it really world rocking caliber? Is it world rocking because it really is in general or just because Vista was such a flop? Lifehacker's commentary mostly focuses on graphical and UI improvements like the new task bar and multi-touch support. Hmmm, my world is pretty stable at the moment. I can see how these may be "wow the future is here" for someone not in the tech world, but for someone who is in a technological field what is there really here to sink your teeth into? They do mention that it is "faster and smaller" but do not go into much detail. These are the things I want to see improved in a an operating system, not slicker transparency effects (because, really, that's not the operating system!).

Microsoft had some cool stuff lined up for Longhorn/Vista long before release, such as WinFS and Monad (the new command line) but they dropped those in interest of the dreaded user access controls and gimmicky slickness. Also, MS people have shown that Windows can be a small and efficient OS (WinMini was it?), but they're hardly proving themselves with their actual releases. So what has MS really contributed to the world of the operating systems other than frustrating people so much some have moved to other platforms (win for Apple and Linux)?

Thursday, May 28, 2009

KDE teams needs to rethink versioning

They did it with KDE (the desktop) and now they've done it with KOffice: released a product not ready for the public as a new version number. In their defense they have made it clear that the initial "dot oh" release is not meant to be a fully featured or functional product and so is not for end users for both of these packages. But...

This is utter stupidity. I'm not sure how else to describe it. Every other product on the planet uses a new version number to signify a significant update to a product that is stable and an improvement over the old product. The KDE people do not seem to get this system and all it is going to do is confuse users in the end. Yes, power/advanced/guru users can understand this but the intermediate to beginner will not get this at all. If Firefox 4 came out without the ability to manage bookmarks or, in a more direct analogy, if the next MS Office shipped without PowerPoint (to be added later in a patch) NO ONE WOULD USE THESE PRODUCTS.

Come on KDE, just follow the conventions, use betas and release candidates, etc.. You're hurting yourselves and the Linux/open source community at large; confusing your users is not the way to build a community.

Wednesday, May 27, 2009

Great video game wallpapers

Found these somewhere, thought I forget where now. I want to say DFCKR. Anyway, unlike most fan art, these are beautiful paintings of some classic video game scenes. Way to go Orioto!

Thursday, April 23, 2009

PC vs Mac by CNBC OTM

There's a lot flying around the internets about a segment from CNBC's On The Money featuring Jim Goldman, their Silicon Bureau Chief, talking about the true cost of a $699 PC [video link].

I've seen several sites basically saying this guy is an idiot, and I totally agree, but they have not presented the full options and true facts available. The claims of the "true cost of owning a PC versus a Mac" by Jim:
  • Mac has a lot more included that a "stripped down PC" doesn't have
  • He gives a list of things you need to buy to get it to "perform like a Mac"....
  • Norton Anti-virus at $50/yr
  • Multimedia Software at $80-104
  • Photoshop at $140
  • Video Editing at $100
  • Music Software at $100
  • Geek Squad Visit at $140, which is just for diagnosis, not fixing the problem
  • "Intangibles"....
  • Mac laptop 1.2lbs lighter (than what?"
  • Battery life 4x better (than what? HP 2.5hrs Apple 8)
  • "Faster Chip"
  • Higher-res screen
To begin, he apparently stole his talking points from Business Week writer Arik Hesseldahl, whose original article about this is here.

Let's examine these one by one here. I think calling a PC "stripped down" is unfair and he should have defined what exactly he meant. There's also the problem that when the general population thinks of Windows or Mac that they are mostly thinking of things that aren't the actual operating system, but we'll ignore that for now.

Jim puts Norton as $50/yr and asserts that viruses are such a huge problem on PCs and Arik, who gives a 3 year lifespan for the to-be-purchased laptop, tallies this to $150. Why Norton in particular? McAfee and others produce fine AV software. Jim did not do his research in that Norton AV is only $35/yr, it's $50/yr for Norton Internet Security. The need for the IS over AV products is shaky at best because, of course, there are free and/or open-source products out there to cover the offered functionality. For instance PeerGuardian and Spyware Blaster to keep malicious sites and IPs from getting at your computer while there's a whole host of anti-spyware/adware program available such as Spybot or Lavasoft's Ad-Aware. Also there's a nice browser plugin from McAfee called SiteAdvisor that tells you when a site is known to be a malicious as you browse and is available for at least Firefox and IE. And finally, in terms of anti-virus, there's no need to pay for software if you're a home user as there are plenty of free ones out there like Avira Antivir (the one I recommend and use) and AVG. Additionally, though not quite as polished, there is the open source ClamAV. So, total extra cost so far: $0.

Just a side note, since viruses and stability seem to be such strong bullet points for Mac supporters: don't believe all the hype. Macs are not immune to viruses, trojans, etc. as can be seen by the recent botnet that targeted Macs. Security researchers have been proving for some time now that Apple's platform is vulnerable just like Windows, it is just Apple has thus far lacked the market share to warrant much attention from the bad guys. Also, a little user education can go a long way. Since Windows XP came out I have had absolutely 0 problems that weren't solved by a simple reboot and have had no viruses or spyware. Why? Because I'm an educated user, I don't go looking around on fishy (or phishy! har har!) websites, and I'm careful about what I open or install on my Windows computer. To help save yourself from e-mail scams and viruses use webmail like Gmail that has good spam filtering and attachment scanning. Another plus you aren't open to the attacks that only require you to open an e-mail, which have been known to occur with the Microsoft Outlook e-mail client.

Multimedia Software for $80-104. Jim never really gets into what he means here and Arik doesn't really have this as a category. Arik mentions Muvee Reveal for $80 and CyberlinkDVD for $104, so I guess this is where Jim gets his range. However, Muvee Reveal is video editing so should be in that category. That leaves us with "multimedia" meaning DVD software. Many DVDs come with some form of (usually not great) software for free and Windows Media Player will play some DVDs without having to buy a codec. The real winner here is VLC though. It'll play just about any format you throw at it and will play DVDs flawlessly without having to buy or download any codecs like with WMP. Arik also mentions Roxio Creator which has a ton of functionality, as seen by a quick skimming of its features list. I do not see anything here that can't be accomplished with free and/or open source software though. If you can't find the appropriate program that'll do what you need it to instead of buying Roxio send me an e-mail and I can help you [see my page for contact info]. Adding with the last category: $0.

Ahhh Photoshop. The apparent pinnacle of Appledom and bastion of fanbois everywhere. The problem here is that, again, Jim got it wrong. Photoshop does not cost anywhere near $140 (it's $699); that'll get you Elements, which, as Arik points out, is a perfectly reasonable substitution for a home user. Jim plows through this making it sound like a Mac comes with Photoshop, which is dead wrong, and the small bit of functionality he talks about is not photo editing, it's photo management. Arik is much clearer here, saying Photoshop Elements for $140 will give you the photo editing capabilities that iPhoto gives you, but doesn't discuss the photo management portion. So, looking at iPhoto, it is a good product and has some wonderful features. However, I would say most users would be happy with the functionality and super easy usage that Picasa provides for free, in both photo editing and management. If one needs to do some hardcore editing there is always GIMP or GIMPShop (GIMP hacked up to provide a more Photoshop-like interface). Summing again: $0.

Video editing is admittedly my weak point as I've never really gotten into it. Jim claims you need $100 for this but, again, doesn't go into detail. Arik doesn't really discuss this other than the already mentioned Roxio Creator and Muvee Reveal. In about 3 seconds of Googling I found Jashaka which appears to be a pretty slick video editing tool. I'm sure there are others out there too. Seeing a trend? 0$.

Finally $100 for music software. This is the one that really made me laugh. Who has honestly shelled out money for music software any time this millennium? Windows Media Player is free, Winamp is free, and iTunes is free (for both Mac and Windows, though you have to download it for Windows). Where's the $100 coming from? Another fail on Jim's part, $0. Side note: if you want iTunes on Windows but don't want all the extra crap (MobileMe, Bonjour, Apple Updater always wanting you to install Safari, etc.) you can Google "iTunes lite," Lifehacker has mentioned it in the past.

Both guys claim that you're probably going to need a Geek Squad visit and Jim even goes so far as to say Macs "tend not to [break down]." Arik, yet again, is much more accurate in saying that Apple's Genius Bar for diagnosis is free. For both a PC and a Mac you'll have a warranty for actual hardware failures, it's a bit murkier for software stuff you've broken. I'm not going to bother looking up the cost of fixing something at Apple versus Geek Squad but there's going to be cost either way. I will say that a Mac is probably less likely to get messed up by a user, but it is not outside of the realm of possibility. In the end, it's probably all moot because I would bet there's that family member or neighbor or friend that you know that can fix the problem in 10 seconds.

Next Jim mentions iLife being free with a Mac, which is true, but only partially. iLife will come with your Mac, but if you want to upgrade to the latest versions it'll run you $79/yr. Arik even fails to mention this little catch. Whoops. You don't *have* to upgrade, but considering the upgrades for the products I've mentioned are free we'll assume you need two uprades over your 3 year lifespan, so that's $158 ON THE APPLE SIDE. Note that *some* of the free and/or open source projects I mentioned might be able to run on a Mac. One of the things that I'm going to ignore that Arik talks about is GarageBand, a music creation and lessons suite. I can't imagine this being of much use to the average user because most people simply aren't musicians and so won't take putting music together seriously. As far as lessons go, try a book or video from the library or search internet video and sites, there's plenty of resources out there. If you really do need the audio creation stuff try Googling "garageband alternative," seems like there's plenty of options out there.

Though neither mention it, I know MobileMe is popular amongst Apple users for its ability to "Access and manage your email, contacts, calendar, photos, and files at me.com" (from MobileMe's site at Apple). This functionality is currently provided for free from Google (plus extras such as Google Docs) and Microsoft provides similar service for free through its Live service. The Individual package for MobileMe will set you back $99 per year if you want that functionality. There is a free trial, which we'll assume is a year Ibecause I don't want to look it up, so that's another $198 ON THE APPLE SIDE. You could, of course, use the mentioned free services with a Mac. (Gizmodo also noted this lack of MobileMe mention)

Both come down and say that, to get a Mac-equivalent PC you're going to spend $1500 total. From my tallies above I come up with $0 extra so far, leaving the cost at $699. The only things left are the "intangibles." First I'll address Jim's "Faster chip" because I have no idea what he's talking about here. I'll assume he means CPU, in which case there can be no claim here because he never gives a particular PC model; there are any number of models with varying specs available at that price. This really goes for all of his intangibles. Arik was looking at a particular HP model so his comparisons are somewhat fair, but what about other models and brands? Not to mention there is NO WAY I can believe getting a slightly lighter laptop with a slightly higher resolution screen to match the particular Mac that Arik is comparing to is going to cost an extra $800. The only thing left is battery, which it's been shown the Mac doesn't always get exactly the claimed 8 hours. First of all it there are a lot of assumptions there and in real-world usage it's only been observed to be about 4 hours [an example]. My laptop gets 4 hours too. I'm not sure this whole battery thing is fair either, the particular HP model is extremely limiting. Just because Apple buyers have little to no choice on what they get from Apple doesn't mean PC users don't have plenty of options.

In the end everything but the "intangibles" cost a whopping total of $0 extra for the PC. Although Arik (I'm not giving Jim credit here) does have some points about the hardware specs, I have already mentioned that he's only comparing one particular HP model to the Mac and there are plenty of other options out there. Also, $800 for a small bump in resolution and a pound less on weight seems steep to me, I can easily price those upgrades out on other computers for much cheaper than that. Let's even take these two at their word of $1500 total cost. That's still a LOT cheaper than the $2800 MacBook that Arik is comparing too! I'm going to go ahead and chalk Jim into the "moronic talking heads from news television" AND the "blinded Mac fanboi" categories.

I guess my final bit of advice would be to buy a PC instead of a Mac and ditch Windows altogether for a flavor of Linux, such as Ubuntu (or, due to my preference of KDE, Kubuntu) or Mint. The benefits here are too many to mention.

Wednesday, April 15, 2009

Fox News makes bold, BOLD predictions!

10 Technologies About To Go Extinct

Make sure to note that there is an *about* in the middle of there and then read the list. Way to go Fox! Floppies are almost dead?! No ways! Typewriters?! Discmen (or is that Discmans?)!? Ack! This really only confirms their average viewer age is well over the hill. Yet another reason to not pay attention to Fox's news offerings...

Monday, April 6, 2009

Eternal Beta

Gmail's fifth birthday has come and gone. In those five years Gmail has steadily gained against the established competition and has demonstrated far more creativity. However there is one little nagging fact that everyone keeps talking about: why is gmail still in beta?

A five year beta is just silly. PhD's have been written in shorter periods of time. Betas typically mean a product that is having little or no features added and is mostly working on stability and bug squashing. Gmail does not fit this paradigm. It has been mostly stable (ignoring the service outages, which are not a problem with the Gmail code itself) and a solid performer for years now with more focus on feature additions it seems.

The real killer is the fact that there is Gmail Labs. Google's product labs have been about experimental functionality and "not ready for prime time" sort of projects. Hmmm. Does this sound like alpha and beta software? So Gmail is even mature enough to have its own alpha/beta system. How can you really have a beta within a beta? Honestly, come on. It's time you let your baby free Googles!

Wednesday, April 1, 2009

The April First Update

Well I pondered doing an April Fool's joke but, considering my readership is probably one (myself) I didn't want to spend the time crafting the perfect joke. I will however pass on a nice, legitimate bit of math and nerd humor. Check out PC-BSD and notice--besides being an alternative OS you should try out instead of Windows or Mac--what the new v7 is being called. That's right, the Fibonacci Edition. The only problem is 7 isn't a Fibonacci number. Math fail!

Sunday, March 29, 2009

Converting color spaces in C++

I recently posted my first bit of open source code on my website. It came about because I've had to do some converting of RGB colorspace into HSV for purposes of histogram matching for my research. There is code out there that can be found through The Googles but I've never been satisfied with any of them for various reasons. I've tried to make my code much more readible, straightforward, and clean than whizbang-look-at-all-the-c++-tricks-I-used code obscurity. I've also added the ability to convert RGB to HSL and back. I didn't see much use in having HSL<->HSV but this would not be hard to get by using RGB as a middle man. Have a look at it, use it, improve it, but make sure you follow the license! RGB-HSL-HSV converter project or the direct c++ code.

Saturday, March 28, 2009

Web needs a paradigm shift

I was browsing the [H]ardForum earlier today and something dawned on me. There's all kinds of buzz amongst web-heads about the new CSS/HTML/whatever standards and Apple is doing custom CSS additions to allow for animation in WebKit (bad Apple! follow the standards!). My realization is that CSS cannot be the future of the web.

CSS is an extremely powerful way of expressing design and layout for a site. However, from personal experience and seeing a bazillion posts asking for CSS help, it is just too complicated or confusing to consistently get correct. Long ago we learned tables were bad for layout, we should use div instead. However, there seems to be no agreement as to the best way to use them and sites are often accused of overusing them. That's just one example, forums are littered with people asking why they can't get item x to overlap, float, stay put, or any other number of things on their pages and it seems the solution usually ends up being something obscure or unintuitive.

Some stalwarts would write this off as people not knowing what they are doing. But isn't computer science about making things easier on ourselves? Programming languages have moved from the miserable days of low-level languages to the immense spectrum of high-level ones we have today. Why can't the web do the same thing and unburden some of the mundane work? Anyone who has looked at a CSS file from a large website cannot claim that it's easy to get the gist of immediately with a straight face. One example of a CSS failing may be that there's too many ways to do things. It should be moving more towards Pythonic thinking than C++. Yes allowing for 1, 2, or 4 arguments for, say, padding space is a good shorthand but it's not obvious as to which order they are in or how the 2 maps to handling the other two dimensions.

Right now I cannot propose a new solution or ways to fix this. But I do know that we can do better, much better.

Tuesday, March 17, 2009

Python tip: splitting strings with whitespace

This has gotten me so many times now I figure I need to write it down. Plus, it'll be here for everyone else's benefit.

Examine the following Python code:
>>> s = "foo bar spam eggs" # two spaces between bar-spam, three between spam-eggs
>>> s.split( " " )
['foo', 'bar', '', 'spam', '', '', 'eggs']
>>> s.split( )
['foo', 'bar', 'spam', 'eggs']

Note that if you split on " " as in the first command, Python will split only on the first space in a span of whitespace. After the first, subsequent spaces are placed as empty strings into the returned list. However, if you use the split with no arguments, each split eats all connected whitespace.

Marketing genius

IPhone 3.0 Features Announced

I am constantly impressed by Apple's ability to market and make their products seem like they are something from the far off future.... when they're not. And still the fanboys drool.

Some of the big news items:

Copy & Paste - WHAT?! A MODERN COMPUTING DEVICE WITH COPY & PASTE?! THIS IS REVOLUTIONARY!!!!!!111 GIVE ME NOW!!!!!111

MMS, Search, File Sharing, and several other features fall into this category. Apple, if you're going to market a product as basically a hand-held computer then you can't make a big deal out of simple, taken-for-granted, everyday things like this.

Sunday, March 15, 2009

Elevate America: Yes and No

Microsoft announces Elevate America initiative

I have very mixed feelings about this. On the one hand the US is in dire need of a program like this to bring the general tech skills up to par. I really hope it succeeds in its stated goal of offering training at all levels to all those in the US. We are following woefully behind the rest of the world in cell networks, internet penetration, education levels, and all sorts of other factors. Hopefully this program (or something similar) can both bring up the general education level and, as a result, make consumers push for better systems.

However, I'm extremely disappointed to see this being headed by Microsoft. Their track record squarely points this initiative devolving into a pro-Microsoft cheer fest; I have a feeling all the training will be exclusively for Microsoft products. It is true that this will improve tech skills on some level, but it is not what we need. Just as the government needs to start backing open source initiatives, so the public needs to get out from under Microsoft's thumb and learn that there is a whole universe outside the Microsoft ecosystem. Microsoft's products have their place but I think businesses and the populace could save a lot of money and headaches by trying the numerous open source offerings out there. Microsoft does not have the stranglehold on the world market as it does in the US, so if for nothing else, we should want to be able to interface with the rest of the world's countries as they mature and become our technological peers.

Tuesday, March 10, 2009

So it begins...

As part of my "100 things in 1001 days" project I decided I'd start a blog to chrnoicle my experiences. After some further pondering I have decided that two blogs is a more ideal situation. One to cover the 100in1001 and thoughts on various topics and separate one dedicated towards technology and programming.


Why the split? Well the main reason is I feel like, as one blog, it would be too jumbled and different groups of people would probably be interested in one and not the other.


So what's my focus here? It will be mostly a melding of thoughts on tech topics and programming ideas/concepts, with other related things thrown in to taste. I enjoy learning new languages--so expect tips there--and am a huge supporter of the open source software movement. If you want to know more about me and why you should care what I write you can browse the the rest of my site Hopefully I'll give plenty of good tips and thoughts that you'll enjoy reading!