[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 113: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 113: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 113: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 113: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 113: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 113: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 113: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 113: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 113: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 113: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 113: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 113: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
The Nightstar Zoo • View topic - Premature Optimization Considered Harmful

The Nightstar Zoo

Nightstar IRC Network - irc.nightstar.net
It is currently Sun May 19, 2019 1:22 am

All times are UTC - 6 hours [ DST ]




Post new topic Reply to topic  [ 13 posts ] 
Author Message
PostPosted: Thu Oct 06, 2005 9:50 am 
Offline
Nightstar Graveyard Daemon
User avatar

Joined: Mon Jun 03, 2002 8:30 pm
Posts: 1071
Location: Wouldn't you rather observe my Velocity?


Top
 Profile  
 
 Post subject:
PostPosted: Thu Oct 06, 2005 11:37 am 


Top
  
 
 Post subject:
PostPosted: Thu Oct 06, 2005 12:34 pm 
Offline
Nightstar Graveyard Daemon
User avatar

Joined: Mon Jun 03, 2002 8:30 pm
Posts: 1071
Location: Wouldn't you rather observe my Velocity?


Top
 Profile  
 
 Post subject:
PostPosted: Fri Oct 07, 2005 8:45 pm 
Fair enough; in retrospect, I was making the point too strongly, and should have stated it as a recommendation or something to consider doing, rather than an absolute rule. As you may have noticed, I tend to get carried away by my own rhetoric, often with absurd results. :roll: Part of it is from having been in too many projects that used no revision control at all, or used it lacksidasically, with disasterous results.


Top
  
 
PostPosted: Sat Oct 08, 2005 3:26 pm 


Top
  
 
PostPosted: Sat Oct 08, 2005 7:24 pm 
Offline
Nightstar Graveyard Daemon
User avatar

Joined: Mon Jun 03, 2002 8:30 pm
Posts: 1071
Location: Wouldn't you rather observe my Velocity?


Top
 Profile  
 
 Post subject:
PostPosted: Sat Oct 08, 2005 7:43 pm 
Offline
Nightstar Graveyard Daemon
User avatar

Joined: Mon Jun 03, 2002 8:30 pm
Posts: 1071
Location: Wouldn't you rather observe my Velocity?
One other thought. When I write code I don't typically slap in O(n<sup>2</sup>) code.

I have spent 20 years learning to wite code, and I write code that is much faster and much more readable than I did a decade ago. When confronted with a problem, I tend to throw in the easiest solution that seems to fit, and frequently these are faster than the naiive or trivial solution. If I know two ways to do a thing, and one is O(n) and the other is O(k), I will typically use the O(k) method if it's maybe less than twice as complex.

It is good to understand and know how to write fast code.

What I am after here is that peculiar itch that programmers the world over seem to get, to explore complicated new solutions to problems that don't exist. If you know quicksort by heart, go ahead and use it instead of bubblesort. If you only know bubblesort and want to learn a new sorting method and you have the time to do this, go ahead and invest the time educating yourself. But don't go inventing a new type of sort just because you're sure bubblesort is too slow. Now you're just wasting time and complicating the code, and you're going to end up with a muddled implementation of radixsort that gains you nothing and makes other programmers wonder what the heck you were thinking. ("Radixsort is used when the entire sortable set doesn't fit in available memory at one time... yet this array is maybe 1k in size, and we've got a gig of RAM. What's going on?")


Top
 Profile  
 
PostPosted: Sun Oct 09, 2005 2:39 pm 


Top
  
 
PostPosted: Sun Oct 09, 2005 7:46 pm 
Offline
Nightstar Graveyard Daemon
User avatar

Joined: Mon Jun 03, 2002 8:30 pm
Posts: 1071
Location: Wouldn't you rather observe my Velocity?


Top
 Profile  
 
PostPosted: Sun Oct 09, 2005 11:38 pm 


Top
  
 
PostPosted: Mon Oct 10, 2005 11:14 am 


Top
  
 
 Post subject:
PostPosted: Mon Oct 10, 2005 11:46 am 
Offline
Nightstar Graveyard Daemon
User avatar

Joined: Mon Jun 03, 2002 8:30 pm
Posts: 1071
Location: Wouldn't you rather observe my Velocity?


Top
 Profile  
 
 Post subject:
PostPosted: Mon Oct 10, 2005 3:07 pm 


Top
  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 13 posts ] 

All times are UTC - 6 hours [ DST ]


Who is online

Users browsing this forum: No registered users and 0 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group