Skip navigation

Monthly Archives: December 2008

i’m looking at the ideas in the draft standard for C++0x.

I don’t like some of the things they’re doing.

For example, this constexpr thing.

constexpr int GetFive() {return 5;}
 
int some_value[GetFive() + 5]; //create an array of 10 integers. legal C++0x

Does this not look like a bad idea to anyone?

To be completely honest, I’ve always hated the idea of writing getters and setters that do nothing else other than straight get and set.

For example:

class Number
{
private:
int val ;
public:
void setVal( int to ) {
this->val = to ;
}
int getVal() {
return this->val ;
}

};

I mean, come on. this is a trivial class, but the getter and setter are entirely superfluous in my opinion because they don’t __DO__ anything.

A getter and setter like this, on the other hand:

class Number
{
private:
int val ;
public:
void setVal( int to ) {
if( to >= 0 )
this->val = to ;
else
this->val = 0 ;
}
int getVal() {
return this->val ;
}
};

That makes SOME sense. In this second scenario, we’re protecting val from being assigned a negative value, which is forbidden for whatever reason.

THAT use of a getter and setter I approve of. But the transparent, simple, silly getter and setter functions like the red example above (that can be autogenerated by the IDE when you work in Java Netbeans or eclipse)

  1. DO NOTHING
  2. TAKE UP SPACE
  3. look worse in code, if not for anything but the extra 3 characters you have to write getW” and setW” instead of just a simple assignment w =
  4. Can be slower (function call overhead) if no effort is taken to inline

So that same idea applies to the constexpr thing. You don’t NEED IT.

Just write the constant 5. Or #define it.

I just don’t see the point of it.

constexpr adds additional complexity to the C++ programming language while not really providing new functionality at all. Its just repeating the same general pattern of transparent getters and setters that people seem to like to use.

I actually have done this in JavaScript.

metaprogramming
program that writes code that it will later run (itself)

I guess this is like generating JavaScript from PHP code.

I didn’t realize it was called metaprogramming. But its basically when you use code to write code.

When you start metaprogramming, the application boosts in complexity10 or something. It becomes very hard to understand, and even harder to debug. Because you’ve now got 2 levels to debug on: is the code being generated correctly (php side), and is the code running correctly (javascript side).

I suppose you might use code of one language to run again later from that same language. E.g. writing Python code that creates Python code, which is later evaluated.

Might be useful for generating a callback, or something.

Another form of metaprogramming is these frameworks (prototype, joose) that have facilities to write “Classes” in JavaScript (even though keyword “class” doesn’t exist in JavaScript 1.5). You write something like:

var Animal = Class.create({
initialize: function(name, sound) {
this.name = name;
this.sound = sound;
},

speak: function() {
alert(this.name + ” says: ” + this.sound + “!”);
}
});

Then the prototype framework takes that code you wrote and turns it into “real javascript” that can actually run

function Animal( name, sound )
{
this.name = name ;
this.sound = sound ;

this.speak = function() {
alert(this.name + ” says: ” + this.sound + “!”);
}

return this ;
}

Just get regex coach.

Ever see this error:

The application failed to start because the application configuration is incorrect. Reinstalling the application may fix this problem.

It happens when you build an app in VC++ 2005 and send it to your friends.

That’s because your friends haven’t installed

http://www.microsoft.com/downloads/details.aspx?familyid=32BC1BEE-A3F9-4C13-9C99-220B62A191EE&displaylang=en

backbiting is bad.

the bible says so.

But really, WHY is it so bad?

Let me explain.

I have an inlaw that I really can’t get along with.

I tried to figure out WHY. But I couldn’t.

Then I developed a suspicion/theory. Its because my sister backbites me to him. Viciously.

I know she does. There are brief, glinting moments in our conversations that we have together that say “We’ve made fun of you for this.”

You know what I’m talking about. Like when the fact that you buy boxes and boxes of cookies and stockpile them in the cupboards was made fun of, pretty savagely. You can tell because if you bring it up and offer them from the stockpiles, they freeze and get this guilty look on their faces.

Or your clothes. Or your room. Or your very personal things that you know they discuss and ridicule.

This is why I like to have my private life.. private. So it isn’t open for ridicule.

But anyway, the parts that are, they take opportunity to make fun of me for it. Viciously. I know because of the way they make fun of other people, how the do it.

