Mon, 12 Oct 2009

7:36 PM - World of Warcraft

I broke down and reactivated my account yesterday.  I seem to go through periods where I want to kill things online and they need to be furry.  Perhaps I should look for the axis of anarchy?  (the guild reference for the uninformed)    

I'm kidding about the furry animals.  

()

7:22 PM - (rant) Idiots should not be allowed to write code

I'm sick of bad programming practices.  So many people "learn" to program just enough to get by.  They don't care if their spacing is chaotic, if it's hard to read, if some statements go across the page in one line, if they initialize big objects 10 times in a function, or even if the code is efficient.  They don't comment their code!  How am I supposed to know what it does without spending a great deal of time reading it? 

This is a problem at work.  I've been asked to modify a terrible joomla plugin.  There is zero documentation for this plugin.  The author put his name on it and some ads for his company.  I will never buy anything from him.  He's spelled variables such as wordLength as wordLenght throughout the code.  Spelling length wrong once happens, but an entire plugin with hundreds of lines?  In the database table?  

Depending on what my final patch looks like, I might submit a big diff with whitespace fixes, and code cleanup to this jackass.  If for no other reason, so he can see how to program.  

Another problem I'm seeing is with object initialization.  In another project, I see 5 calls to getContext() within one method.  This creates a heavy object for one use and then leaves it in memory for the call.  Then java has to garbage collect it eventually.  It's slow to GC and it's slow to create it.  What a waste of everyone's time.  Not just my time, but the poor guy who's got to use that shitty website.  Why take 5 seconds when you can take 30?  

Computer science professors need to require comments, and clean code or fail people.  It's that simple.  They need to learn to do this.  Some professors at WMU do that, and I think it's a good idea.

()

Fri, 2 Oct 2009

11:41 AM - (no subject)

Coworker sent this to me and it's so true and funny!

 

I admit it: I'm a bigot. A hopeless bigot at that: I know my particular prejudice is absurd, but I just can't control it. It's Apple. I don't like Apple products. And the better-designed and more ubiquitous they become, the more I dislike them. I blame the customers. Awful people. Awful. Stop showing me your iPhone. Stop stroking your Macbook. Stop telling me to get one.

Seriously, stop it. I don't care if Mac stuff is better. I don't care if Mac stuff is cool. I don't care if every Mac product comes equipped a magic button on the side that causes it to piddle gold coins and resurrect the dead and make holographic unicorns dance inside your head. I'm not buying one, so shut up and go home. Go back to your house. I know, you've got an iHouse. The walls are brushed aluminum. There's a glowing Apple logo on the roof. And you love it there. You absolute MONSTER.

Of course, it's safe to assume Mac products are indeed as brilliant as their owners make out. Why else would they spend so much time trying to convert non-believers? They're not getting paid. They simply want to spread their happiness, like religious crusaders.

Consequently, nothing pleases them more than watching a PC owner struggle with a slab of non-Mac machinery. It validates their spiritual choice. Recently I sat in a room trying to write something on a Sony Vaio PC laptop which seemed to be running a special slow-motion edition of Windows Vista specifically designed to infuriate human beings as much as possible. Trying to get it to do anything was like issuing instructions to a depressed employee over a sluggish satellite feed. When I clicked on an application it spent a small eternity contemplating the philosophical implications of opening it, begrudgingly complying with my request several months later. It drove me up the wall. I called it a bastard and worse. At one point I punched a table.

This drew the attention of two nearby Mac owners. They hovered over and stood beside me, like placid monks.

"Ah: the delights of Vista," said one.

"It really is time you got a Mac," said the other.

"They're just better," sang monk number one.

"You won't regret it," whispered the second.

I scowled and returned to my infernal machine, like a dishevelled park-bench boozer shrugging away two pious AA recruiters by pulling a grubby, dented hip flask from his pocket and pointedly taking an extra deep swig. Leave me alone, I thought. I don't care if you're right. I just want you to die.

