Search found 81 matches

by b0b
Thu Sep 03, 2009 12:23 am UTC
Forum: Coding
Topic: JSP vs. Java Servlets
Replies: 9
Views: 1692

Re: JSP vs. Java Servlets

What's the advantage of separating the two along those lines?
by b0b
Wed Sep 02, 2009 10:05 pm UTC
Forum: Coding
Topic: JSP vs. Java Servlets
Replies: 9
Views: 1692

JSP vs. Java Servlets

I've recently been assigned to a project that contains a lot of JSP with taglibs and Spring. Until now, I've been using Java servlets a lot for the same kinds of tasks. What are the advantages of using JSP? Why do people often choose JSP instead of writing servlets directly? To me, JSP seems pretty ...
by b0b
Fri Jan 11, 2008 6:53 am UTC
Forum: Coding
Topic: Funniest/Most Annoying Code Comments
Replies: 662
Views: 146233

Re: Funniest/Most Annoying Code Comments

In my CS class, whenever I was declaring a function that took two doubles as parameters, I would do this: void dostuff(double, double); //toil and trouble I know the feeling. Here's another one I can never resist: long time; /* know C */ Some legacy code I work on has a warning: // demons lurk here
by b0b
Sat Sep 22, 2007 5:49 pm UTC
Forum: Music
Topic: Music Jokes
Replies: 133
Views: 52022

A mindreader is at a nightclub one night and decides to give a small demonstration of her abilities. First, she reads the mind of the lead guitarist: "Wow, look at all the cute chicks who showed up tonight! Good crowd!" Then the drummer: "Lots of people showed up tonight...Great! we'r...
by b0b
Thu Aug 30, 2007 6:41 pm UTC
Forum: Music
Topic: Music Jokes
Replies: 133
Views: 52022

What's the difference between a banjo and a trampoline?






You don't have to take off your shoes to jump on a banjo.
by b0b
Mon Aug 27, 2007 5:42 pm UTC
Forum: Coding
Topic: Java Servlet Redirect
Replies: 10
Views: 12850

I wouldn't chose GET & POST based on "pretty". They are not the same thing. They have different behaviors as far as caching, repeatability, how they are handled in the browsers history, and much more. Actually, I would include "pretty" as one of those behavioral aspects. I h...
by b0b
Mon Aug 27, 2007 5:34 pm UTC
Forum: Coding
Topic: Java Servlet Redirect
Replies: 10
Views: 12850

What are you doing that actually requires javascript? There are *very* few applications that can't be written just fine without it. We have a requirements to update a portion of a page without a full refresh, and to send signals to a Flash object embedded in the page. Javascript is the most straigh...
by b0b
Wed Aug 22, 2007 3:16 pm UTC
Forum: Coding
Topic: Java Servlet Redirect
Replies: 10
Views: 12850

Depends on the type of redirect. 302 should redirect a POST with POST, but most (all?) browsers ignore that. 303 should always redirect with GET (what most browsers do for 302 anyway) 307 should use the same method as the original request, but is supposed to confirm the redirect with the user if th...
by b0b
Wed Aug 22, 2007 3:55 am UTC
Forum: Coding
Topic: First Real Language
Replies: 5
Views: 2263

That kind of program should be pretty easy in C# or Java. Both languages have a lot of support for internet and UI. At this point I'm looking seriously at ActionScript 3 (Flash). I'm not ready to recommend it yet, though. I'm not sure that it would support peer-to-peer connections well enough for yo...
by b0b
Wed Aug 22, 2007 3:30 am UTC
Forum: Coding
Topic: Coding a hex grid?
Replies: 19
Views: 11041

