Friday, January 12, 2007

So that is why my laptop feels a little hot...

Jan 12 15:59:44 matt-laptop kernel: [ 9130.907621] ACPI: Critical trip point
Jan 12 15:59:44 matt-laptop kernel: [ 9130.907628] Critical temperature reached (956 C), shutting down.

--
Matt
paranoidgeek@gmail.com
Disclaimer: This made sense at the time of writing.

Friday, July 07, 2006

Quote

Another effective [debugging] technique is to explain your code to someone
else. This will often cause you to explain the bug to yourself. Sometimes it
takes no more than a few sentences, followed by an embarrassed "Never mind, I
see what's wrong. Sorry to bother you." This works remarkably well; you can
even use non-programmers as listeners. One university computer center kept a
teddy bear near the help desk. Students with mysterious bugs were required to
explain them to the bear before they could speak to a human counselor.
- B. Kernighan & D. Pike (in "The Practice of Programming" pp. 123)

Wednesday, July 05, 2006

Woot!


I finally have a fully backup system. I'm using rdiff-backup
( http://www.nongnu.org/rdiff-backup/ ) to do increasement updates of the
files on my laptop ( and main machine ) to my desktop ( which is becoming
more of a server ).

Speaking of my laptop, i bought a HP NX 6125 ( similar to the V2402AU i
mentioned before, except black ). It's very nice. The battery life doesnt
reach the quoted 3 hours when the wifi on and the HDD is a bit noisy, but
other than that it is pretty good.

And i still dont have my Uni results back, over a week after the last exam...

BTW 100th post !

Saturday, April 01, 2006

Just when i thought it couldnt get any worse.

We don't teach "do.. while" loops

--
Matt
paranoidgeek@gmail.com
Disclaimer: This made sense at the time of writing.

Thursday, March 30, 2006

Why I am starting to dislike my CompSci cource.

Your program should end by coming to the end of the start() method. It is bad style to exit from within another method.

This was referring to the use of exit(n) ( System.exit(n) in Java ). So if your program's behaviour becomes undefined ( such as a data structure being corrupted ) and it becomes aware of that it should quit by stringing it's way back to the root ( main ) function ?

----

We don't teach the break statement as it is not considered good style.

Who says it is not good style  ?

matthew@gentoo_desktop /usr/src/linux/mm $ grep 'break;' *.c | wc -l
152

Breaks are a very important part of efficient loop control, just as goto is. Yes, goto.

matthew@gentoo_desktop /usr/src/linux/mm $ grep 'goto ' *.c | grep ';' | wc -l
469
 
It's claim to shame is mostly due to it's abuse for trivial applications, but eliminating it completely it just stupid.
 
---

They also teach that defining constants such as this is a very good thing.
 final int SECONDS_IN_A_MINUTE = 60;

 While i agree 100% that arbitarily defined values ( such as using a number to store a state ) should only be set in constants, using constants for things this simple can get quite silly.


--
Matt
paranoidgeek@gmail.com
Disclaimer: This made sense at the time of writing.

Sunday, February 26, 2006

Thinking about buying a laptop

HP Presario V2402AU AMD Turion (EH085PA)
http://www.pricespy.co.nz/pno_7444.html
http://h50025.www5.hp.com/hpcom/nz_en/11_29_64_4592_EH085PA.html

  • AMD Turion ML-32 64 bit ( 1.8 GHz ) ( 512KB cache )
  • 512 MB RAM
  • 60 GB HDD
  • ATI Radeon XPRESS 200M IGP
  • 14" LCD - WXGA 1280*768px
  • DVD Writer ( dual layer )
  • touchpad (??)
  • 10/100 Ethernet
  • 56k modem
  • 802.11g
  • Integrated 6-in-1 media reader
  • front mounted mic/headphones sockets
  • 2 to 3 hours battery life. (??)
  • 2.44kg weight
  • Dimensions 3.89 (H) x 33.40 (W) x 23.06 (D) cm

--

Acer Aspire 5001WLMi AMD Turion
http://www.pricespy.co.nz/pno_6275.html
http://global.acer.com/products/notebook/as5000.htm

  • AMD Turion ML-28 ( 1.6 GHz ) ( 512KB cache )
  • 512 MB RAM
  • 60 GB HDD
  • DVD Writer ( dual layer )
  • SiSM760GX 3D graphics
  • 15.4" LCD - WXGA - 1280*800px
  • Touch pad
  • 10⁄100Mbps Ethernet
  • 56K modem
  • 802.11g
  • up to 3.0 hours battery life.
  • 2.80kg weight
  • Dimensions 3.39~3.89 (H) x 36.4 (W) x 27.9 (D) cm (??)

Both CPUs can power down to a slower speed of 800 MHz that uses less power.
Also both CPUs come in both 25W and 35W Thermal Design Point ( i.e., the amount of heat it makes ), although i dont know the specs on either.

--
Matt
paranoidgeek@gmail.com
Disclaimer: This made sense at the time of writing.

Wednesday, February 15, 2006

Unusual Assault Rifles


Heckler und Koch G11 (Germany)

http://world.guns.ru/assault/as42-e.htm
http://en.wikipedia.org/wiki/G11

Shoots case-less rounds.
And said rounds are square.

FN P90


http://world.guns.ru/smg/smg13-e.htm
http://en.wikipedia.org/wiki/P90

Not too unusual just i think it looks kinda cool. Definitely my favorite.

APS Underwater Assault Rifle

http://world.guns.ru/assault/as69-e.htm
http://en.wikipedia.org/wiki/APS_Underwater_Assault_Rifle

A fully-automatic weapon that can fire underwater. Cool.

Calico M960 submachine gun

http://world.guns.ru/smg/smg57-e.htm
http://en.wikipedia.org/wiki/Calico_960

Hand held with a clip size of 100. 'nuff said.
Well almost, to fit this many it has a spiral of rounds. A bit like a spiral stair case. Also known as a helical-feed magazine.


--
Matt
paranoidgeek@gmail.com
Disclaimer: This made sense at the time of writing.  

Tuesday, January 31, 2006

Found this on the internet

      From: gould@NOSPAMHEREPLEASEpilot.njin.net (Brian Jay Gould)

                         COLLEGE REJECTION LETTER

I wrote this letter many years ago:

Pennsylvania State University Admissions
Address

Dear Sir,

I have received your acceptance for admission, and I regret
to inform you that I will not be attending your university in
coming years.

As a senior in high school, I have applied to many other fine
institutions to further my education. And, although yours
ranks high among them, I'm afraid that you failed to qualify.

Elimination under my system doesn't mean that you are not
qualified to educate other fine young men and women.  It
merely reflects the high caliber of colleges and universities
competing for my acceptance.

My best wishes for your future.

                          Sincerely,


                           Brian Jay Gould


--
Matt
paranoidgeek@gmail.com
Disclaimer: This made sense at the time of writing.  

From a quiz ..

HASH(0x8c8ca44)
You are Scott!

You realize the true power of linux, and that Bill

Gates is attempting to bring about hell on earth

Which CAD character are you ?
brought to you by Quizilla

http://cad-comic.com

--
Matt
paranoidgeek@gmail.com
Disclaimer: This made sense at the time of writing.

Wednesday, December 21, 2005

Hard math question

if a is a complex root of z^5 = 1, show that a + a^2 + a^3 + a^4 = -1

--
Matt
paranoidgeek@gmail.com
"No shirt, No shoes, No BRAIN: No service"

Thursday, December 15, 2005

Spot the bug

function validate_display_enum($in){
switch(strtolower($in)){
case '':
case 'NONE': return 'NONE';
case 'ALL': return 'ALL';
case 'LINK': return 'LINK';
case 'FIRST_2': return 'FIRST_2';
case 'RAND_4':
default: return'NONE';
}
}

Tuesday, December 13, 2005

Got to love PRGs



preg_match("/^(20[0-4][0-9]|19[6-9][0-9])\-(1[0-2]|0[1-9]|[1-9])\-([1-3]0|[0-3][1-9]|[1-9])$/", $string)

This is matches a YYYY-MM-DD date with a little checking.

--
Matt
paranoidgeek@gmail.com
"No shirt, No shoes, No BRAIN: No service"