Fri, 31 Oct 2008

Firefox doesn't support align parameter in colgroup tags
  • Web Author (WA) : Hello, I think I found a bug in Firefox, my page shows correctly in IE, but not in Firefox.
  • Firefox Fanatic (FxF) : That's because IE is a crap, IE is a censored of censored. IE doesn't follow standards. First you should validate your webpage against standard.
  • WA : It also shows fine in Opera.
  • FxF : Opera is as crappy as IE. Opera sucks. Opera is censored. Try with Chrome to see. Chrome is opensource. Chrome could be almost as good as Firefox, if it wasn't Google.
  • WA : It doesn't show fine. Chrome renders it same as Firefox.
  • FxF : Okay. Validating your page with the tool at w3c site should fix it. Always follow standards, if you follow standards, your page will show the same on all standard-compliant browsers.
  • WA : Wait, my page validates perfectly. My page is XHTML 1.1 Strict compliant and also CSS2 compliant. But it isn't rendered correctly on Firefox. The cells in my table are always left-aligned, but I put <colgroup align="right">.
  • FxF : There should be something wrong in your code. Because, as you say, you don't see what you expect on Firefox and Chrome.
  • WA : My page follows standards.
  • FxF : So, the answer is that what you see in Firefox is what your page should be rendered if the other browsers also followed standards.
  • WA : How could I do to make my cells align to right, then, following standards?
  • FxF : Use <td class="alignright"> and in you CSS, .alignright { text-align: right;}
  • WA : My table has thousands of cells to be right-aligned. The colgroup was designed to avoid redundancy writing this parameter class="alignright".
  • FxF : It's the first time I heard of this weird tag named colgroup.
  • WA : Ah? that's why Firefox can't support it. By the way, look at bug #915 at bugzilla, reported on 1998-09-26 and still alive. This bug is 10 years old and still alive.

Further reading: Les dix ans d'un bug, Mozillazine: Lack of support for <col align="">.

posté le: 10:36 | path: /data/web | permalien

Wed, 29 Oct 2008

Malagasy Online Spell Checker.

Because I seem to be unable to write a blog post about this tool, I'll notify you of the existence of the Malagasy online spell checker in a telegraphic style.

Malagasy Online Spell Checker is an online spell checker that you can use for free. Just go to http://dotmg.net/spell/check, input the malagasy text you want to check into the textarea and click on the button you see. The software will respond back with the list of words that could be misspelled. It won't propose any correction yet. It doesn't have an exhaustive list of correct spellings, so maybe some of the words it says misspelled aren't really misspelled.

Malagasy Online Spell Checker is opensource, and is released under the terms of the GNU Affero General Public License, version 3 (or above). It is part of a larger project called tsipelina, and the project is available on tsipelina.sourceforge.net. Malagasy Online Spell Checker requires PHP and a webserver, as it is written in PHP. You may need a Subversion client to download the source if you want to.

posté le: 15:07 | path: /data/web | permalien

Tue, 09 Sep 2008

About me.

Electronic Identity.

Virtual social networks invade our life. I constantly receive invitation to join communities, and, most of the time, this requires to setup an account to identify myself. These are some social networks I use a lot, some others I use rarely, and for 3 or 4, I've got an account but I don't like them at all.

I had the idea of grouping in one page all my identities. And that lead to this blog post.

Who am I?

Mahefa Randimbisoa 's avatar
Home Made Softwares Madagascar
VH 59 DEM, Volosarika
Ambanidia , Antananarivo , 101 Madagascar
+261331174314
Jabber

This CSS styled hCard created with the hCard creator.

I was born on 12th of September, 1980. I'm married, and we have two daughters. I worked for a company named RAS Tana. Its activity, as its name suggests, is about airline revenue accounting. If you've got an airline company, we could make business? I was in the IT department, as a software engineer and hardware technician. We worked on iSeries primarily, and also on Windows®. Now, I'm doing the same business with my own company. I'm skilled in the following programming languages : RPG III, SQL, PHP, XHTML, CSS, Javascript, Delphi. I have a great interest in the OpenSource world, and another great interest for wiki softwares and sites.

I'm an active developper of WikkaWiki; WikkaWiki is a flexible, standards-compliant and lightweight wiki engine written in PHP. Apart from that, I speak malagasy, my native language, I'm fluent in French and I have a rather bad english, but people can understand what I mean... When I'm not coding about WikkaWiki, I build a list of malagasy correct spellings in a MySpell-like format.

Who am I, virtually?

I am DotMG, the correct spelling to write it is with an uppercase D, lowercase o and t, then uppercase M and G. Some services that do not allow mixed case for user-id or screen name will use the dotmg, all lowercase. On some other web communities which emphasize on the real life (as I perceive it) rather than a virtual identity, I'm mahefa randimbisoa or mahefa.randimbisoa.