I know Windows is awful. Everyone knows Windows is awful. Windows is like the faint smell of piss in a subway: it's there, and there's nothing you can do about it. OK, OK: I know other operating systems are available. But their advocates seem even creepier, snootier and more insistent than Mac owners. The harder they try to convince me, the more I'm repelled. To them, I'm a sheep. And they're right. I'm a helpless, stupid, lazy sheep. I'm also a masochist. And that's why I continue to use Windows – horrible Windows – even though I hate every second of it. It's grim, it's slow, everything's badly designed and nothing really works properly: using Windows is like living in a communist bloc nation circa 1981. And I wouldn't change it for the world, because I'm an abject bloody idiot and I hate myself, and this is what I deserve: to be sentenced to Windows for life.

That's why Windows works for me. But I'd never recommend it to anybody else, ever. This puts me in line with roughly everybody else in the world. No one has ever earnestly turned to a fellow human being and said, "Hey, have you considered Windows?" Not in the real world at any rate.

Until now. Microsoft, hellbent on tackling the conspicuous lack of word-of-mouth recommendation, is encouraging people – real people – to host "Windows 7 launch parties" to celebrate the 22 October release of, er, Windows 7. The idea is that you invite a group of friends – your real friends – to your home – your real home – and entertain them with a series of Windows 7 tutorials. So you show them how to burn a CD, how to make a little video, how to change the wallpaper, and how to, oh no, hang on it's not supposed to do that, oh, I think it's frozen, um, er, let me just, um, no that's not it, um, er, um, er, so how's it going with you and Kathy anyway, um, er, OK well see you around I guess.

To assist the party-hosting massive, they've also uploaded a series of spectacularly cringeworthy videos to YouTube, in which the four most desperate actors in the world stand around in a kitchen sharing tips on how best to indoctrinate guests in the wonder of Windows. If they were staring straight down the lens reading hints off a card it might be acceptable; instead they have been instructed to pretend to be friends. The result is the most nauseating display of artificial camaraderie since the horrific Doritos "Friendchips" TV campaign (which caused 50,000 people to kill themselves in 2003, or should have done).

It's so terrible, it induces an entirely new emotion: a blend of vertigo, disgust, anger and embarrassment which I like to call "shitasmia". It not only creates this emotion: it defines it. It's the most shitasmic cultural artefact in history. Watch it for yourself.

Still, bad though it is, I vaguely prefer the clumping, clueless, uncool, crappiness of Microsoft's bland Stepford gang to the creepy assurance of the average Mac evangelist. At least the grinning dildos in the Windows video are fictional, whereas eerie replicant Mac monks really are everywhere, standing over your shoulder in their charcoal pullovers, smirking with amusement at your hopelessly inferior OS, knowing they're better than you because they use Mac OS X v10.6 Snow Leopard.

Snow Leopard. SNOW LEOPARD.

I don't care if you're right. I just want you to die."

()

Fri, 4 Sep 2009

2:45 PM - Graphics by ATI == bad resolution

I just updated my catalyst to 9.8.  Now I'm getting 800 x 600 resolution whenever I try to run at the native 1600x1050 that the monitor supports.  I've been able to get it up to 1440x900 or 1400x1050 without issue.  I'm just a bit annoyed as I often have minor quirks with these video cards, and every release has a new surprise. It's a crossfire configuration on ATI 4550HDs. 

()

Wed, 2 Sep 2009

3:34 PM - More Snow Leopard fun: no printers

Apple replaced the printing API with CUPS only drivers in this release.  As a result, all the old drivers won't work on 10.6.  I just found out that my wife's printer is not supported by HP anymore and my printer is listed, but OS X can't find drivers for it via software update.   

()

12:04 AM - Snow Leopard and 64bit Kernel

Apple made a big deal about the capabilities of Snow Leopard (10.6).  Systems typically boot a 32bit kernel, even in 10.6.  You can check by going to System Preferences and then click on software.  If you see 64bit kernel and extensions: Yes, then you know you're in a 64bit kernel.

To test out the 64bit kernel, hold down 6 and 4 keys when booting your Mac.  It will load a 64bit kernel if your system supports it.  You can also explicitly hold down 3 and 2 to get a 32bit kernel.  On the Apple Xserves, it defaults to a 64bit kernel.  Several sites report that Macbooks will only run 32bit kernels.

