Overclock.net - Overclocking.net
     
 
Home Gallery Reviews Blogs Register Today's Posts Mark Forums Read Members List


Go Back   Overclock.net - Overclocking.net > Software, Programming and Coding > Coding and Programming > Application Programming

Reply
 
LinkBack Thread Tools
Old 04-06-08   #11 (permalink)
Programmer
 
intel nvidia

Join Date: Nov 2006
Posts: 1,404

Rep: 91 version2 is acknowledged by some
Unique Rep: 74
Trader Rating: 3
Default

Quote:
Originally Posted by pioneerisloud View Post
Yeah, I have absolutely NO clue what that says. Looks cool though. Looks like oober 1337 haxorz attempts!!!
It's funny how I spend my time reading code rather than compiling it...

It looks, overall, like relatively simple code, but a good way to learn and expand upon the C++ language. Now I'm just starting to learn C++ myself.
__________________
System: Duo
CPU
Core 2 Duo E6600 B2
Motherboard
Asus P5B Deluxe
Memory
G.SKILL HZ 2x1gb DDR2 800
Graphics Card
EVGA 9600GSO 384mb
Hard Drive
WD 640gb, Maxtor 160gb
Sound Card
Audigy 2 ZS
Power Supply
FSP 450W
Case
Ultra Aluminus
CPU cooling
Freezer Pro 7
GPU cooling
Stock
Monitor
20.1'' SOYO LCD (Wide)
version2 is offline   Reply With Quote
Old 04-06-08   #12 (permalink)
4.0 GHz
 
majin death's Avatar
 
intel nvidia

Join Date: Nov 2007
Location: Tahlequah, OK
Posts: 916

Rep: 46 majin death is acknowledged by some
Unique Rep: 41
Trader Rating: 0
Default

Quote:
Originally Posted by Sgt.Collins View Post
so what kind of application is it
Looks to be a couple of number converters.
__________________
When will JAGeX and Valve work together to make the perfect game?

System: 純粋なケーキの操業
CPU
Intel Pentium Dual Core E2200
Motherboard
ABIT IP35-E
Memory
G.SKILL 2x2GB DDR2 800
Graphics Card
EVGA 9600GT SC 512MB
Hard Drive
Seagate 80 & 160GB 7200.7 IDE/SATA
Sound Card
Onboard
Power Supply
Rosewill RP550-2 550W W/ Gunmetal Finish
Case
Moded Generic MSI ATX
CPU cooling
Intel Stock with Copper Core
GPU cooling
Stock With AS5
OS
Vista Ultimate SP1 x64 / Ubuntu 7.10
Monitor
Acer 22" AL2216W & Compaq MV740 17" CRT
majin death is offline   Reply With Quote
Old 04-06-08   #13 (permalink)
New to Overclock.net
 
Join Date: Apr 2008
Posts: 6

Rep: 0 rubendodge Unknown
Unique Rep: 0
Trader Rating: 0
Default

K I uploaded the EXE to the boar din my first post. Enjoy guys . Also I'm beta testing / coding a Information saver to save friends numbers,names, etc since I seen it on this board and thought coding one into this program would be awesome .
rubendodge is offline   Reply With Quote
Old 04-06-08   #14 (permalink)
Security Sleuth
 
Pooping^fish's Avatar
 
intel nvidia

Join Date: Jul 2007
Location: oklahoma
Posts: 833

Rep: 36 Pooping^fish is acknowledged by some
Unique Rep: 32
Trader Rating: 0
Default

Hah, that was probably mine.
__________________
Quote:
"O, hai! Want som pRon? Dwnlod ths kodk frst. Its teh bst pRonz ever, we prmis." -GibbyGano
Proud Member of the Linux Gaming Community
I am your friend.

System: CSS Pwner
CPU
e6400 @ 3.2
Motherboard
p5n-t 780i
Memory
2gb ocz @ 900
Graphics Card
8800gtx flashed to 621/2ghz
Hard Drive
7200.10 250gb
Sound Card
X-FI Extreme Music
Power Supply
750w Toughpower
Case
Lian li pc-65
CPU cooling
TR u120 Extreme
GPU cooling
stock
OS
Ubuntu, Vista ult. SP1
Monitor
24" Westy
Pooping^fish is offline   Reply With Quote
Old 04-06-08   #15 (permalink)
PC Gamer
 
