Thursday, November 22, 2012

Now you know: Serifs and Fonts

Have you ever felt like you always knew something and turns out you didn't? Paul Harvey used to host a show called "Rest of the story" on the radio. He would take a familiar subject and give you a little known fact or story about the subject. If Paul was alive and decided to run such a show on technology, he would never run out of ideas for the show. There are several terminologies we take for granted on a daily basis. Some of them are real simple and others more complex. I will share my list of such stories here. If you know of any, please feel free to add them as comments below.

I've always taken HTML and CSS for granted. So, I decided to learn it in a proper way. Who better to learn than w3schools (W3 stands for WWW)? While I was going through their chapters, ended up on a topic about Fonts,  that caught my attention and this is the basis of my post today.

I use various fonts, like Arial, Times New Roman, MS-Sans-Serif etc. Didn't pay much attention to the names or how they looked. These Fonts vary in size and shape. Some of them are basic fonts and there are fancy fonts. And of course, there are various other characteristics of a font that make them look different from each other. One such Characteristic is a "Serif". According to Merriam-Webster Dictionary, Serif is actually a word (noun) that means the little edgers added to letters when we write them. Where as, San-Serif would mean the opposite, those fonts without Serif's!! (I don't know if they teach this in English classes in schools, but this is the first time I came across this).

font-typesThough the word is adopted for the computer fonts, the idea of a serif is not new. Apparently, like any western concept, it has origins in Latin and Roman scripts. But it is not unique to the west either. Chinese and Japanse characters have something similar too. See the wikipedia post for more interesting facts.


So next time, you pick a font, enlarge it and see if it has "serifs". As shown Times New Roman font does and Arial doesn't.


Apart from these two types, we also have Monospace fonts that have constant width for all characters. Courier New is of this type and is typically used by text editor and program (code) editors. "Courier New" uses Serifs to adjust the widths to be uniform. Check it out.


Now you know (the rest of the story)!


References:

http://www.w3schools.com/css/css_font.asp
http://en.wikipedia.org/wiki/Serif
http://www.merriam-webster.com/dictionary/serif
http://www.merriam-webster.com/dictionary/sans

Sunday, November 18, 2012

Powerbuilder and SAP

As I mentioned in my earlier post Sybase's merger with SAP seems to be complete. Since SAP took over, there was some uncertainty in the developer community about their interest in keeping the tool alive. From various posts online so far, SAP seems to committed to developing PB further.

If you haven't already noticed, Powerbuilder (PB) is definitely making a come back (among those who left it in the late 90's and the new developers trying to explore PB). I see lot more interest in the tool and many more blogs like this are coming up on the subject. This is almost like before Sybase took over in late 90's. While Sybase kept the product alive, there was a dormant period where the product lost community following. With SAP in the picture, there seems to be renewed interest in PB. They are constantly adding resources related to PB on their site.

http://www.youtube.com/user/saptechnology/videos?query=PowerBuilder
(Courtesy: Bruce Armstrong)

If you are new to PB, these videos may be helpful. I will be posting more links here later.

Thursday, November 15, 2012

Gotcha - JMeter: Response Data Display

This Gotcha is about the Load Testing tool called JMeter. JMeter is a real nice open source tool from Apache to load test Web Apps. You can set it up as a proxy and capture web pages and then customize the scripts in the GUI to build powerful Load testing scripts. I will be posting more about JMeter in separate post(s) later.

For those who are familiar with JMeter, this tip may be helpful. When you look at the results in a "View Results Tree" (See image below), the Response Data typically comes out as Text (HTML source). I was looking at these text HTML for a bit, baffled what to make out of it. I recently (accidentally) found out that you can change that. There is a drop-down below the tree (list) of pages visited. This is normally defaulted to "TEXT". If you change it to "HTML" or "HTML (download resources)", then bingo! the HTML page is displayed. "HTML(download resources)" downloads images etc, so the page looks much more like the original web page. There are other options like XML etc.

This choice (drop-down) is kind of away from the response view, so I didn't pay attention to it. Moral of the story is to click on every buttons and drop-downs on a GUI!! (or read the documentation fully!)

[caption id="attachment_616" align="alignright" width="1024"] JMeter Response View Gotcha[/caption]

PB developer Center on SAP site

Sybase merger with SAP seems to be complete now. If you didn't already hear the news, John Chen, Sybase CEO, has already stepped down. So, expect more activities to move to the SAP side of things. So far, SAP seems committed to PB.

As part of the migration, they are integrating Sybase news groups into SAP Developer Community Center. Below is the link for PB.
http://scn.sap.com/community/developer-center/powerbuilder

forums on EA Server continues to be on Sybase site through this month and later will be merged into SAP forums as well. See here for more details.

Sunday, November 4, 2012

Quick Tip - Oracle on the net (APEX)

While trying to come up with sample SQLs for the previous post, I wanted to test them before posting them. I googled for tips online like always. I found Oracle Application Express. All you have to do is enter a name for the Workspace you would like and an e-mail address. Then they send you an e-mail to validate. When you click on it, they ask you some more details and a reason why you should be given access. Once I completed this, I got another e-mail with temporary password. When I logged in the first time, I had to change the password. After this, it asks me for database name and that's it. I was able to try a few SQLs quickly!

[caption id="attachment_596" align="aligncenter" width="474"] Oracle Application Express[/caption]

So far, I've only tried SQL Workshop menu. This has a nice SQL interface like SQL*Plus, only simpler. And it's free!! I am impressed. Apparently, Application Express (or APEX as it is known) is much bigger than what I saw. See this link for more on this nice tool.

Thursday, November 1, 2012

Quicktip - MS Word: How to Paste/format code?

Have you ever tried to paste code into a word document? Ugly! It loses formatting, wraps code around, loses syntax coloring etc. Today, I tried to document my sample Java/JSP code in word. I wanted to intersperse code with additional comments explaining the code for other developers, the way some web pages do it. I tried pasting code into word, it lost formatting and also syntax coloring. I searched good old Google and landed on this page in Stackoverflow (SOF). Out of the several tips, the one using NotePad++ (Npp) caught my attention.

Export to HTML using Npp
I use Npp both at work and home and it's a great tool. Why not use it? I had an older version. Downloaded and installed version 6.2. They have added few more plugins and options. Now, I can colorize JSP code (though I don't like their choice of colors for HTML elements). Per tip in SOF, I tried Npp Export plugin to copy RTF to Clipboard option. This didn't work OK (colors ran in word). I tried the other options. Of all, the "Export to HTML" option worked out the best for me. Colors softened in HTML. Then I just opened the HTML file in Word, saved as word and got down to business with documenting the code. To add flavor, I added a Style called "Code" in Word to customize further. I added "box" to this style and the results are shown below.

Adding Line Numbers
NppExport does not add line #s by default (There is a "feature request" opened for this issue!). I poked around the web for line #s in Npp and found this tip. Essentially, use TextFx Tools to Insert line #s into the file in Npp. Then do the Export like above. Bingo! I've got formatted/syntax highlighted code with line #s pasted into word document. And one more kudos to Npp for job well done!

Fig 1 - Sample code snippet formatted in Word with description around it