Latest Publications

DigressCast Episode 7 by Tech65

Finally! I’m done with Episode 7! Sorry for the almost 2 months delay of DigressCast but there will be more episodes quickly released more often from now onwards. Anyway, we have our first listener of DigressCast joining us for this episode. We’re actually trying this new format for DigressCast to be a little more serious with a touch of funny. Let us know what you think of this format.

DigressCast Episode 7: The Semi-serious Tech Discussion

Code You Should Not Be Writing – Part 3

Well, this is part 3 already. I hope you’ve enjoyed and appreciated the last 2 part and understand my pain. Well, here’s something that doesn’t seem all too convoluted, but could have been achieved with just 1 line of code. By the way, just for those who don’t know, there isn’t really anything syntactically wrong with any of these code.

for (int i = 0; i < 24; i++)
{
    string strIndex;
    if (i < 10)
    {
        strIndex = "0" + i.ToString();
    }
    else
    {
        strIndex = i.ToString();
    }
    // ... do more stuff with strIndex
}

It’s slightly tougher to understand why this is bad code for those inexperienced. For those you understand why you should not write this code, good for you! You’ve got some developer sense in you. Till the next part, I hope you enjoy this code. Learn not to write like that, please.

The current state of the Microsoft community in Singapore

Disclaimer: What I write in this post does not represent my company, the community, Microsoft, or its employees. These are my independent thoughts of the current state of the Microsoft community in Singapore ONLY based on my own observations.

Where do I even start? How about last week when I was speaking at the recent event at Microsoft? I observed the following:

  1. The entire event was handled by an events company.
  2. The host, a Microsoft employee, only appeared for 2 minutes to introduce me and did not return again.
  3. Evaluation forms and ratings were expressively indicated to be more important to Microsoft than actual interaction and getting direct feedback.
  4. The host even got the summary of my topic wrong.
  5. There was originally supposed to be a Wine and Discussion session after my presentation, but since nobody knew about it.
  6. The audience were quiet, unresponsive, but were very forthcoming for one-on-one questions.

Based on my observations, my conclusions are that Microsoft is not doing a good job at engaging the Microsoft community at large. Thus, corroding the entire community infrastructure to a bunch of zombie people just receiving content and being told what they should do, rather than passionate individuals with their souls and fire ignited to speak out and contribute to the discussions.

A lot of you might say that the developer community in Singapore are so jaded by the problems that they just lost all of that fire. Let me give a huge rebuttal that I’m one of the co-founders of HackerspaceSG and I do not see that at all. We have GeekCamp, UnConference, BarCamp, and various other user groups out there with many developers that are so passionate about what they do, what they want to share, the pains and difficulties, and even the pleasures of developing on a certain platform and technology. So don’t give me that crap about developers are jaded. Not all are.

So what is missing at Microsoft then? What is Microsoft doing that is wrong? Let me break it into various points.

No familiar face during community events

Where are the Microsoft employees? Are the developer evangelists supposed to be attending all these events and care for the community? Why are they always stuck at meetings after meetings? Come on, it is your job to grow the community, care for it, and show that you’re the person in charge for their needs.

Host not appearing at your own event

I don’t know, but doesn’t this sound like bad PR and marketing to me? Even appearing for just 2 minutes is NOT ENOUGH. I really have nothing else to say about this except good luck if you think you can continue doing this.

About your bonus, not the community

So here’s the problem I think is prominent with Microsoft Singapore. Everyone employed to cater for the community (aka developer evangelists) are troubled by Key Performance Indicators (KPI). This determines their performance in the company, thus affects their bonus or salary or re-contract. That’s why if you attend ANY Microsoft event, they always emphasize on filling up the feedback form and getting their metrics and numbers.

HELLO!! I agree you need that, but don’t you think that the basic requirements of a community like discussions and interactions is higher priority than feedback? You’re being paid to look after the community, NOT YOUR BONUS. Once you bring into focus the correct target, which is the community, everything will follow through.

Where’s the passion, Microsoft?

I always believe that there needs to be a catalyst in community building. Someone needs to be able to bring out that passion from each individual and keep the flame burning. If you’re a developer evangelist, I expect you to be the one since you’re being paid to do so. You just need a few people with the energy and passion to create the culture and vibe across the community and you’ll start to see individuals speak out. Where are these individuals? I know of only one, Dennis Chung.

