Showing posts with label General. Show all posts
Showing posts with label General. Show all posts

Friday, June 1, 2012

Self restarting windows services

I recently went through an interview where the interview was running over and the interviewer was trying to kill time so he was telling me about a GDI+ handle bug in .NET. Now for those who know me and have read my published works, you know that I am a UI specialist, so my ears instantly perked up to listen to this issue.

The situation was that they were using a windows service that was creating images and printing them off or something. Anyhow since the service wasn’t a GUI app it was not constantly being started and stopped and so with time it would use up all the available handles.

The solution that this person came up with was to create another service to watch the handles in the other service and when it had to many it would start another service to restart the first service.

To clarify:

Service A creates and prints images that use up handles in GDI+

Service B watches Service A for high handle usage, on detection it starts Service C

Service C restarts Service A

Wow that’s a lot of code and work. How I would deal with it is a combination of configuration and code all in Service A.

So we have Service A keep track of the handle counts, then when we hit the thresh hold we have the service call Environment.Exit with an error code greater than 0, which seems appropriate. Then on install we configure the service to restart on error.

Voila a self restarting service, well sort of, but much less complex than the previous scenario.

Friday, February 27, 2009

New Blog Skin!

Yes once again I have changed the skin of my blog. This time to something a lot more practical for what I am doing with the blog. This for those that do not know is Cogitation, a Subtext skin. But it’s widely used by technical writers and bloggers. It’s supports a lot of text and a flowing layout that is quite good, and though I hate using a cookie cutter template my old template was not as good as I would have liked. So here I am I’ll probably modify it to give it my own little flare, but till then enjoy the layout and the content to follow.

Wednesday, February 18, 2009

Blogging: Style or Content, how will you be judged?

So I spend a lot of time thinking about my blog and wondering,”Should I blog more?” And that leads me to thinking about  the style of my blog. My current style aka theme works well for my needs though there are a few quirks with it, yup look for a future redesign. But what’s more important the style or the content. Can you have poor content but such good style that the users come back and stare thinking, “It’s so beautiful!” with a little drool rolling down their chin? Can that get you through? I don’t honestly know.

 

I do notice however that among the software engineers and coders, or as I called them back in the old days, computer programmers, there seems to be a very broad scope of style and content. Some blogs have great style and great content, these are clearly the winners and will be judge mercifully by the robotic masters, they are among us now. Some have horrible style, and call themselves minimalistic blogs, I call them lazy blogs. I think if your a programmer talking about the subject of web development or whatever you should have a blog that at least puts on a bit of a show for the readers. But that aside, the content is very good Martin Fowlers blog is a good example of this. I went to his blog looked and chuckled at how sad it looked, but the content is solid, also he calls it a bliki.

 

But I wonder again for those that are not familiar with his work, would they just surf away to a new blog without looking? Anyhow I have compiled a list of some of the top programmer blogs out there. So you can look for yourself. All of these have great content, some have great style, and some if not most have both. Where do you stack up?

 

  1. Joel on Software (Joel Spolsky)
  2. Coding Horror (Jeff Atwood)
  3. Seth's Blog (Seth Godin)
  4. Paul Graham: Essays (Paul Graham)
  5. blog.pmarca.com (Marc Andreessen)
  6. Rough Type (Nicholas Carr)
  7. Scott Hanselman's Computer Zen (Scott Hanselman)
  8. Martin Fowler's Bliki (Martin Fowler)
  9. Rands in Repose (Michael Lopp)
  10. Stevey's Blog Rants (Steve Yegge)

 

Enjoy!

Monday, January 26, 2009

Windows Live Writer Blogging Made Easier

Recently I started to look at Windows 7 and I wanted to look at the new Microsoft Live Messenger. So when I downloaded and started to install everything I notice it asked if I wanted to install Windows Live Writer. Having looked at a number of blog posting apps and deciding that they were all lacking I was hesitant to install it. But I like to try new things before deciding if I like them or not so I let the installer rip.

 

To my surprise I have been more than impressed. Having worked in Microsoft Office, like many of us, I am fairly tied to the keyboard layout and hot keys, as well as I write to my blog and I like to see how my posts will look in respect to my layout and template.

 

The initial configuration asked me for a few details about my blog and some information for logging into it. Then it downloaded my template and articles and all kinds of stuff, all of which only took seconds, and I was ready to go. So I typed out a simple test and hit the preview tab and I was just stunned, staring me in the face was a perfect preview of my blog and my post. Perfectly rendered. Which if you know blogger their own preview tab doesn’t do that good of a job. I would think since I have a Blogger blog and not a Microsoft owned and operated one, that I would have sub par integration. But it seems to integrate better than the built in blogger one.

 

