Jump to content


Check out our Community Blogs

G_Morgan

Member Since 15 Oct 2007
Offline Last Active Aug 29 2017 02:51 PM
-----

#584582 What's the difference between Java and Java2?

Posted by G_Morgan on 20 December 2010 - 01:19 AM

That is because the Java 2 term has simply become confusing. Java version 7 is effectively Java 2 version 1.7 (try taking the Java 7 link and replace the 7 in the url with 1.7.0). The Java 2 part was dropped for version 6 precisely to avoid the confusion that this thread highlights. The fact is the original Java 1 is entirely irrelevant. There is only one Java line and that is Java 2 which is now known simply as Java. The latest version of this is Java 6 and Java 7 is the new release that might come out eventually.
  • -1


#409594 Most useful languages?

Posted by G_Morgan on 21 November 2008 - 10:39 AM

It's worth noting that learning the most popular language is by no means the best way to get a job. Think about this, people never pay well for the common.

While something like Python certainly has fewer positions available there are also fewer programmers. It turns out that the jobs/programmers ratio is larger for things like Python than it is for C# or Java. Also some companies use it as a filter, Google asks for Python experience for nearly all it's staff even though they use very little of the language itself.

Also if you want to be absolutely certain of a job the best language is COBOL. There's an absolute mountain of COBOL code out there still in use by big financial institutes that needs maintenance work and integration with more modern infrastructure. Comparatively almost nobody learns COBOL because they, rightly, reason that nobody writes new programs in COBOL. Boring work though, I couldn't do it. Not to mention that COBOL is an awful language.

I'd say you are better off with balance. I wouldn't rush to learn Java and C# because they fill the same roles as high volume languages where programmers are imminently replaceable. However I would learn one of them. I would look at learning a high level scripting language like Ruby or Python. I would also learn C++ and C. Remember you are looking at providing a wide range of skills. Companies have unforeseeable needs and a programmer with some breadth to their skills will do better.

The most important thing is to be able to point at a project and say 'I wrote this'. Employers will care more about your ability to reason about a problem and produce a working design than they ever will about your ability to memorise syntax, class libraries or your mad skillz. An actual working project is better than an interesting implementation of a function. Being able to describe how modules fit together is better than being able to recite how you create an anonymous inner class in Java. Whether this is an open source project, a small application you sell over the web or something only you use doesn't really matter. The fact you can produce work is what will interest them.
  • 1


#394089 Why compiled exe doesn't run other systems?

Posted by G_Morgan on 11 October 2008 - 09:51 AM

Your 64bit system should be able to cross compile for 32bit if you want to avoid messing around setting up a second build environment.
  • 1


#351052 C Or C++

Posted by G_Morgan on 16 April 2008 - 04:47 AM

I use all three TBH. I use Emacs for coding Lisp so utilise a little elisp in programming that. Scheme's simplicity and first class continuations give it some benefits. CL I use for most of my work.

SBCL is my favourite Lisp implementation but it only works well on Unix (the Windows port is a work in progress). I install packages using asdf-install which is the CL equivalent to Perl's CPAN (though has far fewer packages than CPAN naturally). Asdf-install comes pre-installed with SBCL but I think many CL implementations require you to install it manually (most will come with asdf though).

CLiki : ASDF-Install

CLiki : asdf
  • 1


#346832 computer architecture

Posted by G_Morgan on 27 February 2008 - 03:08 PM

There are a couple of decent OSDev tutorials out there

OS Development

Bona Fide OS Development News

These will have a lot of information on the various low level hardware (I mean low level though, bootstrapping, VGA, basic paging).

IntelĀ® 64 and IA-32 Architectures Software Developer's Manuals

The last set of manuals describes a lot of the very basic data structures and instructions that can be used by the x86 processor.

Some of this stuff can be overwhelming though. The last link is most certainly a reference source and not a tutorial.
  • 2


#345229 Compiler/Interpreter tutorial - any interest?

Posted by G_Morgan on 10 February 2008 - 06:30 AM

I've done the code for the first tutorial on this. Thought I'd upload it early if anyone wants a look. One change is that I've used C++ rather than C*. All the code is MIT/X11 licensed (basically do what you want but don't remove the copyright notice, see the files for more details). All it does so far is take a series of identifiers, integers and some operators and tokenises the stream. All the testing has been done on x86/Linux (Ubuntu specifically). There's no symbol table and no parsing as of yet.

The tutorial to go with this will follow at some point.

*I created a dynamic string struct and library for C but it still didn't look very nice. C++ streams are a god send.

//edit - first version had some bugs. I've fixed it and uploaded.//

Attached Files


  • 1


#343969 effect of b = a++ + a++

Posted by G_Morgan on 22 January 2008 - 02:49 AM

i++ is post increment so should increment the value after the statement has been executed.

Try ++a and it should then give a = 3, b = 6;

I wouldn't actually write any code like that. It's the reason a lot of people dislike C.

//edit - just thought I'd add what the compiler will convert these things to


