Posts

Sending Stylish HTML Emails with Confidence: A Guide to Best Practices

I was working on a fairly straightforward personal project. One of the tasks was to write a background process to send stylish HTML emails with options in the form of "actions."  I needed to refresh my knowledge of HTML email generation best practices. Are you interested in hearing them?  Utilize a responsive layout: Check to see that the email is optimized for a variety of devices and screen sizes. The email will look good on desktop, mobile, and tablet devices thanks to this. Use CSS inline: External CSS stylesheets are not supported by most email clients. In order to guarantee that the email will appear correctly in each and every email client, it is best to use inline CSS styles. Stay away from JavaScript: Since JavaScript isn't supported by many email clients, you should avoid including it in your email templates. Check out your email: Test your emails in various email clients with an email testing tool to ensure that they are displayed correctly. Make small images:

13 Years Later: Why Every Developer Should Finally Start Their Blog

Listen up, my coding friends! I remember reading about why every developer should have a blog 13 whole years ago. And what did I do with that knowledge? Absolutely nothing! But hey, it's never too late to start, right? So, let me remind you why you should join me on this blogging journey:  Showcase your Skills: Blogging allows you to flaunt your work, abilities, and know-how. It's a fantastic way to show the world what you're capable of and create a stunning digital portfolio to share with potential employers, clients, or colleagues.  Advance Your Career: Share your work with the world through your blog. Blogging helps you demonstrate your expertise and build a professional reputation that can lead to new job opportunities and a thriving career.  Share Your Knowledge: Spread your wisdom and experiences to others and help them grow as developers. By creating a blog, you can give back to the development community and make a positive impact.  Expand Your Network: Blogs are a g

Flag Arguments

Passing a boolean as an argument into a method is not good practice. It complicates the method signature, indicating that this method does more than one thing. It does one thing if the flag is true and another if the flag is false! A method or function should do one thing and do it well. In order to avoid passing flag arguments you should split the method or function into two, using a very descriptive name for each of the methods. Try refactoring the code in your current project and see if this small change improves the readibility.

Change names when you find better ones

Names are everywhere in software. We name our classes, variables, namespaces, etc. The name should answer all the big questions about your code.  When I'm refactoring my code that is one of the first thing I look for: Does the name of this method reveal its intent? If at that point I can think of a better name then I change it right away.  Choosing good names can take a lot of time but it could save you more time in the future. 

PHP: One of the "Big Three"

I recently was reading TechRepublic article 10 skills developers will need in the next five years where Justin James uses the terminology the "Big Three" to refer to .NET, Java and PHP and I found interesting some of the comments regarding PHP. Some suggested that PHP does not really fall into the same category as .NET and Java. According to the PHP statistics for October 2008 report , PHP is found on 32,84% of the web sites. What do you think? Is there something wrong with PHP? Feel free to leave your comments.

Resharper 4.5

Finally, after being away for a couple days, I was able to upgrade to Resharper 4.5. After using Resharper for a couple years I'm so used to Resharper that it would be hard to use Visual Studio without it. The new version has been improved. I noticed right away that the solutions are loading faster and Visual Studio is more responsive. All licenses purchased after Dec 21, 2007 qualify for a free upgrade to ver. 4.5 If you haven't used Resharper I recommend to give it a try. ( http://www.jetbrains.com/resharper/download/ )

Fix bugs, then write new code

I have found this to be a good practice after finishing an Iteration. The code is fresh in your mind and you can fix the bugs faster than if you wait until a couple weeks later. Fixing those bugs should be included in your iteration planning. Back in 2000 Joel Spolsky wrote his well known 12 Steps to Better Code article and he makes some interesting comments regarding having your code ready to ship at all time. ( http://www.joelonsoftware.com/articles/fog0000000043.html )