Thursday, December 13, 2012

Friday, November 9, 2012

Think Functionally - Writing program the functional way

After taking the "Functional Programming Principles in Scala" course on Coursera.org, my understanding and appreciation for "thinking" functionally grew a lot. One of the big benefits the course have on me is fixing my misconception on recursion. I had disliked writing recursive functions thinking it was very susceptible to stack overflow. Although this is true, the course explanation on tail call help correct my misunderstanding.

I was just browsing the IT forum on discuss.com.hk and came across a post on a university question on about writing a program to give change to for a vending machine (note it is in Chinese). Don't worry about he forum. Although there are a definitely a few good developers in there, the questions and discussion are generally of pretty low quality. I just browse occasionally hoping it will help me getting to know the IT industry in Hong Kong a little better.

I recall doing a similar problem in university for either an assignment or exam question, and I recall doing it the "Imperative way" with loops and states. It was an awful experience.
Now arm with thinking functionally, I took another crack at it and seems much easier.

Sunday, November 4, 2012

Completing the functional programming principles in Scala

I did it! Completed the final assignment #7.


I had doubts whether I had the will power to complete the course, but I am happy I did it. Not because I have to, but purely to satisfy my curiosity.

Now about Scala.

There are lots of veteran opinions on the topic of Scala:

Against:


While there are lots of merits on "issues" with Scala, it really boils down to Scala being a relative young language. I find the claim "Scala is too complex" bogus. Most things are too complex before you take your time to learn about it. Hell, programming is too complex for the average Joe without any programming background.

Scala exhibits the typical issues with a young language:
  • Tooling - such as build systems (sbt) and IDE (Scala Eclipse Plugin) have a lot to be desired.
  • Debugging - The are lot to be desired for a more sensible stack trace on error

However, just the 2 issue above is enough to justify not to use Scala in an enterprise project ... yet. This doesn't mean people should shun it though. 

Scala is one of the nature candidate to evolved into from Java, with both backward and forward interoperability with Java. Companies simply will not drop their years of investment in Java for the next shiny programming language. 

I think Scala community is on the right track though.

I believe through education, developers acceptance of  high order language will become wide spread. The productivity and efficiency provided by these higher order language will justifies the migration to it.

Hey, if not for the Scala language itself, spending time to just learning the concept of Functional Programming is a good investment.

Sunday, August 12, 2012

Hong Kong (mini) Maker Faire

I visited the 1st Hong Kong Mini Maker Faire. It was good to see there are still people making things beside financial products in Hong Kong.


There is even a DIY Segway. The creator claims it cost him less than HK$ 4,000. I guess Jackie Chan is not going to be too happy about this.


While there are plenty of 3D printers, this set of 3D scanner + editor is quite cool and the set cost a whooping HK$ 180,000!!


Monday, July 2, 2012

Building out DC Insight - Asset Management

I have been nerding-out over the weekends busy building out our solution for Asset Management. The ideas is to combine RFID technology, centralized software, and import/export capability with excel help data center operators manage their IT assets.
From my experience with working on DC Insight Monitoring solution working on the Active RFID hardware, integrating the hardware into the solution was a relatively straightforward process.
Over the pass few weeks, I focused my energy in building out the integration with the Passive RFID hardware, which requires a little bit more work.

After some hard work, I am proud to provide the first screenshot of the handheld software.


The idea is to allow the user to quickly scan the server rack and find out whether all the equipment are there. What this requires is a RFID tag for each server equipment and a RFID location marker tag. Here is what happens when a use scans the rack:

  • Handheld software picks up the tag id scanned and call out to the centralized software through the WIFI connection to retrieve the tag information, i.e. is it an Asset tag, Location marker tag or a tag not in the system at all.
  • Once a location tag is identified, the software checks to see whether current asset tags are at their expected location. Again, the expected location are stored in the central software.
  • Pull the list of expected asset at this location from the central software and see whether their are equipment missing.
  • Sort and color code the result, e.g.
    • Location tag (blue): place at the top of the list
    • Unexpected tags (various color in the middle): place in the middle to allow user to quickly see all the issues.
    • Expected tags (green): at the bottom.
If all goes well, the user should see just one blue row at the top and all other rows are green. Checking your asset status should literally just take seconds.

Wednesday, May 9, 2012

More Hardware options for DC Insight - Better solution to fit customer's budget and requirements

DC Insight is rolling along nicely with a few more projects coming down the pipeline. I am also pretty satisfied that we now have a very flexible solution which can scale from small rooms to large sites for both environmental monitoring and power monitoring.

Here are some quick diagrams which illustrates the concept:

For Environment Monitoring:

For Power Monitoring:


I have also updated our DC Insight solution page to show more detail.

Friday, February 24, 2012

As another customer learned, temperature can rise very quickly in a data center, causing your servers to shutdown

Today I get to visit a brand new data center still under construction. It is for a casino in Macau. Their setup is interesting with about 5 rooms of around 60 racks each. Judging from the state of the building, I am surprise to learn they have to be up and running by April! At least they have their data center operational while the building itself is still under construction.

Recently, they had an episode where apparently the chiller water supply was shutoff, and IT was not notified of the event. As the temperature rises in the data center, server began to overheat and shutdown. Only then, when the end user starts complaining did IT realize there was an issue in the data center. An the interesting part is, their data center is only at 20% capacity!


As we learned with another client, after we installed the DC Insight monitoring system in the data center, just shutting down one CRAC unit rises the temperature very quickly!


During the exercise, we took turns to shutdown 3 out of 4 CRAC units in the data center. As we observed from the above chart, the placement of the first and third CRAC made it crucial in the operation of the data center. Shutting down the first or the third CRAC, the data center temperature rises quickly, and within 8 minutes we have rack in-take temperature going over 30 deg C. Since, this is operational site the facility manager quickly restore the CRAC to avoid an issue. I guess they don't really have a N+1 cooling design after all :)

Now imagine if all the CRAC goes down at once, temperature can rise VERY quickly in a data center.

Friday, January 27, 2012

Uncluttered ancient network cables from office

Kung Hei Fat Choi! To kick of the year of the Dragon, I went ahead and completed new year resolution #1!


2012 Resolution #1 - Clean up spaghetti of network cables in demo room

With 30 years old company comes with 30 years old messes. I finally uncluttered the network cables underneath our raise floor in our small demo room.