Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

liptonlover

macrumors 6502a
Original poster
Mar 13, 2008
989
0
I'm having so much fun... I've been messing around a lot today, just trying different stuff, saving code snippets for easy future use, and using the help document a lot. *Wishes the cocoa book would hurry up and get here*
 

yeroen

macrumors 6502a
Mar 8, 2007
944
2
Cambridge, MA
Welcome to the wonderful world of programming!

May your journey be a fun one. :)

So far he's only experienced the manic phase. Soon enough it'll turn on him and, at the terminal, he'll be hurling curses and execrations that would make a sailor blush; just like the rest of us have at one time or another.
 

sushi

Moderator emeritus
Jul 19, 2002
15,639
3
キャンプスワ&#
So far he's only experienced the manic phase. Soon enough it'll turn on him and, at the terminal, he'll be hurling curses and execrations that would make a sailor blush; just like the rest of us have at one time or another.
Why I never ever did that! :p

BTW, I went through a couple of these. Saved my Mac SE a time or two back in the day.
 

liptonlover

macrumors 6502a
Original poster
Mar 13, 2008
989
0
@ Yeroen - Heheheh I don't swear.... :cool:

@ Sushi - That thing is cute.... I would put it on a shelf instead of beating it to death :D
 

sushi

Moderator emeritus
Jul 19, 2002
15,639
3
キャンプスワ&#
@ Yeroen - Heheheh I don't swear.... :cool:
Oh, you probably will. :eek: ;)

@ Sushi - That thing is cute.... I would put it on a shelf instead of beating it to death :D
Thanks. I went through two of them. Poor guys!

At the time I was using a Mac SE for development, so it was cool to have the Smack-a-Mac sitting beside the real one. And I smacked them good at times.
 

adrian.oconnor

macrumors 6502
Jan 16, 2008
326
3
Nottingham, England
@ Yeroen - Heheheh I don't swear.... :cool:

Heh. That's possibly because:
  • You haven't had to write code to parse a badly designed XML schema...
  • You haven't had to track down a memory leak caused by middle-ware (that you have no control over) and that causes a major application to crash randomly once every few weeks...
  • You haven't had a subtle bug slip through testing that corrupts data (and then had to tell the customer that their data is corrupt because of a bug)...
  • You haven't written a beautiful piece of code, to spec, only to have a dumb-ass manager tell you that they want you to do it differently 'just because'...
  • You haven't been tasked with maintaining some legacy code that turns out to be 3000 lines of horrible spaghetti (which has also been copied, pasted and subtly changed in 5 different files to do 5 very similar jobs)...
I could go on, but that last one has made me start shaking a little. It had a happy ending though - some extreme refactoring turned it in to a 500 line thing of beauty :)

P.S. This is a tip for budding professional programmers: If you ever use copy and paste while programming, you're almost certainly doing something wrong. Do Not Repeat Yourself!

P.P.S. This /is/ a list of things that make you swear, but they don't make programming any less fun. In fact, these things just serve to make the good times even better!
 

liptonlover

macrumors 6502a
Original poster
Mar 13, 2008
989
0
awwwww... :mad:
I spent my memorial day marching in a parade :)
Everyone download my calculator from macupdate, it's called programocalc! I'd love honest not-just-being-nice reviews.
 

lee1210

macrumors 68040
Jan 10, 2005
3,182
3
Dallas, TX
The icon is awfully small.

I can't give input other than that, as when I start it, the program crashes...

May 27 12:57:09 lee-mckeemans-computer crashdump[17221]: Calculator crashed
May 27 12:57:10 lee-mckeemans-computer crashdump[17221]: crash report written to: /Users/lee/Library/Logs/CrashReporter/Calculator.crash.log

Exception: EXC_BAD_ACCESS (0x0001)
Codes: KERN_PROTECTION_FAILURE (0x0002) at 0x00000000

