Any computer programmers here?

Mike_Yates

Literotica's Anti-Hero
Joined
Jan 5, 2006
Posts
15,449
Is anyone here a computer programmer? Could they answer some questions for me?

What is source code? How do you write source code?

What is a compiler/assembler?

There are Millions or sometimes even Billions of transistors the size of about 30 atoms each inside of a microprocessor. Do you have to write the logical language for the computer to perform your desired task, for each one of these transistors? I can't imagine any single person writing Millions/Billions of lines of code.

Do you have to have a math degree to understand programming?

Do you have to have genius or near-genius intelligence?
 
Computers understand zeros and ones. To write code like that is insane nowadays soooooo......

1. You write source code in one of many programming languages, i.e. C++, Visual Basic, Java, Pascal, etc.
2. You run that source code through a compiler. This converts the instructions you provided via the source code into an executable format the computer's operating system understands. If you make a mistake, the compiler won't understand the instruction and will let you know where your error lies (usually).
3. The computer's operating system insulates the users and the developers from the hardware's inner workings. When you write code and compile it, you only need to know the intended OS so that you can write the correct code and use the correct compiler.
4. No you don't need to have a math degree and no you don't have to be a genius, the Indian kid who writes code for me is a moron. :rolleyes: Good logic is essential however.
 