To keep your system in 64bit mode, try the utility discussed at this website: http://www.ahatfullofsky.comuv.com/English/Programs/SMS/SMS.html

Many device drivers such as the wacom tablet kext, vmware and parallels run in 32bit mode right now.  Don't expect miracles.  These programs will need to be updated to take advantage of 64bit computing.  

Finally, you might be wondering what the big deal is about 64bit computing.  The basic idea is that computers were limited to 4GB of RAM due to the nature of the processors they run.  Most processors since the 386 support 32bit applications.  Some might even remember the hype around Windows 95 which was one of the first operating systems to run anything in 32bit mode in the PC world.  The key here is 32 bits.  An integer is 32 bits long.  This size limit also affects what programmers call pointers.  A pointer "points" to a location in memory.  Think of it like a child pointing to his little sister hiding in the corner.  Since that number is limited in size, it can only point to so many memory locations.  In the PC world, this limit is further reduced by things that have to get mapped into this address space like video cards.  Anyone who's run windows vista on a PC with 4GB of RAM (32bit) will know that 3GB-3.5GB of RAM is all that you can use.  Even worse, most programs are limited to 2GB of RAM or less.  With a 64bit kernel, the size of these pointers has been increased.  That means the computer can allow access to a lot more RAM both to individual programs as well as the entire computer.  It solves the problem for several years.  This is not the first time we've seen this happen.  Older processors could address even less memory.  Besides this obvious improvement, there are many other features on these processors.  They include extra memory on the CPUs as well.  These temporary pieces of memory are called registers.  Without boring you further, just think of it as extra temporary slots or variables that the CPU can use at the same time without using your regular RAM.  It makes them much faster.  There is a catch though.  In 64bit mode, pointers and other parts of programs are much larger.  That means the cache on your processor (another kind of memory) will get used up faster.  Some types of programs might actually run slower because of this.   

You might be wondering why there's all this memory.  Just remember that computers have two main kinds of memory, permanent and temporary.  A hard drive, cd-rom disc, flash drive, or other media is permanent because it's still there when you turn off the computer.  The remaining types get cleared when the computer is turned off.  This includes random access memory (RAM) on the motherboard (main memory that you would see in an add like 4GB DDR2); L1, L2, and L3 cache on processors, GDDR3 RAM on your video card, etc.  Cache memory is much more expensive, but faster than main memory.  Each level is faster than the previous with L1 as the fastest.  Part of what makes it fast is that it's not a lot of memory and it's structured differently.    

()

Tue, 1 Sep 2009

5:26 PM - First thoughts on Mac OS 10.6

I got my copy of Snow Leopard today and promptly installed it.  The upgrade process was smooth.  I recovered about 17GB of free space between the improvements in snow leopard and it's ability to find a "dead" mobile me idisk.  Actually strike that.  I just remember that OS X now uses a different meaning for GB for disks now.  (base 10 instead of base 2).  

Some things do seem quicker, but I'm not fond of the gamma change.  It's dark and dreary like windows now.  The new highlight feature when right clicking on a dock item is very annoying and reminds me of vista.  I suspect they were trying to emphasize the dock items, but it's overkill.  I keep thinking why did the screen go dark, especially with the black menu now.  

Mail.app did a quick upgrade on my mail.  Considering the amount I have, it was painless.

Keychain detected an old version from long ago.  I just had to enter an old password; good thing I could remember it.  

I've seen some quirks with my IRC client.  The popup windows to tell me about the connection to the server won't go away.   I have to manually click each one.  In 10.5, i could just bring the app into the forground to get rid of them.

 

()

Fri, 28 Aug 2009

2:21 PM - What to build

We're finally getting an opportunity to co-locate a server for MidnightBSD.  A friend of mine works at a hosting company in Lansing.  He's made some arrangements for us to colo a box.  However, I'm not sure what to build.  