Two things.

  • You know that people who make fun of others to you will make fun of you to others.
  • And people who tell secrets of others to you will tell your secrets to others.

Anyway, HE DOES NOT RESPECT ME. He cannot respect me. Because my stupid sister herself ridicules me. She does it because she is nasty inside. I know she is. She is very mean.

So, that’s why we can’t get along. He’s spent so much time ridiculing me, that when he tries to sit down with me and speak, its pretty much unbearable.

Interpersonal impedence
Refers to the sense of difficulty one feels when trying to get along with another.

Two people that get along perfectly are said to have a low interpersonal impedence. My sister and I can sit in the same room and within minutes be laughing and making jokes that we both find funny.

My inlaw and I, however, have a very high interpersonal impedence. His jokes don’t seem funny to me, and vice versa.

High interpersonal impedence: no matter how hard we try to spend time together, we just can’t get along.

I’m constantly trying to find where video game characters and ideas come from.

The latest in the series is

Demon Hunter from Warcraft 3 < = > William Wallace from Braveheart?

Watch the movie again, and the efficacy with which he cuts down his enemies. A good clip.

anatarranatur.

an example of some bad writing from the NWN2 manual:

A skill check is made when you apply a skill to a task. Your skill ranks and bonuses are added to a random number between 1 and 20. This skill check results in success if it equals or exceeds the Difficulty Class, or DC, of the task.

For example, consider a rogue with a +14 bonus in Open Lock. When trying to pick a simple lock with a DC of 15, the rogue will always succeed. His skill check will be as low as 15 (1 + 14) and as high as 34 (20 + 14). If he comes across a very complicated lock, however, that is DC 35, it will be impossible for him to succeed until he somehow increases his Open Lock bonus.

Here is how I might write it

A skill check is made when you apply a skill to a task.

For example, consider a rogue with a +14 bonus in Open Lock. When trying to
pick a simple lock with a DC (Difficulty Class) of 15, the rogue will always succeed.

Here’s why.

Your skill ranks and bonuses are added to a random number between 1 and 20. This skill check results in success if it equals or exceeds the DC of the task.