DotMG loves wiki.

Well, first group of my identities: wiki world. Apart from WikkaWiki, I think I also have an account on WikiNi and WackoWiki. I contributed to the malagasy Wikipedia, I also have an account on the french and english wikipedia, and registered on the betawiki to try to help translate MediaWiki in malagasy. And, do you know about Uncyclopedia? I'm DontoMG on hatsiklopedia, the malagasy version of it. I translated the web site openformats in malagasy as DotMG on openformats.org.

DotMG codes programs.

I'm DotMG on cia.vc and on CodeRepos. It's rather hard for me to explain what Cia.vc does, so, if you're interested, read what it says in its documentation page. CodeRepos is a free service that gives SVN repositories and access to host opensource projects or plugins. I've got an account on Sourceforge that I've never used. And finally, I'm mahefa.randimbisoa on Google code, because the first time I had to use a google account for my GViMail project, my user-id inherited from my google mail address.

DotMG helps, and needs help.

Sometimes, I need some help for programming, and sometimes, I can help others. I'm member of a malagasy association of IT users, called Infogasy where I'm known as DotMG. I'm randimby on developpez.net, and VBFrance remembers me as DotMG.

DotMG uses softwares, preferably opensources.

Ohloh is a very interesting social network for opensource software users and developpers. It tracks every opensource software activity, collects and displays statistical datas. If you're interested in knowing what opensource software I use, visit my Ohloh profile, and maybe, you could find softwares that you'll be addicted to. Wakoopa, on the other hand, installs a little software tracker on your system, and this Wakoopa tracker sends statistics to the site about what software you use, whether it's opensource or proprietary (or cracked, I pay all non-free software I use). It knows how many of your times did you spend on Mozilla Firefox or MSHearts... Take a look at what I use on my Wakoopa profile page.

DotMG is blogging ...

I feed many blogs. This blog you're reading is where I put what I want to say about my worklife. It will contain articles about iSeries stuffs, web usage and web programming. I publish Jokes, fun and boring-time stories, and rarely some more serious ideas about malagasy life at What if .... I also post some articles as DotMG on Malag@syMiray. Another blog dedicated to serasera.org is mine, I called it Serasera Watch. I'm DotMG on Technorati, so, you can see there if I happen to setup (yet) another blog. I'm also member of Mybloglog as DotMG, wow, it shows my avatar on sites that I visited and which have a Mybloglog widget.

I started microblogging in June 2008, as and then with the same id DotMG on identi.ca. If you want to follow me, my tweets are about general life, while my dents will be more about programming things.

DotMG is not addicted to other social networks, no more.

I use web forums sparingly, known as DotMG on serasera.org or moov.mg. I didn't find any interest in questionning or answering on Yahoo! Q&A.

I don't like hi5. I was invited some years ago, and joined. But I actually think it's a buggy social network, and not interesting. Look : one of my friend sent an invitation to one of my e-mail addresses. Because it was an address hi5 didn't know, it suggested me to create a new account. But, I think that I should have only one identity on one social network, and I've tried to search for the person who invited me, but no result found. The invitation mail didn't mention any clue of which name she registered. Please, don't invite me to be your friend on hi5, I don't use it. And I don't visit my hi5 profile, so don't leave a comment. I also have a MySpace profile that I don't see. I think I ignore what to do with MySpace. The same for a 43places account, created but not used, I don't travel at all. I don't understand why I continue to accept joining a social network that I won't like. It seems like I've got a profile 954 VMS on a site called unyk.com.

Very recently, I joined , and the number of my friends grows constantly. I joined some groups and sometimes, I play games on it. A bit interesting social network, I spend about 1 hour per week on facebook, most of it on playing.

To stay connected with my old classmates, I've setup my Sekoly.info account to alert me by mail whenever someone sends me a comment. I also found 2 old classmates on Copains d'avant.

And about more serious or professionnal social network? I really really really hate Viadeo. It sends me weekly e-mail with nothing interesting, it makes a big difference between normal members and premium members, and the site is not functionnal at all if you aren't a premium member. I don't want to waste any penny for a social network website, and the site's strategy is like harassing me about to become a premium user. Apart from that, will I mention mailing-lists I'm subscribing to? Okay, I'll mention one : the midrange rpg400 list, just in case you're interested in RPG programming.

Media sharing social networks.

I'm DotMG on Flickr. I posted 2 videos on Google Video but I don't know how to retrieve the URL for my google video profile.

Bookmarks.

I don't stumble upon websites. When I find an interesting page, I bookmark it on del.icio.us. If you want to share any page with me, just tag it with for:DotMG.

OpenId

OpenId is the solution to this huge number of network identities. For most of these unused accounts, I don't even remember my passwords. I wish every webservice supports openid. My openid account is http://dotmg.myopenid.com.

posté le: 15:45 | path: /data/private | permalien

