How do you make a better programming culture?

Posted on September 17th, 2008 by Jerod.
Categories: Musings, Software Development.

Some thoughts:

* Pair programming / mentoring
* Promote Unit tests
* Promote design & design reviews
* Do lunchtime code reviews (those who participate will learn a lot)
* Lunchtime training for better coding techniques
* Encourage coding ‘practice’ (maybe competitions where the best code wins.)
* If you have a couple good people, encourage them to mentor those who need help.
* Start a workshop to teach specific techniques/technologies.
* Try having food at your workshops/trainings/reviews.
* Try to bring your code under continuous integration, if feasible.
* See what IDE plugins are available for your language & IDE. Maybe you can get people to improve their code with formatting tools, style checkers, and code complexity analysis.

Taken from StackOverflow

no comments yet.

How do you spend your day?

Posted on April 14th, 2008 by Jerod.
Categories: IE, Firefox, Web Development.

Here’s how I spend some of mine:
Time Breakdown of Modern Web Design

no comments yet.

Slow Firefox on Vista, rev 2

Posted on February 28th, 2008 by Jerod.
Categories: Frustrated, Firefox, Web Development, Vista.

Sooo…it’s not enough that Vista does some retarded stuff when browsing regular websites, it even has a heart attack when you’re just browsing to localhost! When developing in ASP.Net, I use the built-in mini-server that’s part of Visual studio, and Firefox is incredibly slow to refresh the page.

So what causes this? Once again, it’s the fun implementation of IPv6. To fix it, browse to about:config in FireFox, and set “network.dns.disableIPv6” to “true”

Argh.

no comments yet.

The Power of the Web

Posted on September 9th, 2007 by Jerod.
Categories: Firefox.

It would appear that, despite my best efforts, I have learned to write in Portugese.

“What’s this?” you say? You read correctly. Whilst posting a reply to another blog, I happened to accidentally press the “Spell check” button on my Google toolbar.

Needless to say, I rather surprised to be informed that I had accidentally completed the worlds fastest course of “The Rosetta Stone”.

Portugese?


It’s amazing what you can learn on the web.

no comments yet.

Slow Firefox on Vista

Posted on May 13th, 2007 by Jerod.
Categories: Firefox, Vista.

OK, so Vista added a new value to the TCP stack that XP never had, and it causes Firefox to DRAG on *some* sites, especially with specific routers (the ever-so-ubiquitous WRT54G, of which I own 2, being one of them). Basically, it’s due to a poor choice of settings for the TCP packet window size. So…to fix it, run this:

netsh interface tcp set global autotuning=disabled

I don’t currently know of any negative side effects (my understanding is that this is how XP operates), but if anyone knows of any, let me know.

Change “disabled” to “enabled” to turn it back on.

no comments yet.

Generic Access Control in ASP.Net

Posted on April 10th, 2007 by Jerod.
Categories: Web Development.

Microsoft has made an effort to put together a nice membership API for creating users and roles in ASP.Net. That’s great, for simple websites with basic access control needs. However, once you get past the basics, you’ll need more fine-grained control, or you’ll end up hard coding huge or statements together to determine if any of the 70 different roles you’ve created have permission to the item they’re requesting.

Enter the Permission Manager.

Using the Permission Manager is pretty simple. Using lines like:

PermissionManager.HasUserPermission(”User”,”Permission”,”Object”);

or

PermissionManager.HasRolePermission(”Role”,”Permission”,”Object”);

and the extensive set of options for granting and removing permissions, it’s easy to set up a complex, yet easy to manage access control list. I suggest reading this good overview to get an understanding of how it all works. Or, you could read the author’s blogs about the subject.

Happy coding!

no comments yet.

A New Look

Posted on April 9th, 2007 by Jerod.
Categories: Likes.

Woohoo! I’ve updated my journal to be much cooler. This one has a pirate ship. And translucent borders. So, if you’re interested, leave a comment about the new look!

1 comment.

Shows that suck

Posted on March 22nd, 2007 by Jerod.
Categories: Hates.

Grey’s Anatomy. American Idol.

Thank you.

1 comment.

IE and the Unknown Runtime Error

Posted on March 19th, 2007 by Jerod.
Categories: IE, Firefox.

So, I think I now know what the stupidest thing IE does is. Check out this code:

  1. <p id="para"></p>
  2. <script type="text/javascript">
  3. try{
  4. document.getElementById("para").innerHTML = "<div>Inserted</div>";
  5. }catch(e){
  6. alert(e.message);
  7. }
  8. </script>

Simple enough? Insert content at position X. OK, yeah, not exactly brain surgery. And no, it’s technically NOT valid HTML, because we’re inserting a div into a p element. So fine. But guess what? Open that snippet in IE, and you get:

moz-screenshot

Yes! Rock on IE! (Firefox works like a charm, way to go, Mozilla!)

And now, to make things even more interesting, check out this code:

  1. <p id="para"></p>
  2. <script type="text/javascript">
  3.   try{
  4.     var x = document.createElement('div');
  5.     x.innerHTML = "<div>Inserted</div>";
  6.     document.getElementById("para").appendChild(x);
  7.   }catch(e){
  8.     alert(e.message);
  9.   }
  10. </script>

Voila, problem solved, in both IE and Firefox. Go figure.

no comments yet.

mod_rewrite for IIS?

Posted on March 1st, 2007 by Jerod.
Categories: Web Development.

Well, thanks to ScottGu's Blog, I found a mod_rewrite replacement for IIS, called IIRF Check it out!

no comments yet.