-
I'm going to do an experiment today
I’ve started learning C# and ASP.NET MVC about 5 or 6 months ago. While learning I’ve developed a clone of Reddit that had a very clear differentiator: you could see the messages and the web page at the same time. When I was close to completion Reddit released exactly that feature. I scrapped that project.…
-
Are dynamic languages just a temporary workaround?
This can unleash so much hate mail, but here it goes, my inbox is ready! Are dynamic languages just a temporary workaround? I’m not sure! I’m switching between the two types of languages all the time: Java, Python, C#, JavaScript. I’ll try to make the long story short. Statically typed languages, like Java and C#, are nice…
-
Formating strings in C#, like in Python
I like Python’s way to format strings because you can use it everywhere, it’s part of the strings. You can do print(“Welcome %s!” % user.name) as you can do Console.Writeln(“Welcome {0}!”, user.Name) But then in Python you can also do randomMethodThatTakesAString(“Welcome %s!” % user.name) In C# it gets trickier, because the call to Console.Writeln takes…
-
File input for forms in ASP.NET MVC
I’m not sure why ASP.NET MVC was shipped without a file input type for forms. Maybe it’ll come in MVC 2.0 or 3.0. Meanwhile, I created one. I spent two or three hours trying to figure out how to go from Object to IDictionary<String, Object> to follow the same ASP.NET MVC style where you have…
-
Converting the ASP.NET MVC project into OpenID
When you create an ASP.NET MVC project it comes with a controller called AccountController that manages logging in, logging out, registering, changing password and so on. Since usernames and passwords are dead I converted it into OpenID and I’m just pasting it here for everybody to use. I’m using the DotNetOpenAuth library which you have…
-
SVGs in .Net using Cairo and Gtk+ (and C#)
If I was using C it would have been simply a couple of calls to librsvg, but on C# things got a bit more ugly because Rsvg, the wrapper around librsvg is not finished. And other bindings are also missing. Just getting a Cairo context out of a Gtk.DrawingArea was not as simple as I…