What do you use?

Patrick.B

Member
Messages
96
Reaction score
4
Points
8
Hello !

I wonder who of you uses a local web server before you upload your code?

What type of machine you use (make and model) to make it a local host server?

What kind of OS do you use ..?
 

essellar

Community Advocate
Community Support
Messages
3,295
Reaction score
227
Points
63
I usually just use the machine I'm developing on (often in a virtual machine, but not always). That means making some adjustments if I'm using a Windows machine, since the devices (/dev) "path" doesn't exist, and being fastidious about case (since Windows is case-insensitive in a lot of areas where other OSs are case-sensitive) and making sure that all of the special characters I use are "safe" everywhere. (That's a good idea in any case, since anything that doesn't fit in 0-9, A-Z, or a-z is likely to have a special meaning in some language or other, and the last thing you want to do is write code that accidentally becomes an exploit when you use a different tool.) And there are some translation utilities that need to be in place, with OS detection, for some things that whatever programming language I'm using doesn't translate automatically. Of course, that's a "small projects" approach, and it won't work for everything. It's also not particularly robust, and it does mean knowing and observing the differences between operation systems.

In general, what you want in a separate dev server is the worst piece of crap that will run your desired environment (operating system, web server layer, programming language runtimes, database, etc.).¹ Low memory, slow processors, slow Ethernet, disks that write things out longhand and send it via snail mail, and so forth, can help you spot problems that you'd never know about if you were using the latest and greatest. And it will still be faster than a shared server or a small VPS if it's on your LAN. You do want to use a 64-bit machine, though, unless you know that you'll be writing for a 32-bit environment (there are some BIG differences in math and equality-checking in several types that can bite you). That means that the Raspberry Pi isn't quite an ideal machine: it's got everything you want except 64-bit processors. Too bad, really: the Zero would be an ideal machine if it were 64-bit: it's slow, has memory that wouldn't have been out of the ordinary in 2000, and everything passes through either a microSD card or a single USB port. If you're buying new, that means that anything that isn't ARM- or Atom-powered will do just fine. The chances are pretty good, though, that you'll have an old machine lying around, or can find something used, that is more than up to the task, since anything "mainstream" made in the past eight years or so will probably work.

If you assume Linux as a server operating system, you don't need to get too worried about the distro, either. That's mostly about preference and package manager semantics.

So, to sum up: you need a 64-bit computer. That is all.
__________
¹ Yes, I know that developers want everything to go licketty-split, so they think they want a fast machine. Their code probably won't be running on a fast machine "for realz". What they really want is a dev machine that will force them to write code that will go licketty-split on the small slice of the over-burdened server that their code will eventually be running on in production, even if that means a few frustrating seconds spent waiting for things now and again in development. Bad is good. A powerful development workstation, one that will run your editor/IDE as fast as you can think, is good to have, but the machine that runs the code you write needs to highlight your idiocy whenever you do anything idiotic. (And we all do.)
 

Sharky

Community Paragon
Community Support
Messages
4,399
Reaction score
94
Points
48
So Raspberry Pi 1 model B?
Wikipedia said:
While operating at 700 MHz by default, the first generation Raspberry Pi provided a real world performance roughly equivalent to 0.041 GFLOPS. On the CPU level the performance is similar to a 300 MHz Pentium II of 1997–99. The GPU provides 1 Gpixel/s or 1.5 Gtexel/s of graphics processing or 24 GFLOPS of general purpose computing performance. The graphics capabilities of the Raspberry Pi are roughly equivalent to the level of performance of the Xbox of 2001.
 

essellar

Community Advocate
Community Support
Messages
3,295
Reaction score
227
Points
63
If it weren't for the 32/64-bit thing, it'd be perfect. Especially when you remember that you can load a whole new config/environment by changing an SD card. (A Docker that actually docks? Cool.) Honestly, for most CRUD, it would probably work; it's only when you get into deep equalities (lots o' bits in your data type) and maths that can't be "close enough" that it makes a difference. When it does make a difference, though, it can be a big difference... of the hair-pulling where's-the-bug-I-can't-find-no-steenkeen'-bug variety. In production, of course.
 
Top