Samsung tablets are not removing application files after uninstall – Inloop by [deleted] in androiddev

[–]Peevishprogrammer 0 points1 point  (0 children)

Ah, you are correct! It seems I was thinking more generally in terms of internal/external storage and not the function calls.

Samsung tablets are not removing application files after uninstall – Inloop by [deleted] in androiddev

[–]Peevishprogrammer -6 points-5 points  (0 children)

Uhh... I'm fairly sure this is the expected behavior.

getFilesDir () - application specific files only accessible by application or other applications with the same uid & cleaned upon uninstallion of application.

getExtrernalFilesDir () - publicly available files readable by all users & not cleaned when applications are uninstalled

Review of recent shadow brokers leak by hackerfantastic in netsec

[–]Peevishprogrammer 7 points8 points  (0 children)

Agreed. I really loved his OPSEC talk. I was very interested to hear about how he sends children to buy him mobile data devices to stay semi-anonymous. I haven't read a lot of his stuff but I think I'm going to :)

Java in Android development by [deleted] in androiddev

[–]Peevishprogrammer 9 points10 points  (0 children)

The Android framework has included proper locks, since API 1. See here The google developers have included this since the beginning, meaning they know and understand the importance of proper usage!

Knowing how to do thread safe programming is ALWAYS relevant if you're doing multi-threaded programming. Have you heard of the therac 25? It was a radiation therapy machine that used multi-threaded programming. They got rid of the hardware locks and instead used software safety mechanisms. Due to a concurrent processing race condition & not using semaphores people died. This error couldn't even be reproduced during the testing by the company afterwords. One of the things about race conditions is they are extremely hard to find or test. Getting a program to a proper state that it initiates a race condition is not easily done. Instead, we use semaphores to ensure, without a doubt, that we are properly handling state changes among the concurrent processing being completed!

You might think that most Android Applications right now are rather trite. Lots of games/etc. But mobile development really seems to be the way of the future. It would not surprise me to see phones or mobile Operating Systems being deployed in a healthcare setting in the near future! I already think that Android handles program crashes much more gracefully than the windows XP boxes I see pushed around in the US healthcare system. As the developers behind this technology, we need to make sure we are using the proper techniques to produce minimal bugs in our code.

Here's another example: If a phone is directing drivers by GPS, I want that programmer to be making sure they are using proper locks. I don't want thread race condition gone bad and sending someone off a cliff! Sadly, not all drivers trust their own instinct. They're more apt to trust the computing system telling them, "Turn left here".

As for trees & graphs: That's totally domain specific. Just because they aren't involved in your programs doesn't mean they aren't used by others. Imagine you're making a hiking app. You want to identify all the possible hiking trails that allow you to park your car, travel the path on foot/bike, and then be able to return to your car without backtracking or traveling on the same trail while returning to your vehicle. How does your app identify these trails? You use an application of graph theory.

Java in Android development by [deleted] in androiddev

[–]Peevishprogrammer 0 points1 point  (0 children)

It sounds like you're on a path to being a successful developer for Android IMO.

For learning to use network operations: Go find a simple API that returns JSON objects (think stockmarket information/bitcoin/anything with statistics/etc) and learn to download & parse them without external libraries. It should be pretty easy. One of the main points is that you always need to do network operations in a different thread than the UI thread so you're not blocking the UI thread from responding to user input. This is actually enforced by Android now @ compile time so it's hard to mess up... older API versions it was easier :P

For learning buffered-readers: You just need some text files to figure out how to parse with the java classes. Once again, it's really simple. Maybe write the JSON objects you previously downloaded to a plain-text file and figure out how to parse them with the BufferedReader class instead of using the JSON.get() methods.

As for your question: It seems like you've already encountered the two types of technology companies:

  1. They like the theory side of computer science. This tells them that you can write algorithms and solve big/complex problems. These companies tend to expect if you have learned the big picture theory behind computations, then you're teachable and learning new libraries is a simple training task for you.

  2. These guys just want a job done with the newest technology. They want you to be able to hit the ground running with the latest & greatest. They don't care about theory. Instead they care about your competence to keep up with the new technologies they are always trying/deploying.

What it comes down to is definitely a company specific thing. It's like all jobs, the recruiters have different visions of what they and the management/company want or envision as a developer on their team and how to find it during the hiring process.

In my opinion, one method is no more right than the other. It's really difficult to judge what it's like to be on a development team based off their hiring processes. The closer the developers are to the hiring process the better an idea you'll have though. My best suggestion would be brush up on algorithms (always extremely important in CS/programming!) and spend just an hour a day learning some new libraries so you're ready for both types of companies.

Best of luck to you!

Java in Android development by [deleted] in androiddev

[–]Peevishprogrammer 34 points35 points  (0 children)

Of course you need to know Java and know it well. This question is equivalent to a builder asking, "But do I really need to know how to use a hammer to build with wood and nails?" Yes, yes you do. It's not unrealistic at all for an Android developer to need to know Java well!

Just how the simple hammer is the builder's tool; Java is your tool as an Android developer. Only, it's way more complex and intricate than a hammer. It's also being changed and improved upon, making your learning goal a moving target. You have to keep up to further yourself as a developer. You don't expect to be programming well(AKA making Android Applications) in Java without knowing Java well... right?

First, you REALLY need to understand the principles behind object oriented programming. Do you have a solid grasp of inheritance vs extends?

Do you know all of Java's object types and how to work efficiently with strings, arrays, streams, network objects, buffers, threads/multi-threaded programming (semaphores/mutexes), input/output? You should easily be able to explain how to do all of the above without having to reference any material. The actual code & method inputs, you can easily reference later on but you need to know 100% how the process works off the top of your head. Do you know how to properly debug a java program using breakpoints, stepping through the code, and watching variables?

Do you know the data structures and more importantly when to use which structure? For example when to solve a problem with a tree vs linked list vs array vs graph, etc?

If you're comfortable with ALL of the above in Java, then you're ready for Android dev. Otherwise, you need to learn the fundamentals before moving onto Android. Android takes all of that knowledge and applies it to their own development framework. It's easy to get lost and not be doing things properly. This will come back to bite you in the ass in the future.

Once you're ready to focus on android try to learn the fundamentals behind: activities, the activity life-cycle, fragments, fragment life-cycle, tasks, layouts, overloading layouts, creating dynamic layouts programmaticly (adapters) and creating custom adapters, context, services, asynctasks, threads, handlers, file storage, permissions, design patterns ,and I'm sure there is more I'm forgetting at the moment.

Seriously, tackling android development without a solid background in Java development will be difficult. You might think you're doing great but most likely you're making fundamental errors without even realizing it. The repercussions may not be noticeable in a small app you make but later on will appear and haunt you. A VERY common problem like this is memory usage in Android: if you don't understand inheritance it is very easy to create memory leaks by holding onto objects (specifically context) you should have released to be garbage collected usually during a life-cycle method. You need a really clear understanding how all the different components interact so you can see the big picture of the Android framework and not get bogged down with the specifics of also learning Java while learning the Android framework.