Live data from Hacker News

The day my script killed 10k phones in South America

new.pythonforengineers.com

131–140 of 164 posts

Re: The day my script killed 10k phones in South America

#131

Author here. I shared this yesterday, didnt get much upvotes and quickly vanished. Thanks to /u/nixcraft for sharing it again! Looks like 2nd time lucky. Im seeing the same type of comments here and on Reddit, I'll try to answer a few common ones. 1. Yes, I know it was stupid testing on production. But we'd been told we needed to release the product on Monday (this was Friday), no objections. A previous project manag…

> This is builtin on iPhones I've never heard of this. Can you elaborate?

Device management? Most famous for work wiping the phone remotely

Re: The day my script killed 10k phones in South America

#132

Earlier quoted context omitted.

> It taught very valuable lessons, Especially not to type rm -rf without checking multiple times. "Measure twice, cut once." One of the many uses I have for a mindmap in my daily use (Freemind 0.9.0!), is as a place to write out sysadmin/sql commands in a structured way before executing them. If I can test it on dev before production - great. If I have to run it directly on production, following this method (religiou…

Can you maybe go into a bit more detail about how you use Freemind? It's not something I've heard somebody do before and it sounds interesting.

Sure.

I use freemind but there are lots of other mind mapping programs available these days.

http://freemind.sourceforge.net/wiki/index.php/Main_Page

I have mentioned freemind a lot in my posts, but I guess I have never really gone into how I have used it over a really long time. First started using it around 2012 and have been building my local knowledgebase/library ever since.

With full text indexing on I can search a local directory for when I have (successfully!) used something like mysqldump and the context it was used it. Have found this is significantly faster and more reliable then just trusting google/stackoverflow - especially for edgecases I have solved in the past.

I use freemind 0.9.0 (self-compiled) as I have found it is the most reliable and never crashes version. Currently running with jdk1.8.0 with an override script on OSX Catalina.

How I use it:

- program.mm e.g. mysql.mm

Evolved into program-feature.mm

   e.g. mysql-mysqldump.mm
Evolved into program/program-feature.mm

   e.g. mysql/mysql-mysqldump.mm
- as a daily worktracker (week ending on the Sunday)

   e.g. weekend-20121024.mm
Each day gets it's own tree/node:

weekend-20121024

   Mon 18/10

      JIRA-123 Fix database blah.id issue
Each node can then be written out, colour-coded (red for copy-paste bash commands, light blue for sql), and finally copy-pasted in a chunk in order (windows users be careful of selection order).

Just did a wc -l on my 'program' mindmaps since 2012: 2604

Re: The day my script killed 10k phones in South America

#133
> Our company had been bought by an investment firm, and they wanted their pound of flesh. All projects deadlines were moved up, and at one time we were testing 3 products in parallel, all with different requirements.

What are you supposed to do in such a situation? Jump ship? Or attempt to provide pushback against unreasonable practices and deadlines (which may either be listened to, or just get you fired), or simply ignore the deadlines altogether because they're made up and follow the best practices anyways? To me, it feels like there are no good options if you plan on staying at a company like that.

> I could have tested it better, but that would have meant working late into the night. No thanks. I had already worked a few late nights/weekends and I was done.

Regardless, it feels like you should put your health first, always. So, in a situation like that, consider the potential risks of what could happen due to badly written code, how likely those are to occur if you don't double check your work and if it feels like it's a good idea to check it but you don't have the time, just do it the next day. Of course, this may or may not play into the best practices and getting fired bits above.

On an unrelated note:

> b) Some project managers and Important sales managers had also been doing the same thing – making up phone numbers and locking real phones. Of course, they were doing it manually so only locked 3-4 phones, while we locked 10,000, but the final effect was the same. We were all pissing in the pool. Everyone pretended it was an honest mistake. Lol, look how silly we are. Not a big deal, live and learn ole chap, live and learn. Except for the poor sod in Peru who couldn't make phone calls or post duck-face pictures to Instagram, but no one asked him.

This feels illegal. It probably should be illegal. Is it?

Re: The day my script killed 10k phones in South America

#134

Earlier quoted context omitted.

Can you maybe go into a bit more detail about how you use Freemind? It's not something I've heard somebody do before and it sounds interesting.

Sure. I use freemind but there are lots of other mind mapping programs available these days. http://freemind.sourceforge.net/wiki/index.php/Main_Page I have mentioned freemind a lot in my posts, but I guess I have never really gone into how I have used it over a really long time. First started using it around 2012 and have been building my local knowledgebase/library ever since. With full text indexing on I can searc…

Can you give examples of what your nodes look like, say in mysqldump? Or maybe a screenshot? It sounds like something I'd like to try.

