Reading About Date and Time

| Comments

So is Noda Time perfect then?

Of course not. Noda Time suffers several problems:

Despite all of the above, I’m a rank amateur when it comes to the theory of date and time. Leap seconds baffle me. The thought of a Julian-Gregorian calendar with a cutover point makes me want to cry, which is why I haven’t quite implemented it yet.

I am getting more confused about this simple thing called date and time minute by minute…

Simple.Data and Dynamic Calls Are Awesome

| Comments

Couple of weeks ago I started to look into different open source packages on the .NET platform such as Nancy and Simple.Data. They all looked very cool, but one paragraph in an article called Introducing Simple.Data - explaining how the code snippet below works - caught my attention:

getting data from db
var db = Database.Open(); // Connection specified in config.
var user = db.Users.FindByNameAndPassword(name, password);

That’s pretty neat, right? So, did we have to generate the Database class and a bunch of table classes to make this work?


In this example, the type returned by Database.Open() is dynamic. It doesn’t have a Users property, but when that property is referenced on it, it returns a new instance of a DynamicTable type, again as dynamic. That instance doesn’t actually have a method called FindByNameAndPassword, but when it’s called, it sees “FindBy” at the start of the method, so it pulls apart the rest of the method name, combines it with the arguments, and builds an ADO.NET command which safely encapsulates the name and password values inside parameters. The FindBy* methods will only return one record; there are FindAllBy* methods which return result sets. This approach is used by the Ruby/Rails ActiveRecord library; Ruby’s metaprogramming nature encourages stuff like this.

Just read that sentence once again…

That instance doesn’t actually have a method called FindByNameAndPassword, but when it’s called, it sees “FindBy” at the start of the method, so it pulls apart the rest of the method name, combines it with the arguments, and builds an ADO.NET command which safely encapsulates the name and password values inside parameters.

This sounds like crazy awesome magic and I need to understand it!

How magic works?

To find out how the magic worked, I downloaded the source code from github and started to poke around the code. The rest of the article explains what I got out of this experiment.

All Navy Outside and a Pirate Dying to Be Released Inside

| Comments

She was then hired as a senior consultant to Digital Equipment Corporation, a position she retained until her death in 1992, aged 85.

Her primary activity in this capacity was as a goodwill ambassador, lecturing widely on the early days of computers, her career, and on efforts that computer vendors could take to make life easier for their users. She visited a large fraction of Digital’s engineering facilities, where she generally received a standing ovation at the conclusion of her remarks. During many of her lectures, she illustrated a nanosecond using salvaged obsolete Bell System 25 pair telephone cable, cut it to 11.8 inch (30 cm) lengths, the distance that light travels in one nanosecond, and handed out the individual wires to her listeners. Although no longer a serving officer, she always wore her Navy full dress uniform to these lectures.

Grace Hopper invented the compiler and coined the term debugging. The two things I do in most of my professional life. She must be a truly remarkable person and I owe her my job! :)

Stop the Troll

| Comments

What does this sound like? Yes, it’s a textbook case of a protection racket. It is organized crime, plain and simple. It is an abuse of the legal system, an abuse of the patent system, and a moral affront.

In the face of organized crime, civilized people don’t pay up. When you pay up, you’re funding the criminals, which makes you complicit in their next attacks. I know, you’re just trying to write a little app for the iPhone with in-app purchases, and you didn’t ask for this fight to be yours, but if you pay the trolls, giving them money and comfort to go after the next round of indie developers, you’re not just being “pragmatic,” you have actually gone over to the dark side. Sorry. Life is a bit hard sometimes, and sometimes you have to step up and fight fights that you never signed up for.

I think the last sentence is classic and I fully agree with it. Life is a bit hard sometimes, and sometimes you have to step up and fight fights that you never signed up for.

There are some very awfull software patents granted in the past and there are some, who are clearly abusing this system. Let’s stop these trolls together!

Exploring Xamarin iOS on Windows

| Comments

