Home
raznorw's Journal

> recent entries
> calendar
> friends
> profile
> previous 20 entries

Advertisement

Monday, April 24th, 2006
1:23 pm - Programming
Object Oriented
Multiple Inheritance -
Add behaviour by defining a new class that's a subclass of multiple classes
ie WINDOW, WINDOW-WITH-LABEL, WINDOW-WITH-BORDER, WINDOW-WITH-LABEL-AND-BORDER
suffers from coombinatorial explosion of classes
Mixins - Add behaviour to instances (or classes) without defining new subclasses
ie. Soccer-Player instance has methods for playing soccer.
Some soccer player is also a singer, mixin the "singer" class with that instance
Now instance can play soccer and sing.
Contrast with MI where you'd instead need a new class that inherits off of both
parent classes.
Context-oriented - objects behave differently in different contexts
ie. some person instance can take on employee role or employer role.
Actions differ depending on context. As opposed to defining new class
busy-worker (employee employer).
Employee Role, speak method - <insert ask for raise here>
Employer Role, speak method - <insert cutbacks here>
Aspect-oriented - modularization fo cross-cutting concerns. ie. logging
Most progs would like logging (for debugging if nothing else)
Can be (should be?) "woven" in
Subject-oriented - precursor os aspect oriented

Prototype-based programming environments - see Self (what's different?)

XOTcl has some interesting features in regards to some of the above

(comment on this)

Wednesday, March 8th, 2006
4:19 pm - Smalltalk
Smalltalk, more than just a language, a complete development environment!
integrates "consistently" and editor, compiler, debugger, spell checker, print utiltiies, window system, source code manager, ...

Benefits:
Tight integration allows for better, and more natural, interactions between components. (think windows / office suite) Also allows developers to "stay in context" while coding / compiling / debugging. Instead of edit (vi / emacs), compile (make / g++), test, debug (gdb), everything stays within the same environment.

Drawbacks:
Lack of familiarity. Developer has to learn new editor, debugger, window system, source code manager, ...
How good is the consistency between different small talk implementations?

There exist Smalltalk implementations of vi / emacs(?), and the other components could be made similar to more familiar alternatives (where appropriate).

So, how useful is the system really? Time to delve in and find out.

(comment on this)

Thursday, February 23rd, 2006
2:16 pm - languages of the day
OCaml
Haskel - non-strict, purely functional (?)
common lisp - multiple namespaces, strict order of evaluation
scheme - 1 namespace, unspecified order of eval (fnc args)
Miranda - non-strict, purely functional commercial language

(2 comments | comment on this)

Friday, January 20th, 2006
1:08 pm - TCL is making me sad
so I was trying to write this handy little utility, and i've recently started picking up TCL so I figure sure, why not?

Pass By Name, that's why not. Basically, everything is a name that exists in some scope. So what you ask? Well...

I was porting a parser over from c++ and i'm quite time limited so I figured it would be easiest to just copy the structure now and worry about making it more "tcl-like" later. Except it doesn't work like that.

Example:

set a [list {} {} {}]
- {} {} {}
## A now is a list containing 3 inner lists
set b [list a b c]
- a b c
## b is now a 3 element list
lset a 0 $b
{a b c} {} {}
## the list a now contains the value that was in b...VALUE
lset b 0 "foo"
- foo b c
## updates B, but not a
set a
- {a b c} {} {}

Hmm...Not quite what I wanted. In fact, what I wanted was basically a pointer so that I could drop the B objec tinto multiple parents and modify it from any of them affecting all of them.

to do this i'd have to do something like...
lset a 0 b
- b {} {}
and to get that value
set [lindex $a 0]
- foo b c

Which brings me to my point. I didn't want to have to name everything. I like anonymous data structures (and functions...closures!) The problems not a show stopped. Indeed, with some thought, I might be able to find a more elegant way of doing (or pure functional way). But it'll have to wait, no time today. Maybe monday

(comment on this)

Tuesday, January 10th, 2006
3:23 pm - memory management
preprocessor directives (?) the state whether the return value of a function is
a. dynamically allocated memory that needs to be deleted
b. return "by value" that does not need to be deleted ever
c. dynamic memory that should NOT be deleted because control of the memory is not
returned...a pointer is merely being used for efficiency
-- this becomes an issue in multi-threaded type applications where the originator
-- of the memory may try to delete it while some child still thinks it can use it
-- smart pointers / ref counted mem / garbage collectors

(2 comments | comment on this)

Monday, January 9th, 2006
10:10 am - Linux Educational Software
ie, the kind we used as kids in elementary school. Software that teaches you things, be it math, science, electronics, reading, vocab, whatever.

The "educational games" that some teachers / parents were enthralled with and kids didn't mind because, hey, it was kinda fun... even if they wanted us to learn something at the same time.

What kind of stuff like this exists for linux?

(comment on this)

Monday, November 28th, 2005
6:07 pm - Manifesto
a written statement declaring publicly the intentions, motives, or views of its issuer
- courtesy of www.m-w.com (as usual)

There's a lot of manifesto's out there spanning a wide range of topics. But enough about that.

Todays posting is merely a grouping of topics I've ventured across in recent ramblings. Nothing new here. Just background material (and little enough of that)

There's lots of thorny issues in computers these days, like security and portability. As developers address these issues more, the goal is that consumers will notice them less.

Portability -
One approach to the portability problem that is being heavily pursued is the use of interpreters, just-in-time compilers, and virtual machines to isolate the developer from havign to worry about the underlying system.

Example: As long as the target computer has a JVM (Java Virtual Machine), the developer can be reasonably confident that his code will run allowing him to target the JVM as his development platform instead of Windows, *nix, or any other operating system (OS). Much as the OS acts as an abstraction layer providing developers with a cleaner view of hardware, virtual machines abstract away the OS (to some degree) leaving developers to target VM's. The burden of portability is then moved to compiler writers and VM vendors to ensure their systems work as advertised.

Other advantages of JITs:
Change execution paths on the fly based on metrics gathered at run time laeding to better optimizations. Similar benefits can be achieved with Garbage Collection vs. manual memory management.

GC - what guarantees could be provided to real-time systems? (especially when coupled with JITs)

.NET -
Microsoft (among others) attempts to take the VM approach even farther by providing compiler frontends to multitude of languages that all compile down to the same byte code, ie. can all be run on the same VM. Perl 6 and Parrot is another example of this. The developer is now given even more latitiude in that he can choose from a range of languages for development.

This idea has been around in other forms for quite a long time. An earlier example would be the first C++ compiler CFront which "compiled" C++ code to C code which would then be compiled to native code by the existing compiler for the machine. This allowed CFront to take advantage of whatever compiler optimizations were already present in the C compiler without the burden of compiling to machine code.

Security -
Reliability - Do all messages get through that need to? Can I count on this system?
Accountability - Can I see who did what and when and KNOW the information is correct?
Privacy - Can I send X to Y and no one but Y will know what X is?
Confidentiality - Can I say i'm me and have others believe me?
... (fill in later)

Other issues to be addressed later:
Reliability (system uptime, correctness) not necessarily security related

Software Foundations of a General Purpose Computer
Operating System - All interactions with the hardware should go through the OS
Compilers - Can you "trust" the machine code to do what you specified in the higer level language?
Applications - The programs users will run to accomplish their tasks. Compilers are also applications. So is an Operating System.

Utilities -
Source Control Management (think cvs, arch, or darcs, etc)
...

Say what?

Software Vulnerabilities come in many shapes and forms, but almost all boil down to the machine receives some form of input which causes it to behave in a fashion not intended (and potentialty detrimental to) the user (owner). Common classes of vulnerabilities include the ever loved stack overflow, web vulnerabilities generally involving malicious code being downloaded to your computer via vulnerable cgi / asp / javascript / ... interfaces, any other listening service.

If a machine is not connected to any networks (especially the internet), remote attacks should be impossible.
If a machine is connected to the internet, but has no listening services, it should theoretically be immune to remote attacks. (is it? isn't it? why not?) Initial thought says, if it denies all connections, remote attackers shou dlbe unable to access the system. Unless the IP handling of the OS is broken. Denial of Service attacks might still be possible. Connections established from the machine to the outside world are all potentially vulnerable (man-in-the-middle, piggybacking, nasty web attacks)
Machines running services open up a while host of new vulnerabilities.
MLS (Multi-level security) is another level headache.

How can virtual machines help?
Sandboxing. Blocking off critical / system data.
Adding security policies on what can and cannot be run on them.

Privilege elevatation. Etc.

What does this have to do with me?

I'm not sure yet

(comment on this)

Wednesday, September 21st, 2005
12:38 am - Go / Weiqi
After a long hiatus, I started playing go again with some regularity on the Dragon Go Server. The turn based system fits much better with my schedule than trying to find the blocks od time needed to play a full game in one sitting. I do miss playing full games however, and once i'm all moved in and set up at my new house, reactivating my KGS account is next on my list of things to do. (current DGS ranking is bouncing between 12 and 13 kyu, will probably settle low end of 13kyu as I'm in hte process of losing 3 games)

While packing for the move, I started looking through my collection fo go books and even picked up a few to briefly read through.

Attack and Defense by James Davies -- one of my favorites. I always enjoy reading this book and I definately learn something new (or remember something more) every time I read through it. The opening chapter on territoy vs. power completely changed my original outlook on and and is a constant revitalization when I want to start playing again

Graded Go Problem for beginners, Volume 2. Started chugging through this. The problems don't really take me long, and aside from the first, I haven't gotten any wrong (bad bad start), but it is slow going overall. I dont' have the stamina to burn through all that quickly and with almost 400 problems...it takes time. Considering it is supposed to be for 25-20kyu, this is the sobering, "oh yae, my reading needs serious work" wake up book.

Break Through to Shodan -- fun little book. Not that i'm anywhere near shodan, but something still seems to click.

And dozens more that I didn't have time to paw through. I think as part of my unpacking process i'm going to draw up a list of my books and chart a course through them. See if they make any more sense this time around. See how much more I can learn from them. See if I can finally break into those damned single digit kyus!

But first...thursday the moving guys come and I finalyl move into my new house with Karin. Super harsh work deadline of Sept. 30th. Lots and lots of house warming stuff in oct, plus jin's wedding. So, go remains a passing fancy for now. But at the very least, i'm definately going to try and play 1 game on KGS this weekend. See if I can actually last through a full game in one sitting!

(comment on this)

Wednesday, July 6th, 2005
9:37 am - promises
I've been thinking about / talking about a major code rewrite for months now...something about the existing baseline just strikes me as wrong. Last week, I finally sat down with my boss and came up with some ideas, then spent friday trying to whip out a proof-of-concept demo. The demo went exceptionally well, as good as I had hoped, and now I get to actually do the rewrite. 2 months to restructure / recode / retest many years worth of effort. It's going to be a long 2 months.

Keywords: UCC, Design Patters, Observer (of sorts), Decorator (unused), Filter (kind of joins Decorator + Observer), C++ (textbooks anyone?)

(2 comments | comment on this)

Friday, March 11th, 2005
1:04 pm - Java Swing is ASSININE
Java has some nice features, so I decided to (again) try to use it for my work project. Everytime I try to make a GUI in java, I start getting really frickin annoyed. By default, it looks like crap and responds poorly to resizing. (example code available on request). My computer also doesn't have quite enough ram to run Netbeans (which took 140+mb when I loaded it). Alright, i'll be patient, i'll look through the documentation...

I'm using JList (multi-selection list, I want to be able to pick multiple objects) Except, when I resize my window, it goes from showing all the elements to NONE. htat's right...it doesn't shrink the list, it just disappears. Well fuck.

Enter java documentation...http://java.sun.com/docs/books/tutorial/uiswing/components/list.html

"In combination with the call to setLayoutOrientation, invoking setVisibleRowCount(-1) makes the list display the maximum number of items possible in the available space onscreen." Well, that sounds like what I want...sure would be nice if that was the default action, but whatever...

And the result is...it now shows NOTHING. That's right, the entire list just disppears...WTF? I'm sure i'm just missing some other config options that would make it work all nice like...

BUT, in case I wasn't irritated enough already, we get to this section...
"If you initialize a list with an array or vector, the constructor implicitly creates a default list model. The default list model is immutable \x{2014} you cannot add, remove, or replace items in the list."

Well hell, I need muteable lists, reading on...

"To create a list whose items can be changed individually, set the list's model to an instance of a mutable list model class, such as an instance of DefaultListModel."

Oh, so the "DefaultListModel" class is for muteable lists, but the default list model doesn't... GAH!!!

So now my code is getting bulky beyond need, my GUI still doesn't look right because of some other frickin options, and i'm starting to froth at the mouth (rabies?)

SWING is braindead and has crappy defaults. I despise GUI programming in Java. Everytime I contemplate it I brack into a cold sweat. Everytime I try it I break into a Blog Rant. (or worse...) That being said i'm going to look through the "ListDialog.java" sample sorce file on their website, because their sample behaves nicely. Shame it's 170 lines of code for simple behaviour...

Back later

(comment on this)

Wednesday, December 8th, 2004
10:49 am - Mailing Lists
A few weeks (months?) ago I joined the clisp mailing list because I like lisp, clisp is my (current) interpreter of choice, and I thought I might learn a lot (or even something) by reading the messages that get sent. But, as with most of the mailign lists i've joined, I rarely keep up with the messages, though there is plenty of useful content that passes through.

Until today. I've reached the point in my project where I suddenyl realized, "shit, I need more speed!" A neural net, go game state classifier. Using 30 hidden nodes (random number) I can run through 5000 samples in roughly 10 minutes. I have roughly 41,000 pieces of training data that i'd like to train the network at least 1000 times on. (10-100k would make me happier, but...)

so 10 minutes * 8 times the data * 1000 = a lot more time than I have. I need to make my code faster! Can't find a profiler in clisp. What now?

I know, send a message to the (a) clisp mailing list, and see if anyone can give me more data.

Within 10 minutes I got a respose. Within 20 minutes I got 3 responses, including 1 from one of the main clisp developers. Not too shabby. Of course, instead of acting on those response i'm writing this, but I read them, they were useful, I've got hope again.

Oh, and in the "I'm a total dumbass" category of improvement...

Lisp is an interpreted language (by default). You can, however, compile lisp code which makes it run faster. How much faster you ask?

Running my now compiled lisp code on those same 5000 data samples with 30 hidden nodes took...0.45 seconds. 0.45 vs 598, 3 orders of magnitude faster. DOH! (thank god I didn't post that piece of idiocy to the list)

However, faster code still means more time to run the trials...so a profiling I will go!

(comment on this)

Thursday, September 30th, 2004
12:03 pm - Vague References
cause I don't do specifics

Sunday, Sept. 26 => Wednesday, Sept. 29 was one of the almost entirely self-contained chapters that sets itself apart somehow.

Understand, of course, that when I say self-contained I mean it in a very broad sense. Obviously there was a good deal of history working up to that point and the (ripple?) effects will continue for a good long while, but the before and after can be termed "status quo".

status quo - the existing state of affairs

shrug, who goes by dictionary definitions anyway?

As with all other "self-contained" chapters in my life, I wonder how long the effects will linger, how long the memories will remain strong, how long before life truly returns to the old "status quo". (I just kinda like the phrase at the moment)

And that's the point of this post. So I can come back in 10 years (or whatever), read over a fairly vague entry (no details other than dates), think back and see what impact it truly had. I'm going to state that in the present, it's impossible for me to know the full ramifications of such situations, regardless of the ability to think objectively about a topic. Controlled logic and / or an examination of history would both allow me to provide semi-accurate predictions, but honestly, where's the fun in that?

"Jacta alea est, The die is cast",
let them fall where they may.

Also "Alea iacta est" or
"Alea jacta esto": "Let the die be cast"


Word Usage

"Les jeux sont faits"

(comment on this)

Friday, September 24th, 2004
3:49 pm - Adrenaline
Overload!

so hyper it hurts. Ouch.

(comment on this)

Wednesday, September 22nd, 2004
4:34 pm - Doh
Right, so I continuously contemplate writing a go program for my machine learning class (or future research) but time and again am stumped by the fact that...I don't know if I can, let alone have the time to try. Especially since I want to try and use as little human knowledge as possible (more on this later).

An so, today it finally struck me, don't start with a 19x19 board.

well, DOH!

So with a bit of renewed hope, I think that focusing on a 9x9 board will let me experiment with machine learning and whatnot, without making the problem too frickin large. And ideas that look promising (or work) can then be reapplied to a larger board.

And, the board size is 1 little variable. I can regenerate my entire program from 9x9 to 19x19 with 1 change, so all efforts can basically be instantly reused.

Why, oh why, didn't I think of this sooner?

Now i'm excited again :)

(comment on this)

Tuesday, September 14th, 2004
3:51 pm - If you were wondering
where I've been, the answer is...right here.

The website is coming along. I haven't created any content for it, but I've made much progress with the back end work.

New Subcategory - Java programming. Not that I much care for java (hate hate), but it is the easiest thing I can use to teach someone who wants to write gui programs, so be prepared for a "tutorial" on java programming! Actually, it's going to be the steps I take to write one very specific program and not much of a tutorial...but hey...

(comment on this)

Thursday, September 9th, 2004
1:15 pm - trouble
always getting myself into trouble...

But on an unrelated note (if you can believe that), I decided a short while ago to put together a personal web page and started gathering knowledge and books to that effect. But it being a personal project in my "free time" it was coming along quite slowly, I've got a lot of things I want to do. Flash forward.

Bossman says, "we need a web page for the group. We need to web-enable some of our products."

Ears perking up, "sure, I think I can help with that some". Boom, now personal project and work project collide, efforts go to both web pages, and I get paid for doing what I wanted to do anyway...except now I actually have to go and finish it.

On another unrelated note, I start class tonight, "Machine Learning" (as I'm sure I've said many times in the past) which requires a semester long project. Dare I say it, an Artificial Neural Network for playing checkers (go?) trained with Evolutionary Algorithms (or related)? Wouldn't that be...utterly convenient. Or perhaps something with bioinformatics, the other new hobby / research area I picked up recently and could now turn into a school project.

I don't know why I'm always so surprised when I get the opportunity to levy a personal project into a work / school related project (and vice-versa) but it pleases me never-the-less. So long as motivation holds. Anyway, back to the website!

(comment on this)

Thursday, September 2nd, 2004
5:05 pm - Job Descriptions
Occasionally I'll browse ComputerJobs.com or various other job posting just to see what's out there and honestly, I've rarely (if ever) foudn any job description that I "matched well" and was interested in. Today, I found a job description wherein I actually fit and I bet it'd be interesting. But of course, I'm content where I am right now and am not actually going to apply or anything, but it was very nice seeing it and knowing that possibilities still exist :)

(comment on this)

Monday, August 23rd, 2004
4:37 pm - Exemption
Umm, what does exemption mean? Cause, if I'm thinking of the right word, it means something along the lines of "not part of".

Specifically, "...exemption from minimum wage and overtime pay..." would mean the minimum wage and overtime pay does not apply to said exemptees. In this case, computer-related occupations.

U.S. Department of Labor.

What the bloody fuck? At where did the $455 / week salary come from??

I know, Executive, Administrative, Professional (learned or creative) exemptions all exist as well.

Which brings me to as aside. "Learned professional" == "performance of work requiring advanced knowledge, ... work which is predominantly intellectual in character and which includes work requiring the consistent exercise of discretion and judgment".

I'm not sure if i'm miffed because software engineers are not exempt, or because we're specifically called out and not considered learned professionals. or even
"creative professional" = performance of work requiring invention, imagination, originality or talent in a recognized field of artistic or creative endeavor. Programming is an art form!

Sigh. Well, I still get paid overtime, just not at a time and a half rate, so I guess I can't complain much. But still, 40+ hour work weeks are the work of the devil! Back to school I say, forever a student!

(5 comments | comment on this)

Friday, August 20th, 2004
2:53 pm - Full time student
so...lots of schools / programs offer enough money to ph.d. students to do it full time without racking up excessively massive loans. Could I really return to life as a full time (ie. broke) student? I'm not entirely sure, but it is a possibility worth considering.

U. Penn. A lot of nice looking programs.

(comment on this)

Wednesday, July 28th, 2004
9:31 am - What's worse?
Actually doing what I told myself i'd do...or deriving real pleasure from it?

Hypothetical question of course.



Needless to say, (in)sanity prevailed and life continues as before. But now with a touch more laughter.

(comment on this)


> previous 20 entries
> top of page
LiveJournal.com