Quad Monitors: is it worth it?

3 03 2011

I recently acquired four rather large and unwieldy CRT monitors that were otherwise destined to the trash heap, in addition to my regular LCD and a Sony TV that I was using to do dual screens in the past. It just so happens my video card supports up to six monitors. I have, therefore, attempted to accomplish every geek’s best dream come true: my very own monitor wall. Okay, maybe second best dream come true, but the first can’t be talked about with children present.

Now moving on, the shiny new Saphire HD5870 2GB GDDR5 Eyefinity 6 Edition video card in my desktop doesn’t actually have any sort of analog output. The outputs are all pure digital through six mini-display port connectors. The video card comes with 4 mini-display port to regular display port adapters, a mini-display port to HDMI adapter, and two mini-display port to DVI-d adapters. To support more than two monitors, the adapters have to be of the active variety, which actually have some sort of logic and clock signal generation build into the adapter. I picked up two Acell Displayport to VGA adapters from Fry’s electronics for $30 a piece to get my monitor wall started, and to decide if 4 monitors is enough or I really am crazy enough to want 6. It’s also easy to fit 4 on my desk without too much work. I did have to disassemble part of my desk to fit them, but nothing but a hack saw and a little bit of wood glue won’t fix up once I have the time.

The question still remains: is worth it? For everyday use, definitely overkill. For programming, maybe. It is useful to have a couple of sources of documentation up while coding in one or two screens.





The Quest for Programming Zen

23 02 2011

Every good programmer knows what it’s like to have a programming spree. For some it’s a rare but wonderful occurrence, for others it’s a daily thing. It’s those times where you stay up until 3:00am trying to perfect a piece of code, then wake up in the morning still thinking about it. It’s those times where you code for 8 hours straight at work and get yelled at by HR for skipping your lunch break. It’s those times you become so immersed in your work that your mind doesn’t wander, get tired, or get bored. It’s an illusive and spontaneous thing, impossible to force yourself into if the conditions aren’t just right.

What causes such sprees? What separates mind numbing tedium from intense programming that you love to do? And are we as software engineers alone in this feeling of zen? We’re certainly not alone, but it may be surprising that the near cousin in our quest for coffee induced super human attention spans is not another engineering discipline, but rather a form of entertainment: video games.

I was watching a video lecture the other day on 7 ways that video games reward your brain. The single most interesting thing I find about video games is their ability to engage people’s minds for long periods of time. Instead of vegetating in front of a TV, they make people actively solve problems, compete against other people, and make seemingly tedious things nearly addictive (see Farmville), but without feelings of boredom or burnout. Does programming reward our brains the same way that video games do?

1. Experience bars measuring progress

Ever since the beginning of video games, cold hard numbers have reported progress and skill in video games. It’s nearly impossible to find a video game that doesn’t contain scores, levels, or character experience counters. Programming can also provide some empirical measures of progress in the form of line numbers, file sizes, code check ins, bug counts, and requirements met. As you’re programming you have a mental road map of where you’re going, and you have some idea of how close you are. The future may be filled with unpredicted obstacles impeding your progress toward your goal, but video games are similarly unpredictable. Sometimes level 20 seems right around the corner, but you get stuck trying to defeat a group of enemies or conquer a troublesome city. The constant desire to further your progress drives you forward.

2. Multiple long and short-term aims

Video games don’t just reward the player at the completion of the game, but incrementally guide and reward them on their journey. Similarly, programming is not just about getting to the completed program. The program consists of many objects, functions, and small individual pieces that must be constructed before we get to the final integration. Each of these smaller tasks is a short term goal, a specific thing to keep your mind focused and busy on, all the while making progress toward a long term goal.

3. Rewards for efforts

Rewarding effort is a mysterious thing. On one hand, you might not think that watching crops grow and getting money for them to plant more crops would be rewarding, but the millions of people playing Farmville prove otherwise. The reward for video games usually comes in the form of unlocked weapons, levels, and character perks. In programming, the reward is the satisfaction of creating a program and having it run correctly. Programmers simply enjoy what they do, and in a zen like way, are rewarded just by doing it and doing it well. There are, of course, also financial and academic rewards associated with many programming projects.

Computer Problems (XKCD 722)

