03 May 2013

Taking refocusable images using MagicLantern

If you a professional or hobbyist photography, you undoubtedly have heard about the Lytro. For those of you who haven't, the Lytro is a camera that uses "light-field technology" to allow more information about the light that is coming into the camera be stored. This information, in turn, can be used to perform a variety of functions, the most apparent of which is the ability to re-focus a picture after the picture has been taken. Its very exciting technology, but for those of you who already own an expensive DSLR its a bit disappointing that the technology is currently only available on Lytro cameras and DSLR manufacturers have yet to announce any comparative technologies in their cameras. Do not despair, however, because the refocusing functionality can actually be faked with DSLRs or any camera with a manually refocusable lens!

20 February 2013

My thoughts on the Playstation 4 announcement & the gaming industry's future

First and foremost, I should let you know that I've been an XBOX user since the first XBOX was released in 2005 and have never owned a Playstation in my life. I have never really had a strong attraction to Sony's offering of gaming consoles save for the great console battle of the Sega Dreamcast vs. the PS1. Years after that debate (where Sony obviously won), Sony announced the new Playstation 4 console today and gave the world a glimpse into the series of improvements they've made for their flagship entertainment product and tried to entice the gaming industry that their new product was superior to all other consoles - as any marketing campaign would require. However, the announcement was not what I would call a normal event.
Now, I should raise the disclaimer that I was only able to watch the first half of the announcement up until their presentation of "Drive Club," so information about the presentations made afterwards were sourced from reactions and information disseminated via Twitter. Regardless, here are a few things I noticed about Sony's event today:
  • First, in stark contrast to industry tradition, they elected to announce their new console outside of a large gaming expo, such as E3. I have noticed that this has become a recent trend in the tech industry, where games and consoles are announced outside of these large events and lead me to believe that the hype building up to and after a purely announcement-only event help drive interest so that appearances at venues such as E3 and PAX get more attention. It feels very "viral" in nature and seems to be a very effective technique in generating buzz about products and brands, a fact I will come to again shortly.
  • Secondly, the technical hardware details of their upcoming gaming platform were given fairly early in the presentation, which I was very appreciative of but I'm sure was more techno-babble to most consumers. This fact is very important, because
  • Thirdly, the entire event seemed geared more toward attracting game developers to their platform than   an announcement to consumers. In fact, Sony's event was more a demonstration of their new platform than a reveal of the platform itself. Details of the hardware were almost glossed over and, instead, focus was given to the software-based aspects of the Playstation 4. To illustrate this point, consider the event's timeline: a somewhat high-level discussion was given about the hardware pedigree of the system, only spending a couple minutes talking about the processing power and graphical capabilities; a very short display of the system's new controller, allowing developers a brief glimpse into what capabilities the primary input peripheral will provide; an argument in favor of its design and the principles therein; and finally a sampling of various games and features demonstrating some of the capabilities of the platform. Also, it can not be forgotten that throughout the presentation, mentions of the PS Vita's interoperability with the system were not in short supply.
  • Finally, from what I read via Twitter, the console itself was never shown. This part makes some sense to me since during one of the demos early in the event it was mentioned that they were demonstrating off development hardware. This leads me to think a couple of things: a) they have not settled on a design for the unit; b) the hardware components are technically still in flux, which explains why they did not mention exactly what kind of processor and graphics processor they were using; or (and this goes back to the first point above) c) they purposely did not reveal the physical system to continue to build interest and attention to the new Playstation as speculation of the design of the unit is still unknown.
