Foo - Sigh. A coworker falls off his pedestal

Bikeforums.net is a forum about nothing but bikes. Our community can help you find information about hard-to-find and localized information like bicycle tours, specialties like where in your area to have your recumbent bike serviced, or what are the best bicycle tires and seats for the activities you use your bike for.




superdex
09-15-05, 01:11 PM
I get to write technical specs and architect stuff here at work. I then hand these off to code jocks that basically fill in the blanks. I still write the nitty-gritty, but not as often anymore; I spend more and more of my time in class designers and UML diagrams. My feelings on that are for a different day. Anyhoo:

Had a nicely done State Pattern done up for some work here, and handed it off, and it was coded up sweetly. Then I asked to make a small addition to the app that uses these state classes, and my dearest coworker, whom I have mad respect for, didn't place the functionality in the child state classes as it would seem (to me anyway) most obvious to do. So instead of having each state class tack on its own value for the query string, I have this, in the client code:


private string SetQueryString()
{
string strQuery = string.Empty;
RequestContext rqContext = (RequestContext)Session["REQSTATE"];
if (rqContext != null)
{
if (rqContext.State.GetType() == typeof(OpenState))
strQuery = "?STATE=0";
else if (rqContext.State.GetType() == typeof(ValidatingState))
strQuery = "?STATE=1";
else if (rqContext.State.GetType() == typeof(ForwardedState))
strQuery = "?STATE=2";
else if (rqContext.State.GetType() == typeof(RemovedState))
strQuery = "?STATE=3";
else if (rqContext.State.GetType() == typeof(MatchedState))
strQuery = "?STATE=99";
**
return strQuery;
**


Ugh. :mad: Guess who gets to refactor it back into the state classes where it belongs? Yup, yours truly. :( :(


Sorry if this is g(r)eek speak, I just had to get it out.


KrisPistofferson
09-15-05, 01:19 PM
:crash: I didn't understand a word of that.

va_cyclist
09-15-05, 01:25 PM
I said "sprocket," not "socket."


snowy
09-15-05, 01:26 PM
OMG, I guess thats why you computer people get the big bucks. My eyes hurt just from looking at that!!!

va_cyclist
09-15-05, 01:33 PM
Wouldn't it be more efficient to make the call to rqContext.State.GetType() just once, then evaluate the result with a CASE statement?

Just wondering.

superdex
09-15-05, 01:37 PM
it's most effecient to have each state class tack on the value as part of its normal operations, eliminating the CASE statement entirely. It also saves on maintenance, because now if we add another state to the system, someone has to remember (or discover when the shizzy breaks) that this CASE is out there in the client code. A huge no-no....

Blackberry
09-15-05, 01:42 PM
My recommendation: Go for a long bike ride.

KingTermite
09-15-05, 01:42 PM
What case tool do you use for UML? We paid $2000 or whatever it is per license for Rational Rose some years back and later found a tool called Enterprise Architect which has everything Rose has (and more) for about $150 a pop!

BTW...most of the code I work on is Windowsey or embedded (C/C++) in nature....rarely get into the web stuff. I have done a bit of perl, though, very little of it was for CGI.

mirona
09-15-05, 01:46 PM
Man, now I have to look at you differently :( You'll never be the same in mein eyes ya friggin dork! :D

slvoid
09-15-05, 01:48 PM
The matrix-valued linear form:
http://relativity.livingreviews.org/Articles/lrr-2004-2/article1305x.gif
is an operator-valued vectorial quantity that forms dirac's equation by replacing vk by
http://relativity.livingreviews.org/Articles/lrr-2004-2/article1311x.gif
where Ak is the electromagnetic 4-potential,by assuming the velocity of light c to be the classical average of the 4-velocity vk and applying the operator to the wave function.
By introducing a covariant derivative for the spinors, we can obtain the guage-covariant derivative:
http://relativity.livingreviews.org/Articles/lrr-2004-2/article1320x.gif
We define this asymmetric matter tensor for the spinor field to be:
http://relativity.livingreviews.org/Articles/lrr-2004-2/article1325x.gif
By combining einstein's teleparallel theory to five-dimensional space, the lagrangian is:
http://relativity.livingreviews.org/Articles/lrr-2004-2/article1449x.gif
We can reduce this down to four-dimensions as:
http://relativity.livingreviews.org/Articles/lrr-2004-2/article1493x.gif

DannoXYZ
09-15-05, 01:53 PM
The answer's 42...

va_cyclist
09-15-05, 01:53 PM
This belongs in the "Bicycle Mechanics" forum.

superdex
09-15-05, 01:57 PM
What case tool do you use for UML? We paid $2000 or whatever it is per license for Rational Rose some years back and later found a tool called Enterprise Architect which has everything Rose has (and more) for about $150 a pop!

We have some huge Rational license, with ClearCase for source code repositry and ClearQuest for bug tracking. We have Rose in-house, but I've been doing all my stuff in Rational XDE, which is a UML diagramming/code generation tool that plugs into VisualStudio --farther down the lifecycle than where Rose fits in. Works okay, though I'm still mostly a code-by-hand kinda guy. I'm slowly trusting the tool(s) to write for me. The nice thing is being able to have the diagrams right there to give to the project managers and such for auditing and whatnot. That part I'm buying into...



BTW...most of the code I work on is Windowsey or embedded (C/C++) in nature....rarely get into the web stuff. I have done a bit of perl, though, very little of it was for CGI.

Yah I've been a web guy since, oh, 1991 --I wouldn't be able to code my way out of an MDI to save my life...

superdex
09-15-05, 02:01 PM
The matrix-valued linear form:
... glaze ...


you win, you win!

halfbiked
09-15-05, 02:19 PM
Yah I've been a web guy since, oh, 1991 --I wouldn't be able to code my way out of an MDI to save my life...

Uh, what? You talkin' ARPA net or something? Most folks hadn't heard of the internet in 1991, much less email or 'the web'.

KingTermite
09-15-05, 02:29 PM
you win, you win!
As the copy & paste champion you mean? :D

KingTermite
09-15-05, 02:30 PM
Uh, what? You talkin' ARPA net or something? Most folks hadn't heard of the internet in 1991, much less email or 'the web'.
The internet seperated from ARPA and went on its own (mostly via American Universities) around the mid 80s.

timmhaan
09-15-05, 02:30 PM
The matrix-valued linear form:


that'll be sweet when we finally have a unified theory. maybe i should get off my ass and contribute something to the effort. it sure is taking them long enough...
:p

KingTermite
09-15-05, 02:33 PM
We have some huge Rational license, with ClearCase for source code repositry and ClearQuest for bug tracking. We have Rose in-house, but I've been doing all my stuff in Rational XDE, which is a UML diagramming/code generation tool that plugs into VisualStudio --farther down the lifecycle than where Rose fits in. Works okay, though I'm still mostly a code-by-hand kinda guy. I'm slowly trusting the tool(s) to write for me. The nice thing is being able to have the diagrams right there to give to the project managers and such for auditing and whatnot. That part I'm buying into...
You might give Enterprise Architect a look some time. It has the way up front UML design, with reverse engineering, automated code generation (many languages to choose from), automated documentation generation, Visual Studio integration, etc... There is also an enterprise version which uses an oracle database that I think plugs nicely into your Version Control System. We just have a few standalone copies for the time being though (our VC system sucks....we are using Merant's PVCS).

If I recall correctly, their (EA) website is www.sparxsystems.com

KingTermite
09-15-05, 02:37 PM
that'll be sweet when we finally have a unified theory.
I know "of" GUTS, but not the guts of GUTS!

superdex
09-15-05, 03:02 PM
You might give Enterprise Architect a look some time.

Yeah, I'll check it out, but I'm one monkey in a 130-person IT department; the chances of us getting away from the Rational mega-license is laughable, even if EA is the better product.... Dilbert on a daily basis I tell you!

superdex
09-15-05, 03:06 PM
that'll be sweet when we finally have a unified theory. maybe i should get off my ass and contribute something to the effort. it sure is taking them long enough...
:p


ooOOOOOoooh. I read Brian Greene's Elegant Universe (http://www.amazon.com/exec/obidos/tg/detail/-/0375708111/qid=1126818232/sr=8-1/ref=pd_bbs_1/103-2322439-5251044?v=glance&s=books&n=507846) earlier this summer, and while I could swallow everything, I didn't soak in the appedicies. Hell, I didn't even look at the math. I'm a concept guy, y'know?

KingTermite
09-15-05, 03:17 PM
Yeah, I'll check it out, but I'm one monkey in a 130-person IT department; the chances of us getting away from the Rational mega-license is laughable, even if EA is the better product.... Dilbert on a daily basis I tell you!
I live in the same ever-changing cube jungle! :(

Cromulent
09-15-05, 03:20 PM
ooOOOOOoooh. I read Brian Greene's Elegant Universe (http://www.amazon.com/exec/obidos/tg/detail/-/0375708111/qid=1126818232/sr=8-1/ref=pd_bbs_1/103-2322439-5251044?v=glance&s=books&n=507846) earlier this summer, and while I could swallow everything, I didn't soak in the appedicies. Hell, I didn't even look at the math. I'm a concept guy, y'know?

I liked Michio Kaku's Hyperspace http://www.amazon.com/gp/product/customer-reviews/0385477058/ref=cm_cr_dp_pt/102-4124098-7908168?%5Fencoding=UTF8&n=283155&s=books a little better. It was more accessible, in my opinion. Brian Greene's book was really good for the first few chapters and then it became some pretty dry stuff. That's just me, though.

And while we're on the subject of String Theory and the search for a T.O.E... here's my favorite physics quote: "Physics is like sex. Sure, it may give some practical results, but that's not why we do it." - Richard Feynman

timmhaan
09-15-05, 03:31 PM
And while we're on the subject of String Theory and the search for a T.O.E... here's my favorite physics quote: "Physics is like sex. Sure, it may give some practical results, but that's not why we do it." - Richard Feynman

here is my favorite quote, although not directly related to physics (and less funny than yours :)):

"I am somehow less interested in the weight and convolutions of Einstein's brain than in the near certainty that people of equal talent have lived and died in cotton fields and sweatshops." — Stephen Jay Gould

Cromulent
09-15-05, 03:39 PM
here is my favorite quote... "I am somehow less interested in the weight and convolutions of Einstein's brain than in the near certainty that people of equal talent have lived and died in cotton fields and sweatshops." — Stephen Jay Gould

You're right, that's less funny. Great quote. I love reading Stephen Jay Gould. Bully for Brontosaurus is one of the all-time best. I'm always amazed when I read his stuff. I'm astonished that people can be that smart and write that well. The essay "Red Wings in the Sunset" had me rolling on the floor... and that from a guy who wrote about natural selection.

Orikal
09-15-05, 04:55 PM
I liked Michio Kaku's Hyperspace http://www.amazon.com/gp/product/customer-reviews/0385477058/ref=cm_cr_dp_pt/102-4124098-7908168?%5Fencoding=UTF8&n=283155&s=books a little better. It was more accessible, in my opinion.

Yeah, that book's great. MK does a weekly hour-long radio show that you might want to check out as well.

http://www.mkaku.org/explorations/

slvoid
09-15-05, 05:08 PM
that'll be sweet when we finally have a unified theory. maybe i should get off my ass and contribute something to the effort. it sure is taking them long enough...
:p

Unified field theory won't make you bike any faster. :p

KingTermite
09-15-05, 08:24 PM
Unified field theory won't make you bike any faster. :p
That's your theory, eh?