Also, what motivated or inspired you to use Freemind in this fashion?

Re: The day my script killed 10k phones in South America

#135
Holeup a second.

Right at the beginning when writing your script you must have known that the random generator would end up creating valid numbers? Expecially when run for tens of thousands cases?

There exist test ranges of numbers that are allocated in order to accommodate this type of testing and avoid exactly this problem.

Re: The day my script killed 10k phones in South America

#136

Earlier quoted context omitted.

Huh? So you're telling me that I can walk into the phone shop, get them to give me a phone with financing, and then not pay it, and... still own it? Sweet deal!

Yes, just like you still own the phone if you take out a bank loan, use it to buy the phone, and then default on the loan.

But you don't, not if you secured the bank loan using the phone. Which you did if you financed it through a carrier.

Just like if I go to a bank, get a loan for a car, buy that car, and stop making payments... THE BANK OWNS THE CAR.

Re: The day my script killed 10k phones in South America

#137

Earlier quoted context omitted.

Sure. I use freemind but there are lots of other mind mapping programs available these days. http://freemind.sourceforge.net/wiki/index.php/Main_Page I have mentioned freemind a lot in my posts, but I guess I have never really gone into how I have used it over a really long time. First started using it around 2012 and have been building my local knowledgebase/library ever since. With full text indexing on I can searc…

Can you give examples of what your nodes look like, say in mysqldump? Or maybe a screenshot? It sounds like something I'd like to try. Also, what motivated or inspired you to use Freemind in this fashion?

I think I originally found it on a /. story sometime in 2012 and tried it out as more organised local txt file documentation system.

And I loved the fact that I could write out the 'plan', test it, and then copy/paste into a terminal.

I really started it as I was compiling from source a lot (still do) in those days, and there were always little quirks that had to be worked out on different platforms.

For example the mysql/mysql-compiling.mm mindmap was created to provide copy/paste installations for Percona-mysql on Linux and OSX.

The weekly/daily mindmaps are my primary working space.

I wasn't running Jira at the time, and Freemind is faster anyway.

When writing something new in a daily node, I can then copy it into the appropriate program/program-function.mm Then I started experimenting with colours and icons and came up with my own system: - green (F3) for search questions - red (F4) for bash cmds - blue (F7) for sql cmds

https://i.ibb.co/GWmfhMf/freemind-mysql-replication-screensh...

Re: The day my script killed 10k phones in South America

#138

Earlier quoted context omitted.

Can you give examples of what your nodes look like, say in mysqldump? Or maybe a screenshot? It sounds like something I'd like to try. Also, what motivated or inspired you to use Freemind in this fashion?

I think I originally found it on a /. story sometime in 2012 and tried it out as more organised local txt file documentation system. And I loved the fact that I could write out the 'plan', test it, and then copy/paste into a terminal. I really started it as I was compiling from source a lot (still do) in those days, and there were always little quirks that had to be worked out on different platforms. For example the…

This is pretty awesome. Thanks for answering my questions, it's been insightful. I've been messing around with Freemind for the past hour and I'm liking this. This has definitely inspired me to experiment with it further.

Re: The day my script killed 10k phones in South America

#139
post #36

Earlier quoted context omitted.

Not usually the case under UK law at any rate.

Huh? So you're telling me that I can walk into the phone shop, get them to give me a phone with financing, and then not pay it, and... still own it? Sweet deal!

Normally they'd come after you with debt collection agencies / court cases rather than asking for the handset back. They want their £40/mo for 24 months, not a used handset really.

Re: The day my script killed 10k phones in South America

#140

Earlier quoted context omitted.

1) I highly doubt that the app disables emergency calling. 2) Some (rental, probably also lease) vehicles actually do have disablers. They prevent the vehicle from being started, not stop them in the middle of the road. 3) The police don't repo a thing. That's a civil matter and generally outsourced to the lowest bidder with a tow truck. By the way, if someone dies because of it, the only person whose conscience it i…

> By the way, if someone dies because of it, the only person whose conscience it is on is the person who bought a phone they couldn't afford and then didn't pay for it. Just like if someone died because the car got repo'd and they couldn't drive to a hospital. Sure. What they were thinking trying to buy something without having money, right? And even worse, what they were thinking being poor. They should have bought…

If everyone saw things like you, there would probably not be nearly as many poor people with phones.

It is these very consequences (repo, deactivation) that make it possible for these phones to be offered at affordable prices.

Sadly we don't live in a utopia, especially the poor people of this world don't. I'm sure they'd rather have the phone that stops working and possibly indirectly kills their family when unpaid than no phone at all.

Post reply on HN