Sgt.Collins's Avatar
 
intel nvidia

Join Date: Feb 2008
Posts: 760

Rep: 52 Sgt.Collins is acknowledged by some
Unique Rep: 44
Trader Rating: 0
Default

that is cool! i want to start learning that now
__________________
Quote:
Originally Posted by Dezixn View Post
As long as I can play my steam games on a mac...
OH WAIT...
Well at least mac has the number crunching market...
OH NOES
I suppose they win in the server market...
RUH ROH

System: [Folding]
CPU
Intel Q6600 Quad Core@ 3.0Ghz [Folding]
Motherboard
Abit IP35 Pro[Folding]
Memory
2gb Crucial Ballistix[Folding]
Graphics Card
Nvidia GeForce 8800gt(OEM)[Folding]
Hard Drive
250gb Western Digital SATA[Folding]
Sound Card
Onboard Sound[Folding]
Power Supply
700w OCZ Game X Stream[Folding]
Case
Raidmax Smilodon Extreme Black[Folding]
CPU cooling
Stock[Folding]
GPU cooling
Stock[Folding]
OS
Windows Vista Home Premium 32 Bit[Folding]
Monitor
17" NEC AccuSync LCD[Folding]
Sgt.Collins is offline   Reply With Quote
Old 04-06-08   #16 (permalink)
New to Overclock.net
 
redsox83381's Avatar
 
intel nvidia

Join Date: Apr 2007
Location: Jersey
Posts: 3,403

Rep: 188 redsox83381 is acknowledged by manyredsox83381 is acknowledged by many
Unique Rep: 142
Trader Rating: 12
Default

Ha those are those fun little programs you learn in the first few months. Cool to see them all together like that.
__________________
Put this in your sig if you're an Immortal Technique Soldier
Quote:
Originally Posted by Malcolm X;
Brothers and sisters, and friends -- and I see some enemies. In fact, I think we’d be fooling ourselves if we had an audience this large and didn’t realize that there were some enemies present.

E6300 @ 3.5 Proof

System: My GF bought me a 8800GT but I have no other parts
CPU
--
Motherboard
--
Memory
--
Graphics Card
Palit 8800GT
Hard Drive
--
Sound Card
--
Power Supply
--
Case
--
CPU cooling
--
GPU cooling
--
OS
--
Monitor
--
redsox83381 is online now   Reply With Quote
Old 04-06-08   #17 (permalink)
The Project Keeper
 
Licht's Avatar
 
amd ati

Join Date: Mar 2007
Location: Bel Air
Posts: 8,862
Blog Entries: 3

Rep: 266 Licht is a proven memberLicht is a proven memberLicht is a proven member
Unique Rep: 178
Trader Rating: 0
Default

Buddy, switch statements! I believe that would help you a great deal.

System: (AMD-AMD-ATI)-(CPU-Chip-GPU)
CPU
AMD Athlon X2 5200+
Motherboard
Gigabyte 790X AM2+
Memory
2x 1Gb Kingston && 2x 1Gb Wintec
Graphics Card
Saphire HD 3870
Hard Drive
[RAID0] [2X] WD 160GB 7,200RPM
Sound Card
X-Fi Extreme Gamer Fatality Professional
Power Supply
OCZ Game-X-Stream 700w
Case
NZXT Black Steel
CPU cooling
Stock Heatskin & Fan
GPU cooling
Stock Saphire 3870 Cooling
OS
Windows Vista Home Premium x64 SP1
Monitor
Samsung SyncMaster 19" Widescreen
Licht is offline Overclocked Account Licht's Gallery   Reply With Quote
Old 04-06-08   #18 (permalink)
Programmer
 
kdbolt70's Avatar
 
intel ati

Join Date: May 2007
Location: Walled Lake, MI
Posts: 1,112

Rep: 127 kdbolt70 is acknowledged by manykdbolt70 is acknowledged by many
Unique Rep: 92
Folding Team Rank: 197
Trader Rating: 1
Default

one thing I noticed in the 7 seconds I scanned it, you have no error checking. If the user inputs "banana" as their menu choice, your program isn't going to do anything. I'd A) have a default: statement in your switch statement so if any thing comes through that isn't 1-15, it will print an error and run it again. B) I'd probably make some sort of error checking function that returned true or false if the input was acceptable. Lastly, I'd run that switch statement in a while loop, so people can use more than 1 of your functions when they use the program.

