Monday, December 20, 2010

Set a fixed Locale in Grails

Grails has a nice feature that resolves the application's locale based on factors like request-header information, the request-parameter 'lang=xx' and the default locale of the VM.
But some projects don't need such flexibility. Rather they want to make sure that a specific locale is used always.

All you need to do is adding Spring's FixedLocaleResolver and set the VM's default locale. Add the following code to your resources.groovy:

localeResolver (FixedLocaleResolver, Locale.GERMANY) {
   Locale.setDefault (Locale.GERMANY)
}

Tuesday, October 26, 2010

Password Protection for entire Website with Apache

Just a little note, because this one is often used for a quick (and dirty) password protection of a Website served with an Apache frontend:

1. Create a password file with htpasswd (or httpasswd2):
htpasswd2 -c -m /etc/apache2/apache-passwds your_login_name

2. Extend your Apache config with something like this:
  <LocationMatch "/.*">
        AuthType Basic
        AuthName "Password required"
        AuthUserFile /etc/apache2/apache-passwds
        Require valid-user
  </LocationMatch>

Sunday, October 24, 2010

Memory Consumption of the Grails Command Tool

Yesterday, I decided to reuse a Virtual Server with 1 GByte RAM as an continuous integration server for my Grails development.
Setting up Tomcat, Hudson and Artifactory was quickly done. To ensure safety, I checked the memory:

root@dev:~# free -m
                 total       used       free     
   Mem:          1024        661        362 

Ok, up to 360 MBytes left. That should be sufficient for the Grails Command Tool.
I installed Grails 1.3.5 and run a grails help. Oops, the following exception was thrown:

.......
Base Directory: /root
Resolving dependencies...
Dependencies resolved in 2084ms.
java.io.IOException: Cannot run program "/usr/bin/env": java.io.IOException: error=12, Cannot allocate memory
        at java.lang.ProcessBuilder.start(ProcessBuilder.java:460)
        at java.lang.Runtime.exec(Runtime.java:593)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
.......
       Caused by: java.io.IOException: java.io.IOException: error=12, Cannot allocate memory
        at java.lang.UNIXProcess.(UNIXProcess.java:148)
.........

I was wondering why Grails would need more then 360 MByte for a simple help-command. Looking around I recognized that Grails reserves 512MByte MaxHeap-Memory and another 192MByte for the PermSize per default.
It can be adjusted by setting the GRAILS_OPT environment variable. For me it works by adding the following line to the .bashrc (or /etc/environment if needed globally):

GRAILS_OPTS="-server -Xmx200M -XX:MaxPermSize=128m -Dfile.encoding=UTF-8"

Thursday, October 14, 2010

Faulty Dell Precision Notebook & Poor Dell Services

This is such an unbelievable and annoying story; thus, I decided to make it public.

For the last five years I’ve been a happy Dell customer. I owned several Dell notebooks and one desktop-box and they worked mostly very well. Little problems, like a broken DVD drive, were handled fast by the Dell service.
Hence, I decided last June to invest in the high-end, powerful and expensive Notebook Precision M6500. I ordered a 1920x1600 White-LED screen, which seems to be perfect for my work as a software developer (especially during creation of Web-Application with nice designs).

The notebook arrived after three weeks and I was happy so far. The first impression was not too bad: A real power machine. Ok, it is quite heavy, the power supply is huge and the fan works like crazy. But that’s ok for such a powerful notebook.

The problem started while looking at the screen. Especially when comparing it to my old notebook display or to the duplicated screen on an external monitor. The display of the Precision had an extreme bluish cast (“Blaustich” in German). Things that should be grey were extreme blue. It had nothing to do with the Windows 7 adjustments, because the blue cast appears also on the Bios screen. It was a “hardware issue”.

To make a long story short: Today, three months and about 20 Dell service calls later, I still have no flawless Dell notebook. In between I spent many hours in the phone waiting loop, three on-site repairs were done and at the end the notebook has been replaced by a swap model.

The swapped Precision made me full of hope. And yes, as it arrived no bluish cast anymore. That proves the defect of my first Precision M6500.

