Introduction About Site Map

XML
RSS 2 Feed RSS 2 Feed
Navigation

Main Page | Blog Index

Archive for the ‘Programming’ Category

Linux Text Editors

WysiwygPro
WYSI(not)WYG, so better use plain-text (click to enlarge)

THERE is most definitely no perfect editor, regardless of which platform one uses. Nonetheless, while Linux has some very powerful text editors, different ones should be used under different circumstances. In this item, I concentrate on editors (primarily my favourite one) for development work.

If one ever made a transition to Linux, my suggestion for an editor would be Kate/KWrite, among more. KWrite, which is the editing component of Kate (typically KDE-only), is a good editor for developers — either Web developers or programmers. KWrite incorporates knowledge of markup and syntax for many programming languages, which would be valuable to the P/L-polyglots.

I recently made a permanent transition to KWrite and I continue to explore Kate, which integrates seamlessly with FTP, much like the rest of the desktop environment. It becomes an important trait if you develop on a remote computer, which for me is essential due to parallel computing.

The MATLAB editor, for example, I recently conceded in favour of KWrite. It was slow and it hadawkward and unconventional keyboard accelerators, probably owing to interoperability. The accelerators were an oddity and a real pain to adapt to. Above all, the editor was an unbelievable bloat over SSH. It was not too responsive, yet it had built-in debugging capabilities, which I never bothered to use as it had been aimed at unexperienced users.

BBedit is said to be a good editor for developers on the Mac, but it is costly. For Windows, there are many free editors that replace the weak Notepad — that which is included by default in Windows.

Reviewing Pointless Programs

AlexRank
SearchStatus – one among many Firefox search toolbars

PLUG-INS have become very popular among Open Source projects. They enable an application to be extended endlessly by its community without getting bloated at the very core. At present, you can come across a large variety of plug-ins for the Mozilla family and many of these plug-ins tend to be more playful than practical. They serve no pragmatic purpose or even a purpose other than amusement. Most of them offer nothing beyond an enjoyable 1-minute time-burning. Examples from Mozilla Firefox:

  • Extension to display your IP address
  • Extension to diplay the Google icon in the status bar whenever you visit Google
  • National security threat level in your panel

All of these plug-ins simply do what they claims to be doing. No more, no less. These are ‘proof of concept’ examples; very basic examples, almost as fundamental as the infamous “hello world”, but ones which exploit the Firefox API‘s for independent developers. These often get unjustifiable low ranks, which criticise their presence rather than quality. This bugs me at times.

Plug-ins are indeed sometimes pointless, but they should do what they say on the tin. Why do people install such plug-ins and then whine about them? If you don’t need a plug-in, don’t get it installed in the first place, I say. I continue to see review of what is admittedly incomplete or lacking. Better not review or not download literature and code if the description does not sound pleasing. Review is unfortunately used as means of punishment for time-consuming activities or dissapointments, which were all along called for (and voluntary). Rank, popularity and value must be separated altogether.

Plain Text Justify and Hyphenate

Book scanning
Giving the more professional look to your text

THIS blog item revolves around a wonderful Perl script which can revolutionise the layout of your plain-text messages, giving them looks reminiscent of that found in professional literature. The tool is called the Paragraph Adjuster with Hyphenation and it is of course free.

To give an example of its use, a file I created in ~/Main/Programs/Scripts/indent.sh contains the following:

perl ~/Main/Programs/paradj/paradj.pl --width=74 -h -n -b
     ~/in > ~/out

kedit ~/out

The first command invokes the script from its path and passes it some arguments, which are personalised. The input come from the file in and output is sent to a reserved file (out) which acts as a common container and somewhat of a placeholder. The last command makes the output available to me (on screen) to copy and then paste, often to be used in newsgroups, mailing lists, and rarely in E-mail too.

The script is based on a Perl module that was inherited from TEX. The LATEX family is rather presentation-aware and smart in terms of its fragmentation decisions. It ‘knows’ when it is reasonable to hyphenate and where added spaces for justification are least distracting. Maybe the same applies to indentation. There are many options in the script, which control the tendencies, the priorities and thus the behaviour of the output.

The command example above hopefully illustrates how simple it is to use the script, as well as invoking it rapidly, without too much manual intervention and input/output ‘piping’. I have also set up a shortcut (CTRL+ALT+7) to convert in to out and then copy and paste onto the required place, so indent.sh need never be called from the command-line.

Example from my most recent use of the script:


The  short  answer:  Windows has  got  itself
trapped. Over the years it has adopted overly
permissive  and  lenient mechanisms that  ne-
glected security. Security seemed like a cost
hat  hindered functionality. Unauthorised in-
stallations and lacking verifications are one
example. ActiveX controllers are another.

Notice that all text lies within a rectangular block. This needs fixed-sized fonts, which cannot be guaranteed by all recipients or readers. If sent to a recipient and read by a mail client, feed reader, newsgroups reader, browser, etc., it may be displayed in whatever form the user prefers, even proportionally-differing font sets.

The Cost of Efficiency

Equation

MAKING of efficient algorithms and use of more compact data representations have a cost in terms of complexity. They lead to greater coding and programming time, yet there is plenty to be gained.