Overall, this event did not seem like it was destined for consumers. But since they knew prospective consumers were still part of the viewing audience, they included the game demos as part of a way to satiate the typical consumer's desire to know why they would want to spend their money to purchase a shiny new Playstation. This seemed, as I mentioned before, to be more about getting developers to join them and build an IP portfolio for their system and brand before other systems gained a foothold on the market, especially since Nintendo's Wii U has been slow to sell and Microsoft has yet to reveal their own next generation console. The sooner they attract developers, the more likely they may have a successful launch and may be likely to maintain a market foothold for quite some time.
One last point I want to address is the outcry and criticisms I witnessed over various social networks about how they did not actually show what the Playstation 4 would look like. It seemed as though to these people the appearance of the system was more important than the components and platform the system was built on, which, to be frank, is very superficial. Personally, I do not care what the unit looks like since it will sit inside my entertainment cabinet where I will likely never need to see it unless I need to change a disc - which in itself is becoming an infrequent task what with remote power control and online content delivery becoming standard features for most consoles now. For me, and I would hope a lot of other people, the console would merely need to fit into my cabinet and allow me to set other components on top of it and still function without overheating. It could be just a very plain rectangular black box with 1 LED and a disc drive, I don't care. I care only about the experience it pumps to my television and speakers, since ultimately that is where my money was invested if I bought one.
Overall, the game demos I did see showed the new machine had great potential for putting out astoundingly beautiful graphics, but outside of the games, there was little to be terribly excited about. Its social features and remote play via the PS Vita are great conveniences, but I rarely use such things and do not even own a PS Vita, so there is virtually no value to me there. And the fact that there really wasn't anything that got me excited brings me to this: it appears as if the gaming industry has hit a wall. It seems as though the last big creative and technical breakthroughs were made back in 2005, and peripherals such as the Wiimote, WiiU gamepad, Kinect and Move have only incrementally extended the lifetime and functionality of those the respective platforms. But it seems that with the Wii U and now the Playstation 4, the next generation of consoles are shaping up to be less revolutionary and more of just technology refreshes on current designs. But now that two of the gaming giants have put their cards on the table, it will certainly be interesting to see what Microsoft's offering will bring and whether they will contribute any innovations to the industry.

01 February 2013

An Update on Distributed Computing on Mobile Devices

Over a year ago I wrote a blog post about an idea that I had had since college. In that post, I proposed using smartphones as platforms for distributed computing projects. This was because desktop usage has decreased dramatically in the last few years and new server consolidation technologies are making it harder to run intensive distributed computing projects in single instances.1 I saw that there is great value in distributed computing projects like SETI@Home and Folding@Home, and even after I wrote the post I continued to yearn for enough time to make a proof-of-concept.
Earlier this week, Tony of ClockworkApps tipped me off to his implementation of a mobile distributed computing application for Apple's iOS devices. Though I personally don't own an Apple iOS product and thus can not try out the app myself, the fact that an implementation now exists for the concept astounds me and I congratulate Tony on the achievement. I'm excited to see that others are now recognizing the untapped potential in distributed computing on smartphones, tablets and other mobile devices and look forward to the standardization and implementation of this technology for all device platforms in the coming future!


1 - Though more and more "cloud software" is quite distributed, running singular programs to do intensive, long-running distributed computing tasks yields no benefit if those programs run in virtual machine instances on a single machine. Running multiple distributed computing tasks like SETI@Home or Folding@Home in their own virtual machines on a single server does not make sense. Not only does the server have to deal with the overhead of running each of the virtual machines, the processing of the tasks end up taking a performance hit since they are now emulated and processing is at the mercy of the hypervisor and its CPU timing. Instead, if a distributed computing program was properly tuned and run on a multi-core server, the performance would be drastically improved since the computing task would have near complete runtime in each core without overhead or dealing with processor/core timesharing. Granted, a lot of engineering has been done to minimize the overhead of virtual machines to increase the performance of the applications contained within them, but realistically nothing can surpass the performance of running as close to bare-metal as possible.

22 September 2012

My Entertainment Cabinet Cooling Project

Since 2010, we've had a new entertainment cabinet and TV stand that we bought at Costco that has housed all our media equipment. It is a pretty nice wood cabinet, with 2 cabinets on either side, each with a slide-out shelf in the middle. The doors to each cabinet have replaceable panels, which we decided to have glass put in them. It fit our needs extremely well, but had one large downside: the back panels for each of the cabinets only had holes for the wires to go through and, thus, did not provide enough ventilation.
Now, for some time this wasn't such a problem but as we began to upgrade and get new equipment like a DVR and Logitech Revue Google TV unit, these always-on units produced a lot of heat, and so closing the doors wasn't an option. Closing the doors only trapped the heat in the cabinets, and it got so hot in the cabinets that you could feel the heat from inside the cabinet on the top of the cabinet. For over a year, we just kept the doors open, occasionally pointing small fans into the cabinets when it got particularly warm. But I was never satisfied with this "fix" as it looked messy, so I resolved to come up with a cost-effective solution.
At first, I wanted to go all-out and buy 4 PC case fans controlled by an Arduino which could monitor temperatures in each of the cabinet sections and independently control the fan speed for each.This seemed like a really great way to go, but without enough electronic engineering knowledge, it seemed like it would be a daunting task and a bit overkill for the basic problem that I wanted to solve: I just needed some fans to cool the cabinets. So I brought the problem back to its roots and began listing the requirements for my cooling project:

  • A minimum of 4 fans: 2 per cabinet, 1 per shelf.
  • Each fan needed to move as much air as possible in their sections
  • The setup needed to be low power
  • I needed to have a mesh filter for each fan to keep a) the cats from hurting themselves by sticking their paws into the fans, and b) to reduce dust.
  • I needed a way to control power to the fans, monitor temperature and optionally monitor or control fan speed.