Thread 0 Crashed:
0 libSystem.B.dylib 0x9010c802 _malloc_initialize + 992
1 libSystem.B.dylib 0x900028d7 malloc + 29
2 com.apple.Foundation 0x927e265f _NSAPDataCreate + 26
3 com.apple.Foundation 0x927e1fdd NSPushAutoreleasePool + 37
4 com.apple.AppKit 0x9327f7c1 NSApplicationMain + 62
5 com.yourcompany.Calculator 0x00002938 main + 30
6 com.yourcompany.Calculator 0x000028ee start + 54

-Lee
 

liptonlover

macrumors 6502a
Original poster
Mar 13, 2008
989
0
is your os at 5.0 or higher? It won't work if it isn't. And I don't know why it insists on making the iconset so small, it's a big image...
 

lee1210

macrumors 68040
Jan 10, 2005
3,182
3
Dallas, TX
is your os at 5.0 or higher? It won't work if it isn't. And I don't know why it insists on making the iconset so small, it's a big image...

Ah, nope... I am still on 10.4.xx, so I guess that would do it.

For your icon, do you have a big image, but there's a lot of transparent space around it?

-Lee
 

adrian.oconnor

macrumors 6502
Jan 16, 2008
326
3
Nottingham, England
Everyone download my calculator from macupdate, it's called programocalc! I'd love honest not-just-being-nice reviews.

Nice! That's a cracking start. I have a small bug to report: I can't resize the window - I think the results field is obscuring the corner.

I'd recommend for your next step that you look at using the Segmented Control for the buttons. You could even make it so that one of the operations is always selected, and that the result updates automatically as you type the numbers into the boxes! If that sounds impossible, wait until you learn about delegates and then have a go. Segmented controls also look very good for groups of related buttons, which is what you have here.

Also, you should delete those default menu options so you have just the program default menu and help.

That's a great start though. You quite clearly have the right aptitude and a passion for programming, and that's what makes a great programmer!
 

liptonlover

macrumors 6502a
Original poster
Mar 13, 2008
989
0
@ lee -

sorry I meant 10.5 :D and I think I will remove some alpha settings so it can be used by older OS's.

I used grab to take a snapshot of the window, so the actual image is just that big. But when I put it through IC it turned it into a square image, so yes it does actually. Also a lot of it has an alpha value of .60, I believe there was a warning about that possibly messing it up.

@ adrian -

Not a bug, there's not point in resizing it so I set min and max size restraints. And just on a side note for future reference, if restraints aren't set the field being there does not affect dragging the window size.

Actually that's on my list of things :) I don't think it will be impossible, I'll just do it the old fashioned variables way and wait on delegates. I think it's possible, anyways...

Yeah, but I like them. It makes my calculator look more official :p

Thanks! I have been at it for years! :)

So next up is to get live updates to the result, switching to a segmented control which I just realized will save me a bit of code, and to add some simple graphics. I currently have it, though not released yet, where when you do a calculation the results window spins and then shows the result. But instead I will make it slide in like a drawer then pop out with the result.
 

adrian.oconnor

macrumors 6502
Jan 16, 2008
326
3
Nottingham, England
Not a bug, there's not point in resizing it so I set min and max size restraints. And just on a side note for future reference, if restraints aren't set the field being there does not affect dragging the window size.

Sorry. I was going off the description (and Screenshot) on MacUpdate: http://www.macupdate.com/info.php/id/27628/programocalc

Actually that's on my list of things :) I don't think it will be impossible, I'll just do it the old fashioned variables way and wait on delegates. I think it's possible, anyways...

So next up is to get live updates to the result, switching to a segmented control which I just realized will save me a bit of code, and to add some simple graphics. I currently have it, though not released yet, where when you do a calculation the results window spins and then shows the result. But instead I will make it slide in like a drawer then pop out with the result.

Pop-out drawers are a great thing. I look forward to the next version!
 

liptonlover

macrumors 6502a
Original poster
Mar 13, 2008
989
0
when I updated the listing they decided not to update the description apparently :mad:

just to make sure there's no confusion, I'm not using an actual drawer. I will just resize the results window, to slide it in and back out. Nothing special.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.