Levels of Programmers

by Juan 3. April 2009 12:01
Share on Facebook

Here’s an interesting article about the different levels of programmers.

I found the question on level 5 quite interesting

You have a successful career as a software developer. Your skills are always in demand and you never have to look very long or hard to find a great job. Your peers respect you. Every company you work with is improved and enriched in some way by your presence.

But where do you go from there?

Where do you go from here? I think that’s a question everyone ask themselves, at least I know I do… and quite often.

I might be close to answering it though…

Disclaimer: I’m not placing myself at level 5.

Tags: , ,

Programming

Hacked!

by Juan 1. April 2009 11:33
Share on Facebook

HACKED!

Hi Master (: Your System pwned By Turkish Hackers

BlueLine pwns you!

WhiteCode, LiZZard, with me in here

WE WERE HERE

Hacked by DarKLord ;)

Tags: , ,

General

LazyLoading and Serialization

by Juan 28. March 2009 22:55
Share on Facebook

The other day I run into a little problem, which I thought worth of mentioning. It’s really kinda obvious when you think about it, but I didn’t, until I run into it.

First, a little background for those that don’t know what LazyLoading or Serialization are.

Lazy loading is a design pattern commonly used in computer programming to defer initialization of an object until the point at which it is needed. It can contribute to efficiency in the program's operation if properly and appropriately used

So basically, you implement your properties (of complex objects) in such a way that they get instantiated only when the property get is called; something like this

image

In computer science, in the context of data storage and transmission, serialization is the process of converting an object into a sequence of bits so that it can be stored on a storage medium (such as a file, or a memory buffer) or transmitted across a network connection link. When the resulting series of bits is reread according to the serialization format, it can be used to create a semantically identical clone of the original object. For many complex objects, such as those that make extensive use of references, this process is not straightforward.

The “not straightforward” part, is often solved getting the object referenced in the property, and serializing it also.

So, could you spot the problem?

Whenever an object that implements LazyLoading gets serialized, all its properties are called, which breaks the whole LazyLoding concept.

My specific problem appeared because I used an entity both to display a list of objects with a listview, that used the code and description properties, and when you clicked on one it would redirect you to an edit page, where the full object would be loaded so it could be edited.

I “fixed” it with a tiny little flag; since I have a Service class that calls a DataMapper to load the entities, I knew from where I was calling it, so I added a parameter to pass whether LazyLoading should be cancelled; in the above example, additionally to checking if the private field was null, I also checked this flag, and loaded it only if it was false. This greatly reduced rendering times.

I know it’s not a really good fix, so I though of leaving an open question to everyone… how would you solve this?

Other options I thought were:

  • Having two different entities, one lightweight for the list, and one for the full edit page. This would double the Service and DataMapper classes, and it was a lot of work.
  • Having two different entities and use inheritance to reduce that Data Access layer duplication. It seemed it wouldn’t be that clear, and still it seemed like a lot of work.
  • There was another option that I cannot recall right now.

Anyway, it’s an interesting problem, isn’t it?

What would you have done?

Tags: , , , ,

Share extension for BlogEngine.NET

by Juan 28. March 2009 12:37
Share on Facebook

Share is a new extension for BlogEngine.NET. What it does is pretty simple, it adds a “Share on Facebook” link on top of every post, so you can share them on facebook as a link.

After you install this extension (instructions below), you will see the link as follows

image 

The extension uses a custom page for its configuration, where you can select the text of the link, and the link type, as explained on facebook’s help page.

image

And, as advertised, when you click the share link, you get the pop up window to post the link to your facebook profile

image

Optionally, you can add a link to the head section of the site.master of your theme, to have facebook pull that image as a thumbnail, you do that like this

<link rel="image_src" href="<your_url>" />

Where <your_url>, is the url of the image you want to display.  

To install this extension, simple unzip the following files on your BlogEngine.Web root directory