b = a++ + a++;
/*converts to */
b = a + a;
a += 1;
a += 1;

-------------
b = ++a + ++a;
/*converts to*/
a += 1;
a += 1;
b = a + a;

  • 1


#340355 Need practice app ideas.

Posted by G_Morgan on 02 December 2007 - 01:38 AM

Pop3 sounds interesting. Sending mail shouldnt be hard.
I was thinking about making a mail app to recieve SMTP mail, and tried to make that in PHP, but parsing SMTP turned out to be a major pain!

PS, i found this on Java 3d:
Java 3D API Tutorial
Is that the version vich sucked royally?


You've got that backward. SMTP is about sending mail. POP3 is about interacting with a mail server to retrieve mail. Sending mail is more difficult than retrieving it for some reason.

Yeah that's Java3D, it's unsupported these days. I'd look at JOGL if I was you. If you really want to learn 3D though I'd look at

NeHe Productions: Main Page

That site has a whole host of OGL tutorials. Unfortunately they are written in C. Learning the concepts is most important, then moving to Java is easier.
  • -1


#339570 Do you write html in notepad?

Posted by G_Morgan on 23 November 2007 - 01:40 PM

Well maybe you are true, but knowing the code is a very positive thing!


That's why I said I distrust code generation. It's just Notepad is lacking every feature you can imagine. You could literally write a better editor in about an hour. There are many good free text editors for Windows with all the appropriate tools that it doesn't seem necessary to endure the pain that is Notepad. Unless a editor has at least auto indentation, syntax highlighting and multi buffer editing I wouldn't bother with it. That's setting the bar quite low as well IMHO.

There's one exception to the code generation rule as well. That's code generation you define yourself, naturally you understand that. Lisp tends to do a lot of this and it can save you many hundreds of lines of code.
  • 1


#339524 Intel or AMD

Posted by G_Morgan on 23 November 2007 - 06:31 AM

Remember how much heat the old Cyrix processors put off? You could cook an egg on those things.

I didn't realize the PS3 uses PPC. Don't they have 7 processors in it?


The PS3 isn't a PPC (no Altivec) though it is PPC inspired. The Cell processor has 1 PPE (which is the PPC with no Altivec) and 8 SPE's. Basically the SPE's are vector processors like you find in super computers. So only the one core is really a general purpose core. The SPE's are like SSE on steroids, this is why there is no Altivec on the Cell, Altivec is the PPC equivalent to SSE. I suppose the Cell is a PPC in the way C++ is C, i.e. it almost is.

Bit of a white elephant really, they originally intended that the PS3 wouldn't have a high end graphics card and that the SPE's could more than handle OGL (which they can). The problem is there isn't enough bandwidth between the processor and the frame buffer to get high speed graphics so they had to fall back to using a traditional GPU. Bit of an oversight and it's the reason the PS3 is so expensive and so difficult to develop for. If it had gone to the original plan then the PS3 would have actually been cheaper than the 360.

Also it is by no means the only machine that uses PPCish technology. The Wii and the 360 both use PPC, IBM have a monopoly in the game console market. The PPC also dominates the super computer and mainframe (these still make IBM billions) markets and is used increasingly in embedded computers. Frankly it beats the ** out of the x86 which makes most OS programmers want to run around with a machete hunting Intel engineers. Seemingly everything involved with x86 was a mistake, hack or drug induced nightmare and the solutions to all this are generally worse.

Right now Intel chips are better than the AMD ones for the first time in nearly a decade. The AMD chips don't have anything near the heat problems that the Pentium 4 had. We can be certain that AMD can turn it around, it's just that they are targeting the server market right now. It's also worth noting that the 64 bit extensions AMD made are the only sane bit in the entire x86 processor. They killed off a lot of cruft when they designed that arch, I think everyone breathed a sigh of relief when we realised that segmentation, a technology that fills about 4 chapters in the Intel developers manual and is never used outside of OS/2, was killed off by AMD.
  • 1


#338210 Programming Languages where did it came from

Posted by G_Morgan on 03 November 2007 - 07:49 PM

Hey guys im starting to have interest in computer programming, but i have a question. If these programming languages are used to make softwares, how were these programming languages are made?


Somebody designed them. Computers only really interpret a series of binary opcodes which encode very simple instructions like moving values between registers and memory or add two registers together along with a few comparison and branch instructions.

Eventually somebody produced mnenomic assembly which basically just replaces the machine opcodes 1 to 1 in a more readable language. Naturally the first assemblers had to be written in machine code directly but later ones could be written in assembly language using the earlier assemblers to bootstrap the build process.

Later higher level languages came about the same way. People built compilers to convert high level languages into assembly and then used the assembler to build a working binary. Naturally the first compilers were written in assembly with later ones coming in high level languages.

The key theme is bootstrapping. At each level of abstraction we always start by developing it in the last level and then using that to implement something similar in a higher level language. This is why Python is implemented in C, you could write a Python compiler in Python and use the C based interpreter to bootstrap it.
  • 1


Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download