It would waste some memory, but it might be easier to traverse if the '|' lines in your diagram were actually cells with null contents. (Think of "dark matter". :wink: ) If you have blind spots for "north" and "south", it might work. (0,0) (nul) (0,2...
by b0b
Wed Aug 22, 2007 3:04 am UTC
Forum: Coding
Topic: Java Servlet Redirect
Replies: 10
Views: 12850

Java Servlet Redirect

I have a Java servlet. I want to do a HttpServletResponse.redirect to another URL, but I want to add some parameters at the same time. Problem is, I don't want the new parameters to be visible in the URL. In other words, I want to do a redirect with additional POST parameters. Is this even possible?...
by b0b
Mon Aug 20, 2007 6:09 pm UTC
Forum: Coding
Topic: Unit Testing of Visual Attributes
Replies: 3
Views: 1470

For example, a recent bug involved compositing a source image into a graphic preview JPEG and into a final PDF. In one case, a new "maintain aspect ratio" flag was not being observed in the PDF generation. The bug only occurred when the source image was a PNG file with dpi<150. Seems that ...
by b0b
Mon Aug 20, 2007 4:29 pm UTC
Forum: Coding
Topic: Unit Testing of Visual Attributes
Replies: 3
Views: 1470

Unit Testing of Visual Attributes

I understand the value of unit testing. I've written Java test classes using Junit, and I endorse the concept in theory. I'd love to use the XP model of writing unit tests for everything I do. Validation of results is a real problem, though. Many of the things I write output graphics. Whether the re...
by b0b
Fri Aug 17, 2007 11:59 pm UTC
Forum: Music
Topic: Unusual musical instruments
Replies: 29
Views: 5376

My Williams double-12 pedal steel is one-of-a-kind. As far as we know, there's never been another D-12 with crossover linkage (the pedals can be switched from one neck to the other via a mechanical lever). I love it! Also, I have a Rickenbacker pedal steel built in 1962. Rickenbacker lap steels are ...
by b0b
Fri Aug 17, 2007 11:48 pm UTC
Forum: Music
Topic: Pentatonic Scales
Replies: 32
Views: 8098

Here's a little pedal steel improv using a pentatonic tuning:

http://soundhost.net/b0b/4th_fret_.mp3
by b0b
Thu Aug 16, 2007 6:32 pm UTC
Forum: Forum Games
Topic: Limericks
Replies: 270
Views: 58009

There was a programmer named Gus
Who spent all his nights in a fuss.
As he lay in bed
What went through his head
Was (while !asleep()) sheep++;
by b0b
Wed Aug 15, 2007 11:57 pm UTC
Forum: Music
Topic: Lyrics that really speak to you
Replies: 89
Views: 11707

My Baby's Eyes

There are millions of stars in the sky, but none shine as bright as my baby's eyes I only wish that I could see, with all the wonder and love that my baby sees How it must feel to see things all new, feel there's nothing you couldn't do Fly like a bird and feel free as one to, wish I could start ov...
by b0b
Wed Aug 15, 2007 11:47 pm UTC
Forum: Music
Topic: To vibrate or not to vibrate
Replies: 9
Views: 3042

Your teacher is teaching you to play better. He wants you to hit the notes solidly and in tune, because that's where good technique starts. Once you've mastered that, you have better control of your instrument, which in turn can be used to produce really sweet vibrato when you want to. I played with...
by b0b
Tue Aug 14, 2007 11:57 pm UTC
Forum: Music
Topic: What do you play?
Replies: 274
Views: 37108

I play pedal steel guitar, other steel guitars and marimba. I can play electric bass in a pinch, if necessary. I can also read a guitarist's fingers to get the chords, but my left hand can't really do the things that guitar players do.

I've only been playing marimba for two years, but I love it!
by b0b
Mon Aug 13, 2007 7:23 pm UTC
Forum: Coding
Topic: Java Books
Replies: 34
Views: 10710

Re: Java Books

I think I will get Java in a nutshell once they come out with the new version. I wouldn't really use it all that much yet. No signs on the net of it coming out anytime soon. :( I don't think there's much in it that's version-specific. "Java in a Nutshell" contains the basic information th...
by b0b
Fri Aug 10, 2007 7:06 pm UTC
Forum: Computer Science
Topic: Programmers: Math nerds or Artists?
Replies: 68
Views: 19337

I'm an artist. I write creative code and creative music. The difference is that the creativity in the code is accessible to very few, while the creativity in the music is accessible to many people. I can't even explain the art of programming to my friends. Other coders are the only ones who can real...
by b0b
Fri Aug 10, 2007 6:21 pm UTC
Forum: Music
Topic: Music Jokes
Replies: 133
Views: 52022

A C, an E-flat, and a G go into a bar. The bartender says: "Sorry, but we don't serve minors." So, the E-flat leaves, and the C and the G have an open fifth between them. After a few drinks, the fifth is diminished and the G is out flat. An F comes in and tries to augment the situation, bu...
by b0b
Fri Aug 10, 2007 4:35 am UTC
Forum: Music
Topic: The first album you bought?
Replies: 148
Views: 22017

"MEET THE BEATLES"
by b0b
Fri Aug 10, 2007 4:31 am UTC
Forum: Music
Topic: Pentatonic Scales
Replies: 32
Views: 8098

Here's a pentatonic pedal steel tuning that I used a long time ago. The pentatonic notes of the basic string tuning are the leftmost column: http://www.b0b.com/sgwest/pp7806p3.gif I gave up playing the pentatonic tuning for a long time, but then rediscovered it a few years ago. Currently the back ne...
by b0b
Fri Aug 10, 2007 2:55 am UTC
Forum: Coding
Topic: Java Books
Replies: 34
Views: 10710

Re: Java Books

Is Java In A Nutshell a good book for me? The newest version was printed in 2005, making it about version 5.0, is that really a big issue? It's the most used Java book on my bookshelf. It succinctly answers all syntax questions, and describes the parameters of the standard tool set. It also has an ...
by b0b
Thu Aug 09, 2007 11:38 pm UTC
Forum: Coding
Topic: Alternatives to the dreaded goto
Replies: 114
Views: 19356

a) That doesn't help you when an error condition is detected inside of a loop. b) Having multiple levels of indentation like that detracts from readability. It makes the error handling a central part of the flow, which is backwards -- you should be able to read the non-error case by reading straigh...
by b0b
Thu Aug 09, 2007 9:00 pm UTC
Forum: Coding
Topic: Alternatives to the dreaded goto
Replies: 114
Views: 19356

