Posts Tagged ‘Microsoft’

Why I love C#

Monday, October 26th, 2009

BASIC was my first love. Notice the all caps -- that was how it was written back in the 80s. I discovered BASIC via a GW-BASIC manual I had found in my grandfather's boarding house, where a former tenant left it after graduation. From that lost book I was introduced to programming, and I moved from GW to QBASIC then to Visual Basic 4, jumping to VB 6 and finally, VB.NET. Visual Basic was my first foray into .NET, and with my skills back then, it was really, really good.

Along the way I met a bunch of other languages, though. In highschool we were also taught a data-oriented language called Clipper, and a weird semicolon-laden language called Pascal. It was the first time I saw line-terminators in a programming language. In college I finally got to meet C. Quite different a beast from BASIC, I nonetheless got the hang of C very quickly. It was terse, requiring fewer keystrokes to write in (there was no Intellisense back then) and I immediately kept all the keywords I needed in my head. It was great, but I didn't get to use it at once when I started working.

In the early years of .NET I was ambivalent between the choice of languages. I learned both Visual Basic and C# and said to myself -- what's the big deal between the two? Nothing much. So I just studied and learned and switched from one language to another, until one day I got introduced to object-oriented programming. OOP was a difficult, disciplined programming concept -- much harder to internalize than structured programming was. But that's where I saw what C# was good at: it was naturally geared towards OOP. I compared writing applications in both languages, and noticed that if I was doing OOP, it would be much faster if I wrote it in C#.

I had one last foray using VB.NET on a full-blown object-oriented designed application, and it just convinced me further that C# was the way to go. What nailed it further for me was when .NET 2.0, and then .NET 3.5 arrived. It was much easier to use and write generics, I could use anonymous methods (which wasn't possible in VB early on), LINQ was without hassles of unsightly underscores, and lambda expressions were just much more intuitively beautiful in C#. Likewise, with the ability to introduce unmanaged code, developers could also introduce more advanced tweaks that are impossible to include with VB.

C# empowers a .NET developer to realize the full potential of the .NET framework, aside from the language. This power becomes even bigger with the introduction of the dynamic keyword in C# 4.0, giving it the best of both worlds between static-typed and dynamic-typed languages. It is this power that convinced me that C# is the way to go.

So, why do you love C#? Why don't you like/love it? I'd love to hear your thoughts too. :)

Introduction to Test Driven Development Slides and Code

Sunday, October 25th, 2009

I did a talk introducing students to Test Driven Development last Saturday, October 17, 2009. This is basically same as the TDD Revisited slides, refined slightly taking into account the student audience.

Last Saturday's talk was part of the IT Probe 2009 event held at Adamson University in Manila, by the Junior Philippine Computer Society.

An Introduction to Test Driven Development

Here's some pics from the event:

I'd like to thank the officers and members of the Junior Philippine Computer Society of Adamson University for inviting me over.

Twitter, Facebook and other Social Network APIs on ASP.NET at UST

Monday, October 19th, 2009

I reduxed my talk on Social Network APIs for UST students last August 29. Just wanna share the pics on this one:

There were over a hundred (something like 130) students that attended this talk. Hopefully I didn't bore all of them to sleep :P

Thanks to the UST ICS Dept. Section A of the College of Engineering for inviting me. :)

MVP for Visual C#

Thursday, April 2nd, 2009

Microsoft_MVP_logo I'm very happy to announce that I've been awarded the Microsoft Most Valuable Professional Award for Visual C#.

Oh wait, I'm not just happy. I feel so freaking awesome I can't even sleep! :P

With this award I'm looking forward to working with and serving the local MS user community even more. Thanks for those who have supported me in my community participation all these years. :)

Pahabol: Pinoy Tech Podcast Episode 03

Monday, March 23rd, 2009

Before we hit Skype for Pinoy Tech Podcast Episode 4, I'd just like to post the link (pahabol lang) to Pinoy Tech Podcast Episode 03: The 40 day social network abstinence, which I wasn't able to join since I was at the hotel in Cebu chilling with the great people from Microsoft after the very successful Web Ramp Up event there. To all our friends and attendees in Cebu, daghang salamat!

We're going to discuss a little about the history of the internet in the Philippines (something we've been doing in tidbits the past 3 episodes anyway) and then go on to discuss about the state of computer science education in the country, so do watch out for the next episode, which would most likely come out this Saturday.

The Twitter WPF app I shouldn’t have missed for my demo

Monday, March 9th, 2009

With the Web Ramp Up held last February 26 coming up fast, and with work piling up the pressure, not to mention a job performance appraisal I'm not happy about (totally my fault, but busted my morale nonetheless),I totally missed out on my podcasts the whole month of February. So on the morning of the 27th I fired up iTunes, synced my iPod, and totally found the one Twitter WPF client that I should have talked about during Web Ramp Up!

blu_TwitterClientScott Hanselman of Hanselminutes talked with the creators of blu, a WPF Twitter client made by a design company called thirteen23. And boy was I blown away.

It was one of those Homer Simpson "doh!" moments where I reminded myself that even if I'm uber-busy, I should stop and look at my RSS feeds and updates, which might yield something both new and relevant to whatever I am doing at the moment.

Oh, and the feature that I was trying to add to Witty, wherein I was retrieving the "source" tweet of a certain reply tweet? Blu actually has that feature. I'm totally impressed!

You can download blu here.

Of course, those attending the Cebu edition of Web Ramp Up will get to see blu integrated in my presentation. See you guys in Cebu on Friday!

Refactoring my Web Ramp Up Coding4Fun presentation

Monday, March 2nd, 2009

