Message on Whatsapp 8879355057 for DSA(OA + Interview) + Fullstack Dev Training + 1-1 Personalized Mentoring to get 10+LPA Job
0 like 0 dislike
3,758 views
in Beginners by | 3,758 views

7 Answers

0 like 0 dislike

Well .. I am gonna say few steps that helped me become a better programmer.
The first thing you need to do is to enjoy it.

1)Never repeat your code:
If you have a common code segment used in a few different places, refractor the code into its own function. This will avoid confusion for you and to people who see your code.

2)Keep your code simple :
Planning for the unlikely makes your code unnecessarily complex. Keeping it simple shouldn't be confused with "quick and dirty".You still have to work thoroughly and carefully. Keep your code as small as possible.


3) Write and Read lots of codes:
If you are a beginner write lots of codes for different scenarios . It may not be a good code or to start with it will not be a good code. But you shouldn't be disappointed with it and should continue writing codes. Play with new languages and tools . Try to create something on your own.
You can refer to few sites such as
lynda.com
W3Schools.com
code academy

4)Test your own code:
You know what your code needs to do , and it probably does it. But you really need to prove it.Analyze all the potential edge cases and make a test which confirms that your code performs under all possible conditions.If you can show your code to some collegue and ask him to break it .Unit testing is a formalised approach to do this.

5)Strive to make your code elegant:
Elegant code is highly readable and solves the problem in hand with the smallest amount of code and machine action possible. It is quite difficult to achieve an elegant code for all the circumstances but after quite a bit of coding you will get a feel for what it looks like. Elegant code cannot be improved by refractoring anything. It makes you happy to look at it . You are proud of it.

6)Keep learning languages and try to master couple of languages.
Learn the top languages and try to master a few in that. It is quite difficult to master in all the languages , so just pick a couple of languages and learn every thing about it. Refer books by famous authors. Check the forums such as stackoverflow. Try to answer few questions there. Refer to the problems given there and try to solve it on your own.

So by following these steps you can definetly improve your programming skills and become a good programmer.

Hope i answered your question. Happy Coding!!

by
0 like 0 dislike

This is one of the most commonly asked questions.

The general answer is: By writing lots of programs.

However, there is a simple exercise that can help you to build up that skill:

  • Pick an activity that you do every day, like making breakfast or something similar. It should be not too easy, but also not too difficult.
  • Write down the steps that you should do for the activity, but do it out of memory in a different time to when you actually perform the activity. (Write the steps to make breakfast down in the afternoon.)
  • The next time you perform the activity take your notes and try to follow the steps religiously. Try not to deviate from your written down steps and if you have to, note the differences down.
  • Improve your algorithm until you are satisfied.
  • Try this with different activities. The tasks become easier and easier.

As stupid as it may sound, it works. The above has been tried on many students and proven to produce significant improvement.

I can't come up with any cool new ideas for a project. Am I simply lacking in creativity? How do other programmers become inspired?

For starters, here's a good quote from Chuck Close on (not) waiting for inspiration:

The advice I like to give young artists, or really anybody who'll listen to me, is not to wait around for inspiration. Inspiration is for amateurs; the rest of us just show up and get to work. If you wait around for the clouds to part and a bolt of lightning to strike you in the brain, you are not going to make an awful lot of work. All the best ideas come out of the process; they come out of the work itself. Things occur to you. If you're sitting around trying to dream up a great art idea, you can sit there a long time before anything happens. But if you just get to work, something will occur to you and something else will occur to you and something else that you reject will push you in another direction. Inspiration is absolutely unnecessary and somehow deceptive. You feel like you need this great idea before you can get down to work, and I find that's almost never the case.

You'll rarely get ideas by just sitting around and waiting for a spark of inspiration. Your time will be much more well-spent if you just go ahead and try building something (anything!), even if the idea seems somewhat stupid or already done.

After all, that's what artists and musicians do -- they don't necessarily start by trying to come up with a highly creative drawing or compose their own music. Instead, they draw landscapes or vases, or cover existing songs. Similarly, don't feel obligated when coming up with project ideas. Re-implementing existing programs is a time-honored tradition -- see how far you can get!

