1,483 karma · joined June 25, 2012
Back to the Bazaar!
I can't do the mental gymnastics to think about the code that way.
When I think about the purpose of the code, the result of the code, before the code has been written, I do this by "compiling and running" in my head. Of course, there's no actual compiling. There's just thinking.
When I reason about the code, either code I'm going to write, code I wrote, or code other people wrote, I execute the code in my head.
I'm currently building a web-scraping system, to look information on partner web site. I'm using python 3, selenium, pyodbc to sql server. I'm also developing the same in C# (3.5) using the webbrowser component in systems.forms. It's got a lot of moving parts, lots of languages involved. I read the documentation for the tools, then I assemble in my head, essentially "running the code" in my head, and then, once all the edge cases are dealt with (are there iframes, popups, ajax async calls, flash and pdfs) then I design on paper, with boxes, and then, later, later, if it all works in my head, then I code it.
Can't do that if I can't reason in my head about what the program is going to do, exactly.
Functional Programming, for me, does not fit in my mental model, so I can't use it, regardless of actual implementation.
Mmmm, really? A map? Like Google maps? Like a paper map? unfamiliar terminology.
Seriously, I learned how to use for loops in 1984. Been using them ever since. Maybe that's the problem. Too old to learn new tricks.
You're right though that my using python language features like lists and file open and loops is like function, but I understand those, so I can use them.
It's like I asked for a tuna sandwich and you explained how to build the engine of the fishing boat to go catch the tuna off the coast of Baja.
I feel like I need a masters in computer science to understand what you wrote.
let me see:
# Python:
domains = []
emails = open("file_with_emails.txt","r").readlines()
for email in emails:
____domain = email.split("@")[1]
____if domain not in domains:
________domains.append(domain)
out = open("file_with_domains.txt","w")
for domain in domains:
____out.write(domain)
out.close()
input:
joe@msn.com
mike@aol.com
tim@aol.com
sam@hotmail.com
output:
msn.com
aol.com
hotmail.com
Simple no?
I want to write a program that reads one text file, and outputs another.
Let's say the first file contains a list of emails, one email per line.
The second file should contain the list of email domains in the first file, one line per email domain.
Procedurally, I would simply declare a list, read the file of emails, line by line, split each one on the @ symbol, and if the part on the right was not already on the list, I would add it to the list.
At the end, I would write the list to a new file, one line per item in the list.
How would one do that using functional programming?
Just because I speak French and English fluently does not mean I can speak Japanese. My wife is Japanese, and speaks it fluently. We've been together 19 years. I've tried to learn. it just does not make sense. It would be nice, because I have relatives there, and I could go live there, legally, but it just doesn't make sense in my brain.
What can I do?
Functional programming is the same. Every couple of years I take a look, and I recoil in confusion.
It also doesn't help that people make fun of me for seeming dumb.
There's something else afoot there.
It's called competition.
Am I missing something?
You could have kept the guy, if he was so important to your business.
I'm not a happy Amazon Prime customer today.
I would buy the self-driving car (2 of them) because I could read in traffic, or relax while listening to music, or watching a movie.
And if tired, on the way to Vegas from LA, push "autopilot button".
It's safer to let autopilot drive than to try to drive sleepy, trust me.
Works well.
Break the build, all stops, and we huddle and fix it.
Sort of like the andon cord in toyota factories.
When someone talks about taking on debt, it is critical to know the interest rate charged. Also very important are whether the debt is collateralized (example: car loan, house loan) or non-collateralized (credit card), along with how easily it would be to get out from under the debt if you cannot pay (can it be discharged in bankruptcy? how does it affect your credit rating?)
Very few (if any) financial people and senior managers could make the company liable to replay this debt unless these variables were known with relative certainty. To take on debt without this information could be deemed reckless and may expose the company to shareholder lawsuits, etc, and be job-ending moves for the people involved.
Back to technical debt? What kind of debt is it? Is it collateralized? What if you can't pay it? Can you write it off, or do you lose the company? Can you get out of it in bankruptcy? What's the interest rate?
I argue that "technical debt" is like an unknown debt. The interest rate is unknown, it is collateralized with the organization itself, and cannot be discharged in bankruptcy, short of bankrupting the entire company.
The prudent and reasonable thing to do would be to not take on the debt at all. Remember what Toyoda (the founder of Toyota used to say): Cash is your best friend, but debt is your worse enemy.
Who would borrow money to go to college and get an education at 40% interest rate a year? It would only be worth it in very rare cases. What about 20% a year? My wife put her college education on credit cards, paying foreign tuition rates, and we had fun paying it back, let me tell you. When I went to college, I went slower, paying as I went, but had no debt at the end.
If any company takes on debt, it is irresponsible for them to not do a thorough financial analysis of the impact of the debt.
What's the interest rate on technical debt? Who can say?
Then they start to understand.
What do I do?
I just don't use the sites.
I've restricted, and continue to pare down, the sites that I use on the internet.
It's the truth.
I do keep my amazon.com account, so I can order paper and cardboard books the local bookstores don't carry, and read them on the sofa at my house, next to my floor lamp.
And do they keep your key?
How long?