Rational Dev

Programming Tips

Getting Parameters From The Query String Without Parsing

You can retrieve the ? and & separated string pair parameters from the URL query string by using request.getParameter(String) in Java's HttpServletRequest.

Posted On: November 22, 2007 - 10:50am by Rational
( categories: )

Changing From Visual Basic (VB) to C#.NET Or Even C++

Programmers changing from Visual Basic (VB) to C# may have some problems. The amount of difficulty depends on the background of the programmer and their ability to pick new things up.

The .NET framework is an object oriented one (OO). If a VB programmer is coming from something like VB6, they are more likely to have problems than someone already using VB.NET and OO principles. Similarly a C# or C++ programmer is going to have an easier time using the .NET framework if they are already well versed in OO principles.

Switching between syntactic changes will not that difficult to get used to for a good programmer. After a short period of time, VB programmers will you will remember to add that pesky ; and C# and C++ programmers going back to VB will eventually remember to leave the ; off.

Posted On: December 18, 2006 - 10:45am by Rational
( categories: )

Peer not authenticated Exception

javax.net.ssl.SSLPeerUnverifiedException: peer not authenticated

If you are getting this exception, it is likely that you need to go to the download for the JDK that you are using, eg 1.4.2 JDK and then find the section with "Java Cryptography Extension (JCE) Unlimited Strength Jurisdiction Policy Files".

Download the archive and follow the install instructions and you should no longer have problems with your higher level encryption.

Posted On: July 13, 2005 - 9:56am by Rational
( categories: )

Hidden Excel Sheets After Writing to the Excel Workbook

Are your Excel sheets missing after programmatically writing to your workbook?

I came across this when trying to write into an Excel spreadsheet from a C# application (should still be application to VB or other languages). This is particulary confusing when you have never written any Excel interacting code before and do not know about hidden sheets.

After writing to the Excel workbook, I found that all sheets had disappeared, although the file size had increased and I could see signs of my newly added values in the binary Excel file.

One of my colleagues pointed out that he could see them whilst using IE, but they disappeared once he saved it to disk and opened the Excel file with Office. He then twigged what was going on and managed to unhide them, see the Windows/Unhide menu option in Excel.

Posted On: August 24, 2004 - 4:44pm by Rational
( categories: )

Programming Reminder List

This is a list of programming observations that I intend to look over every now and again to keep them in my mind:

  • When approaching a problem, don't just dive in and start looking at one area of the problem. This is particularly important if you have already been pointed in a certain direction. Don't take anything for granted, step back and take a broad look at the problem and try to get to the core of what the real issue is. A bit of thought upfront can make sure you are not following a false lead.
  • Formulate different ways you might tackle a situation and then determine which one is most likely to pay off. If there is some kind of small probing tests you can make, try these before delving into something that will take a long time.
    Posted On: July 19, 2004 - 5:04am by Rational
    ( categories: )
Syndicate content

User login

Google

Navigation