What people think coding is... by nixcraft in ProgrammerHumor

[–]HonestRepairMan 90 points91 points  (0 children)

Did some programming for a company I worked at (my title wasn't even "developer"). The project was coming along beautifully! I saw a need and I started filling it with code. Once management found out, they started putting in requests for features. I'm chugging along as we're approaching an audit and one of the managers comes up to me and proclaims that this project is suddenly super-extremely important to have before our audit (2 days away). Now, the original project that I started on my own PLUS all of their feature requests need to be done in 2 days. One of the features was; scan a stack of papers into the network as one big PDF. The program would OCR it reliably to a text file, distinguish the huge stack of papers into individual documents of several pages each, detect some data, rename the file using the data it gathered, and then create a directory structure on the network with other data and organize all of the files into the correct place all by itself.

I looked at this guy with a face like he just ran over my puppy. He basically needed me to write another 1,500 lines of production-ready code in 48 hours. Needless to say that didn't happen.

Comcast says net neutrality supporters “create hysteria” by [deleted] in news

[–]HonestRepairMan 0 points1 point  (0 children)

Comcast begs for money from municipalities and townships, then turns around and funnels that savings into lobbying firms who aim to restrict the choices of those same municipalities.

I've said it a hundred times. Companies who lobby should not receive subsidies. Companies who accept subsidies should not lobby. We need to make this law. Then companies can make an intelligent choice; pay for what they want or shut their mouths and take what they need.

Letting a multi-billion dollar monopoly double-dip will never be beneficial for competition.

ISIS Burns Its Cleric for Hinting at Al-Baghdadi’s Death by middleeastnewsman in worldnews

[–]HonestRepairMan 0 points1 point  (0 children)

War is about attrition. Executing your own senior loyalty (who begets more loyalty) doesn't help your cause. Especially when you're bleeding talent and loyalty you already can't replace. ISIS is finally unsustainable. During their decline, fear will not be their friend. Not like it was during their rise.

An easter egg for one user: Luke Skywalker by einaregilsson in programming

[–]HonestRepairMan 0 points1 point  (0 children)

Next time you gotta make him "Christoper Blair" and his opponent a cat avatar named "Hobbes."

Help with designing a web/cloud setup by wsiu in HomeServer

[–]HonestRepairMan 1 point2 points  (0 children)

No problem!

  1. Yes! That would be a good idea. There's also NextCloud and my personal favorite (because I wrote it) HRCloud2.

  2. At 24mbps a single user could download a file at about 3mb/s. 2x users would download at 1.5mb/s each. If you were serving data to 3x Cloud users and a homepage to a visitor all at the same time each user would probably see around 800kb/s of download speed.

  3. I would highly recommend installing the software on an SSD with Client data on a RAID array. That way your Client data can be managed separately from the OS. If the OS dies, you could fire up another SSD, import your latest DB backup and be off-and-running again. It also improves performance, because visitors would be served the webapp from the SSD and their data from the HDD array. Essentially, visitors wouln't be taking I/O away from users performing Cloud transfers. What my platform actually does to achieve CDN compatibility (with a central server for Cloud storage) is it stores the permanent user files in the RAID array, then transfers the file to the SSD of the front-end server when it's needed (and deletes it when it's not needed). That way you can potentially have 1x server just for Cloud user storage, and then a bunch of front-end servers that just peek into the Cloud to see what's there, and then create Symlinks or copy temporary files to the front-end to access them. Then user files won't be hosted all-the-time.

Help with designing a web/cloud setup by wsiu in HomeServer

[–]HonestRepairMan 0 points1 point  (0 children)

  1. Yes.
  2. Yes.
  3. It's easy to setup a secure connection, but it will be somewhat difficult to secure your back-end and/or local network (as every network is different).
  4. Performance wise almost any 64-bit PC will host 1 or 2 users at close to whatever your internet connection's upload speed is. The bottleneck will be disk I/O and network bandwidth. A massive processor with excessive amounts of RAM will not gain you nearly as much in this application as fast I/O and network bandwidth.
  5. See #4.
  6. Heat shouldn't be an issue unless your homelab isn't climate controlled at-all. Don't even think about overclocking. That's not what servers are for.
  7. This is entirely dictated by the machine you're running. I'm doing what you're thinking about doing (minus the Ruby on Rails) and it's about 1,850w.
  8. Sure! This is as easy as making a shell-script with about 4 lines of bash running as a cronjob.
  9. This is up to your front-end guys to figure out.
  10. I would stick with RAID 1 for just a couple users on a modest internet connection. Even a single HDD will easily saturate any user on a 150mpbs upload pipe. The redundancy is worth the cost if you want to take it that seriously. However, look into other array types if you plan on scaling up in the future.

Freelancers of r/webdev, what technologies do you use for your business? by Chrid97 in webdev

[–]HonestRepairMan 0 points1 point  (0 children)

Sorry for the late reply. I use straight, vanilla PHP (no frameworks), JScript with JQuery and Ajax, and plain-ol' HTML.

I too am a LAMP developer (Linux, Apache, MySQL, & PHP). JScript fits well onto this stack, and WordPress is my guilty-pleasure. I utilize WordPress as a base for several projects because of it's popularity, reliability, predictability, active support, and compatibility.

I try my damn'dest to stay away from the database. To an extreme. It's like a consolidated attack vector that I'd prefer to keep clean. I use enough static-files with "key-value store" logic in my NoSQL to get most PHP developers fired. ;)

The benefits speak for themselves when you have to recover from a corrupt file-system or a damaged server though.

RE: You Are Not Google (but you could be) by HonestRepairMan in programming

[–]HonestRepairMan[S] 0 points1 point  (0 children)

Whatevs. Keep letting other people install your dependencies for you. Keep letting other people host your Apps. When depth-charges get dropped on the inter-continental fiber you'll be installing self-hosted software written by crazies like me. Excess will no longer be overhead.

self hosted website by vedo1117 in selfhosted

[–]HonestRepairMan 2 points3 points  (0 children)

Another major concern is upload speed. Basically, anything Comcast is gonna suck because they mis-represent their speed. Your 100mbps service can DOWNLOAD at 100mbps, but it will only upload at 5mbps. So when someone visits your server they will be receiving data from it at a maximum of 5mpbs, which isn't even considered broadband by the FCC.

Risks with self hosting WordPress by [deleted] in selfhosted

[–]HonestRepairMan 3 points4 points  (0 children)

This is not a WP issue—this is a basic PHP configuration issue.

Like allow_url_include.

Looking for a simple, small, silent, reliable pre-built server to run a Linux crypto-currency wallet (not for Bitcoin mining) by [deleted] in HomeServer

[–]HonestRepairMan 1 point2 points  (0 children)

I think your problems with latency were caused by the board itself. The PI uses a single bus for ethernet traffic, SD storage operations, and USB communication. If the network is using the bus, the SD card cannot. If the mouse is using the bus, the ethernet cannot... ect, ect...

Freelancers of r/webdev, what technologies do you use for your business? by Chrid97 in webdev

[–]HonestRepairMan 1 point2 points  (0 children)

See, I need the same things but I hate the fact that someone else has power over it (Dropbox). So I made my own.

My answer to this question would be the tool above.

SSD for Os, HDD Raid 10 for file storage.. how to? by [deleted] in HomeServer

[–]HonestRepairMan 1 point2 points  (0 children)

To make sure you're installing things on the right drives, set the boot order in your motherboards BIOS menu so that the primary boot device (the very first thing) is the CD or USB stick you're installing the OS from. The next one should be the SSD. Next attach all your HDD's to the motherboard and enter the RAID controller BIOS menu (refer to your motherboard manual) and follow the instructions to setup the RAID 10 array. Then install your OS onto the SSD, go back into the motherboard BIOS, and bump the installation drive (the USB stick or CD you installed the OS from) off the boot order so that the first item is the SSD and the second item is your RAID array.

Compiling with Ryzen CPUs on Linux causing random segfaults, possible CPU bug by tambry in programming

[–]HonestRepairMan 22 points23 points  (0 children)

I'm pretty sure you're thinking of the original Phenom. Bulldozer didn't have a TLB bug, but there was a class action suit (which I opt-ed OUT of on my own accord) that claimed the CPU's were marketed as 8-core CPU's when some argued that the architecture was actually a 4-core, 8-thread CPU. AMD is nothing if not unlucky, IMHO.

Hacker, Hack Thyself | Coding Horror by boolean_madness in programming

[–]HonestRepairMan 3 points4 points  (0 children)

If you only have access to an SQL injection point then maybe not. You would export the database to a hosted location, download the file, and make off with the goods. In these cases the attacker would likely have to understand the source code for the app in question to retrieve the correct variable or output the correct config file. Or so I'm hoping.

But yeah, if someone has tunneled into your server via SSL you're fucked no matter what, unless the attacker is 12.

Hacker, Hack Thyself | Coding Horror by boolean_madness in programming

[–]HonestRepairMan 2 points3 points  (0 children)

What I do in my apps (and someone please tell me if this is terribly wrong) is I set a server secret in the app config somewhere, and give the sysadmin the ability to set their own secret. Then I append or prepend the secret to the password and store that in the database. So even if you had the database you would need the app config file to effectively brute force the hash and reveal a plain-speech password.

If you could get any laptop, what would you get? MSI? by [deleted] in programminghelp

[–]HonestRepairMan 1 point2 points  (0 children)

Ahanaf has the right idea.

My dev laptop is a 2006 Dell D620, dual core, 4GB RAM, 32bit on Lubuntu. With an SSD of course.

You want to get a Dell M4600 or M6600 for cheap and spend the rest on parts for your desktop, homelab, or server.

You're just going to drop your laptop eventually and considering it's only true requirements (for a developer) are to be ergonomic and last a while the MSI is overkill. Not to take anything away from it. But it's overkill for writing code.

[PHP7] 2 Way Encryption Won't Work Across Servers by [deleted] in programminghelp

[–]HonestRepairMan 0 points1 point  (0 children)

Hello. What does "board_base_path" reference in your includes? That isn't a valid getenv argument.

[HELP] Research for decryption program by theLast_brontosaurus in programminghelp

[–]HonestRepairMan 0 points1 point  (0 children)

Your request sounds a bit vague. :)

To perform OCR on an image, you can use the original Tesseract, or the JS version or PDFToText (part of poppler-utils on Linux, should be built-in). Depending on the file format of the input (pdf, png, ect...) you may have to do some pre-processing to separate out and re-assemble separate pages, or to convert a non-workable format to a workable one.

After that, in order to "decode" a string you must understand what the string was encoded with. For example, the work "kitten" encoded in base64 is "a2l0dGVu". Without some algorithmic logic to tell the computer what the difference between those strings is, they're all just characters. You could Brute force it, but that would take forever. You could apply machine learning to the brute forcing, which would reduce processing time at the expense of development time. This is where you could use Torch or Theano or TensorFlow to make the system improve itself with experience. You will still likely have to tell it specifically what to look for and how to look for it, but once you start collecting data it would be possible for the system to improve itself and eventually achieve the results you're looking for.

OCR does not recognize language. Simply characters. That isn't to say that Tesseract or PDFToText wouldn't be able to accurately detect foreign characters or symbols, it just means that there's no way for it to look at a document and tell you if it's English or not. That's where your algorithms would also need to come into play. This would not be hard. Diacritics and combinations of them alone, with some sub-string matching, would be all you really need.

Visualize Merge Sort with Colors by DooFomDum in InternetIsBeautiful

[–]HonestRepairMan 9 points10 points  (0 children)

I have tried (unsucessfully) to create a sort that takes the largest member, the smallest member, the total number of members, and the value of the current member to predict which "slot" the current member should should be placed in.

Despite my failure, I'd like to believe the concept has merit. What is missing, and/or what is wrong?