Search found 135 matches

by biolution
Sat Jan 31, 2009 7:55 pm UTC
Forum: Coding
Topic: worst bugs ever (or your most hated)
Replies: 196
Views: 22382

Re: worst bugs ever (or your most hated)

4 bytes should be enough for -anybody-. Next thing you're going to ask for is more than a megabyte of ram, huh? Damn kids.
by biolution
Tue Jan 27, 2009 4:33 am UTC
Forum: Coding
Topic: worst bugs ever (or your most hated)
Replies: 196
Views: 22382

Re: worst bugs ever (or your most hated)

That is so awesome. A real y2k bug!
by biolution
Wed Dec 10, 2008 12:24 am UTC
Forum: Coding
Topic: Funniest/Most Annoying Code Comments
Replies: 662
Views: 146116

Re: Funniest/Most Annoying Code Comments

(Incidentally: why isn't there a dictionary comprehension syntax? {k:v for etc} is much prettier than dict((k,v) for etc), but meh..) http://docs.python.org/dev/3.0/whatsnew/3.0.html#new-syntax Dictionary comprehensions: {k: v for k, v in stuff} means the same thing as dict(stuff) but is more flexi...
by biolution
Sun Dec 07, 2008 8:41 am UTC
Forum: Coding
Topic: worst bugs ever (or your most hated)
Replies: 196
Views: 22382

Re: worst bugs ever (or your most hated)

Current most hated bug: Our webapi server uses some 3rd party libraries for RPC requests. For better performance, we pool the RPC connections and set their "POOLED" bit. Unfortunately, this pooled bit also prevents the closing of the underlying socket when the connection is "closed&qu...
by biolution
Wed Nov 19, 2008 1:51 am UTC
Forum: Coding
Topic: Funniest/Most Annoying Code Comments
Replies: 662
Views: 146116

Re: Funniest/Most Annoying Code Comments

That's nothing. I've posted this elsewhere, but here's some real Java code I've written: class InvertibleNavigableMapImpl<K, V> extends AbstractInvertibleMap<K, V, NavigableMap<K, V>, NavigableMap<V, K>, InvertibleNavigableMapKeySet<K, V, InvertibleNavigableMapImpl<K, V>>, InvertibleNavigableMapKey...
by biolution
Wed Nov 19, 2008 1:40 am UTC
Forum: Coding
Topic: Funniest/Most Annoying Code Comments
Replies: 662
Views: 146116

Re: Funniest/Most Annoying Code Comments

Code: Select all

public Map<String, Map<String, List<String>>> getCTI() {


Well, really, I could have posted any java code...but that one was particularly bad.
by biolution
Thu Oct 02, 2008 9:11 am UTC
Forum: Coding
Topic: Funniest/Most Annoying Code Comments
Replies: 662
Views: 146116

Re: Funniest/Most Annoying Code Comments

Saw this the other day in a code review:

Code: Select all

private static final int TEN = 10;
by biolution
Mon Aug 18, 2008 4:54 am UTC
Forum: Coding
Topic: Funniest/Most Annoying Code Comments
Replies: 662
Views: 146116

Re: Funniest/Most Annoying Code Comments

I wrote this the other day:

Code: Select all

for(int byte_= feeder.read(); byte_!= -1; byte_= is.read()) {
  eater.write(byte_);
}


Hey, it was funny to me late at night.
by biolution
Fri Aug 15, 2008 7:00 am UTC
Forum: Coding
Topic: MySQL Query... Filtering?
Replies: 7
Views: 1802

Re: MySQL Query... Filtering?

Some databases can setup synonyms or links. Think of it like a symlink, but with database table names. A view might also get you what you're after. I don't know the specifics for mysql.
by biolution
Fri Aug 15, 2008 6:16 am UTC
Forum: Coding
Topic: Python......mail server....
Replies: 43
Views: 10446

Re: Python......mail server....

I skimmed thread since it turned into a python debate, so i might have missed something on topic that someone said. Anyways, I've probably spent the last 9 months dealing with sendmail, postfix, lots of python, and we're developing a new mail server (based on Apache James) in java. That all being sa...
by biolution
Sat Aug 09, 2008 10:12 pm UTC
Forum: Coding
Topic: Funniest/Most Annoying Code Comments
Replies: 662
Views: 146116

Re: Funniest/Most Annoying Code Comments

Correct. The 'True' and 'False' constants were added in 2.3, iirc.
by biolution
Fri Aug 01, 2008 3:31 am UTC
Forum: Coding
Topic: Funniest/Most Annoying Code Comments
Replies: 662
Views: 146116

Re: Funniest/Most Annoying Code Comments

So basically, you copy pasted code from the internet and passed it off as your own without even knowing how or why it works? I'm fairly hard-line on cheaters but I wouldn't call looking up the syntax of something on the web to be cheating, any more than I'd call looking up the syntax in your help d...
by biolution
Thu Jul 31, 2008 4:37 pm UTC
Forum: Coding
Topic: Funniest/Most Annoying Code Comments
Replies: 662
Views: 146116

Re: Funniest/Most Annoying Code Comments

So basically, you copy pasted code from the internet and passed it off as your own without even knowing how or why it works?
by biolution
Tue Jun 10, 2008 4:34 am UTC
Forum: Coding
Topic: Bludgeoning Java into making a generic parser
Replies: 10
Views: 1720

Re: Bludgeoning Java into making a generic parser

biolution wrote:Just as an addendum: static methods are rarely useful. Almost every time I've seen them, they've had to be factored out. Its usually better not make them _not_ static.
by biolution
Sun Jun 08, 2008 4:06 am UTC
Forum: Coding
Topic: Bludgeoning Java into making a generic parser
Replies: 10
Views: 1720

Re: Bludgeoning Java into making a generic parser

Just as an addendum: static methods are rarely useful. Almost every time I've seen them, they've had to be factored out. Its usually better not make them _not_ static.
by biolution
Sat May 24, 2008 6:20 pm UTC
Forum: Religious Wars
Topic: Forced whitespace and tabulation
Replies: 70
Views: 15484

Re: Forced whitespace and tabulation

No, but a multi-line lambda is pretty useless in the grander scheme of things. def Doit(x, y) n = x + y / M(x, y) if n > 10 or n is None: n = D(n) else: n = O(n, x, y) + M(x, y) if not n: n = None return n is a lot easier to read than def main() ... f = lambda x, y: n = x, y ... print f(a, b) print ...
by biolution
Fri May 23, 2008 7:37 pm UTC
Forum: Coding
Topic: Advice needed.
Replies: 13
Views: 1978

Re: Advice needed.

What about finding a few different equations that provide a rough estimate of ship distribution? He said that they'll have fewer larger ships and more small ships, so I'm visualizing a graph with "number of ships" as the y axis, and "ship size" on the x axis. To get an accurate b...
by biolution
Thu May 22, 2008 2:33 am UTC
Forum: Religious Wars
Topic: Forced whitespace and tabulation
Replies: 70
Views: 15484

Re: Forced whitespace and tabulation

Eh? What isn't an object in python? You know I could of sworn that strings, lists, ints and the like weren't objects, but apparently i am wrong. Although, I don't get why I can't do things like: print([1, 2, 3].reverse()) but that's kinda not a big deal. Anyway... >>> help(list.reverse) reverse(......
by biolution
Thu May 22, 2008 1:53 am UTC
Forum: Religious Wars
Topic: Forced whitespace and tabulation
Replies: 70
Views: 15484

Re: Python with braces?

I don't like my white space being a problem personally, but white space still takes up character's in the file. I duno I guess I am coming around to python's way of things, but I still hate that 1) they have data types 2) not everything is an object Its.... an interesting language to say the least....
by biolution
Wed May 21, 2008 3:30 am UTC
Forum: Coding
Topic: Python with braces?
Replies: 8
Views: 17401

Re: Python with braces?

No. Well, you could try this . Seriously, whitespace is not significant in Python except at the beginning of a line. I have never once encountered a whitespace-related problem with Python. Never. Actually, I have fewer problems, because in C you can forget a closing brace and spend a few seconds tr...
by biolution
Sat May 10, 2008 12:31 am UTC
Forum: Coding
Topic: Funniest/Most Annoying Code Comments
Replies: 662
Views: 146116

Re: Funniest/Most Annoying Code Comments

To be really clever, something like this would also work (untested):

Code: Select all

while True
  args = raw_input("=>").split(" ")
  func = getattr(shitlib, args[0], lambda *a, **kw: "Unknown command, try 'help')
  print func(*args[1:])
by biolution
Mon May 05, 2008 4:30 am UTC
Forum: Fit Club
Topic: Yoga!
Replies: 16
Views: 1690

Re: Yoga!

I do yoga off and on; I'm currently taking a Yoga Core fitness class at my school. I've noticed that if you want to increase strength, using weights while you're doing poses (where you have your hands free) helps a lot My main problem is that I am NOT at all flexible, so I have a lot of trouble wit...
by biolution
Sun Apr 20, 2008 8:39 pm UTC
Forum: Coding
Topic: OpenOffice.org (TM)
Replies: 10
Views: 2477

Re: OpenOffice.org (TM)

I'd actually wager that *is* the shortest path according to open source principles.
by biolution
Thu Apr 17, 2008 3:22 am UTC
Forum: Coding
Topic: worst bugs ever (or your most hated)
Replies: 196
Views: 22382

Re: worst bugs ever (or your most hated)

Fun one I finally figured out today. $file_data = base64_encode(file_get_contents($file)); ...much later... $url_data = rawurlencode($data) ...much later... $data = wddx_serialize_value($url_data); ...save to db... While not technically incorrect (shouldn't need to urlencode it in this instance), it...
by biolution
Mon Apr 14, 2008 5:56 pm UTC
Forum: Coding
Topic: worst bugs ever (or your most hated)
Replies: 196
Views: 22382

Re: worst bugs ever (or your most hated)

I once spent hours trying to locate a bug in some C code. It kept seg faulting, and I didn't know why. I threw in a printf. It printed what it should have, and didn't seg fault. I took out the printf. It seg faulted. So I made it print out an empty string and went on my not-so-merry way. I don't kn...
by biolution
Mon Apr 14, 2008 2:38 am UTC
Forum: Religious Wars
Topic: Checked Exceptions vs Unchecked Exceptions
Replies: 31
Views: 5183

Re: Checked Exceptions vs Unchecked Exceptions

I find it interesting that Bruce Eckel, who knows something about Java has concluded that checked exceptions are a bad idea . And the reason is exactly that checked exceptions are so annoying that they encourage people to swallow exceptions, which is exactly what you really don't want to do. Readin...
by biolution
Mon Apr 14, 2008 2:00 am UTC
Forum: Coding
Topic: Google releases App Engine
Replies: 15
Views: 2166

Re: Google releases App Engine

Well, they will break, but it won't take more than 20 seconds of work to fix the backwards-incompatibilities that I know of. The only way Python 3 will "break" an existing Python program is when you attempt to execute it with that version of the interpreter . As has already been pointed o...
by biolution
Sat Apr 12, 2008 4:28 am UTC
Forum: Coding
Topic: worst bugs ever (or your most hated)
Replies: 196
Views: 22382

Re: worst bugs ever (or your most hated)

At my job, this ancient CRM program called Goldmine is used. When exporting some stuff for use in MS Excel it comes out as plain text with fields delimited by double quotes and separated by commas. Double quotes are not escaped :x , neither are linebreaks (I dunno why one would cram text areas into...
by biolution
Fri Apr 11, 2008 5:31 pm UTC
Forum: Coding
Topic: worst bugs ever (or your most hated)
Replies: 196
Views: 22382

Re: worst bugs ever (or your most hated)

In php4, when you instantiate a new object, it doesn't automatically call the class's constructor method. :evil: Offtopic: Eh? It does. Php4 and php5 have different constructor names, though. In php5, __construct is called, if it doesn't exist, ClassName() is called (if it exists, o...
by biolution
Fri Apr 11, 2008 6:45 am UTC
Forum: Coding
Topic: Funniest/Most Annoying Code Comments
Replies: 662
Views: 146116

Re: Funniest/Most Annoying Code Comments

I like this one. I also love the fact that in the Java tutorials, they completely gloss over the fact that close() does throw a checked exception. That made trying to learn file io so easy to learn. At the time I wasn't sure what was going on, but when I copypastaed on of their code examples and it...
by biolution
Fri Apr 11, 2008 5:49 am UTC
Forum: Coding
Topic: Funniest/Most Annoying Code Comments
Replies: 662
Views: 146116

Re: Funniest/Most Annoying Code Comments

r1chard wrote:nibbleswap


At first I read "nippleswap." I think my new goal is to enter this term into popculture. "Oh hey, can you nibbleswap this really quick?"
by biolution
Thu Apr 10, 2008 5:29 pm UTC
Forum: Coding
Topic: Database Structure Help
Replies: 11
Views: 1668

Re: Database Structure Help

For some good material on database normalization: http://www.mcs.csuhayward.edu/~billard/cs4660.html The lecture notes and case studies explain things pretty well. Xanthir makes good points. I'm imagining, at the least, the following structure: players(p_id) inventories(p_id, inv_id) items(item_id) ...
by biolution
Thu Apr 10, 2008 5:24 pm UTC
Forum: Coding
Topic: Google releases App Engine
Replies: 15
Views: 2166

Re: Google releases App Engine

segmentation fault wrote:
r1chard wrote:Where on their site does it mention they're going to upgrade to Python 3?


let me rephrase.

i wonder how the release of python 3 will affect this, if at all.


I'd imagine it would completely break it just like all the other python apps. Being as how python3 isn't backwards compatible and all.
by biolution
Thu Apr 10, 2008 6:35 am UTC
Forum: Coding
Topic: Google releases App Engine
Replies: 15
Views: 2166

Re: Google releases App Engine

Well, 500MB is quite within many site's quotas. I think my code + data was about 50-100 all through highschool and college. I was talking about bandwidth quotas. The idea being that running your code on google's servers gives you horsepower and bandwidth, when the quotas actually prevent that. Subj...
by biolution
Wed Apr 09, 2008 5:52 pm UTC
Forum: Coding
Topic: Release Engineering
Replies: 2
Views: 969

Re: Release Engineering

joel on software has a few articles decent articles on this sort of thing. the general things to do though are: a) use a version control system and have seperate branches for dev and qa and release (hopefully this part was obvious) b) automate as much as possible, ideally you only want a human invo...
by biolution
Wed Apr 09, 2008 2:57 am UTC
Forum: Coding
Topic: worst bugs ever (or your most hated)
Replies: 196
Views: 22382

Re: worst bugs ever (or your most hated)

Fun bugs: Database crash because its log file filed up the hard drive ... causing the Appserver crash because the "database went away" Appserver crash because *its* log file filled up the hard drive Appserver crash because someone sent a very special email (we never did find out why it cra...
by biolution
Wed Apr 09, 2008 2:32 am UTC
Forum: Coding
Topic: Release Engineering
Replies: 2
Views: 969

Release Engineering

Ok, so one thing I've been struggling with is trying to figure out a great way to release software. What release means is making resources available to consumers. I made that intentionally vague. A resource is any combination of code, data, configs - whatever goes into making something work. A consu...
by biolution
Tue Apr 08, 2008 11:27 pm UTC
Forum: Coding
Topic: Google releases App Engine
Replies: 15
Views: 2166

Re: Google releases App Engine

I messed around with the SDK. It's really nothing special. django+mod_wsgi = AppEngine - GQL. You also don't benefit from google's scalability since the free accounts have quotas. Well, 500MB is quite within many site's quotas. I think my code + data was about 50-100 all through highschool and coll...
by biolution
Thu Apr 03, 2008 5:40 pm UTC
Forum: Coding
Topic: OpenOffice.org (TM)
Replies: 10
Views: 2477

Re: OpneOffice.org (TM)

Does it still crash linux? Every attachment I download and try to open will hard-lock my linux machine at work. Thank god for the "view as html" option in gmail.
by biolution
Wed Apr 02, 2008 4:41 pm UTC
Forum: Coding
Topic: Funniest/Most Annoying Code Comments
Replies: 662
Views: 146116

Re: Funniest/Most Annoying Code Comments

This is somewhere around line 2000, which is only halfway through the file. // setting the proper ticket type.. /* @note $className isn't a class name, its the ticket type * but we're avoiding potential conflicts with $type and $ticketType * since we don't know if they're being used later (sometimes...

Go to advanced search