30.9.04
22:19 Free embedded Linux training (
,
,
,
)
Free embedded Linux training/en:
Full trainings:
- Introduction to Unix and GNU/Linux
- Embedded Linux kernel and driver development
- Development tools for embedded Linux systems
Presentations:
- Java in embedded Linux systems
- What's new in Linux 2.6?
- Introduction to uClinux
- Real-time in embedded Linux systems
posted by Jean-Marc Autexier |
0 comments | Permalink | Send to Friends | Google it!
22:18 Free embedded Linux training (
,
,
,
)
http://free-electrons.com/news/news.2004-09-28/en:
Full trainings:
- Introduction to Unix and GNU/Linux
- Embedded Linux kernel and driver development
- Development tools for embedded Linux systems
Presentations:
- Java in embedded Linux systems
- What's new in Linux 2.6?
- Introduction to uClinux
- Real-time in embedded Linux systems
posted by Jean-Marc Autexier |
0 comments | Permalink | Send to Friends | Google it!
29.9.04
20:33 Software auto update (
,
,
,
)
One more article in the series of "things I really like (see previous post about KDE gadgets). This time it is auto update feature. I hate manually have to install newer versions of applications. All applications should provide auto update functionality. Here is a (small) list of auto updates I often use:
- apt-get to update my Suse distribution
- eclipse auto-update. Good for eclipse+GEF+EMF ... but still too many plugins don't provide install-URL and have to be "intalled" (extract in plugin directory) manually
- Java WebStart
posted by Jean-Marc Autexier |
0 comments | Permalink | Send to Friends | Google it!
20:13 KDE gadgets (
,
,
,
)
Few small gadgets which makes me love working with KDE:
- ALT-F2: I start most of my programms like this, auto-completion is nice too
- ALT-F2 4+9: calculator
- Konsole: switch between consoles in one window with ALT-left/right
- Konqueror shortcuts: "gg:keyword" will search in google
- Move windows with ALT-pressed. No need to search Window border
- virtual filesystem (kio-slaves): access any ressource indenpendent from it locations (see also gnome-vfs,commons-vfs...)
- kweather and knewsticker
- date is displayed in clock applet
- ALT-TAB displays icon+application name
posted by Jean-Marc Autexier |
0 comments | Permalink | Send to Friends | Google it!
26.9.04
14:17 (Java) Quality recomendations (
,
,
,
)
Here are several (unsorted) tips to improve the quality of your applications:
- Code convention: important when you develop software in a team, use different IDE's or/and use a version control system. All IDE's support code convention templates, so use them.
- Testing: write as many test cases as you can and add them to your project. Use JUnit (http://www.junit.org/index.htm) and JUnit IDE support. Write tests before you start implementing (define how you app/procedure should work to find out what you need, and then write it).
- Comment your code: at least each class/method, but also inside method if ever you do something someone might not understand without your background
- Document your application: not only inside code, but also write documents (plain text preferred) which explain the architecture of your application. Store documentation with/near your application and in your version control system.
- Code review: do code reviews, use tools (see below)
- Code quality check: before or while code review use Java code analyzers. They will help identifying common coding errors (naming conventions, imports, modifiers, duplicate code, … see findbugs bug descriptions):
- Profiling: from time to time (at least before releases), do long time tests of your application in a Profiler. It will help you to identify bottlenecks and memory problems (Eclipse Profiler)
- Daily builds: helps to identifiy errors quick after they have been implemented (team) and fix them while developer still know what he did and not days or weeks later
- Debug: use debuggers to find errors instead of System.out-try-and-error
posted by Jean-Marc Autexier |
0 comments | Permalink | Send to Friends | Google it!
21.9.04
13:58 JNetstream Performance (
,
,
,
)
Yesterday I wrote a small application which read the first and last timestamp of a pcap file. For this, I used the Jnetstream library. The library is probably completely oversized for what I want to do, but it includes pcap file read which is what I mainly need.
My program (don't have it completely in mind) looks like this:
Decoder dec = new Decoder(pcapFile)
Packet first = dec.nextPacket();
Packet act;
Packet last;
while ( (act = dec.nextPacket() != null)
last = act;
System.out.println(first.getProperty("timestamp"));
System.out.println(last.getProperty("timestamp"));
The program did what it is supposed to do, but the performance was very bad. It took 2,5 seconds to parse a 61kb file (-> nearly 121 hours for a 1 GiB file). I don't know
Maybe I did something wrong and there is a faster method. I will try to investigate on it, if not I will have to implement my own FastPcapReader (help is welcome).
posted by Jean-Marc Autexier |
0 comments | Permalink | Send to Friends | Google it!
19.9.04
15:56 MIT OpenCourseWare (
,
,
,
)
MIT offers free access to MIT course materials vi OCW.
Here is the list of all courses
Have fun reading this excellent material.
posted by Jean-Marc Autexier |
0 comments | Permalink | Send to Friends | Google it!
17.9.04
19:28 Oracle variable multibyte Unicode and java (
,
,
,
)
Today, I discovered that Oracle variable mutibyte support isn't as good as expected.
Background: when you run Oracle with a Unicode character set (for example UTF-8) you can define VARCHAR2 column length not only in bytes but also in amount of characters:
create table MYTABLE
(
COLUMN1 VARCHAR2(200 char);
)
This will create a table MYTABLE with a column COLUMN1 which will accept 2 chars, independent of the used character set (remember that depending on the chosen character set a character can take more or less bytes).
This works fine until you reach 4000 bytes, which is the maximum a VARCHAR2 field can hold. As you see, I'm talking here about bytes, not characters. This means that if you have a character set which takes 2 bytes per character (as UTF-16), you can insert 2000 characters.
For UTF-8 it is more difficult. UTF-8 is a variable length character set. A character can take one to 3 bytes. This means that the calculation is more difficult. In best situation (characters with 1 byte), you can enter 4000 characters. In worst case (characters with 3 bytes), you only have 1333 characters.
If you want to insert or update such a column, be sure to first check the length of your data in UTF-8 bytes and not only count the number of character (which might be different, also because you might use a completely other characters set inside your application).
Here is a short Java UTF-8 check:
String value = ... ;
// only check above 1333
if ( (value != null) && (value.length() > 1333) )
{
// get bytes of the string in UTF-8 format
bytes [] utf8Bytes = value.getBytes("UTF-8") ;
if (utf8Bytes.length > 4000)
{
// Get 4000 first bytes and ...
byte [] tempBytes = new byte[3999] ;
System.arraycopy(utf8Bytes,0, tempBytes, 0,3999) ;
// ... built String from UTF-8
value = new String(tempBytes,"UTF-8") ;
}
Of course this is only a bad hack as you cut the original String and all data's behind 4000 UTF-8 bytes are lost.
posted by Jean-Marc Autexier |
0 comments | Permalink | Send to Friends | Google it!
10.9.04
10:36 Back from holiday (
,
,
,
)
I'm back from holiday.
I spend one nice week on Ile d'Oleron on french Atlanktic coast.
I went there with a friend. We cooked everday fresh fish, ousters and vegetables from the market. Beside discovering the near environment, we went to the beach, run everday day through the forest, played table tennis and played first person shooters until late in the night.
posted by Jean-Marc Autexier |
0 comments | Permalink | Send to Friends | Google it!
|
 |
|
 |
 |