Skip to content

u/codefocus

In this archive from Jan 2010 to Jul 2016

1
posts
170
comments
0
media
519
score

This makes me worry that we'll start seeing classes with a public and a private version of every function, where the public version calls the private version, to ensure type safety.

0 points

I'll echo that having a plan is crucial when slowly refactoring an ancient codebase, so you don't end up inadvertently spaghettifying it even more.

Slowly refactoring is usually the only way to go though.

1 points

I still lease 2 ~15 year old web servers that I don't want to move or even touch too much because they run my DNS.

They can probably be replaced by a $5 instance somewhere but until now, the work and possible downtime involved hasn't been worth the savings.

6 points

When you're in the "I need 128GB of ram to handle all this traffic" bracket, you'll need more than just one server. At this point, spending a few grand more to avoid having a single point of failure becomes necessary:

  • 2+ web servers
  • 1+ database servers
  • 1+ load balancer
  • 1+ backup server
  • 1 guy to maintain the network infrastructure, willing to wake up and drive to the data center at 3am to fight fires if necessary.

And if you're not making enough to pay someone to manage all of this, AWS and GAE should start to look real attractive.

3 points

Give Google AppEngine a look as well.

They're free up to certain quotas, which is great while you're in development, and they scale automagically.

I have a few apps on there. Nothing huge, they serve 5000-8000 daily visitors each, but it's really nice not having to worry about scaling. And because they have data centers all over the world, load balancing, caching and geolocation is taken care of as well. All you need to do is build the app, publish, and Google does the rest.

They're a bit pricey when you do get huge, but at the point where that becomes an issue, you should be making more than enough money to pay for a group of specialists to set up your own network (to give an example, Snapchat is considering moving off GAE to conserve cost).

2 points

Yeah. I paid $99 for phpStorm and the same for Coda. Both among the lifetime top 10 best purchases I've made.

$99 is about 1-2 hours of development work, depending on your rate. That's a bargain compared to how much time a good IDE will save.

2 points

Yes and yes.

Besides the fact that anything using PayPal gets tainted with an amateurish image, Many consumers already actively distrust Paypal, with good reason. They're known to freeze people's accounts, being extremely uncooperative and flat out stealing people's balance if "their system suspects unusual activity".

Stripe is a well known (albeit fairly new compared to PayPal) payment processor that I, as a developer as well as a consumer, trust a hell of a lot more than PayPal.

Plus, having an actual CC form on your site looks professional.

2 points

Since it's a pretty straightforward thing to build, I've just gone ahead and started it. Once it's at a state where it's usable, I'll post a Github link on /r/php for people who'd like to use and/or contribute.

There are two parts of this where I'm unsure which direction to take:

  1. The database connection. The way the base works now is that it creates a new connection (PDO, database agnostic) based on a settings array passed to the constructor. But if it's a connection to the same server that the rest of your project connects to, that's a bit of a waste. I'm thinking of an optional constructor argument (the existing PDO object) but that seems a bit hacky. Another option I'm considering is to write a StorageEngine interface, with two provided: PDO and File. That way, people can just extend StorageEngine to use their own database / file / cloud / bag or /dev/null if they feel like it.

  2. The admin. Developers want freedom, but they don't want to each re-write an admin interface to the same backend. Would you prefer seeing this provided as an optional part of the package, or as a separate set of "example" files that people can just hack around in or copy/paste parts from?

1 points

Keyboard shortcuts

Move and act

jork
Next / previous post or comment
Enteroro
Open the post
f
Open the media viewer
s
Save
h
Hide (the toast has Undo)
Tab
Right after an action: the toast's Undo
x
Collapse the comment
v
Next layout: cards, compact, grid

Go to

/
Search
gthenh
Home
gthena
All
gthens
Subreddits
gthenl
Library
?
This list
Esc
Close a menu or this list

In the viewer

←or→
Previous / next file
↑or↓
Previous / next post
korj
Previous / next post
Space
Play / pause
m
Mute
z
Zoom
s
Save
o
Open the post (on its own page: back to it)
Esc
Close

Keys do nothing while you type in a box.