English Amiga Board


Go Back   English Amiga Board > Coders > Coders. General

 
 
Thread Tools
Old 10 June 2006, 04:15   #61
BippyM
Global Moderator
 
BippyM's Avatar
 
Join Date: Nov 2001
Location: Derby, UK
Age: 48
Posts: 9,355
Quote:
Originally Posted by Calgor
@ant512
Never learned ASM, since they didnt use it at school/uni/work, but have always wanted to just so I could do cool things on my Amiga. Which is why it is great bippym is driving that!

heheeh thanks

68k asm is something I always wanted to learn and was never able to (Like ant I learned alot via trial and error).. Now I have the books, the contacts and plenty of ppl both trying to help us and also others wanting to learn that I think a new tour de force of amiga game programmers is just around the bend

My long term 68k ambition is to program a decent game or 2.. It'll be a long, long way off and I have already talked to 1 or 2 ppl regarding possible co-ops

Hopefully I'll get my asm dev-hdf working properly and then I'll start moving forward
BippyM is offline  
Old 12 June 2006, 14:22   #62
Doc Mindie
In deep Trouble
 
Join Date: Sep 2004
Location: Manchester, Made in Norway
Age: 51
Posts: 841
Hehe, Bippy... MY longterm goal with the AmigaCoding, is to make a Linux-ish version in AmigaE....... would prolly be real crap, but hey... at least I could say "I made it"
Doc Mindie is offline  
Old 12 August 2006, 17:34   #63
Steril
 
Posts: n/a
Quote:
Originally Posted by ant512
I would kill to have a l33t coder working with me.

I did three interviews the other day - we were recruiting a new coder to help on a project I took over nearly a year ago. One of the main problems I have with it is the way the previous guy structured the system, and I wanted to make sure that the new guy understood enough about computer science not to make the same mistake. Basically, the data looks like this:

Code:
                  M                Main object
                  |
          ----------------
          |    |     |    |
          S    S     S    S        Sub objects
       ----  ----  ----  ----
       |  |  |  |  |  |  |  |
       S  S  S  S  S  S  S  S     More sub objects
The previous guy had made a hell of a mess, representing each object with a different class.

I drew this out for all three candidates, mentioning things like "recursion", emphasising the similarity of the data within the objects at each level (you could, perhaps, just use one class to represent all of the objects if you planned it carefully), stressing the need for a simple interface to the whole structure, and I even mentioned the possibility of adding new levels of sub-objects, maybe even to n levels (where n is any integer greater than 2).

Not one of them mentioned the magic word I was looking for. Can anyone guess which classic data structure I wanted them to recognise? Remember, three people failed this test, each of whom claimed to have 10 years coding experience, an impressive mixture of languages (including i386 asm and C++), and were trying to get a job paying in excess of £30k a year.
check out 'Design Patterns' by Erich Gamma and some others...especially the "Decorator Pattern" might help you a lot next time with Object oriented designs getting out of bound...
 
Old 16 August 2006, 02:57   #64
MacTO
Registered User
 
MacTO's Avatar
 