Important Note: This code is an extension for BlogEngine.net version 1.4.5.15 and up. It was tested on this version, because it has a bug fix that made extensions don't work. The bug is present in 1.4.5, I don't really know exactly in which subversion it was fixed, you can check it yourself.

The problem was in the method DataStoreExtension in App_Code\ExtensionManager\Manager.cs, the line

Stream stm = (FileStream)xs.GetSettings();

has to be

Stream stm = (FileStream)o;

That's it! You can download the files below, and you can try it on this very post, just click "Share on Facebook" there on the top

Tags: , ,

Blogging | Programming

Darwin

by Juan 17. March 2009 20:31
Share on Facebook

El 12 de febrero de 1809 nació Chales Darwin, quien postulo en el famoso libro “el origen de las especies” que todos descendemos de un antepasado en común, y que los que sobreviven de cada especie son los más aptos, teniendo los individuos débiles menos probabilidad de reproducirse, y transmitir sus genes a generaciones posteriores.

Todo esto suena muy lógico.

Si Darwin estuviera vivo hoy, tendría que reescribir su libro, ya que siempre hay excepciones a las reglas. Yo soy la excepción en este caso.

La siguiente ecuación aclara un poco más a que me refiero.

clip_image002[4]

Les dejo a vuestra imaginación lo que realmente significa ese corazón, puede haber lectores menores de edad.

Si, lo logré… Darwin debe estar revolcándose en su tumba. Supervivencia del más apto… Ja!

Tags:

Personal

Running ASP.NET MVC on IIS6

by Juan 23. February 2009 10:07
Share on Facebook

I wanted to try out ASP.NET MVC in order to decide whether or not I could use it for a small project I’m starting, I’ve read nothing than good things about the Framework, but I hadn’t had the chance to try it on a real web site.

The first step though, is making it work. My hosting provider runs the windows server on IIS6, and does not allow custom configuration unless you buy a dedicated server, which I didn’t want to do, for now at least.

There are quite a few blog posts that explain how to run ASP.NET MVC on IIS6, but in all I read you need to have access to the web server configuration, to do one of two things:

This options were no good for me.

The solution was quite simple (well, it became simple after a little bit of research): Add a custom route, and map .aspx files to a controller.

You need to add this to the Global.asax file:

 routes.MapRoute("Main", "{controller}/{action}.aspx",
     new { controller = "Home", action = "Index" });
 
 routes.MapRoute("Default", "",
     new { controller = "Home", action = "Index" });

The only drawback is that you don’t get the “pretty” url you can get if you use IIS7 or have access to IIS6 configuration, but it works.