... How much, exactly, do you code in C, when you never need to free memory, close files or release locks? Like I said, I haven't written C in quite a while. The initial question related to C#. I've been using OOP for so long that C's problems are no longer relevant to my work. Still, a C function ...
by b0b
Thu Aug 09, 2007 8:44 pm UTC
Forum: Coding
Topic: Alternatives to the dreaded goto
Replies: 114
Views: 19356

Re: Alternatives to the dreaded goto

I haven't written C in a long time, but generally I would return an error code to the calling function. From what I've seen, most people use goto because their functions are too large and not structured well. I won't say that goto is evil or anything like that, but I haven't found a need for it in ...
by b0b
Thu Aug 09, 2007 5:03 pm UTC
Forum: Coding
Topic: Couple Java programs.
Replies: 23
Views: 3515

The default value of the primitive boolean type in Java is false. When you declare a boolean and don't set it, its value is false. Booleans in a boolean[] will similarly be set to false on creation of the array, by virtue of the type. boolean [] used = new boolean[26]; Notice that the creation synta...
by b0b
Thu Aug 09, 2007 4:31 pm UTC
Forum: Coding
Topic: Alternatives to the dreaded goto
Replies: 114
Views: 19356

Re: Alternatives to the dreaded goto

Post ways you implement to avoid using unnecessary goto statements. I believe that all goto statements are unnecessary. I haven't written one in decades. And the Linux kernel is full of them. What language to you use? If C, how do you handle errors? Not that goto is the only way to do so, but it's ...
by b0b
Mon Aug 06, 2007 10:13 pm UTC
Forum: Coding
Topic: WEIRD bug
Replies: 19
Views: 3104