But in any case, here are some other ideas and tricks for coming up with your own projects:

  • Try reimplementing an existing project. Much as how beginning musicians start by covering songs other people have written, it might be good to start by re-implementing programs others have made. 2D arcade games are a popular choice, for example -- games like "Pong" or "Space Invaders" are very doable by beginners and will still teach you a lot. The FAQ has links to more project ideas.
  • Try connecting programming to another hobby. Programming is a very useful skill in that you can apply it to a wide variety of fields, even ones completely unrelated to computer science. For example, if you're interested in politics you could try analyzing voting pools and trends, if you're interested in music you could try writing a digital soundboard, if you're interested in sports you could try writing a fantasy football tracker or predictor, if you own a business you could write something to help you keep track of inventory... Having interests beyond computer science is useful here.
  • Try keeping track of things that irritate you. If you find anything in your life that you dislike doing or find repetitive, ask yourself if it's something you could automate. To get a sense of what sorts of things computers can automate, see Automate the Boring Stuff. This guide uses Python, but you can do all of the things it mentions using any programming language. Or, perhaps try googling "home automation tutorial" for more physical solutions.

Where can I find examples of good code and projects to study?

Before you start, please keep in mind that studying existing code is not necessarily the best way to learn programming. Programming, in the end, is about applied problem solving, and the best way to get better at problem solving is through lots of practice. Just reading existing snippets of code isn't likely to teach you as much. Usually, when people do study code, it's in a targeted and specific way. For example, if a dev was interested in writing a game using some engine, it would be helpful to see the source code for various demos using that engine.

In any case, try checking out the Showcases section on Github. It has a curated list of tons of popular and interesting open-source programs that range from libraries and games to music and open journalism/data analysis, and is a good showcase of what sorts of things people are doing with code. The source code is also publicly viewable, so you can try downloading and tinkering with these projects yourself.

Also see The Architecture of Open Source Programs, a series of free ebooks that contain more guided walkthroughs on how popular open-source programs are structured. The latest book in the series, "500 lines or less" might be a good starting point since the programs are small enough that you could feasibly tinker with them yourself and use them as a good jumping off point to start your own project.

by
0 like 0 dislike

Instead of suggesting particular ways to become proficient in certain kinds of programming, I'd like to address the overwhelm that you seem to be experiencing. After reading your question's description, it seems that you have two problems:

  1. You don't know the "optimal place to focus your attention."
  2. You wonder how you can improve once you know that focus.


Where to focus your attention is the more important thing to get right. You will want to spend time on improving in areas that you care about, and less time becoming a jack of the trades that don't interest you. You can clarify your direction by brainstorming on what it is that you want to get out of programming. Programming is an umbrella term for many kinds of activities comprising a variety of different skills. If you're interested in solving difficult mathematical problems algorithmically, don't worry too much about obsessing over HTML/CSS. If you're interested in creating great web applications like Quora, do perhaps think about natural language processing down the road but certainly don't make it a focus just yet. 

Be mindful that your focus is your direction, and that you shouldn't try to learn everything there ever is to learn about programming. At least not just yet. (Hint: you can't.) In a similar vein, while I personally believe that a computer science education is foundationally useful for the algorithmically curious and those interested in the academic culture, I do not believe that a general approach of learning everything under the sun is by and large the best way to become proficient at any one thing. I know good web application developers who couldn't begin to suggest the best winning strategy for the first player in a given setup of Nim.

After you know what your focus is, getting there is a lot easier. It's true that there is a paradox of choice here; all the different skills, technologies and methodologies you can choose to practice don't feel liberating when you have to worry about making a bad choice. But the amount of choice is good because when you've narrowed them down by focus, none of the choices are terrible—they are effective (in that they help you attain your goal) even if they turn out not to be the most efficient (one choice may be a little faster way to get there than another). But instead of trying to find the most efficient way to get there, start practicing what you're most excited about and save yourself some wasted time on analysis paralysis. The particular route you go probably isn't as important as the fact that whatever you choose, you will learn enough to get you closer to your focused goal.