Broad-scale example: writing of a good search algorithm makes it hard to understand, let alone algorithms that discriminate data. There is a reason why the Web was made available and practical throughout its decade-long extension.

One would say that the Web has been open. Its pertinent objects were also broken down rationally. It was also because not all pages and graphics are bitmaps, but instead the Web exploits wavelets that are based on mathematics or defined a palette and then use some conventions to refer to it.

Moreover, rather than poster-like Web sites, where everything is hard-coded, there emerged a language called (X)HTML which is concise, descriptive, and unambiguous. There are protocols which define how it should be rendered so a description — a code that is — makes it laborious to implement. Construction of pages becomes arguably easier and the end product much more concise, in terms of its size. Versatility (or flexibility) is yet another matter.

The take-home message: complexity in implementation or even specification takes its toll, but entails true benefits. ‘Lazy’ programming leads to inefficiency, whereas tactful complexity pays off in the long run.

GNOME and KDE Audience Battle

K Desktop Environment GNOME

Earlier today (and/or yesterday), both the GNOME Web site and the KDE Web site published promotional essays, or pointed to them rather.

KDE – Why KDE Rules

I wrote this document to tell everybody why KDE is great, why it’s worth using (great functionality), supporting (great development platform) and hacking (great design) and why you can expect many other awesome features from KDE 4.

GNOME – Vive La Desktop Difference!

If you, dear reader, wrote in asking whether I think you should drive a Mini Cooper or a Hummer, how should I respond? My best bet is to offer no opinion. I know nothing of your preferences or your needs. Either vehicle will get you where you want to go. The difference will be in the experience of getting there. It’s the same deal with KDE and Gnome.

I do not believe this to be a coincidence given some news we have recently heard. KDE’s strengths have been pointed out by no-one other than Linus Torvalds.

Related items:

Minor Bugs and Critical Bugs

Dynamite Monkey

There are bugs that bug the user and bugs that lead to catastrophe. Below lie two examples of critically-buggy applications, which I recently decided are worth listing.

1. Windows 95 – Blue Screen of Death

I still remember, as a most classical example, the days of Windows 95. The operating system failed to cope with unhandled, misunderstood packets that ultimately gave the blue screen and required a reboot in most cases. Sooner or later people got hold of so-called ‘nuking’ software — one among virtually dozens of GUI-based free downloads. That little tool gave its owner the ability to unleash upon others the infamous ‘blue screen of death’.

IP address of the target computer was all one needed. It was easy to determine one’s IP address even when dynamically allocated by a dial-up ISP. Instant messengers (ICQ was new and hot at the time) simplified the process tremendously and tools that interacted with the IM existed as well. This gave your friends and foes the ability to ‘take you down’ whenever they desired.

Sooner or later, anti-nuke software was becoming mandatory. Yet another application to run in the background if you want to survive without rebooting and losing some invaluable work. Not good.

During the holiday, yet another critical flaw with Windows XP and Windows Server 2003 was found. Lessons have not been learned even 10 years later. The promise and efforts to make Windows more modular seem unfruitful.

2. Timely Example: WordPress 2.0 Bugs

I previously said that the release of WordPress would be premature. I said so as soon as rumours emerged. Matt Mullenweg spoke about an undetermined release that precedes Christmas. Boxing Day was the point when things took a gentle dive.

I now write about 40 messages a day in the WordPress support forums, making a voluntary contribution throughout the holidays, as promised. The pace of bug reports is worrisome. That aside, the WordPress Web site was not prepared for the demand either. There was a site migration issue on the very same date as the release and coding bugs emerged all too soon in the forums where they continue to resurface.

WordPress 2.0 was intended to be named after a Jazz musician, as always. ‘Stan Getz‘ was among the top contenders. I believe that WordPress should not be called Getz because it might give a favoured artist of mine a bad name. WordPress 2.0 is more like Milli Vanilli (sarcasm and an overstatement).

Earlier today a version database downgrader for WordPress was released. A few people regret the upgrade, but many are very happy with the new features. Whether the frustration supercedes the benefits is an important question. The answer is yet difficult to deliver and the situation hard to judge.

Bill Gates Workaholism

Bill Gates dancing
Hurry! Hurry! Lotsa’ work to do, guys!

I have found the following old page, from which I would like to borrow a snippet.

He’s (Bill Gates) a ferocious workaholic, who regularly puts in 80-hour weeks, and expects his employees to do the same. And although he’s something of a visionary, he’s not a particularly reliable one; he never meets product deadlines, and the goods he so tirelessly promotes are mostly vaporware. God, like Gates, owes his power and success less to the quality of his product than to his ruthless business sense. He’s created a near monopoly by outmuscling the competition. You might not like this universe, just as you might not like Microsoft’s clunky programs; but pragmatically speaking, where else do you have to go?

Related item: Roots of Authority

Retrieval statistics: 21 queries taking a total of 0.203 seconds • Please report low bandwidth using the feedback form
Original styles created by Ian Main (all acknowledgements) • PHP scripts and styles later modified by Roy Schestowitz • Help yourself to a GPL'd copy
|— Proudly powered by W o r d P r e s s — based on a heavily-hacked version 1.2.1 (Mingus) installation —|