Thursday, August 26, 2010

The two big questions



Image: Danilo Rizzuti / FreeDigitalPhotos.net

There are two questions that should be asked of each developer involved before a new software product is launched to clients:

  • Are you proud of the product you created?
  • Would you enjoy using it and/or recommend that your family/friends use it?

Asking yourself these two questions while developing and testing the product will change how you program and benefit the project immensely. Why? You must write good code to be proud of it. You will be motivated to do it right the first time. You will think about how your code impacts your reputation as a developer. Also, you must know how you and others would use the product to answer YES to the second question. The best written code won't help anyone if it is for a useless feature. The best written code won't matter if the whole thing becomes painfully slow to use. If their are reasons you don't enjoy the product and love it, then those should be called out sooner rather than later. Answering these questions honestly will reveal problems that testing didn't catch because nobody knows the product better than the developers. If you answer NO, then you should have some specific reasons why. Those reasons for the NO should often become the priority one (P1) issues to fix.

So often, right before a project is to release, only the testers and the managers decide if something should go live. The attitude is almost like, "Thank you Mr. Developer for your work, now we'll take it from here." A few developers will secretly cringe in horror (or internally panic) when it is decided to launch. They have been feverishly working on P1 bugs from the QA team while other severe problems in the product remain unaddressed or untested. Often QA's P1 bugs are, in the developer's opinion, the P5 bugs. Also, there sometimes is this feeling of an adversarial relationship between testing resources and developers as bugs found create more work for developers and bugs missed reflect poorly on the testers. By involving developers in the go-live decision, they are automatically held more accountible for problems in the live code, after all, it got their stamp of approval along with testing and management.

PureText

Formatted text in the clipboard can be very annoying to paste into rich-text-aware destination applications. Here's a scenario I see a lot, you ctrl+c some information from a Microsoft Word document, your clipboard has all that information as well as formatting information, junk like this is sitting in the clipboard:
<p class="MsoNormal" style="margin: 0cm 0cm 0pt;"><span  lang="DE" ><o:p><span > </span></o:p></span></p>

You then open your Microsoft Exchange email client and paste in the text and yuck, the font has changed to comic sans at 44 point size in bright Green. You just wanted the text to paste in, but you got a lot more.

The quick and dirty solution is to open a plain text editor and paste the text there, then replace the clipboard with a ctrl+c from the plain text editor.
  1. Ctrl+c the formatted text
  2. Open notepad
  3. Ctrl+v, the formatting is gone
  4. Ctrl+a, to select all unformatted text
  5. Ctrl+c, replace the clipboard with unformatted text
  6. Alt+Tab,Tab,Tab to get the target Application window
  7. Ctrl+v, paste in unformatted text into the target application

Microsoft has provided a quick menu when pasting text that you can use to remove formatting, eliminating some of the annoyance but that only helps when you use their software. If you aren't able to eliminate the formatting, you could be left with having to manually re-style the pasted text, which is painfully time-consuming and frustratingly unnecessary busy work.

PureText can help out here, it essentially performs the steps to remove formatting for you each time you press ctrl+v. So to paste plain text copied from a richly formatted source with PureText installed you simple do this:
  1. Highlight the text to copy
  2. Ctrl+c, clipboard has the formatted text
  3. Switch to the target application
  4. Ctrl+v, glorious unformatted plain text is magically pasted in
The program can be mapped to a different keyboard shortcut from ctrl+v in case you want to sometimes preserve the formatting of copied text. In that situation ctrl+v works as usual, ctrl+p (or whatever key press you decide to use) will paste in the plain text.

A tool like this would be an excellent productivity enhancer for anyone who is authoring with browser WYSIWYG text editors like TinyMCE, and having to cut and paste between other sources. These in-browser editors are have some rich text functionality, but usually just enough to cause problems when pasting and you end up putting a lot of junk like special font settings and “Microsoft specific characters” into your application database by using ctrl+c, ctrl+v without it. This invisible styling then rears it's ugly head when you try to present the material in a browser, you get lots of square boxes in contractions or hyphenations as well as mysterious font changes as the styling interacts in unpredictable ways with the HTML page styles and CSS.

Saturday, August 21, 2010

Keeping your resume fresh

Image: Image: Tom Curtis / FreeDigitalPhotos.net

