|Join Nairaland / LOGIN! / Trending / Recent / New|
Stats: 2,547,551 members, 5,866,006 topics. Date: Saturday, 19 September 2020 at 05:19 PM
|You Would Better Start Programming With Java Or C# by progeek37(m): 4:20pm On Oct 18, 2019|
With all these questions...which programming language should a beginner start with. Many people people have given wonderful advise. I would like to add my view as well. What I will say here may be debatable but I will advise you to consider giving my thought a little chance. I will start by saying that no programming language is actually bad to start with if you are determined to face the challenges that your chosen language may pose.
However don't start with C or C++. You will learn them later.
I would strongly advise beginners to start programming with Java or C#. Python would be another option, but its off-rule syntax can be troublesome...the use of indentation to define scope and block instead of usual curly brace. Also its object oriented programming has some flaws(not technically but syntatically)...especially the encapsulation of data with underscores. Python may be highly human readable and easy to write as well...you may write codes faster in Python than in Java or C# but in large scales applications such fastness is not actually needed because software developers usually are willing to sacrifice immense time working and collaborating with teams to build projects...I mean they are willing to sacrifice any amount of time to build the projects.
Also Python is not strongly typed as Java and C# because of its dynamically typed unlike Java's statically typed, this can lead to problems in code maintenance by other developers. Consider these lines of code in Python:
Assuming there is an array(list) already defined as book_list(for Python) or bookList (for Java)
def exist(book, index):
if index < 0 or index >= len(book_list):
#report an error
if book_list[index] == book:
The code snippet is actually good, I tried to use variables that correctly portrait their functions in the program to maintain a self-documenting code. But there lies some problems in the code. First when other developers are working on such code, the questions that may arise are:
1 What does this function return?(we actually need to work through the function to understand) but what if we actually want to reference the function? Therefore we will be forced to study the whole function to understand it.
2 What does the type "book" belong to? Is it an integer, a string or programmers defined type(object).
Let me rewrite the function(method) code in Java:
public boolean exist(Book book, int index)
if(index < 0 || index >= bookList.length)
//report an error;
Obviously Java is better! So is C#!
Here in Java snippet, from the very beginning of the method declaration we understand that the method is available to be used in other classes because it was declared with the keyword "public", also we learn that it will return a "boolean" type and that it accepts a user defined "book object" and an "integer index".
So despite all the noise from Python communities, Java is undoubtedly better. Python is a great language but I would not encourage beginners to start with it as against Java or C#, because Python does not follow the usual sytnax rule which almost all programming languages adopt. That does not mean it is bad anyway. But as a beginner you need to understand what majority of languages have in common because you will be working with many other languages not just few like Python later in your career.
There are many more things to talk about. Think about OOP in Java or C# or the likes, if we want to encapsulate data so that other classes may not modify it. You simply encapsulate it with the keyword "private" you only have to provide a public method or property to allow other classes to access the data the way you want it to be accessed. In Python you use underscores instead something that can be mistakenly ignored. Also internally Python changes the name of a class member with a name that begins with double underscores by prefixing it with a single underscore followed by the class name. Hence Python does not provide a way to truly protect members from the outside world.
So in my view, I prioritise the following in that order:
Leave your suggestions and views; I will try to reply as much as I can.
8 Likes 2 Shares
|Re: You Would Better Start Programming With Java Or C# by DrBrainstorm(m): 5:39pm On Oct 18, 2019|
Why did you advise not to start with C or C++, especially C? I thought C apart from Assembly is the mother of most programming languages.
|Re: You Would Better Start Programming With Java Or C# by progeek37(m): 9:20pm On Oct 18, 2019|
DrBrainstorm:Yes it is no doubt that C is still used today simply because there is no alternative to it. C is debatably complex for beginners to start with and requires deep understanding of hardware. It is suitable for low-level programming. You can write in pure C, for instance if you want to write an operating system or device drivers or to program an embedded device, not because it is better but because there is still no alternative and the need to control the hardware very carefully. No doubt knowledge of C may enable you to understand the underlying hardware structure and internal implementation and working of computer programs but all these are not necessary to beginners.
In conclusion, programmers don't feel nice using C they use it when there is need for it because as I said before there is no alternative to C now.
|Re: You Would Better Start Programming With Java Or C# by DrBrainstorm(m): 7:31am On Oct 19, 2019|
But what do you say about C++?
|Re: You Would Better Start Programming With Java Or C# by progeek37(m): 8:56am On Oct 19, 2019|
DrBrainstorm:C++ will be a nice choice when you have to program applications that requires very close work with hardware or perhaps that have special performance requirements like 3D games. For all other purposes(like web applications development or business software) it is inadequate. I will not advise you to pursue it if you are starting programming now unless you have something to build that requires it. Someone said C++ lost it popularity mainly because of inability to write quality software with it.
In order to write high-quality software in C++, you have to be incredibly smart and experienced programmer, whereas the same is not strictly required in Java or C#. Learning C++ takes much more time and very few programmers know it really well. Also the productivity of C++ programmers is many times lower than Java and C#.
In conclusion go for C++, when you have to use but if you are beginner, I will advise you not to start with it.
|Re: You Would Better Start Programming With Java Or C# by ibkayee(f): 10:11am On Oct 19, 2019|
Really good points progeek37, I usually recommend python to people who are beginners but your point about general syntax rules and language commonalities is apt, but like you said, that’s not necessarily to say it’s bad!
|Re: You Would Better Start Programming With Java Or C# by progeek37(m): 11:30am On Oct 19, 2019|
ibkayee:Yes. That does not mean it is bad anyway.
|Re: You Would Better Start Programming With Java Or C# by DrBrainstorm(m): 3:18pm On Oct 19, 2019|
I was thinking of learning C++ when I go into programming but from these few points of yours, I think I have been convinced.
But C# was created with the major Intention to rival java, would you recommend to start with C# or Java?
Also, Kotlin is another language that may displace java in the coming years, would you still recommend java?
|Re: You Would Better Start Programming With Java Or C# by progeek37(m): 5:20pm On Oct 19, 2019|
DrBrainstorm:Java or C#... I can give both equal priority.
Kotlin runs on JVM(Java Virtual Machine). Its power relies on Java libraries and frameworks so it cannot stand alone and be successful without Java. The equation is:
Kotlin = Java + extra
If you learn Java learning Kotlin will be a bonus but the reverse may not be the case.
|Re: You Would Better Start Programming With Java Or C# by netsage205: 8:38am On Oct 20, 2019|
Good points @progeek37, but it actually depend on which area they want to face, I don't really advise writing a website in either c# or java, the languages should be used where they are best suited, Python is actually very good for data science, for a data scientists, Python takes a cut above java and c# , for android apps, Java is more suited. So I believe it is just depends on where the beginners want to actually work on. They should learn the one more effective for the area they want to specialize .
5 Likes 1 Share
|Re: You Would Better Start Programming With Java Or C# by progeek37(m): 9:34am On Oct 20, 2019|
But I always advise beginners not to be pre-occupied with writing of websites or building of mobile or desktop apps but rather to focus on learning fundamentals of programming itself. Once you acquire this skill you can switch to any other programming language that is best suited for the project you have on mind.
So all the advice I provided here is based on understanding the basic concepts of programming itself and not necessarily on building a particular project. I hope you understand my point.
9 Likes 1 Share
|Re: You Would Better Start Programming With Java Or C# by Ausrichie(m): 9:41am On Oct 20, 2019|
C# is the best but if you are a comp science student advice is to just learn basics with c# then move to C or C++ for hardware programming and data science purposes or maybe Python you can start with c or c++ self but python is frustrating I advice you don't start with it. When you are done and feel like a brutal challenge go for Assembly for x86 and x64 architecture but learn with c# first I advice you
2 Likes 1 Share
|Re: You Would Better Start Programming With Java Or C# by koyla: 9:42am On Oct 20, 2019|
|Re: You Would Better Start Programming With Java Or C# by Skykid1208(m): 4:28pm On Oct 20, 2019|
most Senior programmers would always advice new programmers to learn programming instead of learning a language.
|Re: You Would Better Start Programming With Java Or C# by DrBrainstorm(m): 8:35pm On Oct 20, 2019|
Thank you very much bro.
Am gonna get in touch whenever I need ur help.
Thanks once again.
|Re: You Would Better Start Programming With Java Or C# by progeek37(m): 12:57pm On Oct 22, 2019|
|Re: You Would Better Start Programming With Java Or C# by 2ray4sure: 3:33pm On Dec 04, 2019|
Do we really have c# developers in Nigeria. You hardly see a thread on c# , majority of nairaland web guru are only WordPress and php designers.
|Re: You Would Better Start Programming With Java Or C# by Ausrichie(m): 10:23pm On Dec 04, 2019|
progeek37:No c isn't bad for a beginner just as delegates and enumerations are scary in c# pointers, addressing and dereferencing are also scary in C but when you learn C it will put you at a prize position.
|Re: You Would Better Start Programming With Java Or C# by acekhalifa(m): 11:26pm On Dec 04, 2019|
progeek37:Can Assembly Language be compared to C in terms of low level programming/hardware programming? If yes, what are the advantages/disadvantages it has over C in regards to that aspect.
|Re: You Would Better Start Programming With Java Or C# by Thenaijaitguy: 6:53am On Dec 05, 2019|
This thread should be kept alive here.not just WordPress everywhere.. I'm planing to do a tutorial series here on c#
|Re: You Would Better Start Programming With Java Or C# by ABCthings: 7:26am On Dec 05, 2019|
To all pro C# how well has it been used outside microsoft?
|Re: You Would Better Start Programming With Java Or C# by Daejoyoung: 8:41am On Dec 05, 2019|
You are right op, but still it depends on your target, your advice applies mainly to would be software engineers, but to academic researchers, data analysts or scientists, l think Python and R still cuts the cake. lf we want to really concern ourselves with the concept of algorithms and data structures, then C programming language would be the best for that.
C# and Java comes in for apps and websites.
lt all depends on what you want to do.
|Re: You Would Better Start Programming With Java Or C# by 2ray4sure: 9:19am On Dec 05, 2019|
I think someone has already answer. But you can be more specific with your question.
|Re: You Would Better Start Programming With Java Or C# by SamzackD(m): 9:26am On Dec 05, 2019|
don't use what you see on Nairaland to judge the entire Nigeria, most programmers that visit Nairaland are not that active here, and Nairaland 2million users is just about 1% of the Nigerian population so you can never tell...
|Re: You Would Better Start Programming With Java Or C# by SamzackD(m): 9:27am On Dec 05, 2019|
ABCthings:game development with Unity engine
|Re: You Would Better Start Programming With Java Or C# by Ausrichie(m): 12:54pm On Dec 05, 2019|
acekhalifa:Well let me list it out.
Advantages of Assembly:
--More Hardware control
--More understanding and control of memory
--More understanding of the hardware components
--You can be creative with code( you can implement coroutines, classes, e.t.c)
--Small in size (a 50mb compiled programming could be 10mb when written with Assembly)
Advantages of C
--Hardware Control (but not as much as Assembly)
--Fast runtime (not as much as Assembly)
--Easier to read and understand
--Nice data structures (Unions, Structures e.t.c)
--easy manipulation of multidimensional arrays.
--small amount of keywords unlike c# and Java.
Disadvantages of Assembly:
--Very cryptic (to a beginner it would seem like gibberish)
--Loose hardware control (I am not sure if it happens now but back then if you make a silly mistake your system could crash)
--Uneasy implementation and manipulation of multidimensional arrays and strings
--loose memory control (it would be very easy to get a stack overflow or segmentation fault here)
Disadvantages of C:
--Uneasy manipulation of strings
--very rigid (you can't use smart algorithms to implement data structures that don't exist in the language) I
--loose memory control(same as Assembly)
--loose hardware control(same as Assembly)
--large in size
--hard to understand (any c programmer that didn't hate pointers and addresses is a genius or a liar)
C and Assembly share many features that is why C is sometimes called glorified Assembly.
|Re: You Would Better Start Programming With Java Or C# by Grandlord: 4:08pm On Dec 05, 2019|
Nice one, progeek37.
I've always wanted to get a deeper and clearer understanding of how programming actually works. You know that kind of eye-opening understanding that makes the whole picture click, and gives you the confidence to take on any programming task, from websites to apps to games etc
Your illustration with the codes written in python and Java explains a lot. I understand that with java you can actually see what's going on in the codes and how it actually works.
I also loved your opinion about understanding programming, first, before thinking about what to do with it.
I'll have to look at Java, based on your recommendation. Thank you.
|Re: You Would Better Start Programming With Java Or C# by acekhalifa(m): 4:14pm On Dec 05, 2019|
Ausrichie:Thanks very much.
|Re: You Would Better Start Programming With Java Or C# by Grandlord: 4:40pm On Dec 05, 2019|
progeek37:Bro do you know any good book on algorithm and data structures you can recommend for me?
I've seen a lot of them on google but I need something straightforward and comprehensive. Something that would help me take a normal, ambiguous story and break it down into systematic, clearer steps to code into the machine.
I feel like that would enhance my problem-solving skills and help me 'think like a programmer'? Thanks.
|Re: You Would Better Start Programming With Java Or C# by progeek37(m): 8:33pm On Dec 05, 2019|
I discovered that the reason many people don't know algorithm and data structures is because they usually base their studies on YouTube videos and online coding courses. You can't learn programming principles with YouTube videos, it is never possible, I have not heard of any professional programmers who learnt all from YouTube videos or online courses. YouTube courses and online courses will give a quick grasp of the concepts but not a solid grasp. This is because no YouTube videos can provide you with adequate exercises and examples.
What I mean is to learn algorithm and data structures you need a textbook... printed or soft copy. I repeat you can't be proficient in handling algorithmic tasks without reading books from professional programmers and following their examples and solving their exercises... YouTube videos and online courses many give you a false hope of understanding programming principles when you do just few things the person who uploaded it did in 5hrs videos not knowing you are thousands of miles behind the full stuff.
To learn algorithm and data structures you inevitably need to read books and practice coding programming problems.
I recommend "The Art of Computer Programming" by Donald E Knuth[
He spent more than 2500 pages explaining algorithms and data structures and their importance to software engineering.
But don't rush to the book yet, start by downloading books on your favourite programming language. Try to solve all exercises.
Learn from me ---there is no book I have ever read without doing all the exercises, some take me few seconds, some minutes, some hours... some days, some even take longer time!
I repeat there is no other way to learn programming principles and algorithm and data structures apart from practising, reading alone is never enough. You need to practice, practice and practice no other way. You need time and patience, you will make mistakes, you will see many runtime errors, many compilation errors. You will fail, and fail and fail. At a point a point you will start experiencing the moment when things start becoming clearer and clearer and some problems that have given headaches previously will become a child's play. I'm speaking from experience.
If you are new to programming, you may consider joining my tutorial group. I give exercises that will you a sound understanding of algorithm and data structures. I also solve many problems live via Zoom app to teach participants how to tackle problems.
7 Likes 3 Shares
|Re: You Would Better Start Programming With Java Or C# by MasterGramnet: 11:36am On Dec 06, 2019|
Grandlord:Haha, 'A Call To Deliver'. Recomendation: The Guy Up There Said Something. But I Personally Don't Recomend Books For People. I Don't Value A Book Over Another. You Can Just Decide To Pick One Among Those Books And Get Started From There. You See One Reason Why Learning Alone Is On A Disadvantage. 20 Different People Can Recommend 13 Diffrent Textbooks For You. Why Not Pick A Mentor And Get Started Or Better Still, Pick One From Those Books And Fire On Or Maybe You Can Pick The One The Guy Up There Recommended. The Ones I Know Are All Okay 4Me. Even The One You'll Tell Me About From There, Is Okay. So, Just Pick One.
|Re: You Would Better Start Programming With Java Or C# by pcguru1(m): 12:49pm On Dec 06, 2019|
I don't believe in mentorship they will show you the way, but you will still have to read the book. Join reddit and follow algorithm threads, but try cracking the interview and also read multiple books to understand each algorithms and data structure, we still dey read am daily.
2 Likes 1 Share
|Sections: politics (1) business autos (1) jobs (1) career education (1) romance computers phones travel sports fashion health |
religion celebs tv-movies music-radio literature webmasters programming techmarket
Nairaland - Copyright © 2005 - 2020 Oluwaseun Osewa. All rights reserved. See How To Advertise. 272