Pages

Pages

Top Programming Mistakes You Should Stop Making

When you start out as a programmer, you can easily fall into the habit of following bad practices while programming.


As a programmer, you can't avoid mistakes and that's part of learning your programming lessons. You'll make many mistakes in your career - some unique, some common ones - and that's how you'll learn to avoid them in future.

But if you are a beginner, you'll likely make some mistakes more often than others. How do you avoid these common mistakes that many programmers do everyday?

To avoid any mistake, you've to become aware of it. And that's why I would like to share with you some common mistakes that many of us still do that keeps us from growing as a programmer.

But before I share that with you, you may want to know how do I know that these are mistakes and not the right methods?

There is a simple answer - I have done all of them at some point in my career. Some more often, while some only a few times. And I regretted doing them later.

But I didn't knew then that I was doing anything wrong by following such bad practices. Once I realized that I was doing the wrong thing I started avoiding them. And now my code is at least better than what I wrote before.

And you too can avoid doing such mistakes. Part of the solution is just to realize that what you're doing is wrong. I know that most programmers won't do anything wrong, if they knew right then that their actions can have a negative impact on their application and their professional growth.

Most of our wrong programming habits are due to our ignorance and nothing else.

To become a good programmer, we have to remove these ignorances one by one. And that's what good programming books try to show us.

Part of the reason that we do such mistakes is because they do get the work done. And isn't that what we are payed to do - make our programs run, and finish our day's work.

But to make something work is only part of your job. If your application is any good, you'll have to update it regularly, and fix any new bugs that may arise from time to time. And then the only thing that'll make your work easier is following good programming practices.

Also, while you can get away with such mistakes in small programs, you simply can't afford them when you make bigger applications.

If you still do them, your application may work and do the needful tasks. But it'll be buggy, full of unoptimized code, and hard to maintain. And even you'll find it difficult to understand the code, when you look at it after long time.

As programmers our job isn't just to make our applications work and let the users deal with the bugs. Our job is to make sure that there is no way users get undesired results even if they give it wrong input.

So to create high-quality applications, make sure you don't do these common mistakes while programming:

Copy-pasting code without understanding it
Often you'll find that the code you are looking for is already available in some other program. It's very tempting to copy the code entirely and use it as it is, without bothering to understand each and every line of it.

Sometimes, the code you are copying may be so large that you don't have time to understand it completely. If you copy any code this way, there is a risk of making your applications vulnerable and buggy.

While this may get the job done, but what if the code does some undesirable activities in the background. What if it slows down your application or does some malicious activity. For that you need to understand the code properly, or you need to be absolutely sure of the source from which you copied your code.

And if any bugs do arise later, you'll find it hard to understand the code as you didn't even write it. And you'll find it hard to trace out a bug and fix it, especially if you copy lots of code at different places in your program.

So be careful when you copy even a little piece of code. Make sure you understand it completely. If you have already used a piece of code before and are 100% sure about the way it runs, then it's safe to copy it. But otherwise be cautious.

Starting from scratch every time
This goes exactly opposite to what I said before but it's another mistake that many beginners do. You may think that it's best to start from scratchevery time you create a new application. But that's a huge waste of resources - your time, energy, and mind - that can be better used elsewhere.

If something you need to do is already out there, use it and make your job easier. There is no need to reinvent the same basic concepts again and again.

You can use the same time to make your application more better in other aspects.

If an API, framework, or game engine eases your task, there is no reason you shouldn't use it. Your goal shouldn't be to show off how talented you are, and how you can do everything on your own without anyone's help. Your goal should be to make sure that your application works perfectly, and it takes as little resources as possible to create it.

This way you can do the same work in less time and save tens or even hundreds of hours. And as time is money, even if you work for yourself, you earn more for the same amount of time.

Searching google without trying yourself
Many times, by habit, as soon as you come across a new problem, you hit google and search for solutions. This isn't the way to become a good programmer. If you always search for solutions outside, without even trying once on your own, you'll never challenge your mind.

When you stop challenging your mind, you stop growing thoseprogramming skills inside you. To become good at any skill you have to solve new problems on your own. That applies to programming too.