4. Rapid, frequent, clear feedback

This is something that separates software engineers from other types of engineers, and is quite possibly a reason why someone like electrical engineers don’t obtain the same zen like states that we do. An electrical engineer will take design requirements and spend the majority of their time painstakingly creating schematics for the design before they even get close to having a real device to look at and test. Software engineers on the other hand, will compile and test pieces of their code literally hundreds of times a day. Of all the engineering disciplines, software engineering is the one with the most rapid and frequent feedback.

5. An element of uncertainty

If you were playing a video game where every enemy you killed dropped the exact same items, or enemies always appeared in the same size groups and locations, the game would be far less fun. Do elements of uncertainty make programming more interesting? Your first thought is probably that you hate uncertainty when programming, and anytime something uncertain happens it’s usually some sort of frustrating bug. However, there is an element of uncertainty in program design that could equate to this in video games. If you designed a program in your head, every little detail, and then began to program it, it would be a very boring procedure of typing away at your keyboard inserting the appropriate code into the computer until done. However, that’s not even a possibility in programming. Instead, a high level view of the program is constructed in your mind, and like an artist creating a painting, the visual feedback he receives from every stroke of the brush effects the next. You don’t sit down knowing what your program will look like, but rather you build the program up from your mind in an uncertain fashion. The element of uncertainty in programming is actually a byproduct of our brains inability to predict and fashion the entire program in our head. The limited scope of our brains means we can’t see what we’re going to create in even the near future.

6. Windows of enhanced attention

A game consisting of nonstop action is tiring. They do exist, and can frankly be a lot of fun (see the open source shooter Nexiuz), but the design of the game must be different to counter the mental exhaustion. Death matches between players have to be quicker, and competition has to fuel the attention span that would otherwise wilt. A more common theme is using windows of enhanced attention. The actual size of these windows is a science and art that video game designers have been striving to perfect since the beginning of games. Finding a balance between exhausting amounts of action and giving the player too much down time to relax and let his attention wander is not a trivial challenge at all. Does programming contain windows of enhanced attention? Definitely. The size and length of these windows vary depending on the type of programming your doing, but the actual programming is the enhanced attention window, and the debugging/testing is the downtime.

7. People

Single player video games can be fun, but ultimately have very short lifespans. The games that live on for decades (World of Warcraft) are games that have a good interaction with other people, providing both competition and teamwork. Likewise, individual programming projects can be fun and hone one’s programming skills, but in the end it’s the large scale projects that will live on. Starting an Open Source project is analogous to starting a game clan. You have a goal, and you find other people to join you and help complete that goal. You also have large scale competition among companies and projects (Firefox vs Chrome, Google vs Bing).

Perhaps in looking to our video gaming cousins in computing, we learn a bit about our own psychology. Is this what the zen like programming zone is? Working and competing with others on a constant drive forward, measured by metrics of progress, and filled with uncertain challenges with both long and short term goals as we’re rewarded and given rapid feedback.





Newegg Desktop Build: Part 1

12 02 2011

Behold, 2/3 of my new desktop! The other 1/3 is sitting in a UPS truck somewhere between here and Kentucky. Like any good geeky blogger would, I took more pictures of the components than I will of my first born child. Enjoy.

Antec Three Hundred Illusion Black Steel ATX Mid Tower Computer Case. Plenty of cooling with four 120mm fans, two front, one back, and one top. There’s also a vent hole on the side to assist with the CPU cooling. Not that flashy of a case, no transparent panels, but a nice solid well cooled case none the less.

Each of the four case fans has a Low/Medium/High setting in case you want to sacrifice some cooling for less noise and power consumption. Useful, though I do wish the cable to it was a bit shorter, the top one especially likes to hang down at awkward angles. Each of the fans also has a standard 4 pin Molex connector for power.

ASUS Sabertooth X58 LGA 1366 ATX Intel Motherboard. Built like a tank with military spec components, and includes support for SATA III and USB III. What more could you ask for? How about two PCIEx16 2.0 slots and a PCIEx16 1.0 slot? Yep, it’s got that too, just in case you want to do some fancy cross fire configuration of multiple video cards.