But then … I can’t believe … what do I see: Blue text on white background had a grey blur (“Grauschleier” in German). This had nothing do to with the bluish problem from my original Precision, but again it’s a defect on the screen. It looked for me like a driver issue. Therefore I reinstalled the operation system from the Dell DVD (which comes without any drivers): The problem disappears. This proves me that the grey-blur-issue is a problem with the drivers in combination with the Dell hardware.

Groundhog Day: Again calling the Dell support, explaining them the problem and deciding to send my Precision to the Dell repair service. I advised the Dell service to restore my system to the Dell Factory Image so that they could reproduce the grey-blur-issue. The partition with the “Dell Factory Image Restore” was still available on the hard-disk. To play it safe, I enclosed a letter with an explanation for the people which would do the job.

One week later I received the Precision back. I couldn’t believe my eyes: They changed the hard-disk, therefore destroying the “Dell Factory Image Restore” partition. I had no problem with the hard-disk, it worked fine! They installed a naked Windows 7 without any drivers. Thank you, Dell!

In my despair I visited the Dell website, entered my service-tag to get a list of all needed drivers (http://support.dell.com/support/downloads/index.aspx?s=dhs&cs=19). I thought if Dell is not able to deliver a working pre-installed system, I would do it on my own. But again Dell sucks: My service tag could not be recognized: “Your service tag was not recognized. Please check your service tag and try again”

And again: Calling the Dell support, updating them and asking for help. Their answer (in short): “Sorry, we can’t do anything about it. It’s a software problem.”

That was the straw that breaks the camel’s back. Sorry Dell. I spent hours on this issue. All I expect is a faultless and full-functional Dell notebook. I’m not willing to spend more time on this issue. Please send me a working full-featured Precision M6500 with a Factory Image or refund!


Dear readers, I will keep you posted how the story will end. I’ve got a lot more detailed, weird and “funny” anecdotes to tell about this. Besides, I’m very interested in the “Dell experience” of other people.


Update from November 2010 (Hard-Disk crashed)

The following days/weeks I’ve received no feedback from Dell. The only communication was with a lady from Dell who asked me to send back my original notebook. But since my swapped notebook didn’t work either, I refused this.
So I decided to make a fresh installation of Windows 7 by myself. The installation of drivers was the annoying part:

  • Tried the “Dell Client System Update” Software which promised to install all missing drivers. --> Didn’t work at all. It just recommended three drivers; and just one of it could be installed without an error
  • Next try: Dell Website which allows to enter my service-tag. No success either - my service-tag is still not recognized
  • Next try: Dell CD with drivers that has been shipped with the my original notebook (The swapped model had none included). Failed again, because some drivers (for example WLAN) failed with errors
  • So I did it the manual way: Checked the Hardware-Identifications and downloaded some of the drivers from the original hardware producer
Finally I’ve got the system running including all drivers. I was pleased so far.

But then two weeks later ... my hard-drive makes some unusual noise ... and ... crashes. Dead. No way to access it anymore.
Remember: That was the hard-disk Dell changed without any reasons some weeks before. Unbelievable!
Luckily I had a backup from three days before. Anyhow three days of work were lost. Thanks again for this, Dell!

I called Dell to make sure I would get a new hard-disk the next day. It was Friday around 6 p.m. No chance. Dell-Service was already on weekend. That means: A new hard-disk would have arrived 4 days later earliest. Four more days without the possibility to work on my computer. That was inacceptable.
Hence, I drove to the city and bought a hard-disk on my own. On Monday morning I called the Dell Service. It took two more days that their new hard-disk arrived (although they promised 24h during the week).

Conclusion: The Dell Service/Support is extremely bad (at least in my case). I even wrote a fax to the escalation department of Dell, but didn’t get any response or excuse regarding my case.
Now I know what the Dell Hell feels like -- endless calls, bad service, improper reparations and in the end you need to help yourself.


Update from February 2011 (Memory crashed)

I was full of hope that after the hard-disk-crash my Dell-Hell would be over. But, unfortunately, this was a false conclusion: First, every two weeks my notebook crashed with a famous blue-screen. As time goes by the frequency increased to two times the week.
Very annoying and again I’ve lost some work results in consequence of several crashes.
The blue-screens showed most of time something like “BUGCODE_USB_DRIVER; STOP 0x000000DE (...)". Sometimes there wasn’t even a blue-screen, instead Windows 7 just froze.

As usual I called Dell after doing some googling before. It turned out that Dell assembled some defect memory (RAM) into my notebook. Dell did already know that the manufacturing of those specific RAM production type was faulty.
Thanks again Dell. Why don’t you inform your customers proactive and offer some replacements?

All in all, this was a very bad experience with the Dell-Support and Dell’s product quality. The trouble continues for more than half a year. It costs me many working hours. I missed serious help from Dell. At least I would have expected some kind of an apology.

Sunday, October 10, 2010

Weird Grails Scaffold Exception

Using the dynamic scaffolding feature (in Grails V1.3.4) like
package de.scheelethek.backoffice.crud
class CommentController {
    def scaffold = true
}
I've got a runtime exception like
2010-10-10 13:11:44,417 [http-8080-1] ERROR errors.GrailsExceptionResolver  - java.lang.Boolean cannot be cast to groovy.lang.Closure
java.lang.ClassCastException: java.lang.Boolean cannot be cast to groovy.lang.Closure
 at java.lang.Thread.run(Thread.java:619)

It looks like Grails is trying to interpret the scaffold-definition as an action.
The explanation was not far to seek:

The referenced domain class is defined in the package "de.scheelethek.backoffice". The controller uses another package definition. scaffold=true is searching just in the same package for a corresponding domain definition. If not found "def scaffold", it is interpreted as an action.

The solution is obvious. Do an explicit definition of the domain class that should be used:
package de.scheelethek.backoffice.crud
import de.scheelethek.content.*
class CommentController {
    def scaffold = Comment
}

Sunday, July 11, 2010

Scrum Compact

For the last five years I've had the pleasure to run all my IT-projects within the SCRUM process framework. Depending on my various employers I was lucky enough to be in the Product Owner, Developer(Team) or mostly in the Scrum Master role.
I'm convinced that Scrum is one of the best methods to control the software developing process for new functionalities. If used correctly, it makes customers and developers happy.
Ok, when doing bug fixes or software support it isn't perfect, but that's another story.

Last week I recognized a very educational site about Scrum. I can recommend it as a good documentation for all German speaking people.

Please note: It's in German.

http://www.scrum-kompakt.de/

Wednesday, June 16, 2010

Disable Repositioning of a Dojo Dialog

The JavaScript toolkit Dojo provides a nice modal dialog. It's great! One of its features is the repositioning in the center of its parent window. The alignment is always recalculated if the parent's scrollbar is used.

This could lead to a problem if the user's screen resolution is low and in consequence the upper and lower part of the dialog is always out of the viewport. Imagine a dialog where the submit button is at the bottom of the dialog page:



In this case it could be possible that certain users never see the button and therefore never could submit the dialog.

A solution would be to deactivate the repositioning if the scrollbar of the main window is used. Unfortunately, Dojo's Dialog has no configuration option for this.

Digging in the source of Dojo I end up with disabling the event that is fired on usage of the scrollbar. Tested with Dojo Version 1.4:

<div dojoType="dijit.Dialog" id="myDialog"></div>
<script type="text/javascript">
       <!--
         dojo.addOnLoad( function() {
             dijit.byId('myDialog').show(); 
             dojo.disconnect(dijit.byId('myDialog')._modalconnects[0]);
         });
        //-->
</script>

Tuesday, June 15, 2010

Web Application Exploits and Defenses

Cool stuff. Wanna learn about and test some security issues? Check out Google's Jarlsberg application:

http://jarlsberg.appspot.com/

Sunday, May 30, 2010

Simple Backup for Spare-Time-Projects

In my spare time -- the remainder of the time my child, wife and job don't demand ;) -- I do some programming for private projects.

I was searching a very simple backup solution considering that I add new stuff just once in a while. The requirements:

  • Check once a day if I added new stuff
  • Just in case new or changed files are detected do the backup
  • Store the last 12 files locally on the development server
  • All backups should be stored on a remote FTP server

Finally, I wrote the following shell-script that does the job:
(If you like to use it just change the variable at the beginning and the FTP commands below):

#!/bin/bash

# Adjust those parameters to your needs
 
REPO_PATH="/var/myproject/"
BACKUP_PATH="/mybackup/myproject/"
BACKUP_FILE_NAME="myproject_backup"
TIME_FILE="${BACKUP_PATH}last_backup_time"
NR_OF_BACKUPS=12
BACKUP_EXCLUDES="/log/"


BACKUP_FILE="${BACKUP_PATH}${BACKUP_FILE_NAME}"

if [ ! -f "$TIME_FILE" ]
then
  echo "No $TIME_FILE found. Create one!"
  touch -d 731211 $TIME_FILE
fi

CHANGED_FILES=`find $REPO_PATH -newer $TIME_FILE | grep -v "$BACKUP_EXCLUDES" | wc -l`

echo "Found $CHANGED_FILES files in backup folder!"

if [ "$CHANGED_FILES" -gt "0" ]
then
  # do the backup
  tar -cjf "${BACKUP_FILE}_$(date +%F_%H%M%S).tar.bz2" -C $REPO_PATH . && touch $TIME_FILE && echo "Backup succeeded!" || echo "Backup FAILED !!!" 
  # put tar on FTP-Backup
  echo Putting backup-tar on FTP-Server
  cd $BACKUP_PATH
  TAR_FILE=`ls -tr1 *.tar* | tail -1`
  ftp -n -i my-ftp-server.hosteurope.de <<EOF
user ftpuser ftppasswd
cd remoteDir
put $TAR_FILE
quit
EOF
  # should old ones be removed ?
  COUNT_BACKUPS=`ls -l ${BACKUP_FILE}* | wc -l`
  if [ "$COUNT_BACKUPS" -gt "$NR_OF_BACKUPS" ]
  then
    echo Found more then $NR_OF_BACKUPS backups. Delete the oldest one.
    ls -t1 ${BACKUP_FILE}* | tail -1 | xargs rm
  fi
fi

Then add the script to your cronjobs. For example:

15 4 * * * /usr/local/bin/mybackup >/mybackup/myproject/backup.log 2>>/mybackup/myproject/error_backup.log

One final note:
If you do backups of "transactional" databases or version-control-systems, don't use the simple tar-backup-command inside the script. Instead use a "transaction-safe" application specific tool. For example in case of doing a Subversion backup use something like:

hot-backup.py --archive-type=bz2 --num-backups=12 $REPO_PATH $BACKUP_PATH && touch $TIME_FILE && echo "Backup succeeded!" || echo "Backup FAILED !!!"

Saturday, May 15, 2010

Increase your Bash History Size

Working with the linux bash shell, the command history could be one of your best friends.
Using the history command (for example joined with a grep) lets you relax your brain and fingers. Sure, even more relaxed is the usage of the reverse-search-history function (Ctrl-R).

To make sure the history's brain isn't to small, you should increase its size. The following lines need to be added to your ~/.bashrc file. It increases the history to the last 10.000 commands, erases previous duplicates and makes sure that the commands are appended (and do no override) on shell exit:

export HISTSIZE=10000
export HISTCONTROL=erasedups
shopt -s histappend

Friday, May 7, 2010

Online Web-Developer Tools

This is a small collection of tools that could be very useful in the daily job of a web-developer. I'll try to keep this one up-to-date:

Where? What?
www.generateit.net A lot of useful generators. For example colors, Lorem Impsum, Cron Jobs and CSS stuff.
tools.web-max.ca Misc tools for encodings (MD5, Sha-1, URL, Base64...), IP stuff and others
hogehoge.tk/tool-i De- and encodings for character-sets, URL, MD5, SHA-1, Hex
kuler.adobe.com Let you generate a nice and harmonious color-scheme
www.typetester.org Test and review fonts and screen types

Sunday, May 2, 2010

Install latest Version of MySQL on Ubuntu

Some days ago I installed the latest Subversion Version to Ubuntu 8.04 (Hardy). It wasn't quite easy, so I was afraid that installing the up-to-date version of MySQL would be a similar trouble.

Luckily, it turns out that it's easy to do. Here we go:

First check the version that is available currently:
root@dev:~# apt-cache madison mysql-server
mysql-server | 5.0.51a-3ubuntu5.5 | http://archive.ubuntu.com hardy-updates/main Packages

Ok, this one too old. We need at least version 5.1.45. Fortunately we just need to add the Lenny debian repository:
root@dev:~#vi /etc/apt/sources.list
add --> deb http://packages.dotdeb.org lenny all
root@dev:~# apt-get update
.....
Fetched 2380kB in 1s (2140kB/s)
Reading package lists... Done
root@dev:~# apt-cache madison mysql-server
mysql-server | 5.1.45-0.dotdeb.0 | http://packages.dotdeb.org lenny/all Packages
mysql-server | 5.0.51a-3ubuntu5.5 | http://archive.ubuntu.com hardy-updates/main Packages

Install the new version of MySQL server (it removes an old MySQL version automatically):
root@dev:~# apt-get install mysql-server-5.1
Important: Select always 'y' on questions during the installation process. This includes the question to override the /etc/mysql/my.cnf. Otherwise you need to adjust it manually, because the "skip-bdb" option doesn't work with version 5.1.

Finally check:
root@dev:~# mysql --version
mysql  Ver 14.14 Distrib 5.1.45, for debian-linux-gnu (x86_64) using readline 5.2

Finishing basic MySQL setup:

Now you need to configure your DB-system as described in the MySQL manual: http://dev.mysql.com/doc/refman/5.1/en/unix-post-installation.html

Problem:
root@dev:~# mysql_install_db --user=mysql
Installing MySQL system tables...
ERROR: 1136  Column count doesn't match value count at row 1
100502 13:26:07 [ERROR] Aborting
100502 13:26:07 [Note] /usr/sbin/mysqld: Shutdown complete
Installation of system tables failed!  Examine the logs in
/var/lib/mysql for more information.

Ok, there are databases in the old 5.0.x format, let's upgrade them:
root@dev:~# /etc/init.d/mysql stop
root@dev:~# /usr/sbin/mysqld --skip-grant &
root@dev:~# mysql_upgrade
root@dev:~# mysql_install_db --user=mysql

Alternativly, delete the stuff in your mysql-data folder (in case you setup a fresh DB):
root@dev:~# /etc/init.d/mysql stop
root@dev:~# rm -R /var/lib/mysql/*
root@dev:~# mysql_install_db --user=mysql

Now follow the MySQL documentation:
root@dev:~# mysqld_safe --user=mysql &
root@dev:~# mysqladmin version
mysqladmin  Ver 8.42 Distrib 5.1.45, for debian-linux-gnu on x86_64
root@dev:~# mysql -e "SELECT * FROM user" mysql
root@dev:~# mysql -e "select version();" mysql

And secure and setup some accounts:
root@dev:~# mysql -u root
mysql> SET PASSWORD FOR 'root'@'localhost' = PASSWORD('mypasswd');
mysql> SET PASSWORD FOR 'root'@'127.0.0.1' = PASSWORD('mypasswd');
mysql> CREATE USER 'debian-sys-maint'@'localhost' IDENTIFIED BY 'wze0EguNSaU52jCH';
mysql> GRANT ALL PRIVILEGES ON *.* TO 'debian-sys-maint'@'localhost' WITH GRANT OPTION;

If you need external access to your MySQL (instead of just allowing it from localhost) do something like this:
mysql> CREATE USER 'root'@'%' IDENTIFIED BY 'mypasswd';
mysql> GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' WITH GRANT OPTION;
root@dev:~# vi /etc/mysql/my.cnf
           --> Change:  "bind-address" to "0.0.0.0"
root@dev:~# /etc/init.d/mysql restart

Sunday, April 11, 2010

Old Browser Warning for your Website

Wouldn't it be great, if old browsers like the Internet Explorer 6 would vanish in your server's logs?
Every website owner can and in my opinion should encourage people to update their out-of-date browsers. All they have to do, is adding a little warning to their site in the moment a legacy browser is detected.

I'm sure a few months ahead this won't be an issue at all. Browsers, like today Chrome, will automatically update and therefore forcing updates.
But till then the website owners are in charge to enlighten their users.

For example:

Just add the unobtrusive script from browser-update.org to your pages (direct before the </body> tag):

<script type="text/javascript">
  var $buoop = {} 
  $buoop.ol = window.onload; 
  window.onload=function(){ 
    if ($buoop.ol) $buoop.ol(); 
    var e = document.createElement("script"); 
    e.setAttribute("type", "text/javascript"); 
    e.setAttribute("src", "http://browser-update.org/update.js"); 
    document.body.appendChild(e); 
  } 
</script>

Then users with an old browser would see a non-intrusive warning at the top of the page:

Wednesday, March 31, 2010

Set time on Linux

Simple use
date MMDDhhmm[YYYY]
# date 033115082010
# date
Wed Mar 31 15:08:02 CEST 2010
Better:
Never use it but configure NTP instead.

Monday, March 29, 2010

Simple Apache Rewrite: Add a folder to subdomain's root

Make sure you have activated the rewrite module. For example: Add the module to the APACHE_MODULES in /etc/sysconfig/apache2.

To redirect all http://mysub.mosbase.com/ to http://mysub.mosbase.com/start/ add this to your configuration (e.g., in your vhost declaration):

RewriteEngine on
RewriteCond %{HTTP_HOST} ^mysub\.mosbase\.com$
RewriteRule ^/$ /start/ [PT,L]

Sunday, March 28, 2010

Install latest Version of Subversion on Ubuntu

I thought it would be as simple as "apt-get install subversion" to install an updated version of Subversion. But I was mislead. Using Ubuntu 8.04 (Hardy) only the ageing SVN version 1.4.6 was available in the official repository.

First try:
Adding Hardy's Backport-Repository (deb http://de.archive.ubuntu.com/ubuntu hardy-backports main) into the /etc/apt/sources.list. Slightly better but far away from perfect: Version 1.5.1 was installed.

I was wondering: Is there a way to install the latest version of SVN without compiling the source distribution? Ubuntu is very widespread and SVN likewise. There needs to be a binary version of SVN 1.6.9 out there... So I googled but failed. Instead I found some up-to-date RPM packages.

At the end I decided to take those RPM packages and convert them into DEB packages.
This worked fine for me:

* Download Red Hat packages at: http://www.collab.net/downloads/subversion/redhat.html
* Installation as follows:
apt-get install alien
root@dev:/install/subversion# alien --version
alien version 8.69
alien CollabNetSubversion-client-1.6.9-1.x86_64.rpm
alien CollabNetSubversion-server-1.6.9-1.x86_64.rpm
dpkg -i collabnetsubversion-client_1.6.9-2_amd64.deb
dpkg -i collabnetsubversion-server_1.6.9-2_amd64.deb

vi /etc/environment
root@dev:~# echo $PATH
/usr/local/sbin:/usr/local/bin:/opt/CollabNet_Subversion/bin/:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games
root@dev:~# svn --version
svn, version 1.6.9 (r901367)
   compiled Jan 24 2010, 16:38:33

Tuesday, March 23, 2010

Common Eclipse Startup Arguments

Working with more than one workspace, the following runtime parameters make life easier:

eclipse.exe -vm \software\jdk1.6.0_21\bin\javaw -data \workspaces\project1_space -showlocation -vmargs -Xms1024m -Xmx1024m -XX:PermSize=512m -XX:MaxPermSize=512m

  • -vm: Explicitly specify which Java VM to use when running Eclipse
  • -data: Location of the workspace.
  • -showlocation: Displays the location of the workspace in the window title bar. Very useful if you have more than one workspace opened.
  • -vmargs X... : Used to increase memory (the example above is for Sun's/Oracle's JVM). Use the "jconsole" command to verify your needs for a specific workspace.

The argument "-clean" is handy if you face some configuration problems or need to restart Eclipse in consequence of a crash.

Note: You can also specify those parameters in the eclipse.ini. But then you are not able to apply them for each workspace individually.

Sunday, March 21, 2010

Grails Tutorial, Book & Interview

I'm an excited user of the Grails framework. In the past I was lucky enough to get some payed Grails projects. This enabled me to work full-time with Grails and getting a deep understanding of the technology.

To give something back, I decided to publish some Grails stuff. If you are interested in Grails you may look at one of the following:

Creating & Customizing a Blogger Blog

Since Blogger is very easy to setup and still allows great individual customization, I decided creating my Blog this way.
Here is a short summary what I did for customization:

What? How?
Create the Blog Just register to Blogger, choose a subdomain and assign a layout to your Blog.
Personally I prefer a template with fluid width (like Denim). It's very annoying if you own a great screen with 1920x1200 and the website just shows the content in a fixed width of 800px for example .
In addition use the ordinary Blogger functions (e.g. Gadgets) for creating your basic page elements
Remove Blogger's NavBar The NavBar at the top of the page takes too much space and is not necessary. Anyway it has one useful feature: The search field which implements a full-text search on your Blog. So I decided to hide the NavBar per default and make it visible if you move the mouse on the top of the page. Check the following post for a how-to (doesn't work for IE): Toggle NavBar
Customize HTML/CSS My next step was customizing the HTML/CSS to achieve a custom look & feel. Blogger allows you to change and extend every part of the HTML/CSS of your blog. You only need to have some basic understanding of CSS. ;)
In specific I changed the header, some colors, margins, background, list-elements.
Block Paragraphs I defined a new CSS class for presenting block paragraphs:

