Skip to content

u/DiscontentDisciple

In this archive from Oct 2010 to Jul 2020

1
posts
24
comments
0
media
58
score

Top posts

Backup Strategy?

I'm up to 130TB of Redundant Local Storage, but trying to figure out the best way to backup the data and move offsite - for this volume of storage, the commercial cloud providers are out - it'd be several hundred dollars a month. Tapes? Build another low power server and stick it somewhere else to r...

4 points8 comments
Open on Reddit

Top comments

Do you have test data? You could refactor it and just teat to make sure you get the same output. While your code may not handle every edge case since you don't know the business requirements that it addresses, you should be able to get the gist of it.

My guess is it's poorly written, no single class should be incomprehensibly large. So this is someone throwing their entire business in main()

Also, you could try walking through it and just comment the shit out of it. Start with what it's actually doing since you don't know why. If you're using an editor that allows you to collapse sections, comment then collapse leaving the comment visible, this will leave you with the flow. Your comments will suck without the why, but it might be enough to figure it out.

6 points

Just keep coding man. I look at code I wrote a year ago and wonder what the hell I was thinking. It happens to all Programmers. The trick is establishing some "best practices" that you do and always meet those and if some of your queries aren't optimized or something it doesn't matter. Just make sure you do the things that are on your best practices list (Hash Passwords, Don't pass sensitive data in plain text, etc. etc)

5 points

try breaking the URL into Segments 3 and 4, with 3 being http or https and 4 being the rest of the URL.

Then you can add the slashes back manually, or just use CI's prep_url() command if it's http.

edit, or just send it without the http/https and add an optional 4th parameter to handle the few https cases you get.

4 points

Subreddits

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.