RSS
 

Archive for May, 2008

A little bit of success

20 May

Just passed my driving test:

  • Now I got wheels
  • Now have to drink less.
 

Speed up your work in Vim

09 May

If you don’t know what’s Vim, then:

  1. You’re Windows IDE’s fan
  2. You’ve never used Linux

An option “you’re using Emacs” is not included – you would have definetely known Vim. You’d hate it for the sake of “holly wars”.

I’m not an Emacs lover, neither those huge IDE’s with bunch of boxes, bookmarks, you name it. Most of these things are useless when you need to code something fast, so I just stuck with Vim: simple, light, fast, and have a lot of functionality. Here are just few tips of speeding up coding process I’ve been using lately:

If you got some repetitive function calls or anything you’re not bothered to print just fire up:

Comments:

:ab #cb /********************************
:ab #ce /*******************************/

Printing #cb or #ce will paste initial comment pattern.
:ab #r require_once();
:ab #i  include_once();

Minus another dozen of lines to be typed.

Text search:

You can :set incsearch which will enable incremental search for you, or use regexp, like:
:/\<agent\>/ will find you “agent” in current file.

Using ftp:


cmap ,r :Nread ftp://ftpdomain/public_html/index.html
cmap ,w :Nwrite ftp://ftpdomain/public_html/index.html

These are just basics, Bram Moolenaar, the developer of Vim, got a good article on how to optimize your work with Vim, and David Rayner with his page of Vim tips. Compulsory to learn for Vim beginners!

 

Real Microsoft Vista code leaked!

08 May


/*
TOP SECRET Microsoft(c) Project:Longhorn(TM) SP1
Estimated release date:2008
*/
#include “win95.h”
#include “win98.h”
#include “leopard.h”

char chew_up_some_ram[10000000];

void main () {
while (!CRASHED) {

if (first_time_install) {
make_10_gigabyte_swapfile();
do_nothing_loop();
search_and_destroy(FIREFOX | OPENOFFICEORG | ANYTHING_GOOGLE);
hang_system();
}

if (still_not_crashed) {
basically_run_windows_xp();
do_nothing_loop();
}
}

if (!DX10GPU()) {
set_graphics(aero, very_slow);
set_mouse(reaction, sometimes);
}

// printf(”Welcome to Windows 2000?);
// printf(”Welcome to Windows XP”);
printf(”Welcome to Windows Vista”);

while (something) {
sleep(10);
get_user_input();
sleep(10);
act_on_user_input();
sleep(10);
flicker_led_promisingly(hard_disk);
}

creat_general_protection_fault();
}