Code:
Microsoft Macro Assembler  Version 5.10                    5/22/07 09:03:11
sysinit                                                     Page     1-1




				; Initialization for Byron's C&T CS8230 System

				
 0000				primary	segment	use16
					assume	cs:primary,ds:primary,ss:primary
				
 00E0					org	0e0h
					dss	4,mctl		;memory controller data
					dss	1,extf		;if zero, E800-EFFF region found unused
				
 0100					org	100h
 0100				main	proc	near
				
 0100  B8 0305				mov	ax,305h
 0103  33 DB				xor	bx,bx
 0105  CD 16				int	16h		;max keyboard rate, min delay
				
 0107  B8 351E				mov	ax,351eh	;address diskette parameter table
 010A  CD 21				int	21h
 010C  26: C6 47 0A 04			mov	mb es:[bx+10],4	;500ms startup
 0111  26: C6 47 02 FF			mov	mb es:[bx+2],-1	;14-second delay until motor off
				
 0116  E8 048C R			call	sychk		;80386 or later else barf
				
 0119  0F 01 E0				smsw	ax
 011C  24 01				and	al,1
 011E  0F 85 029E R			jnz	pmode		;cpu not in real mode
				
 0122  B0 0A				mov	al,0ah
 0124  E6 22				out	22h,al
 0126  E4 23				in	al,23h
 0128  0A C0				or	al,al
 012A  0F 85 02A5 R			jnz	mcnp		;system has no 82c302
				
				
				; enable 64k ram at A000, 160k-192k ram at C000
				
 012E  B9 0003			mcp:	mov	cx,3
 0131  33 DB				xor	bx,bx
				
 0133  FA				cli			;disable interrupts
 0134  BA 0022			rmcl:	mov	dx,22h		;82c302 controller index port
 0137  B0 0C				mov	al,0ch
 0139  02 C1				add	al,cl
 013B  EE				out	dx,al		;address configuration register
 013C  66| C1 E3 08			shl	ebx,8
 0140  42				inc	dx		;82c302 controller data port
 0141  EC				in	al,dx		;read configuration register
 0142  8A D8				mov	bl,al
 0144  E2 EE				loop	rmcl		;read for FE,DC,BA
 0146  FB				sti			;enable interrupts
				
 0147  66| 89 1E 00E0 R			mov	ml mctl,ebx	;save configuration
 014C  66| 89 1E 0488 R			mov	ml mv2,ebx
 0151  66| B8 0003FFFF			mov	eax,3ffffh
 0157  66| 23 D8			and	ebx,eax
 015A  66| 33 D8			xor	ebx,eax
 015D  0F 85 02AC R			jnz	mcerr		;A000-E7FF must be on I/O channel to start
				
 0161  FA				cli			;disable interrupts
 0162  B8 0DF0				mov	ax,0df0h	;register D, data F0 (B,A)
 0165  E8 01D4 R			call	wctl		;set A000-AFFF system ram, B000-BFFF I/O
 0168  32 C0				xor	al,al		;register E, data 00 (D,C)
 016A  E8 01D4 R			call	wctl		;set C000-DFFF system ram
 016D  A0 00E2 R			mov	al,mctl+2	;prior setting 03-FF (F,E)
 0170  50				push	ax
 0171  24 F0				and	al,0f0h
 0173  E8 01D4 R			call	wctl		;set E000-EFFF system ram, F000-FFFF unchanged
 0176  58				pop	ax
 0177  24 0C				and	al,0ch		;check whether E800-EFFF was in use
 0179  34 0C				xor	al,0ch
 017B  A2 00E4 R			mov	extf,al		;zero if entire region not used
 017E  FB				sti			;enable interrupts
				
				
				; initialize enabled ram to set parity
				
 017F  B8 A000				mov	ax,0a000h
 0182  B9 4000				mov	cx,4000h	;64k/4 (16k dwords)
 0185  E8 01DE R			call	wram		;initialize segment A000-AFFF
 0188  80 C4 20				add	ah,20h
 018B  E8 01DE R			call	wram		;initialize segment C000-CFFF
 018E  80 C4 10				add	ah,10h
 0191  E8 01DE R			call	wram		;initialize segment D000-DFFF
 0194  80 C4 10				add	ah,10h
 0197  F6 06 00E4 R FF			test	mb extf,-1
 019C  74 02				jz	s @f		;region not in use, clear 64k
 019E  D1 E9				shr	cx,1		;clear 32k only
 01A0  E8 01DE R		@@:	call	wram		;initialize segment E000-E[7F]FF
				
				
				; find last mcb in chain
				
 01A3  B4 52			        mov     ah,52h
 01A5  CD 21			        int     21h
 01A7  26: 8B 47 FE			mov	ax,es:[bx-2]
 01AB  8E C0				mov	es,ax		;addr 1st mcb
				
 01AD  33 F6			mcbl:	xor	si,si
 01AF  26: 8B 5C 03			mov	bx,es:[si+3]	;size of block
 01B3  43				inc	bx		;include mcb
				
 01B4  26: 8A 04			mov	al,es:[si]	;mcb flag
 01B7  3C 5A				cmp	al,'Z'
 01B9  74 2D				jz	s lmcb		;end of mcb chain
 01BB  3C 4D				cmp	al,'M'
 01BD  0F 85 02B3 R			jnz	merr		;not an mcb
				
 01C1  8C C0				mov	ax,es
 01C3  03 C3				add	ax,bx
 01C5  8E C0				mov	es,ax		;address next mcb
 01C7  80 FC F0				cmp	ah,0f0h
 01CA  72 E1				jb	mcbl		;continue if not into rom
				
 01CC  BE 0333 R		abug:	mov	si,os mbug
 01CF  B0 FF				mov	al,-1
 01D1  E9 028E R			jmp	errms
				
				
				; write middle ram enable mask register
				
 01D4  86 E0			wctl:	xchg	ah,al
 01D6  E6 22				out	22h,al		;index
 01D8  40				inc	ax
 01D9  86 C4				xchg	al,ah
 01DB  E6 23				out	23h,al		;data
 01DD  C3				ret
				
				; write ram segment ax, length cx
				
 01DE  8E C0			wram:	mov	es,ax
 01E0  33 FF				xor	di,di		;start at 0
 01E2  51				push	cx
 01E3  F3/ 66| AB			rep	stosd		;initialize segment
 01E6  59				pop	cx
 01E7  C3				ret
				
				
				; end block
				
 01E8  26: 8B 44 01		lmcb:	mov	ax,es:[si+1]	;owner
 01EC  0B C0				or	ax,ax
 01EE  74 40				jz	s lbok		;last block is free
 01F0  3D 0008				cmp	ax,8
 01F3  75 35				jnz	s lbpgm		;not system block
				
				
				; block may be a vdisk header, in which case it must be removed
				
 01F5  26: 66| 8B 44 22			mov	eax,ml es:[si+22h]
 01FA  66| 3D 53494456			cmp	eax,53494456h
 0200  75 CA				jnz	s abug		;system block but not vdisk header
				
 0202  06				push	es		;save mcb segment
 0203  B8 3519				mov	ax,3519h
 0206  CD 21				int	21h		;get int 19h vector in es:bx
 0208  8C C0				mov	ax,es
 020A  48				dec	ax		;s/b address of mcb
 020B  59				pop	cx
 020C  3B C1				cmp	ax,cx
 020E  75 BC				jnz	s abug		;int 19 does not vector to this block
 0210  26: 8A 07			mov	al,es:[bx]	;first op code
 0213  3C EA				cmp	al,0eah
 0215  75 B5				jnz	s abug		;not far jump
 0217  51				push	cx		;last mcb segment
 0218  1E				push	ds		;program data segment
 0219  B8 2519				mov	ax,2519h
 021C  26: C5 57 01			lds	dx,es:[bx+1]	;far jump operand
 0220  CD 21				int	21h		;vector to far jump target instead
 0222  1F				pop	ds
 0223  07				pop	es
 0224  26: 89 74 01			mov	es:[si+1],si	;set block as free
 0228  EB 06				jmp	s lbok
				
 022A  8C CB			lbpgm:	mov	bx,cs
 022C  3B C3				cmp	ax,bx
 022E  75 9C				jnz	s abug		;if not this program, then what?
				
				
				; extend mcb chain into enabled middle ram
				
 0230  8C C0			lbok:	mov	ax,es
 0232  26: 03 44 03			add	ax,es:[si+3]
 0236  3D 9FFF				cmp	ax,9fffh
 0239  75 91				jnz	s abug			;ram must end at 9FFF:0
				
 023B  26: 81 44 03 0FFF		add	mw es:[si+3],0fffh	;extend block to seg AFFE
 0241  26: C6 04 4D			mov	mb es:[si],'M'		;not last block
				
 0245  B8 AFFF				mov	ax,0afffh
 0248  8E C0				mov	es,ax
 024A  26: C6 04 4D			mov	mb es:[si],'M'
 024E  26: 66| C7 44 01 10000008	mov	ml es:[si+1],10000008h	;set 64k system block over video area
				
 0257  B8 C000				mov	ax,0c000h
 025A  8E C0				mov	es,ax
 025C  26: C6 04 5A			mov	mb es:[si],'Z'		;new last block
 0260  B8 3000				mov	ax,3000h		;set 192k size
 0263  F6 06 00E4 R FF			test	mb extf,-1
 0268  74 03				jz	s @f			;E800-EFFF region not in use
 026A  80 EC 08				sub	ah,8			;reduce 32k (160k)
 026D  26: 89 44 03		@@:	mov	es:[si+3],ax		;set size
 0271  26: 89 74 01			mov	es:[si+1],si		;owner (free)
				
 0275  C1 E8 06				shr	ax,6			;from paragraphs to kilobytes
 0278  05 02C0				add	ax,704			;total with ram added to mcb chain
 027B  8E C6				mov	es,si
 027D  26: A3 0413			mov	mw es:[413h],ax		;system memory size
				
 0281  B8 5801				mov	ax,5801h
 0284  BB 0001				mov	bx,1
 0287  CD 21				int	21h			;set best-fit allocation strategy
				
				
				; Termination
				
 0289  BE 0366 R		exit:	mov	si,os mcrlf
 028C  32 C0				xor	al,al
 028E  66| C7 06 0484 R 035B	errms:	mov	ml mv1,os pmsg
	R			
 0297  E8 038B R			call	msout		;write message to stdout
 029A  B4 4C			error:	mov	ah,4ch
 029C  CD 21				int	21h		;exit
				
				
				; Problems
				
 029E  BE 02BA R		pmode:	mov	si,os pmms
 02A1  B0 01				mov	al,1
 02A3  EB E9				jmp	s errms
				
 02A5  BE 02D7 R		mcnp:	mov	si,os not302
 02A8  B0 02				mov	al,2
 02AA  EB E2				jmp	s errms
				
 02AC  BE 02FC R		mcerr:	mov	si,os ooctl
 02AF  B0 03				mov	al,3
 02B1  EB DB				jmp	s errms
				
 02B3  BE 0320 R		merr:	mov	si,os mcbms
 02B6  B0 04				mov	al,4
 02B8  EB D4				jmp	s errms
				
				
 02BA				pmms:	da	<êcannot run in virtual modeà>,0
 02D7				not302:	da	<ê82c302 memory controller not foundà>,0
 02FC				ooctl:	da	<êunexpected middle ram mapping: è6à>,0
 0320				mcbms:	da	<êbroken mcb chainà>,0
 0333				mbug:	da	<êincomprehensible memory configurationà>,0
				
 035B				pmsg:	da	<àsysinit: >,0
 0366				mcrlf:	da	<êmiddle ram enabled and initializedà>,0
				
 038B				main	endp
 04E1				primary	ends
					end	main