<pre class="simpleCode">
...
</pre>
Tables The chosen Blogger layout doesn't have any table styling. I did it on my own. While editing you need to create a HTML table as follows and you see a table like the one around.

<table>
<tr>
<th> ... </th>
<th> ... </th>
</tr>
<tr>
<td> ... </td>
<td> ... </td>
</tr>
</table>
Source Code For sure there will be some source-code on this blog. I decided to integrate the SyntaxHighlighter to allow code formatting like this:
// some Groovy list operations
List myList = ['a','b','c','d','e']
if (myList.size()<6) {
    myList << 'f'
}
assert ['A','B','C','D','E','F'] == myList*.toUpperCase()
It's easy to integrate this into your Blogger's HTML/CSS definition (check the installation documentation at SyntaxHighlighter). Finally all you have to do is specifing a tag like:

<pre class="brush: groovy">
...
</pre>

Starting Blogging on MosBase

No Blog, no Twitter, no Facebook, just a business WebSite at www.moscon.de and a humble profile on Xing. Till today that's all I've done for the "publicity" about my person on the Net.
There are two good reasons for that:

  • There is a lack of time for twittering, blogging or facebooking steadily about my person. (There may be a lack of interest also.)
  • In this regard I'm a little old-school:   My private things should stay private and therefore are only accessible in non-public areas on the Net.  

Nevertheless:  I'm a programmer and technical project-manager in professional life. Even in my spare-time I spend a significant time on exploring technical issues or interesting business ideas around the Internet.
So I decided some months ago to publish a kind of knowledge-base that collects some experience, tips, ideas and insides of mine. I had a specific idea and planned to write a software for this which possibly would become open source. And yes, MosBase should be the place for this.
But as time went by, my priorities changed:
First of all my lovely little son arrived.


As you expect certainly, a big part of my spare-time is now about him. In addition I currently develop a new version of www.ScheeleThek.de, which will become a kind of "Videothek" (video-store) for my family. Sure, it's non public.



Second a nice idea for a new social-web-site popped into my head. I plan to start the realization at the end of this year. So hoping this website will see the light of day in 2011. In future more about this new project here .....

Thus I decided to make MosBase a classic Blog. This should replace my knowledge-base initially.

Enjoy!