Quantcast

Maximum PC

It is currently Fri Oct 24, 2014 9:56 pm

All times are UTC - 8 hours




Post new topic Reply to topic  [ 52 posts ]  Go to page Previous  1, 2, 3
Author Message
 Post subject: Re:
PostPosted: Thu Aug 12, 2010 7:32 pm 
Bitchin' Fast 3D Z8000*
Bitchin' Fast 3D Z8000*
User avatar

Joined: Tue Jun 29, 2004 11:32 pm
Posts: 2555
Location: Somewhere between compilation and linking
SanguineumCaelum wrote:
In ECE they actually have discussed optimization but thats low level(MIPS,SPARC,IA32,BASIC), and programming projects for some of those classes stipulate solving a problem in a certain number of instructions, which does directly correlate with efficiency most of the time.

CSC courses you only get direct assistance with code if you cant get it working, no regards to optimizing. If thats the state of the industry i feel a good deal better although real optimization in anything high level is on the list of things i wish i knew.

Instead of learning to "optimize" high-level code, what you'll learn in your CS courses is to select the right algorithm(s) and data structure(s) to solve a problem. This is far more significant than learning to optimize a given piece of code. Analogy: We've been given the task of digging up 100 yards of pipe in a backyard. You decide to "micro-optimize" by practicing with a shovel and increasing your aerobic capacity. You're able to dig at 3x the rate of me. OTOH, I "macro-optimize" and work on techniques for locating the pipe within the yard. On average, I am able to reduce the area dug to less than 10% of the total. [I would also add that I decided to use a back-hoe... but that isn't necessary]

Who will complete the task first? Well, it is going to depend on the yard, right? If it is long and narrow, then you're likely win because you'll be digging faster and in the correct spot. In the best case, you'll finish 3x faster (ie when my search-space reduction techniques don't help). However, if the yard is say 10 acres, my reduction of the "search-space" is much more significant than your fast shovel.

The real-world is full of both types of problems. Sometimes you need to do something fairly straight-forward and simple in a small search space. This might be a good candidate for some "micro-optimizations". Sometimes you'll be working in a large search space like chess or whether a complicated circuit is SAT, these will require "macro-optimizations" and sometimes approximations because the optimum answer would take too long to complete.


Top
  Profile  
 
 Post subject: Re: Programmers can't program...
PostPosted: Fri Aug 13, 2010 4:23 am 
SON OF A GUN
SON OF A GUN
User avatar

Joined: Mon Nov 01, 2004 5:41 am
Posts: 11605
I should hope you know where the pipe is before you start digging :)


Top
  Profile  
 
 Post subject: Re: Programmers can't program...
PostPosted: Fri Aug 13, 2010 8:32 am 
Java Junkie
Java Junkie
User avatar

Joined: Mon Jun 14, 2004 10:23 am
Posts: 24226
Location: Granite Heaven
Best analogy ever. Every thing I needed to know about laying pipe, I learned in college.


Top
  Profile  
 
 Post subject: Re: Programmers can't program...
PostPosted: Fri Aug 13, 2010 8:50 am 
SON OF A GUN
SON OF A GUN
User avatar

Joined: Mon Nov 01, 2004 5:41 am
Posts: 11605
Jipstyle wrote:
Best analogy ever. Every thing I needed to know about laying pipe, I learned in college.

Also known has "a dark time in Jip's sexuality".


Top
  Profile  
 
 Post subject: Re: Programmers can't program...
PostPosted: Fri Aug 13, 2010 8:56 am 
Java Junkie
Java Junkie
User avatar

Joined: Mon Jun 14, 2004 10:23 am
Posts: 24226
Location: Granite Heaven
CrashTECH wrote:
Jipstyle wrote:
Best analogy ever. Every thing I needed to know about laying pipe, I learned in college.

Also known has "a dark time in Jip's sexuality".


I refer to it as my apprenticeship, actually. :P


Top
  Profile  
 
 Post subject: Re: Programmers can't program...
PostPosted: Sat Aug 14, 2010 11:50 pm 
Bitchin' Fast 3D Z8000*
Bitchin' Fast 3D Z8000*
User avatar

Joined: Tue Jun 29, 2004 11:32 pm
Posts: 2555
Location: Somewhere between compilation and linking
Um, it was supposed to be an analogy for computational complexity, not college sexuality!


Top
  Profile  
 
 Post subject: Re: Programmers can't program...
PostPosted: Mon Aug 23, 2010 4:28 am 
SON OF A GUN
SON OF A GUN
User avatar

Joined: Mon Nov 01, 2004 5:41 am
Posts: 11605
One man's trash is another man's treasure.


Top
  Profile  
 
 Post subject: Re: Programmers can't program...
PostPosted: Tue Dec 14, 2010 7:00 pm 
8086
8086

Joined: Tue Aug 04, 2009 3:42 pm
Posts: 20
How about this, come to think of it? I'm really not sure how efficient it might be (it's hard to compare Perl to other languages) though.
Code:
use MIME::Base64;print map{$r=ord;map{(++$i,'Buzz','Fizz','FizzBuzz')[$_]."\n"}(3&($r),3&($r>>2),3&($r>>4),3&($r>>6))}split//,decode_base64"EAZJMIRBEgxhkARDGCTBEAZJMIRBEgxhkA"


Top
  Profile  
 
 Post subject: Re: Programmers can't program...
PostPosted: Wed Dec 15, 2010 7:24 am 
Java Junkie
Java Junkie
User avatar

Joined: Mon Jun 14, 2004 10:23 am
Posts: 24226
Location: Granite Heaven
Please stop bumping threads that are months (one almost a year) old.


Top
  Profile  
 
 Post subject: Re: Programmers can't program...
PostPosted: Wed Dec 15, 2010 1:27 pm 
8086
8086

Joined: Tue Aug 04, 2009 3:42 pm
Posts: 20
"Bumping" is posting a meaningless message to bring the thread back to the top of the forum. What I did was "ask about".


Top
  Profile  
 
 Post subject: Re: Programmers can't program...
PostPosted: Wed Dec 15, 2010 2:11 pm 
Java Junkie
Java Junkie
User avatar

Joined: Mon Jun 14, 2004 10:23 am
Posts: 24226
Location: Granite Heaven
Bumping, in this context, is replying to a thread and bringing it back to the top of the folder.

Whether you agree with the semantics or not, please don't do this.


Top
  Profile  
 
 Post subject: Re: Programmers can't program...
PostPosted: Fri Dec 17, 2010 5:20 am 
SON OF A GUN
SON OF A GUN
User avatar

Joined: Mon Nov 01, 2004 5:41 am
Posts: 11605
At least what was posted was relevant.


Top
  Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 52 posts ]  Go to page Previous  1, 2, 3

All times are UTC - 8 hours


Who is online

Users browsing this forum: No registered users and 3 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
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group

© 2014 Future US, Inc. All rights reserved.