Source code is on the right, machine code is on the left.
 
There are Millions or sometimes even Billions of transistors the size of about 30 atoms each inside of a microprocessor. Do you have to write the logical language for the computer to perform your desired task, for each one of these transistors? I can't imagine any single person writing Millions/Billions of lines of code.
Joe Rockstar answered the rest but this part is interesting, too.

Even at the assembly language level, code isn't designed to handle each of those nano-transistors. I can't say it's impossible to, it just doesn't do that.

Let us just say that, to the best of my knowledge, these transistors are the lowest level of chip construction. If they had a language that actually addressed each transistor - which, to my knowledge, they do not - it would be a lower level language than anything you'll learn in college.

FYI, an operating system like Linux (just the kernel, in fact) is made up of ~10 million lines of code, and perhaps even more lines of code are involved in MS Windows. No one person does that - that takes many, many people to do.
 
Do you have to have a math degree to understand programming?

Do you have to have genius or near-genius intelligence?

Most people concentrate in either business or scientific programming. But in any Computer Science program you need math through calculus. A majority of programming jobs are in the business area, so a bit of statistics and financial math is helpful. You do need a bachelors degree. But there are areas like network engineering you can get into with an associates.

Programming in if itself is just part of what you need to learn. Software design is important. There are many IT jobs you can focus on: Like computer security or business analysis. You don't need to be a genius. But it is a field where you do need to have a strong interest, otherwise you will go batty.
 