Intel Core i7-950 3.06ghz Quad core CPU. The most expensive component of the computer, and also the smallest and least impressive to look at. Ironic? I was originally going to get a Quad core AMD Phenom, but then noted the Hexacore Phenom was almost the same price. That led to checking benchmarks and realizing that the Intel i7 not only outperforms the Phenom Quad core, but also the Phenom Hexacore, by an amazing large margin. Around that time was when I decided if anyone deserves a good computer, it’s a career computer engineer who also enjoys video games on occasion, and I might as well go all out and pick a CPU/video card combination that will be able to play any current games and be future proof for a few years of new games to come.

CORSAIR 750TX 750W PSU. Was on sale with the video card and is apparently a really good PSU.

Saphire Radeon HD 5870 with 2GB of memory.

 

3 x 2GB of G.SKILL DDR3 1600 in Triple-Channel configuration.

 

Still waiting for my hard drive and CPU cooler, which sadly won’t arrive until Monday or more likely Tuesday. It’s tempting to throw on the Intel CPU fan and find an old hard drive to give it a test run, but I’ll likely just wait until the rest of the components arrive.

 

But, that didn’t stop me from assembling what I’ve got so far.





Nvidia Lemon Strikes Again

9 02 2011

Last week my trusty Dell Vostro 1400 suffered another failure of a defective Nvidia GPU. This is the second time it’s failed, less than two years after the last failure. Nvidia tried to cover up the issue as much as possible (not surprising given a nearly 25% stock drop during the incident), never admitted how many laptop GPUs were defective and what the actual accelerated failure rates were. From my personal experience of now owning two of them, the Geforce 8400M chips seem to die before two years of heavy use.

Instead of replacing it with another laptop, I decided to go with a decent desktop instead. My Toshiba NB205 netbook works fine for everyday carry use. When the Vostro was young it got to roam the world, connect to new wifi hotspots and power outlets. In its old age it was tied into a variety of USB cables while sitting soundly on a desk, the younger netbook getting all the adventure. A desktop is a more suitable replacement for the function it was performing in recent days.

Three large boxes housing the components of my future desktop steadily making their way toward Tempe… stay tuned for a post with plenty of build pictures.





New Toy: Panasonic DMC-ZS5

20 11 2010

I return from the abyss of non-blogging! Between school, work, work like school (senior project), and school like work (TA position) I haven’t felt like doing much recreational hacking and programming, or at least anything worth blogging about. I did, however, decide that I was tired of not having a digital camera and got around to getting one.

For my price range of around $200 and the requirement that I would be able to manually set most things and not just have a generic point and shoot camera, it came down to the Canon SX130 or the Panasonic ZS5. Both of which offered high optical zooms, macro modes, comparable pictures, and the ability to use manual/custom settings instead of just relying on an automatic mode. I ended up going with the ZS5 due to the smaller form factor and the longer battery life with a lithium-ion pack instead of AA’s, although the ability to buy spare AA’s could certainly have been useful.

The specs,

Resolution:            12 Megapixels
Lens:                         12x optical zoom (25-300mm eq.)
ISO:                            80-6400
Shutter:                    60-1/2000
Max Aperture:       3.3

 

Here are a few random shots took in the middle of the night.

 

Up close photo of my Leatherman Wave with mediocre indoor lighting.

 

Gumstix Overo with Tobi Expansion board… and a quarter for size.

 

View looking North from top of A Mountain.

 

View looking South from top of A Mountain (60 second exposure time).

 






Aerg, ClearCase

23 06 2010

So we started using ClearCase at work, but I have to say I’m not really impressed so far… The GUI and the command line tool are both driving me nuts. Doing seemingly trivial tasks requires digging through pages of the manual, downloading some 3rd party plugin, or doing some tedious thing by hand. And oh yeah, did I mention it’s slow as paint drying, and just as fun to watch? I’ve written this entire blog post while checking in a chunk of code and files less than 50MB.

A simple example of the little things I keep running into is adding a folder of subfolders and files out on a remote file share to the version control. Should be easy, right? Just look for a recursive option in the ClearCase Explorer? Nope, there isn’t one. Well then, to the command line cleartool. Wait… it also doesn’t have a recursive option? Seriously?