Right now I have some spare parts lying around such as a Core 2 Duo 2.13Ghz processor, Intel DP965LT motherboard, 2.5GB of RAM and a 250 watt power supply.  I've also got a video card somewhere.   At a minimum, we'd need a case and hard drives. He's concerned about the CPU performance.  The current system is mostly idle, but we would have more bandwidth available at the new provider.  My motherboard can't  handle any quad core newer than the Q6600 (FSB limitations).  

My gut feeling is to put money into RAM and disk instead of going for a better CPU.  Of course, I also don't know what I'm going to do with this stuff.  With new systems at best buy coming with 2-6GB of RAM, it doesn't seem like a lot.  

I guess it all depends what services we're moving.  For instance, if the Magus database were to go on that box, I think we should consider a faster CPU.  

()

Thu, 27 Aug 2009

1:49 PM - The problem with BSD on the desktop

Like many BSD developers, I'm forced to use other operating systems for other tasks.  Well that's not entirely accurate.  I like to use many operating systems, because I have a passion for them. But, at the same time I try to improve the BSD experience to get my own work done.  If I can get to a point that most of my tasks can be done within BSD and just run a VM for the few things I need to do in windows, great. 

This creates a few problems though.  First, I need to actually get a decent VM running on MidnightBSD.  Porting virtual box has been very slow.  Qemu has never been fast enough for my tastes.  VMware won't run at all.  Second, I need to come up with programs that can replace existing software I use or port that software when possible.  Today, I just ported the mysql administrator and query browser tools to MidnightBSD.  That's one less thing I need to worry about.  We still need openjdk so I can do work.  Firefox is running but it's only 3.0.x and I can't even call it that.  

()

Sat, 15 Aug 2009

12:05 AM - Happy 20th birthday Genesis

http://blogs.sega.com/usa/2009/08/14/happy-20th-birthday-sega-genesis/ 

I still remember when I got my Sega.  I was living in Clio.  Got it for Christmas.  It was the first generation with sonic the hedgehog.  I think it had been out 2-3 years by then.  I had rented one from the local video store several times.  I told my mother I wanted a genesis or snes and she went with the cheaper of the two.  Back then, a genesis cost 129.99.  

I just looked up the release date of Sonic the Hedgehog.  it was June 23, 1991. 

 

()

Fri, 7 Aug 2009

1:43 PM - Tag balancer

http://nekohtml.sourceforge.net/

This is a java based HTML "fixer" that can make HTML valid in an xml parser.  It looks rather interesting.

()

Sat, 1 Aug 2009

Wed, 29 Jul 2009

11:52 AM - (no subject)

Is this the end of web search competition?  Microsoft and Yahoo have inked a deal to use Microsoft's Bing search engine on yahoo.com.  That means Microsoft has won.  This is the foothold Balmer has wanted in search and marks the end of his massive attention to search.  That means, Microsoft can focus on other attacks against Google or other sectors again. 

The deal is terrible for yahoo.  The CEO must not understand why the previous people in her position did not want a deal with Microsoft.  Search was the only thing yahoo really had.  Portals come and go.  They won't have a product for ten years.  There's no way they can recover and eventualy Microsoft will steal the portal users to their own websites.  It's a very bad move for Yahoo.  I feel bad for the engineers at Yahoo that will be fired.

 

tags: google evil microsoft search yahoo

()

Tue, 28 Jul 2009

2:41 PM - When the "whole" internet is slow

I've been trying to figure out a network problem at home for over a week.  It's difficult because I don't have proper testing equipment.  I just have to guess.  I've narrowed down a few things.

FIrst, ping traffic to the router has been very slow.  It's also a bit laggy to the switch.  Directly pinging other systems on the switch is fast.  I've also looked at the port statistics on the switch and noticed a lot of CRC errors (for a switch) on the router port. The link is only 100/full but flow control was disabled.  I've since enabled flow control and rebooted the switch.  We'll see what happens.  The network cables are all from the same batch of belkin cat5e that I bought with the switch.  I'm wondering if I should buy some cat6 cables for some of the systems.  In theory, it shouldn't matter with the router because it's not running at gigabit speeds.  The fact that the link is slower than most of the network could be a problem though.

At first, I thought it might be the cable connection.  However, the errors in the logs happen infrequently and are common for cable modems.  The upstream signal is a bit high but still within acceptable parameters.  