Joe Rockstar answered the rest but this part is interesting, too.

Even at the assembly language level, code isn't designed to handle each of those nano-transistors. I can't say it's impossible to, it just doesn't do that.

Let us just say that, to the best of my knowledge, these transistors are the lowest level of chip construction. If they had a language that actually addressed each transistor - which, to my knowledge, they do not - it would be a lower level language than anything you'll learn in college.

FYI, an operating system like Linux (just the kernel, in fact) is made up of ~10 million lines of code, and perhaps even more lines of code are involved in MS Windows. No one person does that - that takes many, many people to do.
Jesus... what an ignorant dope.
 
Most people concentrate in either business or scientific programming. But in any Computer Science program you need math through calculus.
No, actually, Calculus isn't relevant to programming computers.

Logic is.
 
Well, if true, that's some ridiculous bullshit.

Computer science degrees are usually conferred through either the Math department or Engineering department of the university. Each of them has Calculus as a requirement for a degree. Most degree requirements are structured for breadth and depth, and four quarters of Calculus and some Differential Equations are a reasonable depth requirement.

If a person can't do Calculus, the chances of being able to handle the logic for computer programming are pretty slim.
 
Computer science degrees are usually conferred through either the Math department or Engineering department of the university. Each of them has Calculus as a requirement for a degree. Most degree requirements are structured for breadth and depth, and four quarters of Calculus and some Differential Equations are a reasonable depth requirement.

If a person can't do Calculus, the chances of being able to handle the logic for computer programming are pretty slim.
That's crap. You're not a computer programmer, I guess.