Mon, 18 Aug 2008

Excel report with no duplicates on master file.

My tasklist:

  1. Do a query, master-detail. To make it short, let's say the two tables are named MASTER and DETAIL.
    SELECT M.CUSTNO, M.TOTAL, D.ARTICL, D.AMOUNT 
    FROM MASTER M INNER JOIN DETAIL D ON M.CUSTNO = D.CUSTNO
    CUSTNO is a primary key on the MASTER table, and in the DETAIL table, there could be 1 or more rows with the same CUSTNO value. CUSTNO is alphanumeric.
  2. Present the result in an excel file. The Excel file should have 4 columns: CUSTNO, TOTAL, ARTICL, AMOUNT.
  3. For the presentation, the master columns (CUSTNO and TOTAL) should not be repeated if there is more than 1 row for the value of CUSTNO in the table DETAIL. In other words, below are the good and the bad style of presentation, on excel.

Here is the bad style of presentation. The client would like the cells in blue to be empty. You get this with the above SQL query.

CUSTNO     TOTAL ARTICL     AMOUNT
   L35      1000 Papers        700
   L35      1000 Pens          300
   M77       300 Papers        300

Here is how the client wants the data to be presented:

CUSTNO     TOTAL ARTICL     AMOUNT
   L35      1000 Papers        700
                 Pens          300
   M77       300 Papers        300

The reason is that the client wants to be able to sum the values of the column AMOUNT in the excel file. The other benefit is that with empty cells, the change of the column CUSTNO is more visible.

To perform this, I added an extra column to my query, and changed it to the following:

SELECT M.CUSTNO, M.TOTAL, D.ARTICL, D.AMOUNT, RRN(M) AS CUSTNN
FROM MASTER M INNER JOIN DETAIL D ON M.CUSTNO = D.CUSTNO
ORDER BY CUSTNO

Let me first explain what does mean RRN(M) before continuing. RRN stands for Relative Record Number. In a DB2 SQL syntax, RRN takes one argument: the name of one table in your query. Here, the table MASTER used an alias M, so, instead of RRN(MASTER), I have to use RRN(M). RRN(M) gives the relative record number of the row selected in the table MASTER, or, in other words, the physical position of the row in the physical file.

Actually, the result of my query will look like the following.

CUSTNO     TOTAL ARTICL     AMOUNT      CUSTNN
   L35      1000 Papers        700          78
   L35      1000 Pens          300          78
   M77       300 Papers        300          79

I extract this in an excel file, and the rest, I'll manipulate in excel. So, I open this file in excel, I get actually 5 columns, I add 2 other columns, called ORDERING and DIFFRRN. ORDERING will be used to preserve the order of the rows, like I showed in a previous post, its values will be 1, 2, 3, ... and so on. In the first cell of the DIFFRRN column, I put the value 1. For each other row, the value of the DIFFRRN cell will be the difference between the value of the CUSTNN of that row and the value of CUSTNN of the row just above it. In other words, if column CUSTNN is the column E, and the column DIFFRRN is column G, value of cell G(n) = E(n) - E(n-1). To do this on excel, on the 3rd row, you put the formula =E3-E2 as value of the cell G3. After you press Enter, that value is computed. To expand the formula for all rows, just select that cell and drag down the bottom-right corner to the last row of the sheet.

1: Formula Gn=En - En-1 2: Drag down the formula cell to apply to entire column 3: and you get the result

After computing, the value of this column DIFFRRN is 0 if we're on the same MASTER record, because the value of CUSTNN (which was RRN(M)) will be the same. If it is other than 0, then it's a new MASTER record. RRN(M) is then just a trick to get a numeric value with wich I can perform arithmetic substraction. If CUSTNO was numeric and primary key, I wouldn't need the RRN at all. Next step will be to clear the column CUSTNO and TOTAL for each row that has the value 0 for DIFFRRN. We will sort the entire sheet by the value of DIFFRRN in order to get all rows having DIFFRRN=0 side by side. But before that, we will select and copy all values of this column, paste it into a text editor (like Notepad), re-select all this values and copy it to finally paste it back to the excel file. Why? Because the value of DIFFRRN is only mathmatical formulas. If we re-order the sheet, the formulas will be reordered, and the cells they refer to will be replaced in unpredictable ways. When pasting to a neutral text editor, we paste the computed values, not the formulas. And when we recopy this to paste it back to the excel, we put the computed values in each cell, and not the formulas.

After this weird copy/paste stage, we can re-order the sheet and select columns CUSTNO and TOTAL for all rows having value of DIFFRRN equal to 0; we can press Del to empty these cells. Then, we re-order again the sheet, now with the column ORDERING to get back the original ordering of rows. And finally, we can delete the columns CUSTNN, ORDERING and DIFFRRN and voilà.

posté le: 17:20 | path: /data/misc | permalien

Mon, 14 Jul 2008