Let me know if you have any questions.
__________________

~M Hail to the Victors M~

System: It's about time!
CPU
Q6600 G0 @3.3Ghz
Motherboard
Gigabyte P35-DS3L
Memory
2Gb Ballistix DDR2 800 @915Mhz
Graphics Card
Sapphire 2900Pro Flashed to XT
Hard Drive
Seagate Barracuda 320Gb
Sound Card
Onboard
Power Supply
Corsair HX 620W
Case
CM 690
CPU cooling
Tuniq Tower 120
GPU cooling
stock
OS
Vista Business and VMWare Ubuntu
Monitor
Acer AL2223W 22"
kdbolt70 is offline I fold for Overclock.net   Reply With Quote
Old 04-07-08   #19 (permalink)
Chiefly Ignorant
 
Scriptorum's Avatar
 
intel nvidia

Join Date: Jan 2008
Location: Atlanta, GA
Posts: 54
Blog Entries: 12

Rep: 13 Scriptorum Unknown
Unique Rep: 10
Trader Rating: 0
Default

Nice program! Now refactor it. Refactoring is changing your code so that it makes adding future functionality EASIER and FASTER.

1. Take everything inside of each case statement and move it to its own function. That's 13-14 functions for you.

2. Look for sets of two of more functions that have similar behavior and vary slightly, then merge each set into a single function using parameters to achieve the varying behavior.

For example, don't the dog years and cat years calculations look similar? What varies between those two snippets? Can you think of how to make a single function with parameters that could calculate dog or cat years AND takes less code than your current implementation?

3. If you're really feeling hopped up and want to try something advanced with classes, now take a look at that switch. Any time you see a big switch you should think about encapsulating what varies. What if you created a "command" object for each function and corresponding English description? (For instance, FibonacciCommand.invoke() writes the Fibonacci sequence to a file. FibonacciCommand.getDescription() returns "Fibonacci Sequence". FibonacciCommand, then, is one of several classes that implements or extends Command, which is either an abstract class or interface that enforces the implementation of invoke and getDescription, and gives your main program a common TYPE to deal with.) Now you can create new instances of the command objects and store them in an array. Loop through the array to print out your menu. When you receive input, look up the object from the array based on the number entered, and invoke the command from said object. Adding more commands to your program is simply creating a new command class and adding an instance of it to the array.

This last kind of refactoring creates a lot of new classes, so it's work with little short term value to show for it. However, it pays off in the long run if you continue to develop this into a large application. The first two refactorings, however, make your code shorter, particularly your main function (which is huge), and makes everything easier to read. A good rule of thumb is if you can't see the entire function on screen at once, it needs to be broken up into smaller functions.

And of course, what was said previously about error checking is totally correct. Error checking good.
__________________
Quote:
Originally Posted by The Bartender Paradox View Post
crazy?...nah. when you cool with a fire extinguisher then your crazy.

System: Flaming Moe's MacBook Pro
CPU
Core 2 Duo
Motherboard
MacBook Pro
Memory
4GB DDR2-667
Graphics Card
512Mb NVIDIA GeForce 8600M GT
Hard Drive
200Gb 7200RPM
OS
OSX 10.5.2 / XP Pro / Boot Camp + Parallels
Monitor
17" Matte 1920x1200
Scriptorum is offline Overclocked Account   Reply With Quote
Old 04-10-08   #20 (permalink)
New to Overclock.net
 
Join Date: Apr 2008
Posts: 6

Rep: 0 rubendodge Unknown
Unique Rep: 0
Trader Rating: 0
Default

Ok I will work on adding some of these ideas. The only real problem is the whole thing about making it be able to restart the app after a operation. I've never done it before so I'm still newbie lol.
rubendodge is offline   Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools



All times are GMT -4. The time now is 11:58 AM.


Overclock.net is a Carbon Neutral Site Creative Commons License Internet Security By ControlScan

Terms of Service / Forum Rules | Privacy Policy | Advertising | Become an Official Vendor
Copyright © 2008 Shogun Interactive Development. Most rights reserved.
Page generated in 0.23519 seconds with 10 queries