I've taken both. And Calculus has no relation to programming computers. None.
 
So is Numerical Analysis

I know, but calculus classes are required for most computer science degrees.

Very few IT professionals ever write a numerical application

Calculus is a means to an end. That is, an exploration to how a problem can be solved as opposed to a solution. Example: Integration via series
 
Very few IT professionals ever write a numerical application

Calculus is a means to an end. That is, an exploration to how a problem can be solved as opposed to a solution. Example: Integration via series
That makes no sense at all.
 
Computer science degrees are usually conferred through either the Math department or Engineering department of the university. Each of them has Calculus as a requirement for a degree. Most degree requirements are structured for breadth and depth, and four quarters of Calculus and some Differential Equations are a reasonable depth requirement.

If a person can't do Calculus, the chances of being able to handle the logic for computer programming are pretty slim.
This is absolutely true. I went through all of those classes plus entry level discrete math just to get a MIS/CIS. It was so traumatically difficult that I don't even remember much of my life during that period when I took those classes.
 
That's crap. You're not a computer programmer, I guess.

I've taken both. And Calculus has no relation to programming computers. None.

You're not a computer programmer, I guess.

I've worked with programmers who went to a diploma mill and got some kind of diploma or certificate without taking any real math. They were often hard working people, but they were often slower to pick up concepts.

Yes, most people who program are not doing differentiation or integration or Taylor series. But people who have studied those things tend to be better at temporal logic.
 
You're not a computer programmer, I guess.
Bah. Who would want to be in that field now unless you learn Hindu? There's absolutely nothing you can do as a programmer here that can't be done cheaper in some offshore hell hole.

Yes, most people who program are not doing differentiation or integration or Taylor series. But people who have studied those things tend to be better at temporal logic.
Yes, it's good exercise for the logic centers in the brain (so to speak). Absolutely necessary for being a high-end programmer.

So has anyone figured out P=NP yet?
 
hey, I used QBasic to interpolate an integral using Simpson's rule. Does that count? :confused:
 
You're not a computer programmer, I guess.
You just guessed wrong.

I've worked with programmers who went to a diploma mill and got some kind of diploma or certificate without taking any real math. They were often hard working people, but they were often slower to pick up concepts.
Whatever.

Yes, most people who program are not doing differentiation or integration or Taylor series. But people who have studied those things tend to be better at temporal logic.
:rolleyes:

You obviously don't know what you're talking about.
 
You just guessed wrong.

Whatever.

:rolleyes:

You obviously don't know what you're talking about.

I don't know what sort of programming you do, but you don't seem to know anything about electrical engineering. Are you one of the SQL people?
 
Joe Rockstar answered the rest but this part is interesting, too.

Even at the assembly language level, code isn't designed to handle each of those nano-transistors. I can't say it's impossible to, it just doesn't do that.

Let us just say that, to the best of my knowledge, these transistors are the lowest level of chip construction. If they had a language that actually addressed each transistor - which, to my knowledge, they do not - it would be a lower level language than anything you'll learn in college.

FYI, an operating system like Linux (just the kernel, in fact) is made up of ~10 million lines of code, and perhaps even more lines of code are involved in MS Windows. No one person does that - that takes many, many people to do.

Crysis certainly makes use of the Billions of nano-transistors inside my computer. ALL of them! It makes them sweat too!

Crysis probably has more lines of code in it than any operating system ever made.

http://i739.photobucket.com/albums/xx36/bermantelevision/Warhead6-1.jpg?t=1295989423

http://i739.photobucket.com/albums/xx36/bermantelevision/Warhead7.jpg?t=1295989482

http://i739.photobucket.com/albums/xx36/bermantelevision/Warhead2.jpg?t=1295989523
 
Crysis certainly makes use of the Billions of nano-transistors inside my computer. ALL of them! It makes them sweat too!

Crysis probably has more lines of code in it than any operating system ever made.

Games like that actually make your graphics card sweat more than anything since it has to render all the images on the fly.
 
Back
Top