Your resume and portfolio is a marketing tool for you. Keep it fresh with your latest victories. It does not look good for a resume to only have three year old accomplishments (it's akin to a neglected castle). It is a shame when the best candidates for an opportunity are overlooked because of a stale resume and a lesser-skilled but better documented person will get the job instead. I have not been perfect at this, but I do keep a screenshot archive of web applications I was involved with. Each time a big project is completed or even when a big undertaking is conquered, I take that as a cue to update my resume with some important descriptive words about the project and what I did to help bring it home. I usually pick up a few new technologies with each project that also have helped fill out my documented developer skills.

Keeping it fresh is also a good idea because you never know when you will be asked to pack up and get out, US companies are loyal only to themselves and their shareholders and will layoff good employees at the first sign of trouble. Letting your resume go stale or failing to document your completed projects, new skills, and personal wins will impact your own professional success.

I also solicit feedback from managers and developers I work with and use the positive comments they make in my references section. I try to time my request for feedback such that I get a good positive note and the person can easily remember a specific positive thing to say about me. The manager or developer is usually are happy to do that for me, after all, I just helped them out.

You can't escape single quotes in SQL inserts with \

To escape single quote marks in DB2 SQL inserts you cannot use the backslash character. This will NOT work:

insert into LCDDB_NCD_BNFT_CTGRY_REF (BNFT_CTGRY_CD,BNFT_CTGRY_DESC,BNFT_CTGRY_EFCTV_DT,BNFT_CTGRY_TRMNTN_DT)
values (52,'Physicians\' Services','2002-8-2',null)

To insert a single quote mark in DB2 with SQL insert you have to replace single quotes with two (2) single quotes.

insert into LCDDB_NCD_BNFT_CTGRY_REF (BNFT_CTGRY_CD,BNFT_CTGRY_DESC,BNFT_CTGRY_EFCTV_DT,BNFT_CTGRY_TRMNTN_DT)
values (52,'Physicians'' Services','2002-8-2',null)


Thursday, August 5, 2010

OpenDNS Family Shield Setup guide

I learned recently of a free service to help protect my family from explicit web content. In this post I want to explain how it works and how to set it up.

Access to the Internet is no longer restricted to personal computers, you can connect game systems (XBOX 360, Playstation 3, Nintendo Wii), you can connect blue ray players and watch movies transmitted over the internet, you can tether your cell phone to use your home internet and browse web sites, your iTouch can wirelessly connect to the Internet, the list goes on. Their is no 100% guaranteed way to protect all of these devices at all times from all explicit or harmful content that may exist other than turning them all off or never having them.
However, it is possible to filter out known hazards and setting up your computer with a filter takes minutes to do.

There are programs you can install on your computer like NetNanny which will protect that machine only, but you would have to find software for each device connecting to the Internet to use that method. Most modern setups for Internet access will have what is called a network router, all devices within your home, that use the same internet service, will connect to this common device. It is here at the router that the filter will be the most effective, essentially limiting and protecting all devices that may make Internet requests. I use Comcast for my Internet service and have a cheap Microsoft router for my home network.

If you only have one device in your home on the Internet OpenDNS Family Shield will also work for it and it is even less complex to setup. Go here: http://www.opendns.com/start and click sign up under the "OpenDNS Basic" option. Follow the steps to change your DNS on your router or computer. Essentially I needed to change my routers DNS settings from automatic to manual and give these two DNS server IP addresses:
  • 208.67.222.222
  • 208.67.220.220
There is a test page as part of the setup guide openDNS provides that will show you if you are successful in changing the DNS servers to openDNS. Routers will have passwords to protect them from being configured, when you try to configure your router, you will be prompted to login, if the password has never been set, it will be a factory password like user: admin password: admin or even blank; each brand is different. If you cannot login to the router because you forgot or never knew the password, then you may have to reset the router by holding down a button on the actual router device. This will clear all settings and you may have to reconfigure the router just to get back on the Internet again, get your internet service provider on the phone to help you do this or recruit a local tech to help out.

If you are still following along the setup and got the successful page, you should be able to click to open the OpenDNS Dashboard. If you ran into problems getting the test page to report success, try restarting your computer first then check the test page again, if still not working try restarting the router. If still not working, try the single-computer-only setup instructions. If still having trouble, recruit a local computer savvy individual to help you.

Once successful, the openDNS success page will have a link to launch the OpenDNS Dashboard, do it! In here you need to click Settings and add your IP address as a named network, it will already be filled in and you just click "add this network" and give it the name "Home". On that same settings tab, click the link to download an important program to keep your computer protected, the link is at the bottom near the text
Keep your network's IP up-to-date with our free software.
If you use Windows Operating system, click Windows link for the Windows version of the software, if you use Mac click the Mac link. Run the program to install the IP updater software, this is critical for most Internet connections because your dynamic IP address will change periodically and OpenDNS has to associate your Internet filter preferences with your ever-changing IP address. If you have paid for a static IP address, you don't need the IP updater software.
Again on the settings tab, click the dropdown box for your networks, pick the named network called "Home" you created earlier. On the left you can pick "Web Content Filtering" and select how locked down you want the Internet, some preconfigured options are categorized as High, Med, Low. It defaults to NONE which is no better than where you started, so change it to something above NONE at least!


On the left menus, pick Stats and Logs and check the box to enable Stats and Logs and click Apply button. Now all requests from all devices connected to your router are logged! This is good because if someone tried to access explicit web sites, you will be able to see when this occurred and what site was attempted. Keep in mind sometimes sites will show up in the list that the user did not intend to access, they may have gone to espn.com and an advertiser pulled an ad from an explicit site. This ad would be blocked and show up in the log. So don't automatically ground someone for a week because of a log entry.

Hope this helps you out.

About Me

My photo
Lead Java Developer Husband and Father

Tags