In the previous example, the rogue’s skill check can be as low as 15 (1 + 14) and as high as 34 (20 + 14). If he comes across a very complicated lock, however, that is DC 35, it will be impossible for him to succeed until he somehow increases his Open Lock bonus.

  • Deliberate confuse with impressive or interesting fact to grab attention. “A rogue with +14 bonus will always be able to open a +15 DC lock”
  • Quick, clear explanation of why fact is true (“rogue’s skill check can be as low as 15 (1 + 14) and as high as 34 (20 + 14).
  • Apply fact to greater wider concepts and pull into general principle (“Your skill ranks and bonuses are added to a random number…”)

I think this 3 step pattern:

  1. confuse and impress
  2. explain clearly why
  3. apply as general principle and extend

is a general formula for effective teaching and generally effective presentation

All the while, being sure to use more paragraphs (think, newspaper column) and break each simple idea into its own paragraph. You CAN have a 1 sentence paragraph, ms ashukian.

Windows shell scripting

fantastic

The %stuff%

There are several items that you can use that looks like %this%.

  • %PATH%
  • %APPDATA%
  • %DATE%
  • %TIME%

basically, these %this% is how you access any of the environment variables defined on your system. Right click My Computer > Properties > Advanced > Environment Variables

Those are all the environment variables on your system.

At CMD:

C:\> echo %APPDATA%

HKLM local machine variables (bottom half) supercede current user variables (top half). Well, if you have a PATH variable defined as both HKLM and HKCU then if you echo %PATH% it gives you the HKLM machine variable; CONTENATE HKCU variable

Substring: %VAR:offset,len%

e.g.

echo %DATE:~1,2%    REM If its Dec, gives ec.  Starting at position 1, get 2 chars
echo %DATE:~1%      REM Goes from position 1 to end of string.  ec 27 08

Above example not that useful, but at least its clear how to work it

Getting random user input.

Try putting this into test.bat, then running it:

set /P MyAnswer=Tell me something: 

echo You said: "%MyAnswer%"

pause

Thanks to this guy again for that neat tip!

Well, I’m getting increasingly frustrated with my inability to shell script.

How many times have I went through about 200 folders, manually unzipping the contents, when I really should be able to somehow write a batch script that does that?

Or copy a single file into every subfolder of a directory. That’s a common task

or desubversion-ize or decvs-ize a copy of a repository dir (sometimes I back up by ctrl+c ctrl+v on local machine (just for archiving purposes!) and need to delete *.svn. Can’t you just do del *.svn /s though? I don’t know. haven’t tried it.)

Or truncate a directory name. I have this really shitty tool I have to use at work which gives me hundreds of items separated into folders, but they have names like:

Something-Last, Firstname Mr () – 4288282858258

So the last pair of brackets (function call or whatever its trying to be) and the 4288282858258 registration number means nothing to me. Yet every folder has these things. I could also do without the title (Mr.). So basically I’d like to truncate the last _4_ “words” (separated by spaces), or I’d like to truncate everything from the last capital M to the end (Mr, Ms, Miss and Capt are the titles they give. Capt is RARE, so we can ignore it as a use case).

msdn command line reference

An A-Z Index of the Windows XP command line (AWESOME)

windows nt shell scripting

windows script host

windows powersHELL!!

But that still doesn’t teach me how to write a script that, say, like this page seems to. let me look at that now.

I came across this in my files dated Sept 10/06.

Which type of developer are you?

This was an online resume question

Which one of the following best describes your role as a developer?

  • Architect: An individual who spends at least half of their time at work designing, specifying or architecting applications.
  • VAR Developer/Consultant: An individual who works as a developer for a company that creates solutions including custom software applications and/or resells hardware or software and/or is a computer or Web consultant.
  • ISV Developer: An individual who works as a developer for a company that develops software for broad commercial distribution.
  • MIS Developer: An individual who works in the IT/MIS or equivalent department of a company that is NOT in the computer industry and creates software applications, builds complex macros, writes computer code or develops Web sites for others’ use at work.
  • Student Developer: An individual who is a part-time or full-time student, creates software applications, builds complex macros, writes computer code or develops Web sites for school purposes.
  • End-User Developer: An individual who creates software applications, builds complex macros, writes computer code or develops Web sites for work purposes.
  • Hobbyist Developer: An individual who creates software applications, builds complex macros, writes computer code or develops Web sites for non-work purposes.
  • I am not a developer

how can anyone take python seriously?

Background: Avid PHP user. Thought about switching over to Python.

At first, I thought, let’s use Python 3.0. Then I thought, well, that’s a bit new, let’s use Python 2.6. Then I realized that you CAN’T (as of right now, dec 26/08) use the STANDARD MySQLDB extension to Python unless you’re on Python 2.4 (32 bit) or Python 2.5 (32 bit). On Windows anyway, the extension SIMPLY WON’T INSTALL for anything other than Python 2.4 (32-bit) or Python 2.5 (32-bit). It won’t even work for the 64-bit version of Python 2.5.

I find the blazen lack of … EASE to connect to a MySQL database .. concerning. I mean, in PHP, mysql_connect() has been PART OF THE PHP language for I don’t know how long. AT LEAST since PHP 4. I find it absolutely amazing that something as popular as Python doesn’t think to / doesn’t feel a need to integrate MySQL connectability like as a CORE PART of its language .. not to be left to somebody else to do and wait for an extension to come out for Python 3. KNOW WHAT I MEAN?? I just can’t take Python seriously as a web development platform if they haven’t bothered to provide first class functionality to CONNECT to a MySQL database in the latest hash of their language. Nah mean.

At a glance here, compared with PHP, I think that Python is simply light years behind. Unless you use a framework, you’re going to have hella time even maintaining a SESSION (see code example 7.3).

This doesn’t seem like the way to go to me, at all. session_start() anyone?

Maybe they didn’t want to crowd the language with functions as PHP is crowded with functions. But still. I’m absolutely amazed at how low level, and the fact that you have to hunt down and install separate extensions, with this language to get basic stuff done that you absolutely must have to build a web app.

I still have yet to resolve the difference between activepython and the python.org stuff.

installing php pear extensions

Well, i always forget how this is done, but its actually really easy.

  1. Navigate to your php install directory. for me, i go start-> run -> cmd.exe

    cd\apache2.2\php
    

    You PHP install dir may be different. If you used xampp, its probably C:\xampp\php. The default location of Apache 2.2 if you install it by itself is something like c:\program files\apache software foundation\apache2.2\php

  2. Then at that command prompt, say I want to add the Math_Numerical_RootFinding PEAR package to my php install:
    C:\Apache2.2\php>pear install Math_Numerical_RootFinding
    

And that’s it! PHP automatically resolves the network connection and downloads the latest build of the package.

IF the package you’re trying to get is still in BETA (as some of the good ones seem to be stuck in a perpetual beta), then you would have to pay attention to the error message that appears when you try to install it.

So for example, I wanted the Math_Polynomial package, so I try:

pear install Math_Polynomial

But it comes back at me with

Failed to download pear/Math_Polynomial within preferred state “stable”, latest release is version 0.1.0, stability “beta”, use “channel://pear.php.net/Math_Polynomial-0.1.0″ to install
Cannot initialize ‘channel://pear.php.net/Math_Polynomial’, invalid or missing package file
Package “channel://pear.php.net/Math_Polynomial” is not valid
install failed

So you have to do:

pear install Math_Polynomial-0.1.0

Which works.

a post in progress

The purpose of this post is to accumulate references / links to how to get started in 99 programming languages. The objective is a one-stop post that I can refer to in the future to remember how to set up a given programming language environment.

  • C or C++

    Ubuntu:

    apt-get install gcc
    apt-get install build-essentials
    
    if not working, then be sure to
    apt-get update
    first
    
    #include 
    int main()
    {
      // this is a comment.
      printf("Hello, world") ;
      return 0 ;
    }
    
  • php

    download it
    this was a good tutorial, but is since taken offline. basically the lines you need to add to httpd.conf are:

    # location of the .dll
    LoadModule php5_module "C:/Program Files/Apache Software Foundation/Apache2.2/php/php5apache2_2.dll"
    
    # location of the ini directory where php.ini sits
    PHPIniDir "C:/Program Files (x86)/Apache Software Foundation/Apache2.2/php/"
    
    # definition of the mime-type:  ADD to the  section:
    <IfModule mime_module>
      AddType application/x-httpd-php .php
    </IfModule>
    

    And that’s it. Other things I like to do to PHP.ini when first setting up are:

    • change error_reporting to E_ALL by setting error_reporting = E_ALL
    • turn on the $_ENV array by setting variables_order = "GPCES"
  • perl.

    Get it from activestate.
    you need to edit httpd.conf again to let apache know that anything accessed via a url like:

    http://localhost/cgi-bin/scriptname

    IS a script that needs to be executed/run, and NOT just some static html or image or content file that can be straight delivered.

    So you set up this “ScriptAlias” setting:

    
        # GENERAL FORMAT OF AN ALIAS:
        # Alias /webpath /full/filesystem/path
    
    
        # Example of an alias:
        Alias /special-docs C:\specialDocs\
        # above rule means that any requests for
        # http://localhost/special-docs/document.doc
        # would actually map down to a request on
        # the computer hard disk for
        # C:\specialDocs\document.doc
        # so, this ALIAS defines basically a second
        # document root, in a sense... a folder
        # from which apache will serve documents
        # out of OTHER THAN htdocs.
    
        # now, for a scriptalias:
        ScriptAlias /cgi-bin/ "C:/Program Files (x86)/Apache Software Foundation/Apache2.2/cgi-bin/"
        # this says anything accessed
        # via http://localhost/cgi-bin/WHATEVER.SCRIPT
        # should really be looked up as a SCRIPT TO RUN
        # that is stored on the hard disk at
        # C:/Program Files/Apache Software Foundation/Apache2.2/cgi-bin/WHATEVER.SCRIPT
    
        # So, you DON'T store perl scripts in htdocs!  You store them IN THE CGI-BIN
        # FOLDER AS DEFINED HERE.  It could be C:/cgi-bin.  Apache doesn't care.
    
        # Now, allow execution of CGI scripts
        # IN the directory you just specified.
        <Directory "C:/Program Files (x86)/Apache Software Foundation/Apache2.2/cgi-bin/">
          AllowOverride None
          Options +ExecCGI
          Order allow,deny
          Allow from all
        </Directory>
    
        # FINALLY, a handler
        AddHandler cgi-script .cgi .pl .py
        # so ALL these file extensions (.cgi, .pl or .py)
        # are handled as CGI scripts.
    

    BUT YOU AIN’T DONE YET!!

    If you try to run your perl scripts, you might see errors like:

    
    [Fri Dec 26 13:32:15 2008] [error] [client xx.yy.80.55] (13)Permission denied: exec of '/var/cgi-bin/run.pl' failed
    [Fri Dec 26 13:32:15 2008] [error] [client xx.yy.80.55] Premature end of script headers: run.pl
    
    

    Now, before you turn into this guy, go to /usr/lib/apache2/ and RENAME suexec to something like suexec.disabled. No time to explain, here’s why.

  • python. get it from python.org. More to come…
  • haskell

    try this

There’s this fun game over Shadanan Jairam Sharma’s page that is pretty cool.

Try it out!

I’m having to develop a game in C#.

At first methinks me will not like this.

Me is watching Anders Hejlsberg videos and mentally wanking (watching anders is the pleasure equiv.. ENVER MIND)

Got a thing.. should I get this motherload Visual Studio 2010 and CTP pack? How quickly are they patching?

CTP stands for…

Hallelujah! I’ve finally managed to uncover what Microsoft so cryptically refers to as “CTP”.

CTP is an acronym that stands for Community Technical Preview in Microsoft’s current marketing lingo. Pretty much a synonym for a beta release, only targeted at professional clients and not the general public.

Anyway, NOT SURE about how to proceed. .NET has progressed a LOT since I last used it even remotely seriously (~2005, .NET 2.0, when some old idiots (especially web hosts) kept clinging to .NET 1.1 for some ODD reason and it was hard to find hosts that actually used .NET 2.0).

Now 3 years later we’re on .NET 3.5, and .NET 4.0 is just around the corner with dynamic types. There’s another channel 9 video I want to watch as well, which I will when I have the time to download as the SCRUB in that silverlight player is just AWFUL (it doesn’t remember even the past 5 seconds of video!) If it doesn’t play like winamp, I can’t use it.

more stuff

an article about writing an rpg using design patterns

JAOO Video 2008 – James O. Coplien

Genius talking about something about oop

the above video is about how you write code in OOP. Weird.

old OOP only captured the “domain structure” – no place to capture “algorithm” and functionality of system.

so if need to change function, complex distributed reasoning

now we can go to one place in the code, reason about it – we haven’t been able to do that before in a clean way

in the old days we tried, 15 years ago, mixing paradigms: part in OO paradigm, part (UPPER LEVEL) in procedural paradigm, hooking things together in procedural code

problem: Missing important elements of structure. Users thing of things in terms of roles that objects play.

Putting everything into one fortran procedure — a variation is the 3 level architecture: institutionalization of the “bug”

“color modelling” – found difficult to understand, once understood, thinks brilliant.

4:00
he goes back: there’s something about roles. OORam methodology: roles work in Java, C++,

Peter felt the same fate – talking about Roles didn’t work because Java, C++ aren’t provided in these languages.

Complex relations: relationship concept is very simplistic in current langs: just a reference to another object

Object oriented programming: wiring

OOP Is a new diagram every 30 – 40 seconds. That’s really what’s going on, so how do we reason about that.

DCI centralizes mapping of roles to objects. There’s a context for every usecase. Going to the business model – rather than what the MVC people do

6:50:
So how is MVC wrong? If you get too much wrapped into the code, you get unmaintainable systems. You need to be able to maintain the things users think about. The second thing is: a system that is unusable. The whole point of OO was to capture end user’s model in code.

MVC:
take objects in the system and bring them out to the screen so i can directly manipulate them.

So desired: close relationship between what’s in screen and what’s behind

you can’t hide a bad architecture behind a good gui

MVC translates between user and data in program

MVC removes everything between the user and the architecture so the user reaches thru the screen and manipulates underlying objects.

The MODEL must represent the way user’s think. NOT the way programmers think.

If the model represents the way a programmer thinks, then the view reflects that, and a person trying to use a teller machine is asked to understand a transaction log. While really all he wants to do is drop some money into the box.

The whole notion of MVC was based on the idea of a “tool”: controller+view: those are written by end-users. You should be able to put them together very quickly as a tool to manage what you can use.

Deiukh rela: The tools and materials metaphor

UML people got it: the programming language

The OO people didn’t: they thought it was horrid to connect to a “procedure”, because that wasn’t OO

Scala has traits. 1st class traits. Use traits to express the roles. Some guy write a scala program to do DCI at JAOO.

This is clumsy in Java. Java doesn’t have the facility to extend an interface to give it methods. It doesn’t have the reflection power to be able to do class composition that you can with traits in Scala.

You can do this in Objective C.

You can do traits in C++ using Templates.

Qi4j

They tried to do this in Java: Give a feeling for class composition. Change language using a framework.

I love to surround myself with work.

its the only way i have piles of things sayign “do me! do me!” all at the same time.

I was LOOKING for this for a very long time now. One time, some dude showed me this off-hand, I KNEW I should write it down, and I lost it.

Now I’ve found it again.

In C:\WINDOWS\system32\drivers\etc\hosts (no extension to file) there is:

# Copyright (c) 1993-1999 Microsoft Corp.
#
# This is a sample HOSTS file used by Microsoft TCP/IP for Windows.
#
# This file contains the mappings of IP addresses to host names. Each
# entry should be kept on an individual line. The IP address should
# be placed in the first column followed by the corresponding host name.
# The IP address and the host name should be separated by at least one
# space.
#
# Additionally, comments (such as these) may be inserted on individual
# lines or following the machine name denoted by a '#' symbol.
#
# For example:
#
#      102.54.94.97     rhino.acme.com          # source server
#       38.25.63.10     x.acme.com              # x client host

127.0.0.1       localhost

So, localhost is an alias for 127.0.0.1.
Now if you want that to be shorter, add a line like:

127.0.0.1 me

Save the file.

Then go to your browser and type

http://me/

that should be equivalent to http://localhost/ now

Its easy to forget all those neat tricks you learn about using bitwise arithmetic for cheap ways to compute practical things:

optimizations,they’re called. yes. or “fun”.

  • if( i & 1 ) // then i is odd Why: Say i is an odd number, like 5. Then in binary, i is 101. 101 & 1 is going to be this operation: 101 & 001 --- 001 So, 101&1 yields 1 (true) when i is odd. What about when i is even? Then the last bit is 0. Say i = 4 100 & 001 --- 000 So this tip takes advantage of the fact that for odd numbers, the last bit is always 1.
  • x >> 1 // divides x by 2 Why? Say i = 5 again. Then 101 >> 1 shifts to the right 1 bit. The last 1 is lost, and we end up with 102 Which is 210 which is (in base 10 math) 5 / 2 = 2 (integer division) take 410 1002 shift right 1 bit 102 which is 210 in base 10: 4 / 2 = 2 (integer division)
  • x << 1 // multiplies x by 2 Why: say x = 5. Then 101 << 1 shifts to the left 1 bit 1010 (a zero is inserted) which is 10102 == 1010 say we have 4: 100 << 1 shifts to the left 1 bit 1000 which is 8 in base 10

bitwise and modulus

to accomplish a modulus operation on a number of the form 2n, simply mask off the lowest n bits using a bitwise AND

x = y % 8;   ===    x = y & 7;

x = y % 32;   ===   x = y & 31;

x = y % 256;   ===   x = y & 255;

enums

Often times you see people creating enums like:

// C#
[Flags]
public enum Properties
{
  
  Heavy = 1,    // bit pattern  000001
  Blue  = 1 << 1,   // 0000010
  Orange = 1 << 2, // 0000100
  Smelly = 1 << 3, // 0001000
  Stinky = 1 << 4, // 0010000
  Fat = 1 << 5,    // 0100000
  Delicious = 1 << 6 // 1000000
  
}

So that they can create variables like:

Properties you = Properties.Fat | Properties.Heavy | Properties.Blue ;

So that you are Fat, and blue, and heavy. The bitwise OR operator is used to combine the flags. Pay attention to the fact that fields are powers of 2.

Now say you’re no longer blue – you’ve changed your color to orange. Then you can UNDO the Properties.Blue bit in one of 2 ways:

you ^= Properties.Blue ;

OR

you &= ~Properties.Blue ;

I MUCH PREFER the second way (using &). The reason is ^= is like a toggle. If the property is on, it switches it off, but if the property is already off, it switches it back on. &= ~(bitwise complement) switches the property off for sure.

what do you do when you’re on your own, having literally TRUDGE through all this work, that’s so incredibly boring?

I keep on breaking out to play ladder games of warcraft 3.

its BAD. But I am getting SO MUCH BETTER at warcraft 3.

I’ve been off for 10 days now. I used to work 7 days weeks. now I play 24/7.

Its bad. Unless there’s some slavedriver sitting behind me whipping my ass everytime I play too much, I’m just so damn lazy and I HATE boring work.

You know, these people are awful.

I feel so tiny. I’m now the gnome. Someone cast small on me. I’m just an itty bitty

oh my ego. how i mourn thee. thou hast been dealt a crushing blow.

thou my ego, my ego thou, thou hast been dealt thy crushing blow. thou art no more mine ego thy ego mine ego is deadeth.. deadeth and i mourneth theee thy ego thy thee thou art mine ego. mine ego thou art dead.

I am a very, very argumentative person. I don’t like to lose. At anything.

Arguments, games, ladder games especially.

But laddering games teach you went to quit.

You know that sensation you get when you know you’ve lost a ladder match? They’re slowly taking over the map. They just creamed your expo. Now they’re at your main. And your hero just died.

Alt-Q-Q.

Its over. You’ve lost. Play the next match better.

Today when I got a message from my boss that clearly sides with my opponent, I realized I had nothing to say. I wouldn’t be able to resurrect my hero before my temple is destroyed. Even if I spent all 400 gold I have remaining on pumping out aboms, I still wouldn’t win at the end of the day.

So I pressed Alt-Q-Q.

Pam,

OK.

Teach your child early!

  • To read
  • To add and subtract – fast
  • To program
  • Experiments with electricity and computers
  • To read plots and graphs and charts

Well fscanf is smarter than you might think.

I love to log things.

New things I find, I put here.

I run Ardamax Keylogger on my work machine.

WHY?? BECAUSE!!

Ever have MS Word crash on you, and your data is now lost because autorecover just didn’t work?

Ever use a web app, type in a ton of stuff, then have Firefox peter out on you? I know this has happened to me numerous times.

Ever write something one week, then COMPLETELY forget where you saved the document and not want to wait 18 hours for Windows search to find it?

USE A KEYLOGGER.

The one I use is called Ardamax.

What’s cool is Ardamax also takes screenshots every 10 minutes of what you’re currently looking at.

So it tracks how you’ve spent your time.
use_a_keylogger1

Granted, this isn’t always the best thing.

Anyway, it is a major security hazard for the paranoid. What if someone wrote a virus to have the keylogger send all data to some server.. bad news. Bad, bad, bad, bad, bad news.

So, methinks me should write a keylogger that can export all its data to some external drive. That is what these keyloggers should do anyway.. on a disc .. it will add up to GB of data after sometime anyway..

I thought this was extremely funny.

i was looking for wact php toolkit and i came up with the “womenabuse center of toronto”

wact.

isn’t that terrible?

Well, it took a while, but I finally buy into gmail labels.

They are better than folders.

The metaphor is, each message is like a sheet of paper.

In the Microsoft paradigm, then, you file messages into folders to retrieve them later.

In the Google paradigm, you stick labels (much like coloured sticky notes) on folders to retrieve them later.

So, if something is in your “inbox”, and is from your “friends”, you want that message to both be in your “inbox” folder AND your “friends” folder at the same time.

In the Microsoft paradigm, this is impossible. A sheet of paper can only be in one folder. In the Microsoft paradigm, a message belongs to a folder.

In the Google paradigm, however, they use labels, so a sheet of paper (a message) can have many labels stuck to it.

  • do-now
  • friends
  • inbox
  • urgent

So this is a message from a friend that you have to do-now. You leave it in your inbox and also label it with a big red urgent label to add that bit of extra urgency to doing your friend.

Ah, what was I talking about? Yes, sex.

No, wait. It was labels.

Ah, so you can use the gmail search box to find messages by label. Say you need to find all the messages that you’ve previously labelled as do-now.

In the gmail search box:

do-now

So that will give you a listing of all the messages that have the do-now label applied.

Now what if you have a system where something that was labelled as do-now gets ANOTHER sticker applied to it called “done” when the task is done. (Work with me here. We could just remove the do-now label, but this is an example :))

So once you’ve done your friend, you have to stick a label on her that says “done”. Now you can search for all the messages that you need to do now and are also done:

do-now-done-1

And finally, here’s the kicker, how to search for a gmail message that does not have a certain label:

do-now-done

In that example, i’m searching for all messages labelled do-now that DO NOT have label:done.

That last example is the most useful by far, and its why I actually wrote this article on doing your friends.

Reference: Using advanced search

Follow

Get every new post delivered to your Inbox.

Join 37 other followers