If you had used a 3-dimensional array in your class implementation, the bug probably wouldn't have appeared. But now that you've found it, leave well enough alone!
by b0b
Mon Aug 06, 2007 9:52 pm UTC
Forum: Coding
Topic: Alternatives to the dreaded goto
Replies: 114
Views: 19356

Re: Alternatives to the dreaded goto

Rippy wrote:Post ways you implement to avoid using unnecessary goto statements.


I believe that all goto statements are unnecessary. I haven't written one in decades.
by b0b
Mon Aug 06, 2007 9:04 pm UTC
Forum: Coding
Topic: WEIRD bug
Replies: 19
Views: 3104

necroforest wrote:(*t0) de-references a class pointer; the (u,v,w) is parameters to the function
Image::operator()(int,int,int);


Operator overloading - I should have guessed! :?

Glad you got it figured out.
by b0b
Mon Aug 06, 2007 8:56 pm UTC
Forum: Coding
Topic: WEIRD bug
Replies: 19
Views: 3104

This is in C++, right? I've never seen this syntax before:

(*t0)(u,v,w)

Is it the same as

( (*t0)[u,v,w] )

:?:

I assume that you've done this sort of thing before, and that the order of precedence for the operations is as expected...
by b0b
Mon Aug 06, 2007 8:45 pm UTC
Forum: Coding
Topic: WEIRD bug
Replies: 19
Views: 3104

My best guess is that you're accidentally accessing memory past the end of t1. Since you've allocated t2 directly after t1, that memory is accidentally contiguous with t1 and accessing it via pointer arithmetic is "safe". I didn't work through all of your arithmetic to find the actual bug....
by b0b
Mon Aug 06, 2007 8:34 pm UTC
Forum: Coding
Topic: Languages that handle infinite recursion
Replies: 40
Views: 8069

Yah, taggedunion, what exactly do you think 'char blah[]' compiles to? const char *blah ... ; Very good MrSparkle. Now what exactly is unsafe/unportable/incorrect about an equivalent statement? (the lack of const on the first is not equivalent, but const can just be added and the ability to change ...
by b0b
Fri Jul 27, 2007 5:37 pm UTC
Forum: Coding
Topic: A few problems i've been having with game programmin in Java
Replies: 18
Views: 3312

Does anyone have any ideas on taking up less memory in general? There's no way for me to make these images any smaller in pizel size, and the one I'm using as a test track is a fraction of a size that the average one is going to be. How about reducing the bit depth of the pixels? Using 5 bits red, ...
by b0b
Wed Jul 25, 2007 5:35 pm UTC
Forum: Coding
Topic: Languages that handle infinite recursion
Replies: 40
Views: 8069

Re: Languages that handle infinite recursion

Are there any languages that would be able to do the following (entered in pseudocode)? define function sum (x) { return x + sum (0.5 * x)} sum (1) And return a value of 2? There's no way out of that infinite loop. I think that in some environments this would work:...
by b0b
Wed Jul 25, 2007 5:23 pm UTC
Forum: Coding
Topic: A few problems i've been having with game programmin in Java
Replies: 18
Views: 3312

That answers that question I guess. Does anyone have any ideas on taking up less memory in general? There's no way for me to make these images any smaller in pizel size, and the one I'm using as a test track is a fraction of a size that the average one is going to be. You can set the max heap size ...
by b0b
Tue Jul 24, 2007 6:09 am UTC
Forum: News & Articles
Topic: How Not To Get Caught Goofing Off At Work
Replies: 12
Views: 3551

It's good to keep a deck of cards in your desk drawer, just in case of a power outage. 8)

Go to advanced search