After giving up on the official documentation and going to Google I found there’s another command line tool, clearfsimport, that’s supposed to let me convert a file system object and all it’s children into ClearCase elements. I excitedly go to the command line,

C:\>clearfsimport -preview -rec -nset \\sipsrvr\C\siplib\ Z:\racecode
clearfsimport: Error: Invalid pathname “\\sipsrvr\C\siplib”
UNC pathnames not supported.

Meh, fine, I’ll go map drives and do it that way. But really, for software that costs $4,000 for a floating license, you’d think that it would be a little less rough around the edges. It isn’t helping my experience that if I try to check a file in using my main machine, it BSODs Windows. We believe it’s some sort of issue with the version of virus software I’m using, IT’s going to look into it more tomorrow.

Looking around the Internet, I’ve found that I’m not alone in my opinion of ClearCase,

http://stackoverflow.com/questions/1074580/clearcase-advantages-disadvantages

I haven’t used it more than a day, so I won’t give up on it yet, but I don’t think I’m going to be convinced anytime soon that it’s worth the high license cost IBM charges. Maybe I just overestimate Enterprise software. Hey look my files finally checked in. ::goes back to work::





TCL Easter Egg

4 06 2010

The TCL command clock format contains a formatting option %Q. According to the manual, “This format group is reserved for internal use within the Tcl library.”

Trying it returns the current stardate.

% clock format [clock seconds] -format %Q
Stardate 64421.6

Another piece of trivia, Stardates in the original Star Trek don’t make any sense, and seem to have no correlation with actual time passing. Roddenberry himself once said that it didn’t make sense and he’d rather forget about the entire thing. In Star Trek TNG and Voyager they actually made the Stardate reflect the season of the episode. Stardate 45xxx was season 5, Stardate 49xxx was season 9, and it wrapped around so Stardate 50xxx was season 10. Using that system, the TCL Stardate format returns approximately the correct date for season 23 of TNG, if TNG was still on today that is (it started in 1987).





Odd TCL Error

21 05 2010

error deleting “c:/sip”: file already exists
while executing
“file delete -force c:/sip”
(file “widgets_jobServer_version.tcl” line 107)

If it didn’t exist, I wouldn’t be calling delete, now would I? This randomly pops up on me, and I have no clue the cause. Googling reveals there’s a bug with TCL and mac OSX that will sometimes create this error, but I’m running TCL on a Vista box… Work around for now is either to call exec del or just surround my file delete -force with a catch and a while loop, it only seems to happen once or twice and then it’ll work fine…





Reminiscing on the semester

12 05 2010

The last day of finals has come and gone, and begun has the impatient F5 tapping on ASU’s student page waiting to see the grades. Not that I’m overly worried, despite quite low test averages in classes and several of my finals not going as well as I had hoped, I’m fairly confident that I pulled off all A’s and B’s. Overall this was definitely a good semester. I met a lot of people, learned a lot of useful things. Though it certainly did have some downs, Computer Networks and Distributed Software Development were both exercises in half comatose clock watching combined with frantic last minute cramming and cheat sheet creation before tests.

Computer Networks (CSE434) was a required class, therefore a necessary evil which is now done with. I had high hopes for that class in the beginning of the semester, as I was often looking into networks information on my own beforehand. Sadly, the class material was a mix of things I already knew, obscure details about protocols that I don’t really care about, and random math that the professor seemed to cram into everything he could. TCP is great and all, but when you spend entire lectures sitting around talking about congestion window sizes and estimations of round trip times, you end up feeling that unless you’re writing your own network stack you really don’t need to memorize all the details as long as you understand the concepts. It didn’t help that the professor was rather boring to listen to.

Distributed Software Development (CSE445) was thrown into my schedule almost purely because it fit nicely after one of my other classes. I really had no idea what to expect, and was hoping for information on things like programming for parallel processors and systems. The class ended up being a very, VERY, high level class on SOA, ASP.NET, WCF, and XML. The explanations were so high level that I really didn’t understand a lot of it. I can now sit here and spout out jargon like, “oh yeah, RESTFUL services are totally better than SOAP or building on top of WCF in terms of QOS,” but that doesn’t mean I can actually program any of it. Really the only thing I took away from this class was learning C# and ASP.NET, and the realization that I find web programming horribly horribly boring and am glad I decided to major in CSE instead of CS. XML is a horribly verbose and bad way to store large amounts of data, SOAP is a protocol on top of a protocol because SOC people are too lazy to write their own protocols and seem to think the OSI model should be 9 or 10 layers instead of 7, and don’t even get me started on the inherent limitations of cloud and service oriented computing (yay quad core 3GHZ processor… sitting idle while all my data goes back and forth over a 1MB/s link)…