Making use of Microsoft MVPs

I keep telling everyone this, that Microsoft MVPs are not Microsoft employees. To you Microsoft employees, we are not your BITCHES. The reason why we’re awarded as MVPs is NOT because we grovel and lick your feet, wag our tails at your every achievement, it is because we are an independent voice that is NOT Microsoft, providing an objective view to what is good and bad about Microsoft technologies, and providing alternative solutions to problems with Microsoft technologies. Despite all the failures and flaws, we care enough to want Microsoft to improve and create better products and technologies. If you think we’re just there to “evangelise” and you want to force us not to say anything bad about your technologies, THINK AGAIN. We’re not your BITCHES. You can very well threaten to take away my MVP award for all I care. I will still continue doing what I’m passionate about, which is to share my objective view towards what’s great and problems with Microsoft technologies. If you think you can make use of MVPs and treat them like that, I’m sorry but this is very degrading of what the entire MVP program is about.

One way transfer of knowledge

I realise that Microsoft Singapore’s events are so caught up in trying to get people excited about cool technologies, and their newest and greatest innovations that they forget about the 2 way knowledge transfer called discussions. Many developers out there still use the older technologies by Microsoft and they want to talk about their problems. Or maybe their cool solutions and workarounds. To grow a community, you need community engagement. IMHO, Microsoft Singapore has gotten the meaning of “engagement” wrong. Engagement is a 2 way flow of discussion where you need to encourage the community to voice out their displeasure with certain technologies, or talk about their experience with Microsoft technologies. It is much more convincing to get the community to talk about it, rather than Microsoft evangelists.

Your events are so passe

Hey, do you know the difference between barcamp, geekcamp, unconference, versus Microsoft Singapore’s own event? The biggest difference is user-created content. The people actually using the technologies come out to talk about it, express their feelings. I attend all these non-Microsoft events and I see a huge difference in the vibrancy of the community I am sad by the fact that Microsoft Singapore themselves are just killing themselves with their old thinking and KPI driven techniques. My advice to you? Rebuild the community again and show your social passion. Encourage community content rather than you providing the content.

Different Developers

Oh I’m sorry, but you concentrate on different types of developers? Yes I agree that there are different types, but neglecting any of them for a long period of time is really your loss. I stress again, developers are developers. You neglect some, you neglect all. Rethink your strategy, and not base everything on your KPI.

The current state of the Microsoft developer community?

I call them zombies. Jaded by the fact that they don’t have the power to influence or make a change at all. All these built into them by the consistent marketing propaganda that is being stuffed into them by Microsoft. Imagine taking away the voice of someone, forcing that person to listen to music he hates without the ability to voice out “STOP IT PLEASE!” Well, that’s exactly what I see the Microsoft developer community to be right now, and I’m very sadden by this fact. I look at other non-Microsoft developer communities congregating at HackerspaceSG and other places, and I continuously ask myself, why isn’t Microsoft doing what these other communities are doing with little or no money at all? Then I come back to reality that it isn’t about community, it is about numbers.

I know I’m going to get very screwed by a lot of people from Microsoft Singapore, but I feel they need a wake up call and realise the current state of the community. I care enough to voice out to the Microsoft community that you need to stand up again and be passionate! I was there back in 2004 when I co-founded SgDotNet and I saw the passion. I was there again in 2006 when Chewy Chong took over as Developer Evangelist and I saw the passion. Now that I’m back again in 2009, I see a dying community.

Where are you now?

HackerspaceSG: Thu, 17th Dec – Some Stories about Context Hacking and Asia

Sorry guys, but this is a super last minute event from HackerspaceSG which we just got word from Johannes Grenzfurthner yesterday of his intention to rant with us about his experience with context hacking.

For those who are unfamiliar with the rant: it is a tradition of performance art which was developed in Europe in the 19th century and successfully ported to the Internet in the early-to-mid 1990s. It is now being introduced to Asia by aesthetic pioneers like Johannes Grenzfurthner.

In recognition of Singapore’s leading position as the financial and cultural capital of Asia, and of Hackerspace.SG as the leading hackerspace in Singapore, he has chosen Hackerspace.SG as the venue for his first Singapore performance of this artwork.

We invite all members of Hackerspace.SG and the related community to attend this rant.