Keep things simple: Order of an excel file.

One of my co-workers was asked to colorize an excel file. The task is simple but fastidious: for each row that has the value of the column `status' equal to 0, the background should be in red. If the value is 1, it should be with a pink background. Other values should be left untouched. The spreadsheet file contained about 2000 rows, and the order of the rows should not be modified.

I first thought about a macro to perform the task, but if I show her how this tedious task could be done that way, she would come to me everytime she think a task could be achieved by using macro, and she's not geek enough to learn how to write macros. Two more thinkings and I come to a simpler solution.

The first thing to do is to add an additional column to the table. It is called rank and have the value 1, 2, ... and so on incremented by 1 to the number of rows. It's very simple with Microsoft Excel to create a column with values autoincremented by 1: simply by writing 1 on the first row, 2 on the second, selecting these 2 cells and enlarging the selection to the entire column by dragging down the bottom-right corner of the selection. This additional column will help us preserve the original ordering of rows. Next thing is to select the entire sheet, then order it by the column status. All rows with the value 0 or 1 for the column status are now grouped. They can be selected respectively only once by dragging the mouse on the line number column. After having applied the color attributes, I just have to reorder the entire sheet by the column rank I created to get the initial ordering of rows, and to finish, I have just to remove this column and voilà.

The most pleasant thing is that the co-worker understood perfectly all the manipulations I've showed her. And I understood that writing cool and smart macro codes is not always cool and smart; many times, I just need to keep my thoughts simple and stupid.

posté le: 11:43 | path: /data/misc | permalien

Tue, 17 Jun 2008

The 2nd browser war explodes

November 2004 to may 2008, the second war is being prepared

Since the release of Mozilla Firefox 1.0 in late 2004, and when Firefox got more than 10% of marketshare, the second browser war was announced. The simple term "Browser war" benefited the users in different ways.

  • Opera became totally free: being freeware was the only alternative for a web browser to stay in the race. Prior to version 8.5, unregistered versions showed ads banners. The developers needed to find financial resources elsewhere. The next step can be that it will be also opensource.
  • Safari was made available to Windows users. Almost every browser is now available on every platform.
  • Internet Explorer was constrained to follow standards, with the release of the version 7 and the forthcoming version 8, and a number of security holes were fixed.
  • Mozilla Firefox was constrained to constantly enhance its performance, especially in term of speed and memory usage.

But it seems like this war has reached its summum on the month of june 2008. If it hasn't yet really started, then june 2008 is its beginning, and if it has already begun, june 2008 is its hotest period, at least so far.

June 10th, Safari 4 seeded to developers

Safari 3.1.1 was announced to be the fastest web browser on any platform, as it loads pages up to 1.9 times faster than Internet Explorer 7 and up to 1.7 times faster than Firefox 2. Safari 4 increases again Javascript performance by 53%. Since Firefox is also about to release the version 3, more performant in term of speed, seeding Safari 4 to developers seems to be Apple's answer to maintain an aspect of the browser war: tha browser speed race. Arul N S says Safari 4's Javascript engine, Squirrelfish will be faster than SpiderMonkey, the Firefox 3's engine.

June 12th, Opera 9.5 released

Less than a week after that, and less than a week before Firefox 3 final is scheduled to be released, Opera releases the version 9.5, emphasizing on keywords web standards and speed and performance, again.

June 17th, the Download Day for Firefox 3 Final

Mozilla found the most exciting idea for the release of its Firefox 3. It's the Download Day 2008: the goal is to set a Guinness World Record for most software downloads in 24 hours. At the time of writing this post, 75 minutes before the hour H, (1.702.903) 1.721.775 pledged to download it during that day.

The final version of Internet Explorer 8 is expected at the end of the year

Internet Explorer 8 beta 2 will be released soon, probably between July 1st and September 30th. It could also be released during this month of june, who knows.

And the winner is ...

According to the w3schools statistics, the winner of the browser war is still ... Internet Explorer who had 54.8% of the marketshare in April 2008. Mozilla and Firefox get about 40%, Safari has only 2.2% and Opera 1.4%.

According to my stats, ie the visitors of my site, the result is a bit different: Mozilla and Firefox has 51.73%, Internet Explorer is at second position with 44.20%, Safari has 3% and Opera 1%.

One thing is sure, however: Mozilla's market share is constantly increasing, gaining more than the other browsers, and Internet Explorer is, on the other hand, constantly decreasing day after day.

To predict the future, I see Internet Explorer going under 30% in the next 12 months, Mozilla Firefox will grow up to 60%, Safari will get 10% or less, Opera will stay at 1%, unless it choose to go opensource.

posté le: 17:50 | path: /data/web | permalien

Thu, 08 May 2008

Downloading a large database from iSeries in csv format.

Today, my task is to receive from the iSeries a huge table (500 Mb in the CSV format). Although I have a so-called ADSL connection, downloading this file through Client Access would take hours (about 8 hours I presume).

The solution is to compress the file before transfer, then decompress it on Windows. But, I didn't know how to compress data on the iSeries, in a format that can be decompressed on Windows. After searching, I finally found that I wouldn't need to download or install anything to the iSeries. Hope this post can help someone.

Creating the csv file on the iSeries

Everyone knows how to do this : It's the command CPYTOIMPF which I've used to create a CSV format of the database, directly to the iSeries' IFS. This is how I did it :

CPYTOIMPF 
  FROMFILE(MYLIB/MYFILE) 
  TOSTMF('/home/mycsvfile.csv') 
  MBROPT(*REPLACE)
  STMFCODPAG(*STMF)
  RCDDLM(*CRLF)
  FLDDLM(';')

CCSID conversion

Before we will compress the text file, it is really important to convert the file to have a CCSID that your Windows program could read. Have in mind that, when you will compress the text file, the compressed file you get is somewhat another binary file. If you download a text file by ftp, your transfer will be in text mode, and an implicit conversion may occur, so you don't have to bother about character set conversion. But while the ftp client will see the compressed file as binary, it cannot do the implicit conversion anymore. You will be able to download the compressed file and decompress it, but the decompressed file may be in an EBCDIC encoding.

What you need to know is the respective CCSIDs of your file in the iSeries and of the decompressed file on Windows. On iSeries, it is generally your job's CCSID. If you don't know, you could use the command WRKLNK '/home/mycsvfile.csv', then use option 8 to display it. On Windows, you may wish to use the iso8859-1 encoding, which have a CCSID value of 819. The other commonly used encoding is UTF-8 Unicode, which has a CCSID value of 1208.

A simple command to perform the conversion is CPY.

CPY
 OBJ('/home/mycsvfile.csv')
 TOOBJ('/home/mycsvfile.pcformat.csv')
 FROMCCSID(37)
 TOCCSID(819)
 DTAFMT(*TEXT)

Compressing the csv file

To compress the text file, we use the jar tool in QSHELL. If you didn't never use QSHELL (this was the first time for me), QSHELL is like the console on Windows® or Unix. To start it, just type STRQSH. You'll get a screen like this :

                                                         QSH Command Entry                                                          
                                                                                                                                    
   $                                                                                                                                
                                                                                                                                    
                                                                                                                                    
                                                                                                                                    
                                                                                                                                    
 ===>                                                                                                                   
                                                                                                                        
                                                                                                                        
                                                                                                                        
 F3=Exit   F6=Print F9=Retrieve F12=Disconnect                                                                                      
 F13=Clear F17=Top  F18=Bottom  F21=CL command entry                                                                                

All we need is then to go to the IFS folder where we put our text file, and launch the jar command there.

cd /home
jar cvfM mycsvfile.jar mycsvfile.pcformat.csv

When compressing is finished, you can type F3 to exit the QSHELL environment.

The compression ratio is generally above 90% because it's just text file, and it is rarely below 75%. I was able to reduce the size of my download from 500 to 24 M Mb. On Windows®, I use the opensource software 7-zip to uncompress the jar file.

Execute the whole process in a batch

The whole process can be done in batch. QShell can perform tasks in batch, as long as those tasks don't need any input from the user.

Previously, we invoked the QShell "console" without parameters to begin an interactive session. Now, in order to perform any tasks in batch, we supply a parameter CMD which is a string representing a semicolon separated QShell commands.

But, a precaution to take is to remove the v modifier in the jar command. So, we will change cvfM to cfM. The v standed for verbose : it allowed the interactive session to display useful informations about the compression process, but it also required an input from the user after the process has finished. To conclude, this is the CL command that create the jar file in batch :

QSH CMD('cd /home; jar cfM mycsvfile.jar mycsvfile.pcformat.csv')

Ahhhh, a little final note : QShell may have problems with filename containing special characters like $, @, ... Consider using filename consisting of letters from a to z, numbers and period only.

posté le: 07:11 | path: /data/as400 | permalien

Tue, 25 Mar 2008

When Gmail deceives.

I used to say Gmail is great, Google apps rock, ... but today, Google has deceived me.

At work, the webmail tab of my browser never closes without my browser. In other words, I receive and send a lot of electronic mails every day, and most of my mails are urgent. The company where I'm working chose the simplest solution for mails: a free webmail service. So, I have a Gmail account as business coordinates.

Today, I got an error during about 6 hours, and the guys at Google call it Temporary Error (502). Temporary?

We're sorry, but your Gmail account is currently experiencing errors. You won't be able to use your account while these errors last, but don't worry, your account data and messages are safe. Our engineers are working to resolve this issue.

Please try accessing your account again in a few minutes.

Temporary? Actually, it lasted for 6 hours, and I don't know yet if it will be available again today. I hope my boss didn't send an urgent message to me. (If he did, I could be fired by not answering...).

posté le: 12:34 | path: /data/web | permalien

Tue, 05 Feb 2008

Au pays des cons, ...

Au pays des cons, les FAI sont rois.

Y a-t-il une place pour un nouveau FAI à Madagascar? Hier, mon épouse s'est plainte que la connexion chez où elle bosse, assurée par Blueline soit coupée tout le temps. C'est normal que ça ne va pas, ils n'ont même pas honte d'afficher Site en reconstruction sur la page d'accueil de leur site web alors que ce sont les pros dans le domaine.

Page d'accueil de Blueline, montrant site en reconstruction

De mon côté, cela fait un bail que j'essaie de me connecter au site ohloh et DTS me dit que le site ou le réseau est peut-être hors service. Le site n'est pas hors service car je peux le voir en utilisant des proxies ouverts. Essayez d'envoyer un mail de réclamation à DTS et ils vous répondront quand les poules auront des dents. Essayez de téléphoner, et le dynamique agent vous conseillera d'écrire un mail au service client.

Erreur de connexion du proxy de DTS au site ohloh.net

Ce problème semble affecter plusieurs sites aléatoirement, et la durée de ce blocage peut aller jusqu'à plusieurs mois. En effet, un blog auquel je voulais commenter utilisait le service de Haloscan. Pendant deux mois au moins, le fournisseur d'accès m'a jeté ce message d'erreur chaque fois que je tentais d'ajouter un commentaire. Heureusement que les sites affectés jusqu'à ce jour ne sont pas des sites sur lesquels nous travaillons quotidiennement, mais si jamais l'un des sites que nous devons impérativement utiliser soit bloqué, cela finira très mal pour quelqu'un.

Au pays des cons, les FAI sont rois.
posté le: 07:16 | path: /data/web | permalien

Thu, 24 Jan 2008

Tabs CodingGuidelines and Vim

vimrc settings

After almost 3 years using Vim as my preferred text editor, I continue to learn and to find tips and tricks I didn't see before. I imagine that to become really involved in any software and to really know most of its potentiality, one should become an active membre of its community, through forums, mailing lists, IRC ...

Today, I found out how to make tabulations visible, so, from now on, I can easily see if any source I'm editing isn't following our Coding Guidelines about whitespaces.

Here is the .vimrc settings:

  • set listchars=tab:.\ : listchars consists of a comma separated list of string settings. The string setting that interests me is tab, which consists of 2 characters to be used to show a tab. The first one is used once to mark the start of the space occupied by the tab, the second is repeated to fill the remaining spaces. Note that, here, my second character is not a backslash, but a space. It needed to be escaped, that's why you see a backslash character here. My tabs are now showing as a dot followed by spaces, so I can count the number of tabs by counting the number of dots.
  • hi SpecialKey guifg=#224488 guibg=#002266: But, I need to make a visual difference between a tab and any dots followed by blanks. For this purpose, I've added a special highlighting for the SpecialKey family, for them to have another background-color. (For this, I edited Vim71/colors/darkblue.vim, as darkblue is the only colorset I use.)
  • set list: This is the clue for showing tabs. Unfortunately, this option made one of my preferred vim setting inactive: the linebreak option which is not used when the list option is on, according to the documentation.

And here's how it sounds :
Screenshots of my Vim screen, distinguishing tabs

posté le: 13:16 | path: /data/web | permalien

Mon, 31 Dec 2007

2007, année pont.

2007 arrive à terme, je vais essayer de faire un petit bilan, bilan personnel de cette trop courte année. Le billet n'est pas du tout intéressant pour ceux qui n'aiment pas le voyeurisme.

2007, début d'année morose

2007 a commencé très calmement, c'était un début d'année morose pour moi, et apparemment, pour d'autres aussi. C'était la routine, et à part la routine, rien à dire.

2007, année des nouveaux départs

L'évenement personnel marquant cette année est mon changement d'emploi. Depuis le premier juillet, j'ai intégré une nouvelle société, d'une dimension plus petite. Toujours dans le même domaine (programmation sur les mainframes, langage RPG/400, CLP, ...) C'était ma deuxième postulation cette année. C'est une bonne chose de changer d'emploi, mais cela s'accompagne de sacrifices personnels : J'ai vendu mes jours de congés contre un préavis trop court, donc, moins de temps libres, beaucoup moins; j'ai dû bosser plus dur pour arriver à maitriser le langage SQLRPG; le siège social de la société se trouve plus loin de chez moi, et en fin de compte, je dépense plus d'heures au boulot et pour aller au boulot. D'un autre côté, j'avoue que cela donne du tonus de pouvoir reformater son disque dur, de tout oublier sur l'aspect métier de son ancien emploi et de repartir à zéro avec le nouveau.

Ceci expliquant cela, notre petite famille a décidé de commencer la construction de notre futur chez-nous. Une entreprise qui a un peu débuté dans la douleur car le terrain qu'on a acheté ferait l'objet d'une double vente, et que l'autre supposé acheteur s'est manifesté après nous avoir vu sur le terrain faire la fondation et prier Dieu de nous aider dans cette construction.

2007, année des rencontres

J'ai pu serrer la main de quelques amis que j'ai l'habitude de cotoyer sur Internet. Ces rencontres IRL étaient quelque chose d'important pour moi vu l'emploi du temps chargé de ces personnes qui passent un court moment à Madagascar. Cela me donne l'air d'être assez important pour quelqu'un d'important. Je regrette de n'avoir pas pu participé à la rencontre Antananarivo miblaogy 4.0 ni aux autres rendez-vous, la précédente section de ce billet pourrait expliquer en partie cette non disponibilité, et j'ajouterais que je ne me considère pas comme un vrai bloggueur, juste quelqu'un qui écrit de temps en temps.

2007, année de l'inachevé

Que de projets en 2007 et dont le but n'a pas encore été atteint.

Mon logiciel de vérification orthographique de langue Malgache n'a avancé que d'un iota. J'ai bien voulu arriver à un brouillon présentable avant la fin de cette année, mais, faute de temps et de disponibilité; il reste encore au stade de fumiciel malgré l'intérêt affiché par les internautes comme Lova, Tattum et d'autres.

La vérification orthographique manuelle d'une biographie en malgache écrite par une amie s'est terminée en queue de poisson. Le nouveau job y est pour quelque chose, mais le plus grave a été la faillite de la société qui hébérgeait mon site. Cette société a fermé boutique, sans préavis, et les données de tout un travail ont été perdues. Cela m'aura appris la valeur et le prix des sauvegardes. J'ai préféré oublier tout le contenu qu'il y avait dans mon ancien site et repartir de rien. Pour cette vérification orthographique, il me faudra une semaine pour réparer les dégats, et cette semaine, je ne l'ai toujours pas eu. A notre rythme de départ, on aurait bouclé le livre avant la fin de cette année...

WikkaWiki, le moteur wiki opensource auquel je participe, n'a pas réussi à sortir la version attendue 1.1.7 malgré (ou à cause de, c'est selon...) le grand travail entrepris par toute l'équipe. On a été contraint de revoir la priorité et de faire des releases intermédiaires à cause des attaques de spams. J'ai peut-être porté la poisse, qui sait?

Notre chez-nous est en cours de construction, une chose de plus d'inachevée. Même une partie du terrain n'est pas encore titrée à notre nom.

Smiley, du haut de ses deux printemps et 2 mois, ne bavarde toujours pas. (Smiley est le pseudo que j'attribue à ma fille quand je suis sur Internet). Elle sait dire "Papa, maman, bebe, masiso, maiaiy" et d'autres mots; elle chante "Petit Papa Noël" et d'autres chants pour enfants, et c'est tout.

2007, une bonne année dans l'ensemble

A part la mort de Chris Benoit, de sa femme et de son fils (Non, je ne connais pas personnellement Chris Benoit), je dirai que 2007 a été une bonne année, un seul enterrement et deux visites à l'hopital pour ma grande famille. 2007 était un pont vers une année meilleure, une vie meilleure

2008, année de l'aboutissement

Dieu, Je te remercie de tout ce que Tu m'as offert au cours de cette année 2007. C'était une bonne année, et bien que je n'ai pas été sage, Tu m'as toujours soutenu et aidé. C'est par ta grâce que je suis là où je suis. Pardonnes mes pêchés et enseignes-moi à devenir meilleur chaque jour. Pour 2008, je Te demande de m'aider afin que les objectifs que je me fixe soient atteints. Donne moi du temps, la santé, l'enthousiasme, la force, Ta bénédiction pour accomplir mon travail et mes travaux. Mais que seule Ta volonté soit faite. Amen.

PS: Je ferai tout pour être de la partie pour Antananarivo miblaogy 5.0

posté le: 08:08 | path: /data/private | permalien

Wed, 14 Nov 2007

SQL0326

One day, I've created a program in the SQLRPG language, with RPG400 (and not RPGIV). It was something like the snippet shown below, except that it had about two dozens of fields in the SELECT clause.

C/EXEC SQL 
C+ DECLARE C1 CURSOR FOR SELECT A, B, C FROM T
C/END-EXEC
 * ...
C/EXEC SQL
C+ FETCH NEXT FROM C1 INTO :A, :B, :C
C/END-EXEC

When compiling, I've got the strange SQL0326 error message. A little command DSPMSGD SQL0326 QSQLMSG shows me that it meant Too many host variables specified. I restart counting again and again, but I definitely had the same number of host variables as the number of fields in my SELECT clause. Googling didn't help, seems like I didn't have the right search keywords or no one before encountered this issue. I tried every figure I could imagine, blindly, and after one day of searching, I finally found the trick!

Some fields in the database had 300 characters length. In fact, they represented in one string an array of 6 50 characters sub-elements. In my program, I declared the variable as an array of 6 elements of 50 charcters long. I thought it as a clever way to get automagically the value of each element, but that was the problem.

In an RPG/400 program, a string variable can have a length less that 256 characters. This doesn't apply to arrays, so, even if the total length of the variable array was 300, the compiler didn't see it as a problem. But at the FETCH instruction, I think fields having a length larger that 256 characters weren't considered. The solution was to, either use SUBSTR in my SELECT clause to limit the length of the strings fetch to be under 256, or CVTRPGSRC to pass to RPGIV, which does not have this limitation.

C/EXEC SQL 
C+ DECLARE C1 CURSOR FOR SELECT 
C+ SUBSTR(A, 1, 250) AS A1, SUBSTR(A, 251, 50) AS A2, B, C FROM T
C/END-EXEC
 * ...
C/EXEC SQL
C+ FETCH NEXT FROM C1 INTO :A1, :A2, :B, :C
C/END-EXEC
posté le: 14:16 | path: /data/as400/sqlrpg | permalien

Tue, 30 Oct 2007

Troisième anniversaire de mariage...

Pour ma chère et tendre, à l'occasion du troisième anniversaire de notre mariage, ce 30 octobre 2007.

fa izay alehanao no halehako, ary izay itoeranao no hitoerako, ... hataon'i Jehovah amiko anie izany, eny, mihoatra noho izany aza, raha tsy ny fahafatesana ihany no hampisaraka antsika.

Où tu iras j'irai, où tu demeureras je demeurerai; ... Que l'Éternel me traite dans toute sa rigueur, si autre chose que la mort vient à me séparer de toi!

for where you go, I will go; and where you lodge, I will lodge; ... Yahweh do so to me, and more also, if anything but death part you and me.

Rut. 1. 16, 17.
posté le: 08:07 | path: /data/private | permalien

Mon, 29 Oct 2007

Blosxom.

Et me voici en train de jouer avec blosxom.

J'ai essayé WordPress, et WordPress m'a vraiment plu, mais maintenant, je me tourne vers Blosxom pour plusieures raisons, qui sont, par ordre d'importance (décroissante) :

  • Un sang malgache dans blosxom, je suis malgache, et je pense que c'est un encouragement à tous les développeurs malgaches que d'utiliser un logiciel où il y a un malgache dans l'équipe de développement. Il y a de quoi être fier...
  • Mon ancien blog sous WordPress a complètement cramé: Oui, j'ai choisi un hoster un peu tordu, qui a déclaré faillite. Mes posts et mon installation de WordPress ont disparu avec cette société, et puisqu'il me faut recommencer depuis le début, autant je me sens libre d'essayer quelque chose de nouveau.
  • Et mon actuel hoster limite la taille de la base MySQL à 5Mo tout en offrant un espace disque de 1Go, alors, blosxom devient de facto la solution idéale.
  • Je n'ai jamais apprécié la fonctionnalité WYSIWYG sur WordPress. J'écrivais mes textes avec Vim car l'éditeur de texte riche de WordPress générait des balises que je ne voulais pas, et de toute façon, de tels éditeur ne générent pas non plus des paramètres qui sont importants pour la qualité de mes pages (comme hreflang, lang, ...) Maintenant, j'ai un accès ftp assez raisonnable, et le fait de transférer le contenu de mes textes vers le serveur par ftp m'enchante plutôt.

Après deux heures d'essai, je suis assez impressionné par blosxom, par sa simplicité. J'espère seulement qu'il ne soit pas trop simple pour qu'il y ait des fonctionnalités que j'aimerais avoir et qui ne sera possible qu'en modifiant un peu le coeur du programme. La fonctionnalité qui me vient à l'esprit actuellement est de pouvoir mettre un bon titre à chaque page lue. J'ai remarqué que le titre de la page reste toujours le même. J'ai déjà eu l'occasion d'expliquer en malgache l'importance de pouvoir mettre un bon titre sur une page web.

Polyglot était un plugin que j'aimais bien sous WordPress, je tenterai de chercher si il y a un plugin semblable pour blosxom (quoique je ne suis pas certain d'en trouver), mais je n'ai pas non plus le temps d'écrire le même texte en 3 langues différentes maintenant.

posté le: 07:37 | path: /data/web | permalien
Août 2010
Dim Lun Mar Mer Jeu Ven Sam
       

Malagasy miray
About

DotMG's joblog

Work hard at whatever you do. (Ecc. 9. 10a. CEV)
Valid XHTML 1.0 Transitional   Valid CSS!   Powered by blosxom 2.0