Join Date: Dec 2004
Location: Hogtown, Canada
Posts: 16
I started out copying programs out of Compute's Gazette for my Commodore 64 in the mid 1980s and tried to learn a bit of programming from there. Didn't have much success though, until I reached middle school and found a more experienced person to talk to (a teacher who I wouldn't have for another year or to). Eventually I took younger students under my wings, and that helped me to learn even more. Needless to say, I started with BASIC. Eventually I hopped over to C++, then learned about C (proper), and finally learned to love block structured programming in Pascal.

As for this C vs. C++ thing: the language that you choose depends upon the project and the programmers involved. Procedural programming is not backwards, it is simply one model among many. Different models are applicable in different circumstances, and those circumstances depend as much on the programmer as the problem. (For example: I have seen people who are perfectly comfortable with stack langauges.) Since most of the programming I've done has been related to science research, the procedural model fits quite well. I've also worked with Motif, and could only thing "my god, why didn't they use classes." Context is important.

As for the efficiency bit, as an end user I am fed up with programmers who choose inefficient development tools to fit their needs. Why? Because I'm fed up with upgrading just to do the stuff that my old computer was great for. But you pretty much need to hop on to this treadmill in order to stay compatible with the outside world. So please pay attention to those extra bytes and milliseconds, because when they are distributed across enough code they account for significant bloat.
MacTO is offline  
Old 14 September 2006, 16:58   #65
jaycee
Registered User
 
Join Date: Sep 2006
Location: Norwich, UK
Posts: 57
For me, I started with the Spectrum when I was 8 years old, fiddling with the examples in the manual, type-in's from magazines etc... eventually learned enough to write my own stuff. I did try z80 assembler but couldn't get my head around it at 11 years old

I got an Amiga 600 for xmas when I was 14, and also got the Amiga Format magazine with AMOS on it. Started coding AMOS, and about 2 years later got fed up with it and started to learn 68000 assembly... from code on Aminet, and by hacking into other peoples code (with the good old Monitor program by Timo Rossi!)

In 1996, I went to college where we were doing Pascal... learnt Pascal very quickly (3 months) and this got me into the PC... I bought my own, and started learning C on Visual C++ 4 with a copy of this book. Learnt C++ a bit later on (although I still don't know things like how to use templates properly, and the STL)

In 1999 I met Paul Burkey, the author of Foundation... I helped him get started on the PC and also helped him make some updates to Foundation as he had just sold it to e.p.i.c Interactive (now Runesoft). From there, e.p.i.c approached us both to port SimonII to the Amiga and Mac. I learnt x86 assembly and ported the core of the game, and Paul wrote the Amiga and Mac specific code.

Boring eh!
jaycee is offline  
Old 15 September 2006, 09:08   #66
musashi5150
move.w #$4489,$dff07e
 
musashi5150's Avatar
 
Join Date: Sep 2005
Location: Norfolk, UK
Age: 42
Posts: 2,351
That sounds pretty cool to me I never felt at home with x86 assembler... it never felt as neat or friendly as 68k. Or maybe I just didn't try hard enough?
musashi5150 is offline  
Old 15 September 2006, 15:40   #67
jaycee
Registered User
 
Join Date: Sep 2006
Location: Norwich, UK
Posts: 57
it's not as neat and friendly at all... I know enough about it to be able to write some simple routines, and to translate someone else's written code back to C!
jaycee is offline  
Old 23 September 2006, 08:30   #68
cdoty
RasterSoft Dev
 
cdoty's Avatar
 
Join Date: Feb 2005
Location: Manteno IL
Posts: 58
Send a message via ICQ to cdoty Send a message via AIM to cdoty
I started on a TS-1000 (ZX-81). My amiga programming started with a demo that had source code in it. I can't remember the name of the demo, but it had the mod file about 'collecting trash in your brain' in it (http://www.modarchive.com/cgi-bin/do...gi/T/trash.mod). I wrote the source out on paper, and studied it... I was able to get my own raster demo going from this...

The demo was SportMad.

Last edited by cdoty; 23 September 2006 at 08:47.
cdoty is offline  
Old 23 September 2006, 15:25   #69
sniperchaz
Zone Friend
 
sniperchaz's Avatar
 
Join Date: Jul 2006
Location: MARGATE UK
Age: 62
Posts: 33
Quote:
Originally Posted by bippym
So how did you learn?

Did you take books and study, copy example code etc?
Did you just disassemble and play with code to see what it did
Did you learn about the hardware first or learn to program first?


Tips, tips, tips
I have just been reading though this thread Im not a coder but i am trying to learn obvously the thread had slightly diverged into which is the best code to learn ie ASM,C, C++ etc etc personaly i would have thought (from a begginers point of veiw) the best way to learn is with the very basics of coding and working your way up like learning any language or new skill once you have an understanding of the fundimental basics of computing then you could diversifieyand expand your knowledge or take the shortcut approach and just jump in using all manner of coding tools at youre disposal and have them virtual write the programmes for you.what has amaized methe most reading some of the posts arguing which codes the best is nobody has said there all the best depending on your needs and what it is you want to develope also that code is always EVOLVING into a NEWER type of code its goto to keep up with the new technologies that are developing so its irrelavent arguing whats best in ten years time youl have one univeral code that can write any programme you care to mention with no buggs errors etc the first time you use it my self im going to learn AMOS and ASM just becouse i want to lol
sniperchaz is offline  
Old 23 September 2006, 22:57   #70
Big-Byte
Long time member
 
Big-Byte's Avatar
 
Join Date: Jul 2001
Location: UK
Posts: 754
Back on topic.... better get the hankies out..

When I was very young all my friends had computers before me. Spectrums actually. I used to go round thier houses and play on them and everytime xmas or birthdays came round Id badger my parents for one.

One birthday came round and this time there was a great box shape present which made me excited but I felt there was something wrong - the box was too big to be a spectrum or any other decent computer that I knew of. So I opened it with trepidation to find... an Amstrad PCW Wordprocessor wtf?!?! Being 13 years old at the time you could guess how thrilled I was. My dad said at the time it will be good for me to learn about computers and not play games etc..

Well after a few minutes I got bored of Locoscript and turned the disk over to see what CPM and Mallard Basic was.. and that was the start of my programming.. At one point I used to try to copy the listings from Amstrad Action in (which were for the CPC computers) and tweak them to make them work on the PCW which was very hard as it had no graphics commands! but that was how I learnt the basics.

I did write a few programs though and two got published in 8000 plus (which I got £25 and £10 for) - of which I still have a copy.

Then about 3 years after I had my PCW I bought myself an Amiga and bought devpac and Amiga reference guide and along with various tutorials (Amiga Computing demo tutorial, The Menace tutorial) and a lot of help from my mate I taught myself how to write demos etc..
Big-Byte is offline  
Old 24 September 2006, 00:06   #71
mr.spiv
Registered User
 
mr.spiv's Avatar
 
Join Date: Aug 2006
Location: Finland
Age: 52
Posts: 244
Quote:
Originally Posted by bippym
So how did you learn?

Did you take books and study, copy example code etc?
Did you just disassemble and play with code to see what it did
Did you learn about the hardware first or learn to program first?


Tips, tips, tips
Self taught (which unfortunately shows even today) starting with Speccy's BASIC. Then shortly after Z80 asm.. as there was so much hype and 3l337 glamour around it. BASIC books came with the machine when I got it.

I used to write a lot of games & programs from listings published in magazines at that time. I guess that contributed a bit.

About hardware I knew that much if I put the lead from PSU into my mouth it hurts..

mr.spiv is offline  
Old 25 September 2006, 06:06   #72
jaycee
Registered User
 
Join Date: Sep 2006
Location: Norwich, UK
Posts: 57
...and then you wrote the awesome Stonecracker which I used to use for packing pretty much everything Sure, CrM packed better but Stc was damn fast! I one-filed IK+ with it and it decompressed in less than a second on my stock A1200

Thanks
jaycee is offline  
Old 03 October 2006, 17:25   #73
cdoty
RasterSoft Dev
 
cdoty's Avatar
 
Join Date: Feb 2005
Location: Manteno IL
Posts: 58
Send a message via ICQ to cdoty Send a message via AIM to cdoty
Quote:
Originally Posted by musashi5150
That sounds pretty cool to me I never felt at home with x86 assembler... it never felt as neat or friendly as 68k. Or maybe I just didn't try hard enough?
X86 is as much about swapping registers as it is about the algorithm or efficient code.
cdoty is offline  
Old 04 October 2006, 10:58   #74
jaycee
Registered User
 
Join Date: Sep 2006
Location: Norwich, UK
Posts: 57
Thats why they have so much L1 cache... the lack of registers is made up for by the fact that local vars on the stack will inevitably be cached in L1, thus making up the speed. Also... dont forget that it's quite easy to assume MMX is available now, so you get 8 64-bit wide registers.

Things are a lot better in x86-64 though... AMD had the great idea to make more general purpose registers available
jaycee is offline  
Old 24 October 2006, 05:59   #75
Oscar Castillo
Junior Member
 
Oscar Castillo's Avatar
 
Join Date: Nov 2001
Location: New Jersey, USA
Posts: 291
Send a message via AIM to Oscar Castillo
VIC 20 BASIC, Simon's BASIC and the Super Expander BASIC for the C64. From there on to Turbo Pascal, Turbo C. As much as I would of liked to code more on the Amiga, I never coded much since Imagine was busy rendering away on it most of the time. Currently using Objective-C, Java, C# and SQL Server.
Oscar Castillo is offline  
Old 29 March 2007, 01:48   #76
Yesideez
(2b)||!(2b)
 
Yesideez's Avatar
 
Join Date: Mar 2007
Location: Cranbrook, Devon, UK
Age: 50
Posts: 241
Apologies for resurrecting an old topic but felt I had to add to this one.

I started coding on the Spectrum, C64, BBC, Dragon and Oric all at the same time by visiting computer shops and using their computers. Went onto borrowing the neighbour's Sinclair ZX48, then had a C64, then BBC B, then Amstrad 6128, then A500 1.3, then A1200 3.0 and used BASIC on every single one until I had the A1200 which was when I had my first hard drive. Going through so many machines meant I had quite an understanding of BASIC. Oh, learnt Pascal at college and used a few other machines through time.

With having an Amiga with a hard drive meant I could branch out into other languages. I eventually settled with Amiga E and assembler. One thing that I loved with E was the ability to jump between E and assembler and back with so much ease.

Couldn't afford manuals until a mate gave me his legit copy of DevPac then I was away. One group I was in had a great asm coder who helped me out with various bits of code and a mate in Australia did the same. Released some small tools and OS fixes of existing software (pre 1.3 to KS2+), a few music packs etc.

I knew all about bits (MSB, LSB, AND, OR, XOR, NOT etc.) and it's incredible how many SQL users I've met who know what SIGNED/UNSIGNED is but don't know how the computer stores negative numbers. Still amazes me now when I meet people who don't know this stuff.

I hate VB and other languages with a vengeance as I feel they don't have to know much about what thy're doing - most is done for them. Even basic stuff like opening a window and handling its event calls for example.

Quote:
Originally Posted by Ray Norrish
haha.. I know your sort
One of my programmers has some ludicrously unreadable style. In the corporate programming environment, there's no room for l33t stylee
All my coding has been off the top of my head, wading right in and getting hands dirty straight away. Sod the flow charts and diagrams - complete waste of time. Every program I write is properly laid out with meaningful variable names. I've worked on projects with others who write messy code and always end up having to edit their code making it readable before I can do anything with it.

I also like to optimise my code wherever possible and as someone mentioned before, my code also runs 10x faster than that of others, is more readable, easily edited and basically much better than that of someone who spent a couple days doing a thesis before coding.

Last edited by Yesideez; 29 March 2007 at 01:58.
Yesideez is offline  
Old 30 March 2007, 17:27   #77
Spellcoder
Spellcoder
 
Spellcoder's Avatar
 
Join Date: Aug 2006
Location: The Netherlands
Age: 44
Posts: 27
I started out with basic on a c64 when I was 6 (1986)... Basicly I saw a nephew write his name a thousand times on the screen and it looked funny so I wanted to do it too .

At about 9 I got more interested and wanted to learn more than for/next/goto/input/print. So my dad bought an book for kids on how to program on c64/spectrum/etc.
Later that year my dad bought an Amiga, so I started using Amiga Basic.
About a year later I switched to AMOS Basic which was much easyer, faster, better... AMOS really sparked my interest into programming, so much that I even read the complete manual .

In 1998 I learned 680x0 assembler with some tutorials I downloaded from Aminet and AsmOne and AsmPro.
First I made some cli programs, later I tried aga-fixing some stuff and I tried to make a intro/demo later.
Between 1998-2001 I wrote these things:
  • program to convert end of line characters to other formats
  • a cardreader, but my friend who made the hardware never wrote down his hardware schematics so no-one can use it
  • aga fixed Biplanes Duel (original and ozone-friendly version)...
    later I even made a version with a menu with F1/F2/F3 in which you could change the amount of clouds and would be able to choose between keyboard/joystick.
  • age fixed version of Transplant (mostly consisted of a recoded loader)
  • ripped intros from exe's, bootblocks, trackdisk and made them standalone for a guy from #amigaexotic (Guffaw)
  • wrote a crappy AMOSPro program that cleaned up the messy output some disassemblers produced (for example got pages of empty dc.l data which it changed into blk command)
  • a bootblock with simple textscroller
  • an never finished assembler tutorial (for cool96 and some other guy?)
  • RunIntro
    an kind of KillAGA program which not only try to run old stuff, but also run intros as a slideshow.
    After a set amount of time it would copy back the first MB of chipram, set back the original stackpointer etc and then run the next intro. never released.
  • a never released intro
    this was meant to run fullspeed on OCS machines and had a fullscreen 4 bitplane 1x1 sinusscroller done with the blitter (with a big font), a starfield done with sprites and some AHX music I made myself. Never released it, I think beside me only zeg from #amigaexotic seen/has it.
From 1998-2002 ?
I had to do some coding on the PC for my study, so I working in Turbo Pascal, Turbo C, Visual Basic 6.
Wrote some battle.net telnet & diablo2 protocol bots with VB6 which could send game-related stuff (character info) to a website I made. When Microsoft dropped support for VB6 I've totally stopped using VB6.

From 2003-now
Mostly writing webapplications in PHP and Javascript in OO style. Wrote a not-finished CMS system in PHP and a on-/offline webapplication that has a mapsystem (kind of like google maps), video-player (for dvd) and some gui elements (slider) that's used for some DVD's about wind/watermills and in a traffic-education project in the Netherlands.


Having programmed on the Amiga and trying to get max. performance still influences my coding style. I still enjoy optizing and playing with bit logic in PHP/Javascript, and large XML documents make feel sad for wasting resources (but at least I can get to people I work with to understand how to edit them ).
If/when I had the time I would/will certainly finish my unfinished Amiga projects, because I had great fun coding on the Amiga .

Last edited by Spellcoder; 30 March 2007 at 17:42.
Spellcoder is offline  
Old 31 March 2007, 10:21   #78
Haakon
Registered User
 
Join Date: Sep 2004
Location: Norway
Age: 49
Posts: 180
Quote:
Originally Posted by Yesideez
I also like to optimise my code wherever possible and...
Quote:
Originally Posted by Spellcoder
Having programmed on the Amiga and trying to get max. performance still influences my coding style.
Just a tiny, tiny off topic question:

I'm a non-coder today and still try to find out where my life went wrong . But; i have asked this for Amiga programmers earlier; how do you know when your code is optimized? The answer then was they knew because of their knowledge of how many clock-sequences each operator needed... On a 64K language i guess that is easier than on todays machines...?

How do you measure that on the PC? How do you optimize the program?
Haakon is offline  
Old 31 March 2007, 16:22   #79
Yesideez
(2b)||!(2b)
 
Yesideez's Avatar
 
Join Date: Mar 2007
Location: Cranbrook, Devon, UK
Age: 50
Posts: 241
@Haakon: I never fully optimised as far as I could have, learning CPU cycles was a bit much for me at the time although I did learn some. Optimising code isn't only CPU cycles, its down to the structure of the code as well. I mainly concentrated on using functions and procedures wherever I could (not repeating code) and other menial stuff like using "bxx.b" wherever possible instead of plain "bxx"

Also stuff like:
Code:
        jmp         labelhere
instead of
Code:
        jsr         labelhere
        rts
Another way is using loops instead of repeating commands or a sequence of commands.

Although I have a feeling someone's gonna pull that apart

Last edited by Yesideez; 31 March 2007 at 16:28.
Yesideez is offline  
Old 01 April 2007, 13:02   #80
Kalms
Registered User
 
Join Date: Nov 2006
Location: Stockholm, Sweden
Posts: 237
@Haakon:
On a high level, the code is optimized when you're not doing more iterations than necessary through your loops. For instance, if you want to know which out of a set of 1000 2D sprites that are overlapping (and you know that 90% will not be overlapping), how many iterations are you doing? 1000000? 100000? 10000? 1000? 100?

On an intermediate level, the code is optimized when you keep intermediate results from operations around so you don't need to unnecessarily re-calculate them a little while later.

On a low level, the code is optimized when there isn't much "fluff" between instructions that do the actual work.

Orthogonal to this is memory access: the code is optimized when you touch as few cachelines of memory as possible while performing the actual work. Memory access patterns affect the analysis on all levels.

There are two ways of knowing whether or not the code is optimized: estimate how much time it could take in the optimum case, and then either guess how much time your current implementation takes -- or measure it. "Profilers" are programs which perform that kind of measuring. A good profiler is extremely helpful; it can analyze the entire program at once, and in a few seconds you get an overview of which parts of the program are slower than expected.
Kalms is offline  
 


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

Similar Threads
Thread Thread Starter Forum Replies Last Post
External windows program communicating with program running inside WinUAE xxxxx support.WinUAE 10 19 February 2013 09:27
I want to learn about Workbench mancity support.Apps 26 21 May 2012 06:14
To Late To Learn How To Program On The Commodore 64? Kitty Retrogaming General Discussion 10 01 November 2009 21:11
Want to learn how to dissassemble games Keeks Coders. General 7 06 November 2008 18:10
A little lesson to learn about Pong MethodGit Retrogaming General Discussion 7 07 December 2001 13:03

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 18:45.

Top

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Page generated in 0.10637 seconds with 13 queries