Aluminum PC case fan mesh filter (left) and Cool
Master Turbine Master Mach 1.8 PC case fan (right)
In my research, I stumbled on the Cool Master Turbine Master Mach 1.8 PC case fans. These 120mm fans were large and moved more air than conventional PC case fans and seemed like the perfect fans to use. They were a little more expensive than other conventional PC case fans at $13 a fan, but for their size and power, it didn't seem so bad. I also found some aluminum PC case fan mesh filters for $3 a piece. These would be good to provide protection for the fan.
Finally came the question of providing power to the fans and controlling & monitoring them. I stumbled on the Thermal-Star 7 Fan Bus, an inexpensive power bus with fan speed and temperature monitoring. Though the unit could not control the fan speed based on the temperature, at only $20, I figured that this was not a huge loss as it could still power all 4 fans and monitor temperature and fan speeds. I figured I could still control the power to the whole setup using a simple outlet timer that I had lying around. Finally, since the fan bus required a molex power connector to power itself and the fans that were connected to it, I bought a $13 Coolmaster 12v Power Adapter.
Back panel with holes for the fans
Once the items finally arrived at my doorstep, I knew it was time to dig deep into my inner man and break out the power tools. I'm definitely not a handyman, so after some careful measuring and planning, I used a jigsaw to cut the fan holes and a drill to cut the screw holes to hold the fans into place into the back panels. There was a little bit of difficulty cutting and drilling the holes I needed as I wasn't aware that the panel was actually a laminate, so part of the wood stain began to splinter off the backing plate as I cut. This required the use of special laminate cutters and quick cutting to reduce the amount of scaring to the wood panel. But once the 4 fan holes and 16 screw holes were cut, it was time for the fun part: mounting the fans and wiring the whole rig up!
I love putting things together. It reminds me of my childhood with Legos and taking electronic things apart to see how they work, then figuring out how all the pieces fit back together. I even enjoy putting Ikea furniture together, though the amount of time it takes is a negative point for it. Thankfully this job was a lot easier than putting together an Ikea bed frame since all it took as putting small bolts with nuts through each of the holes to hold the fan and filter to the wood panels:
Mounted fan and filter facing outside the cabinet
The mounted fan on the inside of the cabinet
After all four fans were mounted, it came time to test all 4 fans to make sure there was no loose bolts and excessive rattling:
All the fans powered and spinning with the fan bus
Now came the time to disconnect the test and put the back panels back into the cabinet and connect it for permanent installation:
Fan panel installed into cabinet
Finally, I cleaned up and put everything back into the cabinets. I connected the fan controller to a power outlet timer so that the fans would not be running at the middle of the night - the least likely time we'd be actively using the equipment:
Fans running with equipment back in the cabinet
After having the setup running for the past week, I'm pretty impressed that everything came out pretty well. Though the setup is a little noisier than I had previously expected, it was no noisier than a regular PC. Before the fans, the cabinet with our DVR was the hottest and quickly reach 113F if the cabinet door was closed. Now, with the door closed and the fans running, the temperature in the cabinets usually stay around 88F. Though the major goals for this project have been completed, there are still some things that I have left to do:

  • Buy extension cables for the fans to the fan bus since the cables are just a tad bit to exact for the length of the cabinet.
  • Figure out how to reduce the noise of the fans further.
  • Build an Arduino controller to control the speed of the fans independently based on the temperature and time of day.

25 June 2012

Fifth Anniversary at S4i Systems

Another anniversary has come and gone without fanfare. As I have done in the past, I completely forgot about my anniversary here at S4i Systems Inc and just now noticed - two weeks late. This last year has been quite the roller coaster, with a sudden jolt in the middle of it all. In particular, the last 8 months have been particularly trying for all of us here, but things seem to be leveling out and the high stress we've been experiencing has finally started to wane a little.
Being the "IT guy," I've been working hard fixing, upgrading and implementing new things to make the lives of my coworkers easier and the infrastructure more stable. In the last couple months alone I successfully deployed a hosted collaboration solution in our company and it is already showing promising returns. And throughout the past year, our development group has started to try new approaches to help us coordinate and become more effective, and I look forward to seeing the fruit of our labors. It feels very good to know that across the many concurrent projects that I have been working on here in the last year, things are starting to wrap up successfully and that they are being well-received.
I look forward to what the next year will bring, and am excited to see what I will learn. I know that there will be a number of difficulties along the way, but things seem to be accelerating, and it is exciting to know that I am a part of it all.

