Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed last year.
Improve this question
Is it really important to know algorithms to build mobile applications? I have strong understanding of development tools and design pattern as well as strong knowledge of OOP and MVC.
So, is it required to know hardcore algorithms to become a good mobile application developer?
I can understand that if you want to create games then YES it is obvious that we must know all the AI related algos to be competent. But I am asking for just simple data driven application building.
Every computer program you write implements an algorithm or a set of algorithms. If you are concerned with the quality (deliberately vague term) of your programs then you have to be concerned with the quality of your algorithms.
For example, if you want your program to be fast (which is a quality that a program might have) better choose a fast algorithm than a slow algorithm for the same problem. If you want your program to fit into a small amount of RAM (another quality factor) best choose an algorithm which operates in a small amount of RAM rather than one which gobbles it up by the GB.
So, critical knowledge for a software developer includes the knowledge of how to analyse an algorithm for speed, memory usage, and all the other quality factors you might be interested in optimising. One way of analysing an algorithm is, of course, referring to texts which tell you what you want to know.
I conclude with the assertion that yes you do need to know hardcore algorithms to be a good developer, I don't see any reason to modify my belief when it comes to mobile applications development. Of course, I don't expect you to know all about all the algorithms there might be, but the principal ones found in all the basic text books, and the ones which are specific to your application domain, hell yes you gotta know those rascals !
I think it's irrelevant being for the mobile area or not. You should always try to achieve the best possible solution (there aren't perfect ones). In the mobile area, particulary, performance is very important, because we are talking about small devices, that although in recent years have been getting a major hardware boost, you should always take special care. I always use memory leaks to check if something is wrong with what I do. I also check the heap memory to see if there is something consuming too much memory. Battery is also a concern and you should also test if your application is using too much.
At the moment I am really focusing on the architecture of the application, a working application in the current standards (at least on my owns) is not enough. Knowing patterns is a powerful tool, and you should read about those (one of the best is this one). Maintenance's costs are a major factor these days, and you should try to achieve the maximum code reusability and cleanness. Always assume that the client will change spec and always keep in mind that someone else in the future will maintain your code, so avoid long methods and over complex code (unless you have to do it). Also remember to leave comments, even if something is really simple, be humble... In a month you might not now what that "simple" stuff did. Those things are fairly easy to achieve when you are starting a project from scratch but a pain when you need to start thinking about those when the project is going to production in one week..
So as for your question: is it required to know hardcore algorithms to become a good mobile application developer?
My answer is: No, it helps, but there are others important parts when developing, besides algorithms.
Good algorithms can have a direct impact on battery consumption for your phone as well as how much of a memory footprint it has. Every developer should strive to use the best algorithm possible, but that doesn't mean it is absolutely necessary.
The smaller and more resource constrained your platform the more important it is to know algorithms. So on mobile it would be even more important.
Related
Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 8 years ago.
Improve this question
I'm new in android, I want to know what is the right way to write a code in an android project or which architecture or model should we use in our project
example n-tire, MVC or other?
check out this thread:
Tips on organizing larger Android projects?
and this one:
MVC pattern on Android
and this one:
Which design patterns are used on Android?
and this one too:
Android MVVM Design Pattern Examples
Organize it in whatever way makes the most sense to you. There's no 100% correct way to organize an Android project... it depends on a number of factors (i.e. the size of your project).
If you want to see how Google organizes their projects, take a look at the Google I/O 2012 source code. In particular, check out the iosched.util package... it gives a number of ways to reuse code across your project (mostly by using static utility helper methods).
This is actually a debatable question, but I will give my two pennies.
Considering Android is a portable system you need to consider that your application will not have unlimited power, and the power it does have has to be shared with other applications running on the system, by power I mean battery life, considering a large number of Android devices are actually quite healthy in terms of CPU and RAM, however even though most devices have more RAM these days, this RAM is still shared with other applications, so it should be used sparingly.
That said, any elaborate, highly engineered solution that prefers layering and abstraction over simply 'getting the job done' will probably suffer in the long run, the bottom line is the less instructions your application executes and the less memory your application uses, the more efficient it will be.
To give a more practical answer to your question, I would first make sure you are comfortable with core Android components such as content providers, services, broadcast receivers, intents and handlers, etc and work out from there.
Sorry for not giving a more specific answer, but I hope that helps a little.
I am developing a pathfinding algorithm for an Android game, and I can write a recursive version (which is nice, but needs a big stack, so I might need to create a dedicated Thread for this with bigger stacksize), and a "loop" version which uses a buffer (instead of recursion). It is also a big problem that I don't know the size of the buffer in advance, so currently only the stack-based solution looks feasible.
I know this may be an algorithm theory or general computer science question, but perhaps it's Android specific because the stack size is a system-specific feature after all.
Generally, which should be more efficient (speed) on Android? The stack one, or the one which relies on buffer (heap)? Note that the question approaches the problem architecture-wise (assuming that the algorithmic complexity doesn't depend whether the algorithm is recursive or loop-based).
I know you asked for a Android specific answer, but I don't think it's really relevant to your problem. Two remarks
You don't necessarily need a stack based solution to implement a
recursive algorithm, you can emulate the stack on the heap with a
stack based data structure. Some times you don't even need this, though. This takes a bit more work, but don't base your algorithm on artifical architectural constraints.
There are plenty of non-recursive pathfinding, shortest path algorithms, ie Bellman-Ford
I can't comment on whether the most optimal recursive solution to a problem is going to be better than the most optimal iterative solution on Android. Usually, all other things being equal, the iterative solution is going to be faster, but when you get to more complex algorithms than say, Fibonacci numbers, implementing an iterative algorithm recursively or vice-versa might make a difference.
My gut feeling is you're about to commit the sin of early optimization. Do you have any calculations or measurements that indicate you'll run out of RAM?
I recommend that you use the simplest algorithm you can. You may however want to use AsyncTask so as not to freeze the UI, even for a second.
Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 12 years ago.
Improve this question
I'm doing a little research about this subject. It's for my blog. So, I'm looking for some experiences about this.
I have the "user's side" of the story, I think they want it better if it's on Spanish. But, what about the programmers? Do you make your programs multi-language? Why? Why not? Are you ok with paying somebody to translate your app or you prefer doing it yourselves? Is the benefit bigger than the costs?
Thanks!
In the iPhone videos: http://www.eng.utah.edu/~cs4962/schedule.html they talk about this, and give some advice on it. Basically the advice is Yes convert to another language, and you can probably find a student at a school willing to do the translations very cheap.
You also have to look at the "huge" Spanish speaking population in the world. I may have a bias as I live In Texas and 1/2 the radio, tv stations are in Spanish, I would defiantly translate my apps into Spanish, along with several other languages.
The languages that they mentioned in the videos that converted the best for them were Japanese, Italian, Spanish, and Russian.
If you need to go on the cheap, you can always use Google Translate to translate your text, and then ask your uses for grammar fixes, people like interacting, and feeling like they made a difference.
It's also relatively easy to add multi-language support to an iPhone.
Here's some information on localizing your iPhone appl
http://www.icanlocalize.com/site/tutorials/iphone-applications-localization-guide/
I'm sure you can find similar things for Android.
-Brad
It depends on the use case. When writing a LOB application, I use resource files, satellite assemblies etc. to be sure to keep the portions of the user interface that could be potential localization targets out of my code. You don't really want to hardcode your text into your source code.
In my case, most of the time it is not an issue, I'm doing mostly custom development for clients. It's a completely different story for mobile apps, though - you just upload them to the app store, not knowing who will buy and use them, so there, providing localization sure is an issue. Seeing as it's not really hard to do (i.e. the effort involved in loading strings etc. from resources vs. hardcoding them), the benefits outweigh the costs IMHO. I have no hard marketing facts about this, but I know by experience that translating an application to Chinese opened up a whole new market for us, whereas before we had thought English to be absolute sufficient - turned out we were wrong in that regard.
As for the DIY thing: Don't do it, unless you are very proficient in the language in question. It seems this is kinda obvious, but you always encounter poor translations in applications, and this really takes away th professional feel of the app. Just my 2 cent.
I would definitely give it a try. In Spain, not many people are proficient in English, so if you want to sell in this market, translation is a must. In my experience, selling to the Spanish speaking market (basically Spain an Mexico) is harder than the USA, but considering that the cost for localizing an iPhone shouldn't be to high, it's worth trying.
Just make sure you get yourself a translator that is computer literate.
Google Trends is a great tool to determine the size of your non-english market.
http://www.google.com/trends?q=tumblr&ctab=0&geo=all&date=all&sort=0
If you're writing a Tumblr app, having it translated into Filipino and Malay would probably be worthwhile.
As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 12 years ago.
Google Labs will be rolling out something called Google App Inventor (for Android). CNet says:
"To use App Inventor, you do not need
to be a developer. App Inventor
requires NO programming knowledge.
This is because instead of writing
code, you visually design the way the
app looks and use blocks to specify
the app's behavior," the Google
project description states.
I sense a big, big development here. This is big. The Android platform is really gaining ground on a big range of devices: phones/pda's, netbooks, tablet pc's and embedded systems.
The underlying Android SDK is a well-written framework, but only a reasonable java-programmer has the knowledge to use the components to build a proposed piece of software.
I spoke a lot of people about the android platform. A phone with Android is not a phone. It's a device with wireless and 3G internet capabilities, bluetooth capabilities, a camera, a speaker, a microphone, a touchscreen, a motion sensor and a GPS receiver. These components can be combined in endless ways, the sky is the limit.
Until now, you would need to hire a Java programmer to build that 'genius app' for you.
But now, everyone and his sister will be building them, publishing them, and improving them.
Don't you think this is going to be big?
No, I don't think that it is going to be big. Not really.
It's not going to be nearly as big as the hype, which will fade. There have been dozens and dozens of programs that have tried to make it possible for non-programmers to create applications. They have all dramatically under-delivered, and even though I respect the heck out of Google, there is no special reason to think that they have solved the intransigent problem of programming being hard.
Also, it is important to remember that Google LOVES to release products that are still immature and requiring significant polish. They also kill under-performing products without any sentimentality. This looks tyo me like a classic Google trial balloon app. Don't be surprised or heart-broken if it suddenly disappears with no fafare.
I take issue with the statement that developing a program will require "NO programming knowledge". This is bordering on marchitecture.
So-called "programming knowledge" is more than just being able to remember syntax and string together text that can be compiled into something a machine can execute. It requires problem solving skills, the ability to develop and analyze algorithms, wrangle with complexity, modularization, so on and so on. These are essential skills of a programmer more so than the ability to recall syntax.
If anything this may make simple programming tasks more approachable to people that have problems understanding/remembering precise syntax, but it will hardly eliminate the need for programming skills. I can see it being useful in an educational environment where the goal is to lower the barrier to entry for understanding programming topics without syntactical nuances getting in the way.
Actually, I would be tempted to use this topic as an interview question and weed out any candidates who claim it allows you to develop a program without any programming knowledge or otherwise level the playing field between programmers and non-programmers.
While I think the other answers have got it right that programming is a slowly learned skill that cannot be replaced overnight with a nifty interface, there are a couple of things that may yet make this pretty interesting:
Built-in support for interfacing with popular services like twitter, etc..
The ability for power-users to do crazy and interesting stuff by stringing together some formulas. Sometimes a power-user with a crude tool can be more in tune with solving real problems than a programmer who is trying to brainstorm an app that will sell. I'm thinking primarily of Excel here, where a business user can learn a powerful mini-language to solve their personal problems, often in ways that are either brilliant or horrifying.
Will it result in tons of crappy apps? Probably. But it will also put pressure on Java developers to up their game and produce better stuff - or get buried in the flood.
I don't think this is going to be big but I do think that this will open the door for non-programmers to be introduced to programming and possibly increase the supply of programmers after non-programmers get a taste for software design. As other posters have mentioned this has been done before. What makes this different is the popularity of Android. My guess is that this will bring in 3 different types of people:
Business men and women who have
an idea for an app and want to avoid
hiring a programmer,
Non-developers that are interested
in learning how to program and use
this as an introduction to the
mindset, and
Existing developers that just use
this as a means to develop apps
faster and easier.
I don't think this will change the way people program though. My guess is that this will only allow you to create basic apps and in order to get into the more complicated stuff you'll need to dive into the code. This will open the door to more "developers" though.
There's been exactly one really successful end-user "programming environment" since Basic that I can think of and it's not Visual Basic on Windows or Rexx on the Amiga or even Logo for kids. It's HyperCard.
HyperCard spawned a huge number of people doing stacks for their own needs and for others like I've never seen. There were even commercial programs (even games) written using it as an environment.
So how well does this emulate the things that made HyperCard a success?
Well, HyperCard came with new Macs
and was reasonably cheap unbundled,
App Inventor is free so that's even
better.
HC had a very simple paradigm
that was easy to understand, I've yet
to see what the programming
environment is like for App Inventor,
but it's hopefully not too bad.
HC could be hooked to almost anything
via various extensions. App Inventor
is Java under the covers, I think we
can safely say that it is a full
powered language with connectivity to
everything under the sun.
The biggest problem with Google is that they lack the things Apple is best at, hand holding, packaging, removing layers that might intimidate newcomers, sizzle. You only have to watch (perhaps cringe) through one of Google's I/O conference keynotes and compare it to the slickly produced product rollouts that Apple has done for years to get a sense for how well they can sell things. Selling is not their forte, and that, more than anything else, can temper the adoption of App Inventor even if it's great.
I think that this could be problematic... I mean even seasoned java developers are creating apps that interfere with the main thing that the platform is there for ... the users phone.
App inventor might be useful for games, but do you really think that it can be used to create media player apps, security apps, etc?
General purpose visual programming tools have been attempted and subsequently failed, hard, since the 60s. Possibly even the '50s.
The only ones that have done "okay" - to my knowledge - are ladder logic tools and Labview. They are fairly limited in scope.
So Google App Inventor probably will mean the rise of a few nifty widgets, a slew of "meh" ones, and a long tail of failures. Much like other programs. But I don't think it'll Radically Change The World. I could, of course, be wrong. Google may have gotten with a disruptive idea and has a realistic visual programming model. They have the money and the brain trust to find or happen upon one.
This sounds like an advertisement or something. No, I think App Inventor is subset of what MIT's Scratch is and I think this will just be a vehicle to deliver millions of useless porn clips and wallpapers. I found Google's video to be laughable, of all the things, a woman makes a cat wallpaper app that purrs? I think it is very naive to think that this will "democratize programming" or whatever cliches people like Seth Goden are likely to bandy about.
Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 10 years ago.
Improve this question
Tomorrow I am buying an HTC magic phone on the Rogers network. Since it runs android (the only reason for picking this phone :) ), I was hoping to do some playing around with it, writing applications for it and the like. But first of all, how? Do I need some special cord? I know about the android SDK, but how do I even get started?
And, the main point of this question: I've never programmed for anything besides a website or a PC before. What is strikingly new and exciting about writing software for a phone? What are some things I should try to write, which aren't too difficult, and will maximize my "OMG AWESOME" moment density per unit of time?
Oh, one more (possibly stupid) question: What language do I write in? Java...right? Is there any other languages or frameworks I can use to write for this phone?
Note that there's nothing special about this phone: It's not unlocked anything, I didn't order it as a developer phone from Google, I'm buying it out of a Rogers store on a three year contract.
You can phone up your significant other and talk.
Here's what you need to do:
install Eclipse and the Android SDK
work through the dev guide, tutorials and documentation at developer.android.com
join the Android Google Group
Once you're done with that, you should have some ideas on how to proceed. Good luck and have fun!
The big difference in writing software for a phone is the constraints placed on you by the hardware. Forget creating masses of objects and throwing them away. That takes memory and your garbage collecter will end up taking too much processing power away from you to clean up after your mess. There are a number of good videos and tutorials up at developer.android.com which give you more info on how to code 'tightly' for low memory/processor environments. It's actually great fun - you have to think a bit harder about what you are doing than if you are coding for a more powerful environment like desktops.
As for the android OS itself - I think it is fantastic. Just brilliantly designed for something like cellphones. I love the way they use intents to trigger things. Seriously, go take a look at all the tutorials and then play. If you like well thought out software then you'll love android.
I found this book quite handy for rapidly getting into coding on android.
Android book
I'm not a java developer by trade so I can't be sure this guys coding style is a god Java style but he does touch on most of the main topics you need to get started with android. Do the Sudoku example in full - don't cut and paste, actually code it from scratch with the book as a help.
You can take a loot at apple iphone app store, there are thousands of cool apps already, some of them are indeed OMG.
Language - java is the most commonly used.
You can visit the official website, it has a lot of your answers.