Another great feature is the fact that it is a rich client editor so I can do spell checking and the like with full office integration which is what I would expect.

 

It even has a tagging section at the bottom allowing me to pick the tags for the post from my existing set, or add a new one if I like.

 

One thing that is lacking is the fact that I can’t add custom tags, similar to block quote tags which are included with a simple click, I do have some custom tags for code blocks, which though it would be convenient it is no show stopper for this editor.

 

Anyway If you are an avid Blogger or contributor to the blogosphere I would recommend Windows Live Writer above all the other blog editors to date.

Friday, January 9, 2009

Zoom Your Desktop with ZoomIt

Recently I had to give a presentation in a room that just had an LCD screen mounted to the wall. The problem was that the screen was small for the size of the room and many people couldn't see the screen clearly and that made it fairly problematic.

After the presentation it came up that this was a problem and would continue to be a problem. And someone mentioned that many of the Microsoft presenters use a tool that zooms the entire desktop onto the mouse position. So I set out to find this tool and of course I should have know that it came out of the many great tools from Sysinternals, now part of Microsoft, written by Mark Russinovich.

The tool is called ZoomIt and now that I have it I will add it to my arsenal of great and useful tools.

It does more than just zoom, it also allows you to draw on your desktop which is great for highlighting things that you want to draw attention to. And it has a timer mode that displays a count down that you can set, for those all important breaks.

Wednesday, June 18, 2008

Back to life

This is the first post in years I'm reinventing my blog and bringing back to life. I have been to long out of the scene and it's time to come back with a splash.

Thursday, February 3, 2005

Articles I have written

Recently I came to discover that an article I had written on the Diagnostics namespace in .NET, and thought had been published, did not actually make it into print. The article was purchased, however, as I have come to learn they did not have the room in the periodical to include it, so it was pulled. But I got paid, yet my insites were never seen by my peers to improve thier understanding of this often underused, or misused namespace, which was the point of writing it.

As unfortunate as that was, I went looking for the final draft of that article, and was unable to find it. But I did stumble on one that I had started writing and was unable to complete, or as I like to say "I forgot I had written it."

So without further adue -

Thoughts on Programming Today
By Evan Freeman
March 22, 2004

If you were to ask most people in the field of computer programming what it is about their jobs that they like, you would be surprised by the answer. Most would answer “the weekends”. Here we have a common trend in today’s industry. However, this wasn’t always the case. One would have to believe that there was a time when the computer programmer was quite content with his or her job. I myself even remember when I found deep satisfaction in my job, and then there was light. So what has changed, what is the problem? Well they say that money is the root of all evil, and I have to say this is the case with today’s computer industry. As computers have become an avenue for improved capitalism, the business needs of the corporation have stifled the passion of the computer professional. I have to recount the days when I first started in this industry and the motto of my first real computer engineering company “never stop innovating!” This is what it meant to be a programmer. The computer industry at one time gave the true computer enthusiast a creative outlet that has been beaten down by business need over invention. Basically it has come down to someone does something just because it is cool and rather than receiving the praise that the individual would have in the past. They are met with “What is that for, it has no business need don’t do it again!” So the golden age of computer development is over, the mindset that led to all the great innovations in computers has been stifled like many things that have come before by capitalism. This does not mean that there is no innovation in the computer industry; it just means that it is not what it used to be. That being said it isn’t so surprising that many of the true “geeks” have found themselves drawn to open source as a means to express their creativity. I myself am involved in a number of open source initiatives mainly because I need the creative outlet and praise of my peers that I do not receive at work. Where I may see it as being viable, the limited intellect of today’s business professional who understands dollars and not technology would not see the light at the end of the tunnel that a truly creative innovation would have.

Monday, October 25, 2004

Breaking Intellisense with Resharper

For those not that familiar with Reshaper by JetBrains.

ReSharper is an add-in for Microsoft Visual Studio .NET 2003™ that brings intelligent C# coding assistance, real-time error highlighting, and refactoring features to this popular development platform.

Recently I have seen a great deal of reports of this product breaking the intellisense in Visual Studio .NET 2003. So I thought I would list details on how to reenable it after you uninstall Resharp.

Now I'm not claiming there is anything wrong with the product, in truth I have never used it. I am just listing a solution to correcting a situation that is a result of installing and uninstalling this product.

To re-enable it goto Tools->Options->Text Editor->All Languages

On the right side of the window top section should be "Statement Completion" check "Autolist members" and "Parameter Info"