(Instead of having a url like this: http://yourserver/Home/Index, you get http://yourserver/Home/Index.aspx)

If the framework (MVC) is not installed on the server, you also need to copy the dlls to the bin directory, which they don’t get copied by default, you need to check the “Copy Local” property in the project references.

Tags: , , ,

Programming | Tips

A great example to follow

by Juan 4. February 2009 17:38
Share on Facebook

Some time ago I came across Jeff Atwood and Joel Spolsky; and a lot of my posts were about Jeff or stackoverflow in the past, but now I want to focus on Joel, and his view about software companies.

Check this excerpt from his about page, where he talks about his founding of Fog Creek Software:

We didn't start with a particular product in mind: our goal was simply to build the kind of software company where we would want to work, one in which programmers and software developers are the stars and everything else serves only to make them productive and happy. The theory, which has proven itself over and over again, is that this kind of thinking would allow us to attract the super-talented software developers who would do great things and make us successful.

Isn’t that simple concept just great? Why is it that not all companies have that philosophy?

It’s so simple it can be summarized in this image (also from Joel’s homepage):

working conditions generates profit

Do you you work or have worked somewhere that’s just great, and fun, and focused on working conditions, a place that takes care of the most important asset, the people?

He also stays true to his beliefs, if you don’t believe me, check their new office out.

What would you love to have that you don’t?

What would you do if you owned the company you work for? Or what would you do if you founded your own?

These are interesting questions to ask yourself once in a while; I know I do from time to time

Tags: , ,

Programming | Work

ASP.NET MVC Release Candidate

by Juan 28. January 2009 16:35
Share on Facebook

Just dropping by (after a long period of inactivity) to let you know that the ASP.NET MVC Release Candidate is out (and the final 1.0 version is expected in a month).

So check it out if you haven’t tried the Betas, you won’t regret it.

http://weblogs.asp.net/scottgu/archive/2009/01/27/asp-net-mvc-1-0-release-candidate-now-available.aspx

Tags: , ,

Programming

You gotta love it!

by Juan 29. December 2008 12:54
Share on Facebook

I was just reading one of my favorite blogs, and stumbled across its last post, where it talks about the software industry.

I thought I’d share it, as it explains quite perfectly exactly how I feel too.

Take a look at this response from Joel to someone who’s thinking about leaving the industry

Although the tech industry is not immune, programming jobs are not really being impacted. Yes, there are fewer openings, but there are still openings (see my job board for evidence). I still haven't met a great programmer who doesn't have a job. I still can't fill all the openings at my company.

Our pay is great. There's no other career except Wall Street that regularly pays kids $75,000 right out of school, and where so many people make six figures salaries for long careers with just a bachelors degree. There's no other career where you come to work every day and get to invent, design, and engineer the way the future will work.

Despite the occasional idiot bosses and workplaces that forbid you from putting up Dilbert cartoons on your cubicle walls, there's no other industry where workers are treated so well. Jesus you're spoiled, people. Do you know how many people in America go to jobs where you need permission to go to the bathroom?

Stop the whining, already. Programming is a fantastic career. Most programmers would love to do it even if they didn't get paid. How many people get to do what they love and get paid for it? 2%? 5%?

It’s true that he’s talking about the US, but the same applies here in Argentina… you gotta love building software!

Tags: , , ,

General | Programming

Final de Gaming.NET 2008 (v3)

by Juan 14. December 2008 11:52
Share on Facebook

This post is in spanish, because of this.

Finalmente llegó el día en el que la tercera edición de Gaming.NET ha terminado.

Parece que fue ayer cuando se nos ocurrió trasladar el proyecto hoshimi de imagine cup y adaptarlo para estudiantes secundarios. Que buenos resultados produjo!

Siempre destaco el nivel de "enganche" que tuvieron los participantes, me llena de orgullo que algo que nos lleva tanto trabajo y esfuerzo sea apreciado y útil para tanta gente, ojalá pueda la mayoría capitalizar lo aprendido para sus respectivos futuros, más allá de los premios y los eventos, eso es lo más importante (y por suerte sé de algunos participantes que lo lograron ;) )

Bueno, acá abajo les dejo todos los resultados; un fixture con los resultados de las llaves, los replays, y todos los stats por ronda.

Nos veremos (con suerte) el próximo año con la cuarta edición!

Tags: , ,

Gaming.NET

Powered by BlogEngine.NET 1.4.5.15
Theme by Mads Kristensen Modified by Juan Manuel Formoso

About the Author

Juan Manuel
Networking
View my LinkedIn profile View my Facebook profile View my Twitter feed View my StackOverflow CV

Juan Manuel Formoso
There is a theory which states that if ever anyone discovers exactly what the Universe is for and why it is here, it will instantly disappear and be replaced by something more bizarrely inexplicable.

There is another theory which states that this has already happened.

E-mail me Send mail

Hosting is not Free

Google Reader Picks

Most comments

Cristian Cristian
1 comments
co Colombia

Calendar

<<  September 2010  >>
MoTuWeThFrSaSu
303112345
6789101112
13141516171819
20212223242526
27282930123
45678910

View posts in large calendar

Recent comments

Comment RSS

Disclaimer

The opinions expressed herein are my own personal opinions and do not represent my employer's view in  anyway.

© Copyright 2008