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!

Monero is your friendly neighbor - no not really, I mean friendly CPU miner

Monero is another one of those crypto currency that was really big news in 2017. Now the year ends and hoping for a fresh start in 2018. Just got my masternode up and so far so good. X11 is the algo chosen by Sucre so it's not really friendly to CPU. Now, back to Monero. Its algorithm is Cryptonite and it's friendly to miners that only has CPU. First off, get your monero wallet here . As for me, I do use FreeWallet so I don't worry other app/web for every wallet that I have. Anyway, if you get your monero wallet address, that's OK. All we have to do is to find pool to mine. I use MineXMR as it's simpler. You can choose whatever you like, just search for "monero mining pools" and you get bunch to choose from. Get the miner here, extract it to your location of choice and edit the config.json file. {     "algo": "cryptonight",  // cryptonight (default) or cryptonight-lite     "av": 0,                // algorithm var...

Hosting FTP server in your Local Machine

I use this method to share some files with my friends across the internet that is too large for Dropbox to handle. I tried hosting SQL data that's around 3G in size so I wanted to try FTP approach. I installed XAMPP and it has useful stuffs for HTTP and FTP projects. I use it once with my PHP development, but that's it -- nothing FTP related. This is a tutorial on how to basically set-up FTP server locally to host data to be shared by friends, etc. Once XAMPP is installed, we can directly go to the Control Panel. Clicking the Admin for FileZilla FTP Server administration might alert you with Security Warning, just allow access to it. Click OK to Connect to Server. We are now presented with the FileZilla server Administration interface. Go to Edit->Users to add users. I usually just add temporary users who can access specific files to be shared periodically, that means I'll disable it once I'm done with the file share and also I don't usually leave FTP s...