()

Sun, 26 Jul 2009

6:33 PM - My life according to Jewel

Using only song names from ONE ARTIST, cleverly answer these questions. Pass it on to at least 15 people and include me. You can't use the band I used. Try not to repeat a song title. It's a lot harder than you think! Repost as "my life according to (band name)"

Pick your Artist:
Jewel

Are you a male or female?
Fat Boy

Describe yourself:

Love Me, Just Leave Me Alone


How do you feel:
Doin' Fine

Describe where you currently live:
Leave the Lights On

If you could go anywhere, where would you go:

The New Wild West


Your favorite form of transportation:
Race Car Driver

Your best friend is:
Raven

What's the weather like:
Good Day

Favorite time of day:
Morning Song

If your life was a TV show, what would it be called:
Foolish Games

What is life to you:
Life Uncommon

Your fear:
Abesense of Fear

What is the best advice you have to give:

Everybody Needs Someone Sometime


Thought for the Day:
Do you want to play?

How I would like to die:

Till We Run Out Of Road


My soul's present condition:
Down

My motto:

I Won't Walk Away

()

Fri, 24 Jul 2009

1:50 PM - Women like porn?

According to an article I just read, one in three visits to adult websites are by women.   That means we can't take heat anymore if we do look at porn.  Women do it too. (duh)

()

Wed, 15 Jul 2009

6:23 AM - Google's Chrome OS

CNN has an article on what google must do to make Chrome OS successful.   I don't agree with all the points in the article.  Apple has no incentive to port iTunes over to Linux.  Not only would they need to port iTunes, but Quicktime as well.  The latter is the real problem.  It's not easy to get a multimedia application like quicktime to work.  Apple would need to license codec use and ship a binary product on a platform full of GPL'd code and open source fans.  

Commercial applications have not done well on Linux as many users have philosophy issues with these licenses.  One could argue that Chrome OS targets a whole new audience, but we heard that about netbooks and now they've failed (with linux).  

Apple does want an alternative to windows, it's called Mac OS.  Helping a rival take market-share from you makes no sense.  Apple could justify porting iTunes over to windows because they could sell music and videos to a very large customer base;  the hardware sales of iPods and iPhones helped too.  For the chrome os port to work, apple would need to support iPods and iPhones on linux as well.  

The next problem is that the article made a big point about usability and changing the interface.  If you think that users hate applications that look different, why would Google's Chrome OS be any better?  Instead of starting a friendly application, they have to open a browser (or it's always open) and click on web pages to play a song!  I just don't see that happening.  I think it's worse than telling a user open firefox for "the internet" and thunderbird for "email".  Users memorize icons or program names, and "screens".  As someone working on this problem, I can tell you that it's very difficult to get someone to try out a new system, let alone switch to it on a daily basis.  

Finally, the business model makes little sense.  When Microsoft sold DOS and Windows for PCs, it was for all PCs.  It was risky in the sense they were shipping a system on a new competitor to Apple, but it still targeted a (eventually) large user base.  Google is making an OS for one type of computer that many fall out of fashion much like the PDA has.  You don't see 20 PDAs at your local best buy or walmart anymore.  Now it's smart phones or mp3 players or even handheld video game consoles that fulfill these duties.  As netbooks get larger, they blur on the traditional laptop.  Many netbooks are now near 12 inches.  Some years back, that was a very common size for a laptop.  It was entry level from apple, and midrange for PC vendors.  Netbook means cheap laptop that's slow now.  Eventually the CPUs will catch up and they'll just be cheap laptops.  For the same reasons as the article site with Linux, do you think a non-windows (or mac) OS can actually gain momentum in such a market?

tags: google chrome os

()

Wed, 8 Jul 2009

10:33 PM - (no subject)

 Today was an interesting day at work.  I managed to get Cayenne working properly for a Project -> User mapping through some intermediate tables.  There were few tricks involved.  First, I had to modify the User class within Cayenne to explicitly have a mapping for the Primary key.  This allows you to do an Expression.fromString and refer to the primary key.  Second, I had to do a double mapping using the relationship name between the project and the mapping table then the mapping table to user table relationship.  The context had to be the name from the project end and from the mapping table end to the user table.  (left to right... )  