Small projects you're excited about are great to improve skills in most areas. It's preferable that it be small and manageable but in order to maintain motivation levels, it helps even more if you're excited about the end result yourself. It could scratch a personal itch, solve a problem for your company, or just be something you'd be proud to show off to people. You can create a project that uses almost any technology you'd like to learn more about. That way, the completion of the project is a measurable indicator of whether you've attained your short-term learning goal. Projects can also be great opportunities to see a picture bigger than your subroutines and variables, to bring in collaborators, to establish a portfolio or to contribute something to the open source community.

by
0 like 0 dislike
Telling from my own experience. It's something that is very easily replicable :D

In this answer, I'll be only talking about programming skills related to DS and algo problems, to be precise. Once you're proficient with programming the solutions for those problems, picking up other things like web development, android programming, etc., would be pretty easy because you would be, by now, comfortable with programming the solution you have in your mind.

Firstly, I did a formal course on Data Structures and Algorithms. A proper course teaches you the intricacies of the data structures and algorithms, and you understand how things work - they are not a “black box” anymore. So, now, even if you use libraries while programming, you know what's actually behind those libraries.

Once clear with the theory, I went on to solve the top 100 most solved questions on SPOJ. Once I was done with this, I could myself feel the level of upgradation in my programming skills.

The first few problems will be easy, but as you go further, things will get tougher and will take a lot of time. However, after this hard time is crossed, which happens after solving, say, 60–70 questions, you will feel that now you're able to code whatever is in your mind much comfortably. Then things will become fun :D

Once you've solved around 100 problems, you will feel much confident. Then, you can move on to learning more advanced concepts. You will begin to have fun while coding. Programming seems difficult, but, if learnt the right way, is fun :D
by
0 like 0 dislike

Well! Programming is fun once you understand it and the good part is a good programmer get a huge paycheck from Top Tech Giants Like (Google, Amazon, Microsoft, Facebook & Apple).

The best part is Programming also improves your critical thinking capability. Programming is all about writing optimized and quality code.

Below are some of the programming skills of a good programmer.

image

You need to put a good amount of effort into all these points and then you become a good programmer.

Point 1 and Point 3 are the same, For becoming a good programmer you should understanding all topics of data structure and algorithms, Once you know the algorithms then writing optimized code is easy. We learn different algorithms to write so we can write optimized.

Ultimately all big Tech Giants during there interview looking for people who have good hands of writing optimized code.

Point 2 is not that difficult just need a good command in any programming language Like JAVA or Python or C++ etc

Point 4 comes from practice. Once you understand algorithms then you need to practice lots of problems and write every problem with production-level code

There are multiple Online materials that are there from which you can take help.

For Improving Point 1 and Point 2,

You need to learn all topics of data structure and algorithms in the below sequence

image

Spent a significant amount of time in all topics and practice

Some Of the Online materials which can also make the preparation process easy

GeeksforGeeks: This website is the bible of Algorithms. Here you will find millions of problems for Practise. They have arranged all these above topics separately. All software Engineers must have gone through this website at least once. Because whenever we need to switch organization we need to check this website

Logicmojo This is Online Course for Learning Programming. It teaches all the techniques of writing optimized code using algorithms and data structure. Although it’s a paid course but a good investment. Nice tutorials to learn all the concepts and practice those techniques in their coding editor only. Along with it, they also provide assignments for practice algorithms.

For beginners, they provide tools to analyze the code so steps by step execution of every program can be also checked, along with that they provide online coding tests. As they provide lifetime subscription, eventually helps every time during switching the organization

visualgo This is especially for Beginners because there are lots of sorting and searching algorithms that are there. They provide animation diagrams and tools so you can see the flow of the code. Different Boxes, tables, and all those stuff to learn to program.

Now Once you understand the concepts then need to work on Point 4, That it writing production level error-free code. As I said it comes with practice only.

You can follow the below resources to practice code

Leetcode: Leetcode has a huge collection of problems ranging from Easy, Medium, and Hard. If you just open the practice section here, a huge list of programs is there for practice. So you start doing practicing the program, start from easy then gradually move to medium and then Hard.

