Skip to main content

Not fashionable enough to be arrested

 I’ve been playing with .Net on one of my projects now and we’re using C#. Other teams are in the enterprise. Or the so called Java. You know what I mean, “the IMPLS”. Now I’m diverting. Anyway, Java people on the other teams have check styles. Ok, let’s just call them jTeam for now. Checking styles are one way to set rules on your codes. Some people usually think it’s useless but I have my liking to it. I think codes should be beautiful as oppose to fanciness. I don’t like fancy, simple is useful and should be at least beautiful. What I mean with beautiful is that code shouldn’t be messy. One example is spacing. Having code like x = y+z; and in another code there’s z=y + x * 2; There’s not much of a problem here. It’s just that the spacing is inconsistent. And I think it shouldn’t be that way. I think it’s irritating to look at.

Checking all of these inconsistencies in about 2000 lines of code is awful. Horrible if you’ve got tens of thousands of lines or hundreds. But do not fear. Then came check styles. jTeam has all these and I think most of them don’t quite get that .Net has also this. It’s because some teams don’t even unit test. Now I’m not saying unit testing is fun. Sometimes it’s time consuming but sometimes it pays to get testing done. What I’m saying is I think some (teams) don’t even know unit testing. Especially in our .Net colleagues. I for one, is not good with unit testing but not knowing it or whatever it is, is I think dangerous. It’s like sticking your noses to things you only knew. And to think they’re here about 5 years working, with no unit tests at all. Peligroso. Our .Net teams are bound to be discriminated. Sad.

Anyway as I said, we have check styles and it’s called StyleCop. I tried implementing it in one of the projects I’m managing as a development lead. We use SharpDevelop 3.2 and 4.2 for 2008 and 2010 project formats. Style cop is fun. All you got to do is set rules. You can do this by opening the style configuration file. Usually SharpDevelop has some default value in the Source Analysis project tabs. StyleCop has also some default configuration file in the installation directory. Usualy I just copy the default and put it to the src directory of our project and modify it to fit our needs. In SharpDevelop, point the style configuration file to where we paste the modified default. That’s it. It’s fun and not so difficult too.

But wait you would say. SharpDevelop didn’t find the task? We need to tell SharpDevelop to find StyleCop. Go to Options and in the Tools tree view, click Source Analysis, find the StyleCop installation directory and choose Microsoft.StyleCop.dll. Clik OK and we’re done.

Comments

Popular posts from this blog

Add Brave Browser to Netbeans

We'll I'm liking Brave now, great isn't it. With the token and all and privacy and stuff. And all the good stuff, right? So what other good thing we can do about it other than adding it to our favorite editor. So here it is, adding it is through Tools->Options->General Edit Web Browser Manager and add this setting below. Find the brave.exe usually it can be found in C:\Program Files (x86)\BraveSoftware\Brave-Browser\Application\brave.exe and voila we're good. See you next posts everyone!

Theory of the Genesis of Bam-e

Well, I was pondering of things today. I mean no things? Like nothing? Can't mine like shit, electricity is down almost every 2 hours so I was wondering to myself... How the hell the name "Bam-e" came to be? As a programmer I need to know the origin of it. Like learning new techniques in programming. I need to dissect things. First off, maybe it's a Tagalog term. I think so. And yeah I found it, or did I. I thought the story goes like this. Someone named Dave came to visit Bam. Here it goes... Dave: Hi, Bam ano yang ginawa mo? Bam: Nagluluto Dave: Yay, maganda yan! Masarap ba yan? Bam: Ah wala, hinalo ko lang ang mga natirang ingredients Dave: Ano name nyan? Bam: Hindi ako sure eh! Dave: Patingin nga? Bam: Sure Dave: Pancit lang naman yan Bam eh! Well, if you don't know tagalog. I'm sorry, I'm not the person to talk to. I'm Bisaya and I'm very bad at tutoring Filipino. The hell, I got 79% when I was in high school. I hate the God ...

Lithium first glimpse

I decided to review my PHP and now I’m interested with the Lithium project. I wanted to get my hands on it just to see what it can do and what are the good stuff in it. Lithium by the way is a PHP web framework, it’s RAD. If you don’t know what a PHP web framework is, I don’t think I can help you. But a Google with the topic can result to many useful resources. I almost forgot most of my PHP background because it’s been 2 years since I coded it. And it was with 4.3 and Oracle. I’m not too sure about what to do next. Instead of installing everything from scratch, I decided to install XAMPP . It’s easy and good stuff (I think). Unlike before, installing PHP and Apache, make Apache recorgnized PHP, add a module to it, install MySQL… You know what I mean. It’s a hassle. But with XAMPP, it’s just a single install and everything is in there. Of course, this doesn’t help if you’re a geek and pretend to know everything and installing everything by hand makes you happy. But for me, it’s fine...