There is no fee, though we wish to thank in advance all the wonderful people who consume beer, wine, or soft drinks, for their cash donations into the little glass that says “your donations are welcome.”

For the purposes of licensing under Chapter 257 Section 319, this is an exempt entertainment as defined by the Public Entertainments and Meetings (Specified Arts Entertainment) (Exemption) Order 2005.

Details follow.

monochrom and the East: Some stories about Context Hacking and Asia
A tour-de-farce by Johannes Grenzfurthner of monochrom

monochrom is a worldwide operating collective dealing with technology, art and philosophy and was founded in 1993. So to sum up, monochrom is an unpeculiar mixture of proto-aesthetic fringe work, pop attitude, subcultural science, political activism and technological disaster.

Johannes wants to tell us stories about monochrom’s “context hacking” projects that specifically deal with our focus on contemporary Asian topics.

The term context hacking—like its mimetic sibling “communication guerrilla”—refers to unconventional forms of communication and/or intervention in more conventional processes of communication. Context hacking is a specific style of political action that observes and makes visible the paradoxes and absurdities of power. Context hacking uses absurdities as the starting point for interventions by playing with representations and identities, with alienation and over-identification.

Managed Code within LINQ Pitfall

I thought I’ll post this in case anyone else encounters this problem. The purpose of the method is to get back a set of ClientContacts filtering based on the ClientID and select only those active if the onlyActive parameter is true, else ignore the IsActive filter and return all the records.

Here’s my LINQ query with a simple if-else shortcut within it:

public IQueryable<ClientContact> GetClientContactByClient(int clientID, bool onlyActive)
{
    return from clientContact in this.db.ClientContacts
             where clientContact.Client_AutoID == clientID &&
                      onlyActive ? clientContact.IsActive : true
             select clientContact;
}

Notice line 5? Here’s where I got this code wrong. The above code generates the following SQL statement:

SELECT *
FROM [dbo].[ClientContacts] AS [t0]
WHERE (
    (CASE
        WHEN [t0].[Client_AutoID] = @p0 THEN CONVERT(Int,[t0].[IsActive])
        ELSE @p1
     END)) = 1

If you actually work it out, this SQL statement will always return all records.

Here’s the change I made on the code to fix it.

public IQueryable<ClientContact> GetClientContactByClient(int clientID, bool onlyActive)
{
    return from clientContact in this.db.ClientContacts
             where clientContact.Client_AutoID == clientID &&
                      (onlyActive ? clientContact.IsActive : true)
             select clientContact;
}

Notice the brackets I added? This resulted in the generation of the following SQL statement:

SELECT *
FROM [dbo].[ClientContacts] AS [t0]
WHERE ([t0].[Client_AutoID] = @p0) AND ((
    (CASE
        WHEN @p1 = 1 THEN CONVERT(Int,[t0].[IsActive])
        ELSE @p2
     END)) = 1)

Again, if you work it out, this is the correct SQL statement to achieve what I want. I didn’t know a set of brackets make such a huge difference in the SQL code generation. Do take note of this when you’re finding out why your LINQ query doesn’t work as you might have thought.

HackerspaceSG: Events of Week 51 (Dec 14 – Dec 20)

We had a great time over the weekend at Neoteny Singapore Camp 1 and everyone was very excited about HackerspaceSG. Apparently everyone who attended NSC1 are all hackers themselves and don’t want to leave our HackerspaceSG. So here are the events of this week.

Make cool things with Mitch Altman
Mon, Dec 14 6:00 pm to Late

Wow! Did I mention people don’t want to leave HackerspaceSG? Well, you shouldn’t! Because one of the founders of Noisebridge, Mitch Altman, is in the house! Yes, you heard me. He’ll be teaching us how to make awesomely cool things with micro-controllers! YES! If you’re one of those interested, you’ll be learning from the man himself. Come! Join us for this experience of a lifetime. There will be kits available for purchase on the spot. They are all priced in SGD.

LED Cubes, TV-B-Gone,Brain Machines, Drawdio, Mini POVs  ( $30 each )
Trippy RGB lights ( $15 )
Boarduino – $30
AVR Programming Boards – $30

Check out http://www.ladyada.net/make or http://www.tvbgone.com/cfe_mfaire.php if you’re unsure what the above are. But I’m sure you already know where to look for information.