Else you'll only create what's already there. You'll never create any original work. Is that something you want to do?

While it's smart to look for existing solutions, but if you blindly do it, your laziness will stop you from becoming a better programmer. Even if you do want to look for solutions, it's alright, but first at least spend some time and think upon the problem.

Maybe you can solve it on your own without wasting much time. Maybe you can solve it in a better way than what others have done. Maybe your solution is more accurate than the other ones.

You'll never know these if you don't try.

Ignoring warnings
This is another mistake that I did earlier while developing applications. I can't tell you what a huge difference it makes when your application shows a hundred warnings and when it doesn't show even one - the most important being the ease with which you can recognize new problems.

Warnings are a sign that you are potentially trying to do something that may not work every time. Sometimes, these warnings aren't serious and it's safe to ignore them. But the real problem comes when you have a big application that shows hundreds of warnings, and something doesn't work right.

It becomes difficult to find the cause of that error. And you have to spend more time to analyze each warning and to find the root cause of the problem. Instead it's always better to resolve any warning issues at the start itself, as soon as they arise.

And usually you just need to use the right variables or functions to resolve most warnings. It doesn't take hours to do so; mostly a few minutes, if you remove them as soon as you come across them.

Try to remove any warnings as early as possible. A clean code not only looks good but works good too. Just remember the old saying - treat warnings as errors.

Making Quick fixes instead of Permanent ones
Yes. I am guilty of doing this one too. And I am not proud of it. So often, we just come up with a quick fix that's barely enough to solve the problem at hand.

And it works and makes the problem go away. But if you aren't careful it ends up coming back again and again in different ways.

Whenever you fix a problem, make sure that it doesn't break the system in any way. A fix should improve the overall working of a system, not make it slower or more bulkier.

Also, make a fix that'll solve the problem permanently. Think of long-term, not just short-term. Sometimes, due to our laziness or ignorance, we just want to do our work quickly, instead of spending more time on it. And that's why we write code that does the intended work, but might not work in all possible scenarios.

If you skip on doing your work now, you'll only have to work even more on that problem later.

Just knowing these above mistakes can help you in avoiding them. If you know what you're doing is wrong, most times you won't do it.

And to do a good job you should love what you do. If you don't like programming for some reason then you'll rarely take the extra steps that are needed to write good, maintainable programs.

And if you do intend to write such good programs then you need tochange the way you look at programming.

Think of programming as an art and yourself as an artist. Then you'll never make this mistake of being lazy or careless.

Would a writer write incomplete article and publish it? Would a painter leave his painting incomplete and sell it? Would a singer just sing any useless words between his songs?

Definitely not.

The same applies to programming. Don't write incomplete code that doesn't test all scenarios. Don't leave your application unfinished and ship it. Don't write useless code if you can do without it.

These are just some basic mistakes that we do, because we are tempted to do less work and do something else. But we can't go far with this approach. Sooner or later, you have to become responsible for your work and make sure that there is no flaw in your code.

The sooner you start practicing the right programming methods, the better it'll be for you and your users. Sometimes being a good programmer means just to make sure that you don't do the same mistakes that bad programmers do.

Thanks for reading this post. If you know anyone who unknowingly follows such programming practices please share this post with them and help them become a better programmer.

Pasang aplikasi android di PC

Buat sobat - sobat yang ingin bermain kakao talk, Wechat atau aplikasi lainnya yang ada di android, namun tidak punya android nya. tenang.. aplikasi itu bisa sobat mainkan di komputer atau laptop sobat. silahkan di download dulu Sotfwarenya ( bluestaks )

- Link download

Jika sudah selesai langsung saja ikuti tutorial dibawah ini ya.

pertama jalankan atau install software bluestaks nya tadi.
- Klik double File / klik kanan ( run as administor )
- RUN

Cara pasang aplikasi android di pc
Proses instalasi memakan cukup lama waktu -_-
Tunggu sampai selesai

Jika sudah, silahkan anda buka aplikasi bluestaksnya (pertama buka suka agak lama tapi kalo sudah biasa engga kok )
Klik tanda search di kanan atas