One of the peculiar circumstances of the recently concluded Web Ramp Up 2009 for me is that I will be doing this presentation twice: after last week's event as SMX, we're going to do it all over again this time in Cebu, on Friday, March 13.

Now, having conducted the presentation last February 26, I was able to browse through the evaluation forms, and immediately got feedback and criticism regarding my talk. This gives me a unique opportunity to refine my talk based on that feedback -- retain the good stuff, take out the bad, and do it all over again on the second Friday the 13th of the year.

What had happened underscores the importance of those evaluation forms they give out during MSDN Sessions and Microsoft seminars: it gives us speakers the chance to find out how we did, and give insight on how to improve our material. So for those who gave substantial, concrete feedback during my talk, whether it was positive or negative, thank you very much.

Of course, for the benefit of those in Manila, I'll be posting the revised slides a week or so from now, so do watch out for it.

For those in Cebu, see you next week!

Resource links for Microsoft Web Ramp Up – Coding4Fun: Facebook, Twitter, & other Social Networking Apps with Silverlight and WPF

Friday, February 27th, 2009

This afternoon I conducted a talk on Facebook and Twitter applications using Silverlight, and a lot of people might have missed the links that I showed during the presentation. So here they are:

These links would serve as a good starting point for those who want to make their own Facebook and Twitter apps.

Repeat after me: Test Driven Development is about design, NOT testing!

Friday, January 30th, 2009

A few weeks back while listening to .NET Rocks Episode 408, I cringed so badly when I started hearing Dr. James Whittaker, who is, apparently, in charge of Visual Studio Team System's testing tools (which I surmise includes the oft-admonished MS Unit Testing framework), talk about test driven development and his gripes about it.

Right then and there I saw it: Microsoft's attitude about test driven development has been totally wrong, precisely because they were asking the worst possible person about it. Whittaker is the worst person to talk about test driven development, because he's focused on testing.

Microsoft failed to understand, outright, that test driven development is NOT about testing.

Scott Bellware responded to Whittaker's statements via the Hanselminutes podcast, wherein he offered The Last Word On Test Driven Development on Episode 164. There, he questions (at around 5:30 into the podcast) "why test-driven development is coming out of a conversation about software quality and software quality tools":

I think it's quite sad though that no matter [how much we tell people] that TDD is about design rather than testing, that it never really sank in...

Questions about software quality are damaged when we let them fall over into conversations about test driven development...

The goal with [TDD] isn't really a unit testing goal although we're borrowing unit testing tools to achieve the goal... [We're almost like] "demonically" possessing unit testing to achieve other needs.
["The Last Word on TDD" on Hanselminutes]

I said as much when someone asked on Stack Overflow whether TDD takes focus away from design. In my response, I stated that it's precisely the opposite -- that, once again, TDD is all about software design:

If done right, Test Driven Development IS your design tool.

[...]

Test Driven Development, done right, should make developers highly aware of design pitfalls like tight coupling, violations of DRY (don't repeat yourself), violations of SRP (Single Responsibility Principle), etc.

If you write passing code for your tests for the sake of passing your tests, you have already failed: you should treat hard to write tests as signposts that make you ask: why is this done this way? Why can't I test this code without depending on some other code? Why can't I reuse this code? Why is this code breaking when used by itself? ["Does TDD take away focus from design?" on Stack Overflow]

The reason why I don't take this misconception lightly is because this realization came to me the hard way -- I was part of a project wherein Test Driven Development was grossly misunderstood by previous members of the project:

There was... a failure to recognize that TDD is not about tests, it's about design. The rampant case of singleton abuse in the unit tests made this obvious: instead of the test writers thinking "WTF are these singleton = value; statements doing in my tests?", the test writers just propagated the singleton into the tests. 330 times.

The unfortunate consequence is that the build server-enforced testing was made to pass, whatever it took["When TDD goes red" on Dotnet @ Kape ni LaTtEX]

The attitude Microsoft took regarding this issue explains a lot why testing is an add-on "luxury" feature to Visual Studio, which you pay extra for, and not part of its core features out-of-the-box, and on top of that made it definitely illegal to implement in Visual Studio Express. Hiring a testing expert to implement a software design engineering guide lead to the inevitable misrepresentation of the value of TDD.

Unfortunately, treating TDD as a luxury feature gives the impression to hobby and professional software developers alike that test driven design is nothing but a bell and a whistle in Visual Studio -- which it is not. Test driven development is a paradigm in software development, and to many it has become a fundamental way of ensuring that code for software of any size and complexity is flexible and maintainable and remains that way.

So repeat after me: TDD is about design. It's NOT about unit tests. Tell that to the every developer who asks what TDD is all about, and to every developer who thinks TDD is about testing.

Working through first quarter MS events of 2009

Monday, January 12th, 2009

I'm starting this new year with a bang with lots of activities lined up speaking about new stuff on ASP.NET!

The year starts with MSDN Session: Enriching ASP.NET Applications with jQuery on January 15th, 6-8PM, at Microsoft Philippines office in 6750 Ayala Ave., Makati City. I'm gonna speak about jQuery, an open source lightweight JavaScript library which works with Visual Studio 2008 and is going to be shipped by Microsoft for Visual Studio 2010. Click on the link to register.

That talk will be reprised on Jan 20 and 21, where newly minted MVP Eduardo Lorenzo and I will join forces to speak in Subic, Zambales and Clark Field, Pampanga.

Finally, on February 26, I am honored to be one of the speakers for the biggest developer event in the Philippines: Web Ramp Up. There I would talk about "Coding4Fun: Facebook, YouTube, Twitter and other Social Network Apps with Silverlight and WPF". Click on the link for information on how to register and purchase tickets.

Hope to see you in these events!