25 May 2012

Being a geek and losing an identity

As Geek Pride Day draws to a close, today I am reminded of how I came to become the person I am today, and how my geek identity has changed over the years. Ever since I could remember, I've been fascinated by science, technology and video games. The scientific quest for knowledge helped me excel in a majority of my schooling. Video games kept me entertained and intrigued me with how they were made and the interesting ways stories were translated into code, but engineered so that children could pick up a controller and progress through it. But the greatest influence in my life has always been my interest in technology. If you ever ask my parents, they would tell you I always took apart things and was always playing with broken electronics to see how the everything worked together, even if I never really understood how it all worked at the time. It was the combination of all these things that drove me into the software industry and instilled in me a passion for it.
Throughout my elementary, middle and high school years, gaming was important to me. It was my pastime of choice, alleviating the juvenile stresses of homework and keeping my reflexes sharp. I also prided myself in playing some of the latest games that I got to rent, and, for a time, even renting or owning some of the newest consoles. I was the guy in my group of friends that played a lot of games and could answer a lot of questions about them. It was a part of who I was, and my friends accepted that. But when I reached college, the time I had to play games began to dwindle at a rapid pace. Between having a part-time job to pay for school, the college classes themselves and the endless pile of homework, video gaming time became precious and I began to notice that my gaming chops were starting to dwindle.
They say that relationships require a lot of dedication and responsibility, and being a naive young lad, I thought I could squeeze one in and still have time to play games. Boy, how naive I was. After meeting my significant other, my time was now split between work, school, home and spending time with her, and virtually any other time between each was spent driving from place to place. It was also around this time when mobility was important to me, and I began my transition from a tower PC user to a "road warrior." I had been driving around so much at the time that I began to change the idea of "home" to be the place where the people I cared about were. And, as most people do, home is where most people have their computers. Thus, I always had my laptop with me so that I could do what I needed wherever I needed to do it.
Years have come and gone, and I am still using the 3rd laptop I've ever owned, never looking back to the days when I built and maintained the family tower PC. My laptop helped me grow as a software engineer, and helped me gain the skills to succeed in the software development industry.
Fast forward to today, and I look back with a some longing. For so long I had focused on the other things in my life that it now feels odd to play video games. I can no longer sit for more than a couple hours playing video games, though I sit for more than 12 hours every day either driving to or from work or at my desk. I hear of new games that have the gaming community all abuzz but I can't seem to connect with them. Games that have a social aspect are foreign to me, as my gaming had begun to dwindle around the time when multiplayer online games were starting to become more mainstream. And the genre of games that more and more people enjoyed were not in my set of interests; RTSs and MMOs  could never really keep me as interested as platformers, FPSes, racing, and puzzle games. Moreover, many of the titles that more and more people were playing were designed for more computers that were more powerful than my laptop. I did not want to build a computer again, spending hundreds of dollars on a machine that would be practically only used for games which gave no guarantee on whether the hot game that would be released 3 years in the future would be playable on the best PC parts I used today. I could not justify the on-going expenses of a tower PC at home when I had to be a responsible adult and pay the bills. I had grown up on consoles as gaming platforms and felt that my investments on them were more sound in terms of longevity and the guarantee that the games I bought for the platform would work when I brought the game home.
Slowly but surely I began to notice that I was being silently removed from the gaming community. I was - nay, am! - becoming an outmoded gamer, and I am only 27! Even though I participated to the annual pilgrimage to Seattle to attend PAX, arguably the Mecca event of the geek and gaming community, and even though I felt more at home with fellow geeks from around the world there, returning home I still feel that I could no longer call myself a gamer. New games are getting harder to get into for me, and I am almost exclusively playing games from either the Halo, Portal or Mario franchises mainly because they are familiar to and still bring me joy. Even innovative games on newer, mobile platforms such as Angry Birds or Cut the Rope doen't hold me captivated and entertained like they would have 10 years ago. My life has certainly been changing, and though I am still very passionate about gaming as a whole, I feel like that part of my identity is lost, and it makes me sad for one very important reason: because it means that I am becoming an adult and losing the things that made me young, and this makes me sad.

04 March 2012

On Classic Games & Multiplayer Servers & Virtualization

