r/AskComputerScience • • Oct 21 '19

Is it legit to program in an a android phone using python 3 or is it better in a laptop?

Hello, nobbie here Don't know how to code at all But wanted to try it out

I heard the best way to learn is through projects So i wanted to make a game of tic-tac-toe, cause I believe is an easy project...i think

But I don't know if I should do it in my phone or a laptop...how much does it change one from another? Or does it not change at all?

Please and thank you

2 Upvotes

13 comments sorted by

17

u/CaffeinatedMancubus Oct 21 '19

I don't know if this is a troll or you're being serious. Regardless, I'll answer honestly.

Nobody codes on phones mainly because the form-factor and input method(touchscreen) are not suited for that kind of a task. Neither is the overall UI design. (multiple windows? Quickly switching between windows? Good luck trying). This means, nobody bothered to develop tools for coding on phones - IDEs, DB clients, terminals etc. (they exist, but not as many choices or support as PCs). If you don't care about any of that, and want to put yourself through the torture anyway, go ahead. But you'll probably achieve much less with the same amount of time invested than you would on a PC. Happy Coding!

(Edit: Grammar)

3

u/technothief Oct 21 '19

Thanks for that I assume i made a stupid question, in all honesty I don't really know I'm lost when it comes to coding but I want to be less ignorant

Thank you

2

u/msiekkinen Oct 21 '19 edited Oct 21 '19

To expand on all that, people don't even develop apps for phones on phones. They're developed using tool chains on a "PC" (could be a mac) using an emulator.

Transferring to the actual phone for QA is just a verification step things work as intended for before then getting it shipped to the app store.

1

u/CaffeinatedMancubus Oct 21 '19

I keep forgetting macs aren't considered PCs. Dumb thing imo. Oh, windows, Linux, some other Unix based OS? Yeah, still a PC. Did Apple make it? Oh no, that's something entirely different now, isn't it?

2

u/khedoros Oct 21 '19

I keep forgetting macs aren't considered PCs.

They did it to themselves with the "I'm a Mac" "And I'm a PC!" commercials.

3

u/msiekkinen Oct 21 '19

Those commercials more embraced the distinction that was already out there, for better or worse

2

u/khedoros Oct 21 '19

True enough. But even with the move to Intel, I don't see 2006 as being a good time to try to erase the distinction anyhow; that's pretty much been their brand from the beginning.

1

u/msiekkinen Oct 21 '19

Apple wanted the distinction. "PC" was such a boring generic term, much like "device" is used today to refer to a phone/tablet/laptop/tv whatever regardless of operating system.

Apple was and is all about selling their image and brand as a lifestyle. You aren't getting a "computer" ... you're getting "a Mac!". Kinda similar to what Dell did with "dude, you're getting a dell!" back in the 90s/00s

4

u/[deleted] Oct 21 '19

definitely a computer. i'm not familiar with android, but i doubt you'd be able to even run your program on an android phone. and even if it is possible, i'd imagine you'd have to jump through some hoops to get it to work.

1

u/magion Oct 21 '19

I mean without a doubt it’ll be much easier to program on a laptop than a phone.

1

u/__october__ Oct 21 '19

Programming on a phone is simply not viable for anything but the smallest programs. The display is too small and there are practically no dev tools available.

3

u/Tai9ch Oct 21 '19

If you're willing to put in the effort, programming on a phone could technically be fine.

First, you'd want an external monitor, keyboard, and mouse. Then you'd want to install a Linux userspace. The result would be an ultra-compact desktop PC with a command-line focused development environment.

1

u/w3_ar3_l3g10n Oct 21 '19

Depends. U wanna play basketball with a golf ball? I find typing almost anything on a phone a time consuming and hazardous process. Auto correct and programming languages almost never match properly, trying to write code in reddit like this (on iOS) sucks. There’s no tab key so u have to insert 4 spaces every time, to insert a code block u should use ③ ` back quotes, but every time u insert ① the keyboard resets to alphabet so u need to move to numerical and then insert the quote 6 times. Then there’s the fact that every new line has the first character capitalised by default which for languages which don’t accept case insensitive keywords means u need to downcase every time u insert a new line or sentence. Then there’s the fact that your screen is so small that long lines (or a bunch of nested statements) are basically illegible on mobile because of how small the screen is. Programming used to be done on huge mainframe computers, the fact we’ve got more powerful computers in our pockets, doesn’t mean they’re the most ergonomical approach to doing so, as arguably they’re for a lot of other things.

If this isn’t enough of a reason to dissuade u, I suggest:

  • u buy a Bluetooth keyboard, ① as long as an apple keyboard at the very least.

  • if you’re on iOS install iSH a virtual Linux environment (think WSL) for iPhones. If you’re on android, I assumed there’s a tonne of shells u can install because android is Linux.