Xamarin not so long ago released the version 2.0 of their product that allows all .NET developers to use C# and .NET libraries to code apps for iOS and Android. Better yet, it allows us to use our bellowed Visual Studio.NET to code for these platforms.

I love to try out new things, so I decide to figure out if it is really possible to create very basic application for iOS and for Android purely from Visual Studio.NET.

Getting Started With gridster.js

| Comments

I am looking into to learn more about web client side programming, but whenever I find an interesting project I am overwhelmed with the unknown names of different libraries and technologies mentioned, while reading the project’s page. Consider Dashing for example. They mention Sinatra, Heroku, jQuery.. These are the ones that I have at least a slight idea what they are good for. But the list continues: Sprockets, Gridster.js, Server Sent Events and batman bindings.

This is nuts, I do not understand any of these. So I decided to divide and conquer the problem and try to focus on one unknown technology at a time. The aim is not to master the library, but to construct a minimum viable sample that helps to understand what it is good for.

Let’s start with Gridster.js.

Gridster demo page

The project page describes this library as:


| Comments

Microsoft has the tendency to overdo things. It happened before with .NET around the 2000s. They started to call all of their product ending with .NET. Do you remember Windows Server.NET or Windows CE.NET? Now, they are back with overdoing other stuff such as secrecy, not listening and neglectic developers with Windows Phone and Windows 8. Hal nails it again:

Let me contrast three strategic thrusts going on at Microsoft. Windows, Windows Phone, and Azure. Windows and Windows Phone are in the “shut up and ship” camp. Azure is in the ENGAGE camp. It seems like every week Scott Guthrie is announcing new Azure technology previews or releases. Everything about Azure is exciting. Amazon, Salesforce, and a few others defined cloud computing. Azure is displacing them. It has the Big Mo. Let me make this clear, AZURE IS GOING TO WIN the cloud computing infrastructure and platform battle. Meanwhile Windows and Windows Phone continue to alienate their ecosystems. It is unclear if Windows Phone will ever amount to a significant third ecosystem. It is unclear that Windows will be able to halt an overall market share decline against IOS and Android tablets. Azure developers are excited. No, it’s beyond excitement. Windows and Windows Phone developers? Not so much. They are, at best, conflicted. Azure is doing platforms right. Windows and Windows Phone? They prefer to “shut up and ship”, even if it risks no one caring what they ship….

Git and Visual Studio Are Awesome Together

| Comments

I love Visual Studio and I love git too. What can be even better than this? Visual Studio 2012 integrated with Git. The two together are pure awesomeness and I fell in love with them.

Git Source Control Provider

There is a provider that you can install in visual studio 2012 and you will get git integration. It can talk to tfs, if you use git there. IT can create local git repos and even can clone repositories from github or from other git hosting servers.

Fixing the SelectedItems Property Binding for the Silverlight Listbox Control

| Comments

I recently had to implement a feature in our silverlight app, where the user can remove multiple items selected in a listbox. The project uses the MVVM pattern, so all logic and state is handle in the ViewModel class. When trying to implement the multiple selection, I needed to add a property to my viewmodel that would be a reflection of the items selected on the view. It turns out the ListBox control does not support binding against the SelectedItems property for some reason.

This article describe, how the problem has been solved.

Mass Customization of Apps

| Comments

But in the past couple of months we’ve noticed another category of customers, and that group is growing fast.

I call the trend the “mass customization” of apps, to borrow the manufacturing term. This group creates app templates designed for a particular industry and then customize those templates for each end customer. The customization could be as simple as different branding but more often includes adding differentiating features also.

This article is a total eye-opener for me. With this trend, non-native apps (HTML-CSS-JS have now an edge over native mobile apps. The common source code base. With this common code-base, you can provide customizable apps that can be built and packaged from a web page and deployed much faster. Obviously, you will not build cutting edge racing games or first person shooters in html, but it does not matter. You can build awesome apps to large customers on all platform using the same codebase.

This is totally awesome!