But despite the downs, there were definitely some ups. Embedded Microprocessor Systems (CSE325) ended up probably being my favorite class. The lectures weren’t that interesting, but the projects consisted of programming low level C to run on a Coldfire MC5211 demo board. The first real project was making some RGB LEDs blink a sequence of colors by driving the color intensities with PWMs. The next project was an extension of that, adding the ability to set the sequences by commands via a computer serial port and a UART driver we wrote. After that we hooked up an SD card and talked to it via SPI in order to load/store our color sequences, also via UART commands. Finally we hooked up a Wii Nunchuck and read the joystick, button, and accelerometer information from an I2C bus and used it to change the speed and intensity of the color sequences.  I feel that I learned enough in this class that I can go back to tinkering with my AVR butterfly and get a lot further than before. Before this class microprocessor manuals were rather difficult to read or understand, but now I can go through one and go, oh yeah, it says you toggle that bit and that other bit and stick some pull up resistors on this bus line and I’ll be good. I’ve definitely got a couple little side projects I’m planning to do this summer if I have the time involving some more microprocessor stuff.

Another CSE class I took, Design and Synthesis of Digital Hardware (CSE320), I walk away with mixed feelings of. The main problem with this class, one which ended up ruining it for a lot of people, was a schism between what the professor taught and what the lectures and assignments were on. The first half of the class was basically Verilog, working our way up through the basic syntax, to blocking and non-blocking assignments with time delays, to a standard way to write up FSMs. All of the assignments were projects involving Verilog, one being a dice game using an FPGA, some buttons, and an LED display, another being a full processor design. The second part of the class we got into some more interesting things like some clever ways to do hardware arithmetic (carry select adders, carry bypass adders, carry look ahead adders, carry save multipliers, Wallace tree multipliers), and some information on Flip Flop design, asynchronous circuits, and circuit timing. The tests consisted of very little Verilog, and questions such as, “design using just an unsigned adder and some gates, a sequential hardware circuit that computes a GCD of two numbers.” This involved thinking up a datapath, followed by huge amount of CSE120 type busy work (state tables, kmaps), and ending with some questions on timing. Such a question involved very little that we learned in CSE320, mostly being a review question from CSE120 and combined with some sort of digital design cleverness that you were supposed to think up in 10 minutes. The professor also showed no concern at test averages of 50%.

Last but not least is Physics II. It was certainly more interesting than Physics I, I’ve been a ham radio operator for years and have always wondered about things like Impedance and LC circuits. Now I finally understand things like how capacitors, inductors, transformers, etc work. I’m also one step closer to my plan of someday building a large Tesla coil! Plus, I can be a total geek and say, “I understand Maxwell’s Equations!”. I wonder I can get them on a T-shirt…  ::google:: hey look I can!

And so another semester comes to an end. I also attempted to socialize a bit more and ended up meeting a lot of people in the process, getting to know some of them a bit better. In the off chance any of you are reading this; Brianna, Josh, Beatris, Brenton, Shawn, Aaron, Allen, and any others I spent time with either killing time between classes or sitting in the hardware lab cursing at small microcontrollers with, I hope you see you all again next semester, or perhaps even during the summer.

And now for summer! Without my education to get in the way of my learning, the side projects and possibilities are endless. Plus I’ve got lots of scifi reading to catch up on.





Jacob’s Ladder

7 05 2010

I wandered across a 15kv neon sign transformer when I was cleaning my room that I somehow lost. Yes, I somehow misplaced it years ago, despite it being rather large and heavy… things vanish in my room? Anyway, I wired on a plug off an old fan and some coat hangers and made a nice little Jacob’s Ladder. Video here, though not very good quality,

http://www.youtube.com/watch?v=HG1jrq5tj-0








Design a site like this with WordPress.com
Get started