Cara pasang aplikasi android di pc

Lalu disana terdapat kolom pencarian. silahkan masukan aplikasi yang ingin di mainkan
misalnya cari "LINE"
Cara pasang aplikasi android di pc 

 Klik install

Lalu pilih atau klik kotak yang paling kanan ( Gambar android )


Pada step ini anda akan dibawa ke play store. Lalu klik install pada aplikasi Linenya

Cara pasang aplikasi android di pc 

Terakhir klik accept. jika ada notifikasi silahkan tunggu sampai proses install nya selesai

Oke berhasil. silahkan sobat bisa juga download aplikasi android lainnya sepuasnya
 #ENJOY

5 Orang Kaya Paling Pelit Di Dunia

Wah kali ini Admin akan membagikan info yang sangat unik , menarik , bagus , dan sayang untuk di lewatkan karna ini adalah ALL INFORMATION or SEE_ALL_INFO admin sekarang memakai SUBDOMAIN baru yang di buat oleh om EDDAY GENTAR yaitu BLOGGERINDONESIA.OR.ID keren kan sob ? mumpung gratis SUBDOMAINNYA pengen coba ajah hehehehe , admin membagikan suatu yang keren langsung saja di simak ,

5 Orang Kaya Paling Pelit DiDunia
Usaha dan kerja keras bisa menghantarkan orang menjadi orangkaya yang banyak harta, nah jika sudah banyak uang biasanya orang akan hidup mewah dan royal serta tidak ragu untuk mengeluarkan uang banyak untuk membeli barang barang mahal. Namun faktanya tidak semua orang kaya itu royal dan suka membuang buang uangnya ada juga orang kaya yang suka hidup sederhana bahkan pelit untuk mengeluarkan  uang , Nah berikut ini ada beberapa orang kaya di dunia yang jarang mengekluarkan uang alias pelit, Langsung saja simak INFORMATION ini :D
 
Orang Kaya Paling Pelit Di Dunia


Pemilik jaringan toko ritel WAL-MART ini kekayaan bersihnya ditaksir mencapai USD 46 miliar ( Setara Rp 464,6 Triliun ) . Alhasil namanya nangkring sebagai orang terkaya ke-3 sejagat versi MAJALAH FORBES tahun ini, Pria yang belum Lama membeli perusahaan HEINZ itu ternyata bukan miliarder boros. Dia tak pernah pindah rumah atau membangun rumah baru. Kediaman Buffet tetap sebuah rumah dua lantai di Kota Omaha, Nebraska, Amerika Serikat. Rumah itu sudah dia tempati sejak 1963. Dulu, dia membelinya saat masih merintis usaham seharga USD 31.500 (Rp. 318 juta). Pria 82 Tahun ini juga tak punya hobi membeli barang mewah bahkan, kapal yacht saja dia tak punya. Padahal membeli kapal beharga puluhan juta dolar itu seakan jadi tradisi buat seorang miliarder. Sikap Buffet yang irit menurut banyak pihak, bukan dibuat-buat untuk pencintraan. Dia terhitung tak neko neko sejak mudah. Di usiah sepuh, Dia juga tak banyak menyumbangkan miliaran dolar hartanya untuk amal 
2. AZIM PREMJI 
Orang Kaya Paling Pelit Di Dunia
Pria asal india ini adalah pengusaha RAKSASA bidang Teknologi. perusahaannya, Wipro, ditaksir memiliki total aset sebesar USD 12 Miliar, ( Setara Dengan Rp. 121,2 Triliun ). Namun, untuk ukuran miliarder, Premji Terlalu irit. Cenderung Pelit. Sikapnya yang selalu berhitung sudah melegenda bagi karyawan maupun Kolega. Misalnya, Premji Meminta anak buahnya menghintung pengeluaran per-Bulan buat membeli tisu. Dia juga tegas menerapkan aturan agar karyawan mematikan lampu saat meninggalkan kantor. Dia tak segan naek becak dari bandara sepulang dari perjalanan bisnis untuk menghemat pengeluaran. Premji yang tinggal di Kota Bangalora, India juga kerap ketahuan masih saja mengendarai mobil FORD keluaran 1996 ke kantor tanpa disopiri
3. INGVAR KAMPRAD
Orang Kaya Paling Pelit Di Dunia
Dia Adalah Raja Furniture Asala SWEDIA. persuhaannya, IKEA, Baru saja berinventasi di indonesia. Kekayaan bersih ingvar Tercatat USD 3 MILIAR ( setara dengan Rp 30,3 TRILIUN ). Seperti dua nama sebelumnya, dia punya gaya hidup irit. Ingvar berpergian slalu menggunakan kendaraan umum , terutama bus. Kalaupun Naik pesawat atau kereta api, dia memilih tiket kelas ekonomi. Banyak masyarakat swedia melihat dia dan istrinya makan direstoran murah. Namun, bagi sebagaian pihak seperti dilaporkan harian swedia "Ekonomi" gaya hidup Sederhana Ingvar tak tulus, Sebab, dia kerap ketahuan berusaha menghindari pajak. Buktinya Ingvar Menerapkan Pajak Tinggi bagi konglomerat.
4. CARLOS SLIM 