One problem I had early on was that we also have a user_id stored as the "owner" with a relationship in the project table.  That means there's a direct relationship and an indirect relationship between project and user.  

The idea here was to map all the projects that the User can access.  The mapping table contains a PK, user_id and project_id.  A user can potentially access many projects.  We knew the user id of the user logged in from the session (username would work too and require less work, but could not benefit from the database indexes).  

This sounds trivial, but there is almost no documentation on something like this with Cayenne.  Those apache developers need to get up some real examples of Cayenne apps.  

tags: apache mysql java cayenne db

()

Mon, 6 Jul 2009

11:25 PM - Is Linux ready for the desktop?

Last Thursday, I setup a Linux box at work.  The idea was that it would at least be a bit more like a Mac or BSD box that I'm accustomed to.  Doing non windows development on a PC is painful without a UNIX like OS to me.  I just use a terminal too much.

So, I installed Ubuntu (the preferred distro at work) on a desktop system with an Intel Pentium D 3.2Ghz CPU and 2GB of RAM.   Day to day operation has been quite stable.  I haven't had any serious application crashes, lags, and power management has been working perfectly.  I can put the system to sleep better than Windows XP has ever worked for me.  All of the hardware I care about works.  I haven't bothered to test the sound.  

Even though I'm a BSD fan, I feel that I have to complement the linux community for progressing so far.  There is one issue I have with Ubuntu though.  There are some serious problems with their package management setup.  I'm not complaining about the tools, but rather the availability and quality of packages.  Midori crashes every time I try to use it and I think it's a mismatched webkit version.   Midori even works well on MidnightBSD, I'm not asking for a lot here.  Now that's one package, but there could be many others.  With a user interface that simple and the amount of help and money that project has at it's disposal, I expect more.  I know what we do with practically nobody.  The second problem is more general.  I could not install a JDK from their tools.  Due to the requirements, I needed a real JDK and not gcj.  A JRE was available, and that's fine for someone like my mom, but I need a java compiler.  I don't think it's too much to ask to expose the option in the GUI when it's possible from the command line.  Yes, I'm smart enough to go CLI, but what about a new computer science student trying to do a homework project?  This is a 2 click operation in windows and it comes with Xcode on the mac.  It's just easier on the first two platforms.  

I think some Linux distros are at the point that everyday folks could use them for basics at home.  They need some more polish, but that can happen.  

I still like our package management and ports system better, but we don't have those gui tools yet.   Still, considering microsoft doesn't have an installer like that for apps, it's certainly possible for linux to get marketshare.  It's it weird that microsoft has the best uninstaller (add/remove programs), but not a good "selector" for apps to install.  It's possible on windows, as you can see with Steam for games.  What if there was something like steam, but for apps?  

So, that means I need to set the bar higher for the BSD projects; mine in particular needs some real progress on the usability front.

()

11:18 PM - Cayenne and Joins

I've been experimenting with Apache Cayenne for work.  Earlier today, I got stumped by a complex database relationship in terms of Cayenne.  I can easily write a six table join to accomplish the query, but i wanted to find an object mapping approach instead.

I've learned several things about Cayenne.  First, it does not support outer joins from the built in object mapping.  It's possible to create outer and left joins with either SQLTemplate or performing a JDBC query directly.  

A SQLTemplate is a method to write a "real" SQL statement and either execute it as a non returning query or a select mapped to an existing Cayenne object.   You can even have it return raw rows back.  My first thought was that it would suck to do that because you'd lose the auto generating code for multiple database feature.  Actually, you can write alternate manual queries and register them for each major JDBC provider.  You write a generic default one that can work in most cases and then a tuned version (or whatever) for a specific database.   

The other option is to write a direct JDBC query and circumvent most of Cayenne.  You can still use it's database connection pool though.

DataSource ds = context.getParentDataDomain().getNode ("mydatanode").getDataSource(); Connection c = ds.getConnection();

tags: sql cayenne database

()