Pivotal Labs Seminar on Next-Generation Software Engineering with Ruby and other languages
Mon, Dec 14 7:30 pm Mon, Dec 14 11:00 pm

If you’re not interested with micro-controllers and robots, you might be interested in some software engineering. We have Pivotal Labs, software ninja SWAT team of the Internet, joining us to share their valuable knowledge with us. They are the guys who saved Twitter. Yes, that’s right, the famous Twitter that everyone uses. They are in town for NSC1 and would like to meet the local community of developers to talk about software engineering best practices, agile development methodologies, and scaling Ruby. If you think of yourself as the Tiger Woods (sans drama) of software development, or would like to one day be one of the best, join us. If you think of yourself as a CMM Level 0 up-all-night rebel superhero, this session may inspire you to realize your potential through discipline … kind of like a self-taught street punk going to train under kung fu masters at Shao Lin. Just join us! No registration required.

Hackerspace Hack Time
Tue, Dec 15 6:00 pm Wed, Dec 15 12:00 am

We’ve moved our Hack Time from Monday to Tuesday this week simply because we have too many awesome people in our home who are excited to share and discuss with us. So after learning all that cool robotic micro-controller mayhem, together with your ninja software engineering skills, why don’t cool off by working on your own projects? We have reserved this day just for you.

Hackerspace.SG Christmas Party
Fri, Dec 18 7:00 pm Fri, Dec 18 11:30 pm

Jingle bells, jingle bells. Yes, we’ve survived our first month of HackerspaceSG without a celebration of our very own Christmas Party. If you have always been thinking of popping by HackerspaceSG to see the space itself, this party will be a great time to do so. You don’t really have to RSVP, but sometimes it is always good to know who might be coming. Post your suggestions on how we can do this. I hope to do a PotLuck Style with people bringing food, together with some basic catered food. Plus our usual drinks, beer, wine and alcohol in the house. As usual, we hope you can contribute to our pot of donations. I’ll see all of you there at the party!

Hacking Sexual Morality Through The Ages
Sat, Dec 19 19:30 Sat, Dec 19 22:30

If our own Christmas party hasn’t gotten you worn out yet, you can join us again next evening for a meeting on sexual morality.

So we all know that Religions tell their faithful: No fornication, no adultery, no anal sex, no oral sex, no homosexuality, no pants, no short skirts, etc. Secular humanists however have no prescribed text to follow, no holy men to guide us in the finer points of dating and sex. Does this imply a no holds barred approach? How should Humanists navigate the minefields of love and lust? How should Humanists manage relationships with people of faith?

Laptops… Operating Systems… SD Cards?

Here are my thoughts on something I think might be interesting.

What if operating systems are installed on your 8 gig SD card? Yes, any fully installed operating system like Windows 7, Snow Leopard, Linux can be stored in an 8 gig SD card. The prices for an decent 8 gig SD card costs about $30 or less.

And what if these SD cards are locked and made not writeable except for system updates? Any changes made to the operating system will be on an normal hard drive as per normal. This prevents any malicious code modifying the operating system, and it also keeps the operating system clean and pristine. In fact, returning back to the original system will only require a clean wipe of your hard drive OS settings. But any security or system updates are still kept, so you don’t have to reinstall all those updates and drivers again.

Sadly, the read speed of the SDHC and SDXC aren’t high (but I think higher than normal hdd?) enough to make this possible and realistic enough. Maybe in the future. Who knows if this idea will become the norm.

Code You Should Not Be Writing – Part 2

I hope this series becomes popular enough for bad developers to notice code like this. Because these code is really what’s out that! I’m serious! Next up, abuse of try-catch. This is how type validation is done. Wonderful, isn’t it? And look at the wonderful booleans associated with the try-catch logic? Doesn’t that just make you cringe?

DateTime newDateStart;
DateTime newDateEnd;
string errorMessage;
int index = 0;
bool isInputValid = true;
bool isSingleDayLeave = true;

try
{
    // dateStart is a string assigned from above this code snippet
    newDateStart = Convert.ToDateTime(dateStart);
}
catch
{
    index++;
    errorMessage += index + ". Date start should be given.<br />";
    isInputValid = false;
}

try
{
    // dateEnd is a string assigned from above this code snippet
    newDateEnd = Convert.ToDateTime(dateEnd);
    isSingleDayLeave = false;
}
catch
{
    isSingleDayLeave = true;
}
// ... more of similar code below.