Orang Kaya Paling Pelit Di Dunia
Sejak 2010 dinobatkan Sebagai orang terkaya di dunia Versi FORBES, Tapi akhirnya tahun ini, lengser setelah billl gates merebut kembali tahtanya. Carlos Adalah pengusaha yang dekat dengan penguasa Meksiko. Jaringan usaha telekomunikasinya, diberi nama TELMEX, sudah Seperti negara dalam negara. Total jendral kekayaan bersihnya Sebesar USD 69 Miliar ( Setara Dengan Rp. 696,6 TRILIUN ) Separuh lebih APBN indonesia dengan kekayaan sebesar itu dia cenderung irit. BUSSINESS INSIDER memastikan CARLOS tak mempunyai Jet Pribadi Dan Yacht. Dia pun jrak memperkerjakan Sopir dan membawa Sendiri mobilnya buat berpergian Rumahnya juga biasa sajja, Dengan 6 kamar tidur. Sikap yang cukup aneh untuk seorang miliarder kelas KAKAP. Bahkan, BILL GATES, Rivalnya yang kerap beramal, Punya Gaya hidup lebih boros
5. AMANICO ORTAGE 
Orang Kaya Paling Pelit Di Dunia

Pemilik RITEL pakaian ZARA ini sukses besar mengembangkan bisnisnya. Tahun Lalu, Kekayaan Bersihnya Mencapai USD 22 MILIAR ( Setara dengan Rp. 222 Triliun ). Gaya hidupnya Sederhana. Dia Dan istrinya Gemar ngopi di Kafe Langganan Pinggir jalan, Sejak puluhan tahun Lalu. Mobilnya hanya AUDI A8, Tak mewah, Dan Tak Terlalu Murah, Alias Biasa Aja. Pakaiannya Juga Sering hanya kemeja putih dan Jas hitam. Padahal dia pemilik toko alias biasa saja. Pakaiannya juga sering hanya apartemen di kota La CoruAta, Spanyol. Konon, Dia irit membelanjakan Duit Lantaran Pernah merasakan Berjuang dari bawah
ASAL JANGAN PELIT KAYA TUAN KRAB yah , KOMENTARNYA DONG , jangan pelit nih . kalo mau comment harap cantumkan link Sumber
5 Orang Kaya Paling Pelit Di Dunia 
 
Sumber :  http://www.seallinfo.bloggerindonesia.or.id/2013/08/5-orang-kaya-paling-pelit-di-dunia.html

How to pass command line arguments in eclipse java ?

If you use the Eclipse IDE, and want to be able to send command line arguments to your application, then there is an easy solution.

Firstly, select & highlight the class you are working on:



Go to Run > Run Configurations



Select the Arguments tab



In the Program arguments box, you can put whatever arguments you wish the same as if you were specifying them on the command line.

 

In this case, we want to send the argument dictionary.txt
Once you have filled in the Program arguments box, click Apply. Or if you wish to run the application, click Run
Done! This command line argument will be sent every time you compile the code.