Topcoder: This is for advanced programmers. After leaning and practice from the above resources, then at the last take a taste of topcoder also. World top programmers come to this platform to practice code. If you feel that you become an expert in this field then give a shot at TopcodeR also.

by
0 like 0 dislike

To enhance programming skills, you need to focus on the following 4 topics.

  • Programming Languages
  • Data Structures
  • Algorithms
  • System understanding


To keep my answer short, I will not suggest any books, but keep myself limited to overview of each topic.

Each topic is a big subject of interest in itself. But you can try to grab as much possible gradually in long term.

Programming Languages

  • Never limit yourself to one language. Keep learning multiple languages - one procedural, one object-oriented, one scripting, one functional, etc.
  • Also, don't try to learn too many languages in a short time span. Gradually keep learning one new language every year. But never forget the old one you learnt.
  • Don't focus only on syntax. Focus on the paradigm of the language, its weaknesses and strengths. Understand where each language fits well. Learn what the language designed to offer.
  • Good hold on 3-4 languages will give you a very nice insight about these languages, which will be useful to you.
  • Keep practicing a lot. Almost daily you must write a program, even if it is a 10 lines program. Make it a never dying habit.

 

Data Structures

  • Learn all the basic data structures - array, list, tree, graph, trie, dictionary/map, set, etc.
  • Learn the advanced data structures whatever you can - suffix array, suffix tree etc.
  • Implement data structures in whatever languages you know.
  • Understand the basic operations (read, write, etc,) time complexity for those data structures.
  • Understand the strength & weaknesses of each of those.
  • Remember the data structure support by the language libraries (STL, classes etc.).
  • Keep playing a lot with those.

 

Algorithms

  • Learn all the easy algorithms - sorting, searching, graph algos, etc.
  • Learn all the advanced algorithms whatever you can - dynamic programming, backtracking, etc.
  • You need to master algorithm complexity computation.
  • You need to learn how to design your custom algorithm as per the need.
  • Keep implementing lots of algorithms.

 

System Understanding

  • Understand your target OS nature. What your OS supports? How a process is being executed? etc.
  • Understand program segments - data, text, stack, heap, etc.
  • If your language is based on virtual machine, then learn how your VM works at a high level.

 

Tools [Optional]

  • Choose a suitable editor.
  • Prefer compilers, build tools which follow the standards.
  • Learn static analysis tools, profiling tools.

 

Finally

  • Write a lots of code, compile, run, debug.
  • Read lots of code authored by others, may be from popular open source projects.
  • Keep learning new languages, new data structures, new algorithms, new tools year after year.


Hope this helps.

by
0 like 0 dislike

Really appreciate your honest question . Hope I will be able to provide you some real practical solutions to your inability to write code.

First of all, coding is like a game and anybody can learn it if they have an appetite to create something productive. Being a good programmer, you can actually contribute a lot to make things simpler and better.

I think there could be two possible reasons for that :

  1. You do not have a basic understanding of what you are trying to code, try to clear your basics . For example, i will not be able to build a website unless I have a good knowledge about basic UI technologies like HTML , JavaScript, Jquery etc.
  2. You understand coding but lack practice. Coding is all about practice - the more you practice code , the better you get at it.

Now the solution :

I suggest to start from basics and give yourself sometime to absorb new concepts and keep practicing each concept until you get enough confidence. As a Java developer I would suggest you follow only 3 things - either Javadocs or Head First Java book or Durga Solutions tutorials on SCJP java . If you try to learn Java from multiple sources at the same time then you will end up spending more time in learning a concept. Spend enough time on covering as much basics as you can because thats the only thing that will speed up your coding skill once you start learning advance technologies related to Java.

Here is a list of some technologies and languages that you can adapt based on your learning needs :

  • Want to develop a simple static website ?? : Learn HTML5, CSS, JavaScript in order.
  • Want to build a dynamic responsive website : Learn JQuery, Ajax, JSP and AngularJS .
  • Want to build a simple application : Learn Core Java , .net or Python
  • Want to build an enterprise application : Learn advance java ( JSP, Servlets, Struts, Srimg Framework, Web services)

Think big, start small. Start practicing code daily and try to get better at it as soon as possible.

Happy Learning!!

by