System Analyst and PHP Developer working in Kingdom of Saudi Arabia
Coding has been a part of a programmer/developer daily life, whether using an (Integrated Development Environment)IDE or plain text editor…having a good tool is always an item on their arsenal. In, Unix/Linux environment we have emacs, nano or vim just to name a few and with windows options are just so many. For scripting, I’ve always been comfortable using vim whether i’m in Linux,BSD or Windows but lately, I’ve been using most of the time in windows was the very lightweight no bloat “Intype“.

As describe on the site, Intype is a powerful and intuitive code editor for Windows with lightning fast response.It is easily extensible and customizable, thanks in part to its support for scripting and native plug-ins. It makes development in any programming or scripting language quick and easy.
Menu is very simple, using “File” to manipulate or open a file; “Edit” to do copy/paste or whatever text related work to be done and other standard menu options which clicking or exploring it is quite easy and self explanatory of what it should achieve.

On the edit mode, it doesn’t have any type-ahead or ala autocomplete feature which can be found in other editor like NUSphere, Zend IDE or Komodo Edit but it does however a quick way of automation on syntax. Assuming you’re editing an HTML document, typing the “tag” then follow by “tab” will give you a template with both opening and closing tag already filled in with default values. Intype also offers some basic themes under “Edit” / “Preference” for those who wants to switch between light or dark background.

On the status bar portion, it will give you the current line and column with the type of document you’re using, e.g. HTML, PHP, SQL etc. As the introductory page stated, Intype is very fast which is very ideal of doing a quick code edit or changes. The only caveat of this product is that the development seems stagnant already as of writing this post(08/2010) but it’s OK on my end because I’m using it without any problem so far and serves its purpose well on XP to Win7 platform.

For those programmer or developer who wants a lightweight, fast and no bloat text editor…give Intype a try!
Most developers are comfortable working with the leading framework to achieve different functionality that uses javascript whether it’s a web 2.0 or mobile related projects; we have the elegance of Mootools, cool effects of Dojo, standard look/feel using Yahoo User Interface(YUI) library and of course, every programmer/developer sweetheart…jQuery!
Above mentioned are just a few of them and checking Wikipedia alone…we still have several on the list that is worth evaluating and add in our web development arsenal, some are open source others are not. Yesterday, I’ve stumbled upon MIDORI created by Aycan Gulez which checking the examples given; IMHO, it would surely be another framework that any developer can use on their application or project. Based on the introduction from the site, below are some of the things that the framework can offer…
What is midori?
midori is an ultra-lightweight JavaScript framework that gets the job done without getting in your way.
After minutes of reading the examples, I’ve open up my Intype and do some basic codes to evaluate the framework. Voila, after a few minutes…got a basic example which basically access DOM element and it’s quite really easy! Just like the leading framework that most developers are already using, MIDORI had several functionality that is ready to use; DOM Manipulation, FX effect, Autocomplete, AJAX..and more.
HTML:
"Use CSS selectors to quickly access matching elements on a page..."
Trigger:
CSS:
body {
margin:0;
padding:0;
font-family:"Lucida Grande", Verdana, Arial, sans-serif;
font-size: 12px;
}
a:link,
a:visited { text-decoration: none; color: #cd5500; }
a:hover { color: #147DB6; }
#container {
margin-top: 50px;
margin-left: 100px;
margin-bottom: 50px;
margin-right: 100px;
}
#el-example {
padding: 5px;
border: gray dotted 1px;
color: white;
background-color: black;
}
#el-trigger {
padding-top: 10px;
padding-left: 0;
padding-bottom: 10px;
border-bottom: black solid 3px;
}
#el-output {
margin-top: 5px;
padding-top: 20px;
padding-left: 10px;
padding-bottom: 20px;
padding-right: 10px;
border: orange solid 1px;
}
.el-demo {
color: white;
background-color: orange;
}
JS:
midori.addEventListener(window,'ready',function(e) {
midori.addEventListener(midori.get("#el-button"),'click',function(e) {
var oOutput = midori.get("#el-output");
oOutput.innerHTML = "Welcome midorijs!";
oOutput.className = 'el-demo';
});
});
Source code can be downloaded MIDORI Demo. Some JS library achieve things in shorter line of codes with probably better/faster implementation but there’s no harm in trying so checking it out is definitely worth it. The only minus point on my very short evaluation of the framework is that I can’t minify/pack the library and there seems to be no forum or basic support at least within the site.
Yesterday while finishing the XLS generated report in one of the application I’m involved with, I came across some JS files within the script folder that is like 2007 or so coded and upon checking…the code is a real ugly beast!!!
Why? all functions were defined as global objects or within the window object and funny thing is that even the built-in function confirm() were override with their functionality! I believe the original programmer who wrote it assumes that throughout its code existence, no other developer/programmer would use similar or related function..which is really not a very good approach.
Example:
common.js
function removeData(el) {
var tmp = $(el);
$(tmp).text("").attr("background-color","white");
};
…function list and so on.There are around 14 attached JS files which had functions scattered randomly and were were just renamed function like removeDataY() which has the same functionality.Sigh…
Anyway, for those who are new to javascript…I’d suggest you encapsulate or create a simple namespace for your code so that it would not conflict with other external JS file assuming the function used is the same.
Example:
common1.js
var CM1 = {};
CM1.removeData = function(el) {
var tmp = $(el);
$(tmp).text("").attr("background-color","white");
};
…function list and so on.
common2.js
var CM2 = {};
CM2.removeData = function(el) {
var tmp = $(el);
$(tmp).text("").attr("background-color","white");
};
And within application code, CM1.removeData() will never have conflict with CM2.removeData() since they belong to a different object, it’s cleaner and can easily be debug…There are some pattern which I find useful like the “Module Pattern” from Yahoo but that’s a different story and I’ll post it later in the next blog entry.