Jerry Holkins of Penny Arcade recently posted a tidbit along with with their comic talking about how major publishers have been shutting down their multiplayer servers for old games. In it he discusses that the games, though antiquated and not played often, are being shut down but don't (at the surface) appear to require too many resources to run, especially when system specs are compared to today's off-the-shelf offerings. This article came at just the same time that I was trying to set up a virtual machine to host a FPS that I grew up with: Unreal Tournament. Not the new ones, the original. Before (and including) the "Game of the Year Edition."
It seemed to fit: Unreal Tournament, at the time, provided an early Linux version of the game and its server component, and Linux virtual machines require little processing power. With the multitude of virtualization platforms currently available, some of them free, it made perfect sense for me to be able to set one up to play against my younger brother like we had in old times with minimal overhead. And thanks to a host of virtualization features, I could start, stop, move and clone instances of the machine to meet demand efficiently should I want to publish my server to the legions on the Internet.
The article, combined with my own experience setting up virtual machines, made me realize that there were very few reasons why game publishers couldn't just migrate old games to virtual machines and allow the games to survive through time. Granted, there are some very important technical reasons why publishers couldn't move in this direction, but I can't seem to think of a single reason why those technical problems couldn't be overcome with other freely-available software online. For example, many older games used IPX as their networking protocol. This was fine at the time when TCP/IP and the Internet were not widely used, but now is a huge problem as the protocols are completely incompatible with each other. However, there are software packages, like that provided by the Classic Gaming Arena, that allow users to tunnel IPX over TCP/IP, allowing people to continue using older protocols on the Internet, and, by extension, allow them to play their classic games with their friends and other classic multiplayer gaming enthusiasts.
All of this combined has made me consider how difficult it would be to set up a service for classic gamers to have a home where they can continue to play their multiplayer games well after the publishers have shut down official servers. In fact, I've even considered reaching out to the game publishers for a chance to get the server programs themselves for those games that did not provide the server components to consumers to allow them to host their own multiplayer games. I know that there are a lot of legal hurdles that could need to be overcome as well, but I think the idea of continued revenue on continued purchases of older games would be enough of an incentive for publishers - they would have little to lose!

23 February 2012

Android Tips & Tricks: Creating a shortcut for Google Latitude Check-ins

For a while Google Maps for Android has had Google Latitude, a feature that allows you to share your location with friends and see where they are checked into. This feature is very similar to Foursquare's location check-in, but with a recent update, Google Maps for Android now has a leaderboard to compare the number of check-ins you've accumulated in the day to people in your Circles. Its a fun way to compete with others in your circles. However, one thing that is missing is the ability to have a shortcut to check-in from your Home screen. Though there is a widget that can allow you to check in, it takes up a fairly large amount of screen real estate. For those of us who don't wish to clutter our Home screen with the large 4x2 widget, there hasn't been a good solution - until now.

19 February 2012

Snow Day 2012

Ashley & I had a great time with her family this past weekend in Big Bear. I was able to go snowboarding again for the first time in several years with her cousin while she spent some time with her aunt. It was a long overdue trip, but fortunately the weather, time and, most importantly, company came together perfectly to allow the both of us to truly enjoy it.
My concern now, though, is that my car has started to make a loud squealing noise while driving that is worrying me. It is only intermittent, but when it happens, it is a bit alarming. It could be the brakes, belts, or something much more sinister (& expensive).
Update: Added some pictures from our trip to Big Bear. Check them out below:

09 February 2012

Wake Up Call

So on my way into work today I was almost rear-ended by someone doing 40+ MPH on Ortega Highway near the Lookout Restaurant (see this map for where this whole event occurred).
In the windy roads just before the restaurant going eastbound, traffic had dead-stopped for some reason and I was at the end of the line of cars. A guy driving with a passenger (possibly a girl) in an older Jeep Cherokee zoomed up behind me and I guess didn't realize that we were stopped. He had to swerve out of the way into a set of bushes next to me to avoid hitting me and shoving my car into the car in front of me etc.
He and I were very lucky that he was able to swerve at a point in the road where there was room. Most of that windy part of the road is very narrow, and the east-bound side of that part of the road has guardrails. It just so happened that I was stopped near the driveway to a home that was for sale, and as a result, he had a little more room to avoid me than if I was less than 100ft from where I sat.
It definitely scared me a bit, especially since I was barely able to see what was going on behind me since the sun had created too much glare to clearly see who and what was coming up the road behind me. Its a good reminder for me that Ortega Highway can be a dangerous road and to constantly be vigilant.