Archive

Posts Tagged ‘programming’

New (at least for me) IO functions.

June 30th, 2009 Paul No comments

embarrassing

Well, live and learn. This was an interesting day. I am working on a little project right now, can’t really discuss details, and quite frankly it is nothing that I am going to be too proud of once it is done. But this is not the point. I had to do some minor IO work with this and this is when I found that instead of doing stuff like:

  |  copy code |? 
01
02
 
03
_fsCFileStream = new FileStream(sFileName, FileMode.Open, System.IO.FileAccess.Read);
04
_srStreamReader = new StreamReader(_fsCfMCCSV, Encoding.GetEncoding(1252));
05
 
06
try
07
{
08
    if ((sLineIn = _srCfMCCSV.ReadLine()) == null)
09
        //do stuff here
10
}catch(){}
11

I can simply do
  |  copy code |? 
1
2
File.ReadAllLines();
3

I guess I was stuck on .Net 1.3 for so long, I completely skipped 2.x and now 3.5 is full of surprises. I know I am behind times, need to catch up soon. Gone to do some reading.

Categories: Coding Tags: , , ,

Optimizing Developer

May 15th, 2009 Paul No comments

man_rain

Have you ever looked at a code that you wrote several years ago? I have to do this all the time, after all I am working on the same application. Not only do I do it to fix bugs, but I do it to optimize the production code. And at times I see my old code and think what was I thinking when I wrote this. You see, with every release our main product grows, new features, core changes, you name it. One can say that we are optimizing the software by adding things our clients ask for and this leads to optimization of code. Optimizing your code is extremely important, normally there are few ways in which a particular problem could be solved, but if you are serious about your work, you do want to pick the most efficient way of doing things. Many books have been written on the subject, simple Google search will produce lots of articles concerning code optimization. Today I am not going to talk about that, instead I will talk about optimizing a developer.

If you are like me – doing coding full time and at times after hours, you want to achieve something which falls beyond simple financial compensation for you work. I want to grow as a developer. I have read somewhere that it takes roughly 10000 hours to master a task – be it musical instrument, a sport or any other activity. I think similar thing is applied to programming. I have been thinking of a way to apply optimization to myself, after all if my code can be optimized, why can’t the writer of the code. Here are some principles that I have came up with. This works for me, might not work for everyone. Once again, just my own opinion. Read more…

GoogleLookup – this is pure awesomeness!

May 12th, 2009 Paul No comments

At work I design and code tools that work with data. This data is collected from various sources, mainly people who don’t mind being interrupted at dinner time when data collectors call and ask questions. The issue with this approach in my view is that the data itself can’t be considered 100% reliable. After all, we tend to exaggerate some aspects of our lives even in front of a complete stranger. Human condition; makes you feel more important I guess.

One of the key things that analysts who work with this data are constantly looking for would be up-to-date information. Let’s face it; some things are fluid, changing all the time. If you would want to keep track of the population of a major city, lets say New York, how would you go about doing it? Keep on updating the data manually as new results come in? Have an intern whose job it would be to check daily if those numbers have changed? Well, if you can afford interns, then I guess you can afford some kind of integrated system build based on latest statistical data, but what about the rest of us?

Ever changing data is what sets apart current information from outdated. Consider that some heavy decisions are based on this data; I would imagine that it is important to always be up-to-speed. I am not going to say that GoogleLookup is THE solution, it is A solution, but this is a step in the right direction. Makes me want to consider giving Google Docs another look, despite the worries I have about having my documents indexed.

To me things like that are what make on-line based office solutions more attractive to businesses and simple users. Have a look at documentation, try this for yourself – all I can say, I am thoroughly impressed. For complete list of functions click here.

Holidays are fast approaching.

December 17th, 2008 Paul No comments

winter_lake
It has been a while since I written anything here, I’d like to tell myself that I am just busy and not procrastinating, but that would not be true. I do find time to watch House, so there is no excuse. On the other side, I am very busy. At work we are rolling out a new project, well it is not completely new, but in it’s old form, the project was not used at all, had too many bugs and looked like garbage. Have to say that we are on the final phase of the project, will release a beta version soon.

This would be the first time we used an external GUI dll, and I am quite happy with results. DotNetBar is a great library, and I am positive that we will use it for all our user interfaces; after all, when you have more then one app and all of those have a different look to them, kind of makes you want to re-work it all. That’s what we are doing presently.

New version of Rosetta is coming out soon too, everyone worked hard, and it feels like we are all burned out right before holidays, at least we will have few days to relax and get into the holiday spirit before going back to work.

Are changes good for you?

October 30th, 2008 Paul No comments

I have been told many many times that changes are supposed to be good for you (or me, since it’s my situation that we are looking into). I have been a coder for quite some time now. I can’t say that I am absolutely ecstatic about programming. It does not influence my life outside of my office hours and time that I spent at home trying desperately to improve myself. For instance, I don’t watch Star Trek or build some kind of crazy contraptions which could loosely be called a robot in my basement, although come to think of it, that sounds like a good idea; the robot one, not the Star Trek. I don’t wear nerdy t-shirts with BSOD on it. I am not participating in heated discussions like “My IDE is bigger then yours!” and “My OS can kick your OS’s butt” and so on. I can’t say that coding is my passion, it is something I am interested in and it pays my bills. Another factor would be my formal training – I have some in development, but as for the other areas I can’t say that I am properly trained. Lately something had changed in my work – I am doing more managerial things then coding. Read more…