Infer.NET – Now with F# support

Infer.NET is a framework for running Bayesian inference in graphical models. You can use it to solve many different kinds of machine learning problems, from standard problems like classification or clustering through to customised solutions to domain-specific problems. Infer.NET has been used in a wide variety of domains including information retrieval, bioinformatics, epidemiology, vision, and many others.

Recently, they have released their Infer.NET 2.4 Beta 4 with support for F#! It’s pretty interesting how using Infer.NET in F# will be like in this very interesting Bayesian inference framework. I’m very sure syntax and the terseness of the language will start to show once it starts making full use of the language features of F#. Have a go at it. I’ll be playing with this in my limited free time.

You can learn more from their PDC 2009 talk Infer.NET: Building Software with Intelligence. Here’s the synopsis for the talk.

Would you like to write software that can adapt to the user, learn from examples or work with uncertain information? Infer.NET is a machine learning framework that lets you build these capabilities directly into your .NET application. The framework allows you to combine detailed domain knowledge with the latest machine learning algorithms to generate tailored code to solve your problem. An API based on random variables lets you call Infer.NET code from within your application. We provide examples of using Infer.NET in search and gaming.

Source: Infer.NET

10 things a PR person can do to make a Tech Blogger happy

I’ve been to some tech PR events for the past few months and I realise that not everyone in the public relations and marketing know how to handle the tech bloggers and geeks very well. So, not in any particular order, here are some of my thoughts that some events I attended actually made me happy.

1. Let each person have the actual gadget/device/software/product to play with.

I think this is important when introducing or launching a new technology or product. We’re geeks and if you don’t even have your product for us to try out and play with, it really defeats the purpose of us attending your PR event. We came to see something that we’re interested to write about, not some marketing BS.

2. Less Marketing, More Tech.

Traditional media usually write because they (hopefully) have the passion to write (full stop). Whereas for bloggers and social (or new) media, we tend to write because we have the passion in the things we write about. We do not report, but we write about our opinions, why we like certain products and why not, without any of that marketing BS you give us. So we’re pretty much unaffected by fancy words and flashy strategies. We just want to get into the nitty gritty details as soon as possible. We do want to understand certain rationale behind certain decisions too.

3. Be honest.

I think this tends to be the same for all around. We’re a forgiving group of people, different from the traditional media where the “scoop sensation” is what they are after. If you’re honest, be it about a mistake or not reading our blog, we’ll understand perfectly well. If you don’t know, just say you don’t know. But if you’re dishonest and we find out, we do not forgive all that easily for that.

4. Listen to our feedback and what we have to say.

The serious hardcore geeks always have feedback about any product that they are passionate with. We’re probably the one group of people you’ll find that cares for the product enough to want to improve it. So listen to us and take notes. We do not expect every feedback to be fulfilled, but at least we like to know we’ve been heard.

5. Give us the freedom to do anything with the product (except destroying it of course).

We try everything we can to find what we love and what we hate. Most PR events tell us what we should love, but none tell us what we should hate (and of course you can’t). So we love to figure out everything from scratch and ask for help later on. Do not try to lead us along unless we ask for it.

6. Do not ask us to post press releases and tell us what we can or should post.

Ultimate do not do. We do not look kindly to people who tell us to do these things.

7. Provide a conducive environment to talk and discuss.

I realise some PR events have lots of fancy flashy lights and loud music to impress. But frankly speaking, the best PR event I like the most is a place where we can discuss and talk about the product. Have that one-on-one personal time with the product. Tell us the product, and we ask you some questions. But please, make it conducive. You don’t have to spend a lot in order to get us engaged. Brightly lit places are great for looking at products and playing with it.

8. Be casual and have fun.

It really painful to meet a PR person that’s uptight, stressed out and not enjoying the event that he/she hosts. If you enjoy the event and have fun, we’ll also enjoy the event and have fun.

9. Provide us with the media kit that contains every detail we need, including photos.

Yes, some of us do not have cameras. Better still, send these through email so we can access the media kit from anywhere.

10. Learn and know your product.

If not, get someone who knows your product well enough to answer a majority of the questions thrown. We love technologies, and we have lots of questions about that technology. Remember, honesty is always good. Admit if you don’t know the answer and get back to us with the answers.