tcepsa: (ThreadLove)
Last night, I had the experience of being the only person to laugh at a certain point in a play. The play was Shakespeare's Love's Labours Lost, and the line was "He draweth out the thread of his verbosity finer than the staple of his argument."

I couldn't help myself; I had a fibergeekgasm right there on the spot.

That's two particularly wonderful turns of phrase in the past week... woo! (The other one was "I'm accused of being deliberately obtuse because people who understand the things I don't understand can't understand how anyone can possibly not understand them." from this post on Autism)
tcepsa: (iSquared)
With the current project I am on, the build consists of a couple of steps:
1) Shutdown Tomcat
2) Run an ant script that does the actual compiling and putting things where they go
3) Startup Tomcat

(When I want to deploy changes that I just made to relatively static things, like Javascript files, I can just do step two)

Cut for excessive geekery )
tcepsa: (I'll fix it!)
I just gained at least one, possibly two levels in Regular Expressions.

I'm all tingly now... ^_^
tcepsa: (Computation Suspended)
One by one the unit tests steal my sanity...
tcepsa: (Inconceivable!)
Actually, at this point it has been somewhere between one year and two since I encountered the programming concept of "closures". When I first encountered closures it was in the context of Javascript, and someone had told me that I should be careful with the toolkit that I was using at the time (Dojo 0.42) because it apparently used them and they have a propensity for causing memory leaks. I did a little bit of exploring but was unable to come up with a satisfactory explanation of what they were or why they would have this effect. The result was that I had a sort of nebulous impression that a closure was something that happened--not something that was--when a newly created object ended up with a reference to one or more of the local variables back in the method that called it.

That was pretty much my understanding--and I knew it couldn't be right but at the same time I was keeping an eye on my memory usage and it didn't seem to be getting gobbled up too quickly, nor did it seem that it was never being released. So at the same time it wasn't really a pressing enough issue for me to pursue it terribly deeply. Then, last Autumn, I went to the No Fluff Just Stuff consortium and learned of a language called Groovy. One of the things that makes it so powerful is that it has fairly extensive support for these closure thingies. I got a slightly refined understanding of closures (at least Groovy closures) during the conference and figured that maybe they had decided to use the word (which I still thought was more of a verb) to refer to these somewhat magical functions that could be passed around like variables and have properties like objects and retained references to the local variables that were in scope when they were created.

And now today, about four months later, I was reading the appendix to this article and came across a parenthetical statement that finally tied everything together: "In OO languages, you can, to a limited extent, simulate a closure (a function that refers to variables defined in enclosing scopes) [...]"

It's like there's this lightbulb in my brain that I screwed in back when I first heard the term, and it's been sort of glowing dimly off a trickle current this whole time, and when I read that finally it flared into brilliance! It's called a closure because, for all practical purposes, it's enclosed!! And therefore it can see all of their variables! And furthermore it can screw up garbage collection because it has a reference back to the enclosing object and garbage collection only happens on objects that aren't being referenced by anything that is, or is being referred to by, something on the stack! It doesn't actually screw up garbage collection--GC continues to do its job just the way it is supposed to--but it can trip you up, and that's what they were talking about when I first heard the term.

EUREKA!!! ^_^

(while my understanding may still be less than complete, it is a quantum leap better than it had been before reading that sentence ~grin~)
tcepsa: (I'll fix it!)
It turns out that Blender works pretty well as a 3D Graphing utility ~grin~
tcepsa: (Computation Suspended)
Anyone out there know whether there's a reasonably easy way to represent a tree of arbitrary depth in a database? There's nothing special about any given level of the tree, but there has to be a fairly straightforward way of retrieving the parent and (if present) children records of a given node. Siblings would be nice too, but aren't as important for what I'm thinking about (and worst case scenario, if I need them, siblings are all of the current node's parent's children that aren't the current node).

All of the shadows of ideas that I've come up with so far involve either one, two, or X tables (X being the number of levels in the tree, which makes my brain recoil in horror for daring to even think of it), and a bunch of semi--if not fully--recursive programming on the code side... I'm wondering if there's a way to set it up so that the database can handle it instead, but my SQL-fu is not that strong. Am I barking up an impossible tree, or is there a solution to this problem if I just throw my brain at it harder?

(For a concrete example of what this could be used for, think XML document storage. I make no claims as to the usefulness or efficacy of such an implementation; I merely wish to know about the feasibility.)

Required queries (since maybe this'll be a little more straightforward than the phrasing above):
Give me the record of the parent of this node ID.
Give me the records of the children of this node ID, if there are any.

Queries that would be nifty:
Give me the records of all the siblings of this node ID.
Give me the records of all the ancestors of this node ID [even more optional: to N generations away].
Give me the records of all the descendents of this node ID [even more optional: to N generations away].


[EDIT: Okay, I'm pretty sure two tables would work to provide the 'required' queries. One to hold the actual node records, and one to map parents to children. That doesn't address the problem of recursion on the 'queries that would be nifty' side of things, but that part may be intractable...]
tcepsa: (iSquared)
In Windows it's possible through something called the COM (Common Object Model?) and ActiveX to have programs that you write control other programs. For example, I can write a Java application that can open, modify, and save a Word document in Word (it starts up an instance of Word and then tells it what to do on my behalf).

Is there any similar thing available for the Macintosh equivalents?

Thanks!
tcepsa: (I'll fix it!)
I was at the Northern Virginia Software Symposium this weekend. Holy crap was it awesome. If Groovy can deliver on the things that were hinted at over the weekend... wow. But that's not what this post is about. This post it about a simple observation that I made while at the conference.

Every single presenter that I went to (with the possible exception of one that I forgot to check) used a Mac. And they did it REALLY WELL. As in "I'm going to give this full-fledged demonstration complete with code examples and slides and running the demo applications, and when I am done you will be able to count the number of times that I used the mouse on one hand." (Most of them were also running XP in a program that I believe was called Parallels, but that's a digression from this post). Combined that with the fact that it's now running on a Unix kernel, and there are applications like Quicksilver out there, and I am seriously considering going over to the Apple side. [Though almost certainly not completely...]

So I'm interested in learning more from those of you who have them, especially those of you who do development work on them, how you like them, what are the things you love about them, what are the things you hate (or would prefer were different)? What things do you wish they had?

And what things would you say that I, as a relative Mac newbie, should keep in mind when considering the purchase of one? Could I get away with something used, or is that just crazy talk? I've got about 22 years of experience (of various levels and flavors) with computers (and those of you who know my age and think I am pulling your leg, I can provide proof, at least anecdotally ^_^) but precious little of that involves Apple products, and even less of that involves modern Apple products.

Thoughts? Recommendations? I'll probably follow this up with a more specific-questions post once I think up some more specific questions ~grin~
tcepsa: (iSquared)
Rasputina doing the music from Kraid's Area in the original Metroid

Follow Up

Sep. 26th, 2007 12:29 pm
tcepsa: (iSquared)
In response to this craving I picked up a certain old Game-Of-The-Year CD last night while I was in Springfield. Let's see how well it runs on my laptop...

Also, in a bit of (mostly) unrelated news, I grabbed my trusty ol' HP 48GX. I've got a friend who I'm helping out with Physics, and while I love my tablet PC to death for being able to write notes and sketch force diagrams and do algebraic manipulations of equations that make sense to me, it's currently a pain in the butt to use it for actual calculations... Plus, it's a great excuse to play with RPN, which is pretty much always a good time ^_^
tcepsa: (Computation Suspended)
Whenever I go over to main campus, I am seized with an almost irresistible urge to play Half Life.
tcepsa: (I'll fix it!)
So that drive partition that I said I lost in the last post I made? It's, um, back. By magic, apparently. I am quite happy about this, and hope it decides to stay for quite some time ^_^

I am also very happy about overriding my initial inclination to reformat it upon discovering that it wasn't working quite right. Instead I booted into Knoppix to see whether it was really gone, and everything was still there, right how I had left it. So I booted back into Windows, and ta da! Everything visible again. And there was much rejoicing. Yay.
tcepsa: (I'll fix it!)
Iiiiiiiiiiiiiiiiiiiit's... Monday night. Just doesn't have the same ring to it...

Anyway, it worked. I'm now on a fresh new clean install of Windows. How fresh? Fresh enough that I need to get SP1 on here. And yet despite all that freshness, I still feel dirty... and not in a good way! I'm up a new motherboard (which hopefully includes functional USB 2.0 ports) and down a gigabyte of RAM--though even that has a silver lining, since now the remaining RAM is free to unleash its full 164-bit dual channel glory (the stuff that died was dragging everything down to 64-bit, so this ought to theoretically be significantly faster. Anyone care to confirm/debunk that for me? Anyone? Bueller?)

Erm, actually, why don't I stop writing about how fresh and clean my install is and just put a big target on my computer with the words "|-|axx0rz \/\/3|c0m3!!1!!1!ONE!!" written on it? At least I've gotten Firefox installed...

(oh yeah, and I seem to have also lost my partition containing all my downloads in some freak formatting accident. So much for not having to re-fetch everything! Ah well. ~stiffens upper lip~ It builds Character! (Tee Em) )
tcepsa: (iSquared)
Anyone out there interested in helping me understand the guts of a Tomcat 5.5 server configuration? (Doing some work on a project that requires some tweaking, and for which all the how-tos are written for Apache and are scary to me. More detail: Trying to implement a web-based chat client using JWChat and ejabberd, and it involves some bizarre level of redirection in which requests to a certain URL are somehow sent to the ejabberd server instead--I think!)

Even something as simple as a basic "Here's what the config files are. Here's what the settings tend to mean" or something might at least help me start figuring out which way is up!
tcepsa: (iSquared)
Wow, if those EJBs came with a warranty, I just thoroughly voided it ^_^
tcepsa: (JuggleGeese)
Today has been a very good day at work so far; I've rewritten a portion of code that used a bunch of cumbersome "if" checks to take advantage of the fact that JavaScript supports try/catch blocks. Now I just do what I want to do, and if it doesn't work then I fix it and move on. The fun part is that they're nested three levels deep, but in pretty much all cases I can actually recover from whatever broke it, fix the thing that caused it to break, and move on. No more shall I be at the mercy of (this particular aspect of this particular set of) data architecture!

As it turns out, that was just an appetizer )

tcepsa: (Default)
This was inspired by Friday's Code Snippet of the Day over at The Daily WTF

public boolean myMethod( Object myObject ){
    try{
        // Extremely exception-prone error code here...
    }
    catch( Exception e ){
        log.print("Unable to perform myMethod--trying again");
        myMethod( myObject );
    }
}

My favorite definition of insanity is doing the same thing over and over and expecting the outcome to be different...
tcepsa: (Default)
... waking up in the morning and not being able to get back to sleep because you've started trying to calculate, in your head, how many stitches you have left on your project before you can start binding off. (About 4,360, in case you were wondering... ;) )

Cut for knitting ramblyness ) And now I think at some point I'll have to write up an entry on Algorithmic Knitting Patterns...

That, or a book, just because I think there should be a book out there with that title ;)

Profile

tcepsa: (Default)
tcepsa

April 2015

S M T W T F S
   12 34
567891011
12131415161718
19202122232425
2627282930  

Syndicate

RSS Atom

Most Popular Tags

Style Credit

Expand Cut Tags

No cut tags
Page generated Aug. 3rd, 2025 10:50 am
Powered by Dreamwidth Studios