I disagree that engineering is the best approach to writing software. I think this is the fundamental difference between people who prefer static vs dynamic typing. People who prefer static typing are more likely to say that one solution is more "correct" than the other, whereas dynamic typing allows more flexibility.
I see writing software to be similar to writing music. Music has rules and structure, but leaves room for creativity and allows two or more highly skilled musicians to be able to play music together and improvise.
Static typing imposes limitations (kind of like government), whereas dynamic typing gives you more freedom (but requires responsibility)
It's fine when we're talking about leisure-paced art, done by people who deeply care about what they do. But the reality of software development is different. Software is written primarily by people who treat it as a job, and care about it (on average) about as much as they're paid to - and they're being paid by people who don't care about the product, but its ability to make money. Software written in such environment is (unlike music) powering systems that affects livelihoods, health and safety of other people. With the market pushing quality down, we need a countering force pushing it up.
Or, imagine dropping all regulations around planes, cars, food, health care or infrastructure. Would things be handled better by artists, free to pursue quality? Maybe. Will majority of the providers be artists, or even care about quality? No.
Just a sidenote, reading your comment it occurs to me that I have no idea - and as far as I can tell never read anything about - what is the proportion of code that is done 'for fun' versus 'for pay'.
If anyone has any survey or any discussion on that please reply so I can take a look at it. I'd like to confront my expectations with data
You're conflating the act of building a product with the act of writing code. Even in the most expressive of languages, there are objectively good and bad ways of instructing your hardware to perform a particular calculation or set of calculations - and in the more rigid languages there is often a flat-out right and wrong way.
Design your product with as much free thought and creativity as you please, but never let yourself believe your actual code is art. That - among many other outcomes - is how your platform gets compromised and your customers' identities stolen - not to mention how the successors to your job end up cursing your name and wasting time and money replacing your code wholesale.
> I see writing software to be similar to writing music. Music has rules and structure, but leaves room for creativity and allows two or more highly skilled musicians to be able to play music together and improvise.
Bad music carries only the risk of people not liking it. Bad code on the other hand...
If the RSS reader you're building has no guarantees of working it has no value to anyone. Not all software needs to try and be bug free but all software should strive to minimize the number of bugs in it.
Static typing helps to minimize bugs (when used correctly) by allowing function contract declarations and reducing the build up of defensive guards over time. I've seen code in dynamically typed languages with lines like `if (!foo is integer) raise;` which basically equate to onerous home-built static typing.
Parent isn't saying his way is best. He's saying it's the appropriate mindset for some types of software. What you describe might make sense for bespoke web apps (and many other applications), but it may not be appropriate for, say, firmware development, or writing a web server from scratch.
That might work fine if you're throwing together a blogging system, but not in a critical-systems software-engineering context. When the stakes are high, it doesn't do to view your code as a creative outlet.
Critical-systems software engineering is not about your creativity, it's about building maximally correct software, to minimise the probability of a catastrophic outcome.
This idea that it's inherently virtuous to let software developers be creative, strikes me as quite wrong-headed. If a strict methodology produces better results (and it does), a strict methodology should be adopted.
Bridge engineers don't whine about their constrained creativity. They're too busy ensuring their creations don't get anyone killed.
With the curious exception of Erlang et al, few people serious about program correctness favour dynamically typed languages. There's a reason why Ada is statically typed, and strongly typed (it lacks the dangerous implicit type conversions permitted by C).
This is because given all of the levels of various languages, frameworks, and libraries- I'm just trying to get things to work.
However, I would very much like the methodical engineering approach at my day job applied to programming.
It really blows my mind we don't have full stack + auth that works cross platform out-of-the-box. It blows my mind my recent framework didnt show the post request exchange to get tokens and authenticate.
There are NOT that many people that program at this level. It seems most of my programming questions are answered by asking experts rather than reading a wikipedia article. Electrical and Mechanical Engineering are better solved reading rather than asking engineers. IMO.
But it's clear that one approach can be more correct than another. If it was supposed to save a document and instead it deletes all my documents, it's not right.
So you're saying Python devs are all libertarians? :D
<braindump>
I agree that coding/development is an art, but I also am hard pressed
to find anything that, when done well, isn't an art.
The difference is that music doesn't have any really notion of correctness
or efficiency; sure, there are ideas such as "no parallel fifths" and "tritones must resolve to M3 or m6", but this isn't an issue of
correctness, but rather stylistic guidelines. Schoenberg's compositions
weren't incorrect in any universal sense.
Programs, on the other hand, can be incorrect or inefficient. This is because most
programs have a concrete function that they produce.
Dynamic types are great for exploring your solution space. I can quickly
whip together a prototype, try out different solutions, etc. I don't need
to design my entire program ahead of time, and this is nice. However this
does not prevent me from reasoning formally about my program. Once I've
muddled around a bit and built up some scaffolding, it very well may behoove
me to try to shore up my design, spend some time reasoning and designing a
formal algorithm/specification/etc, etc.
And for the record, as a musician I definitely think formally about my
compositions/pieces I'm playing. Granted, being a guitarist this usually
doesn't involve me writing out my pieces with sheet music, but there is
still a blend of intuition/exploration and brute computation.
As an example, I often times have two disparate parts that I need to
connect together, maybe by modulating, maybe by changing registers, or
maybe by altering my time signature. At that point I put the guitar aside
for a moment and think about my formal requirements, and then try to find
some 'convincing' way to get from point A to point B. Maybe I have some
constraints (I have two measures, I need to start in this position and end
in that position, this finger needs to pedal this note, etc). This quickly
becomes a math problem where only a small set of viable solutions exist.
After 'doing the math' I am left to evaluate my solutions aesthetic quality
which, I suppose, is where most people think of the 'artistic' bit comes
into play. But really, I'd say artistry abounds throughout the process.
And to be clear, I'm not thinking about this stuff as doing math as I'm
doing it--I have my own system for thinking about this stuff that doesn't
look like math.
Anyway, all of this is to say that formalism can be used even in music with
very real benefits.
Isn't that why you have titles such as Software Engineer, Developer, Programmer? Software Engineer should have the engineering background and tackles hard problems whereas Developers and Programmers focus on products and features.
All of these terms are used mostly interchangeably, and it just depends on what company you are at. For example, Microsoft calls them all SDEs (Software Development Engineer) and Google calls them Software Engineers.
This is as though Apple were hotlinking his images -- they are being consistently used in a setting besides that which was originally intended, without permission (or even attribution).
I don't see why putting your url on your own content is 'playing dirty', but displaying someone's stuff without telling them you're doing it or even attributing it sure is.
That is an incredibly unfair and ignorant question.
No, of course not, there are more, compute heavy, features and it's not worth it to spend huge amounts of time to support a phone you're no longer selling.
> it's not worth it to spend huge amounts of time to support a phone you're no longer selling
Unfortunately, without the newer versions of the iOS the phone loses functionalities pretty quickly (the apps will require newer versions of iOS), which, quite conveniently for Apple, will make you need to buy a new one. Aka planned obsolescence.
But kudos for getting at least one version of iOS to perform better than the last one (if that's true). That would be awesome if they actually kept this as a long-term trend.
Yes, as hardware improves and the OS and applications take advantage of this hardware, newer applications may run slower on older hardware. I'm not aware of any phone manufacturer or OS for which this isn't true. AFAIK, there is no other system that supports this level of backwards compatibility.
It shows that sustainability is not even an afterthought. Everybody is ok with throwing away perfectly working devices (i.e. devices that were blazing fast just a couple years ago and now, with some crippling os updates, take 10 seconds to open a PDF) just because they're 3-5 years old. Let's see if Apple really does change their policy on this. For premium, very expensive phones, it would be reasonable for them to be fully functional (with no slowdowns) for at least 5 years.
I don't have this information. However, IMO the current Apple's approach suits a vendor of $300 phones, not $1000+ ones. If Apple really wanted to be the technologic leader in this field, the gigantic markup and the billions of dollars that they make on phones should be funneled into engineering excellence (stability, security, performance, device longevity) and not gimmicks (face recognition). Unfortunately, it seems that the market does not demand engineering excellence even from premium products.
I'm pretty sure the parent comment wanted you to talk about Android, where vendors ending software support and updates before the phone is even bought is the norm.
If they’re cheap, then it’s somewhat expected that they are crap. Not so for expensive phones (if what you described is the case for expensive Android phones as well, then of course they’re even worse than Apple).
You have no idea what you're talking about, or you're maliciously spreading a lie. Apple consistently keeps old devices running, and running well, on old hardware.
Of the competition, only some environments running on Linux/BSD kinda manages to do the same. Android is just laughable in comparison.
> Everybody is ok with throwing away
> perfectly working devices
People do that? All the iPhones I ever owned were passed on to someone. The oldest are not in the useable state right now I guess, but I hope they were given for recycling not just thrown away.
Apple has allowed users to download the “last compatible version” since 2012.
I reset my first generation iPad - last updated 2011 - last year and was able to load and run older versions of most of the apps for streaming services that were available back then - Netflix, Hulu, Crackle, Spotify, Plex, etc.
"Last compatible" means no more security updates, which basically means - we no longer care about the flaws we've made, go ahead and risk your privacy (including for example your life savings if you bank online).
Also, my experience with the last compatible version (for iPhone 4 IIRC) was that IIRC neither Skype nor Hangouts worked anymore. Plus the whole device was incredibly slow.
What security flaws do you expect in older versions of apps that were able to escape the iOS sandbox that were later fixed by updating the applications?
What exploit has there been in an app that let it exfiltrate data from another app or read your web browsing history for any version of iOS?
As far as Google, it’s no surprise that Google abandoned older protocols. That’s kind of their MO....
But what unpatched security flaws have been reported in older versions of iOS that would allow an attacker to install a keylogger or otherwise exfiltrate user data?
> But what unpatched security flaws have been reported in older versions of iOS that would allow an attacker to install a keylogger or otherwise exfiltrate user data?
I haven’t been able to find an untethered Jailbreak for iOS 5 - ie a method for an unsuspecting user to have his iOS device compromised.
A “tethered jailbreak” means the user purposefully went through a series of steps to jailbreak thier device or someone else physically got access to thier device.
I don't quite understand what you're trying to say here. The difference between an "untethered" and a "tethered" jailbreak is that an untethered one sticks around after you reboot your phone. So how exactly is this relevant here?
The difference is that an untethered jailbreak takes advantage of a security flaw in the OS that could be theoretically embedded into a website that you visit and your phone could be jail broken without your knowledge.
A tethered jailbreak means that you either intentionally took steps to bypass the security of the OS or someone who had access to your device did.
> But what unpatched security flaws have been reported in older versions of iOS that would allow an attacker to install a keylogger or otherwise exfiltrate user data?
I don't follow the field of iOS security. I only know that, like everyone whose computing devices handle sensitive data and/or money, I want my system to be patched ASAP if a vulnerability is detected. AFAIK, Apple makes no such guarantees.
The alternative is Android that has a much weaker security model and where the manufacturers don’t offer patches for more than two years if at all.
But as far as iOS, I am not aware of any unpatched security vulnerabilities that have been reported in over ten years that would allow an app to exfiltrate sensitive data from another app on a none jailbroken device.
Wow the downvotes without comments are interesting. I can only guess that they are from people who are so used to getting f*cked by the tech industry that they don't see anything wrong in having to throw away a perfectly-functioning device only because it's 3-5 years old. Now imagine cars were made like that.
Ok not neccesarily throw away then, but, as someone else said, put them in the drawer or give them some non-phone function. For example, my iPhone 4, still perfectly functional but crippled with iOS update that made it too slow to be usable, is now a white noise machine near my bed.
I also bought the iPhone X on day one, but I had to get rid of it, I really hated the notch. Also didn't like the aspect ratio of the display, it's getting way too vertical.
For me, it's like living in a room where one of the walls has a weird inset, which makes it more difficult to arrange the furniture.
Or like having a picture frame on the wall that is slightly crooked no matter how many times you try to fix it.
Or maybe it's like having a mole or birthmark, and calling it a beauty mark.
Sure you can live with it and just ignore it, but that wouldn't be my first choice.
However if you are willing to boot camp into Windows, you are probably less likely to care about a notch.
It's like being a chef but not wanting to eat the food you cook.
For example, a lot of people want their salmon cooked extremely well done, when you as the chef, think this is wrong, but this is what the customer wants, so you do it anyway, but you no longer care about it.
> If we believe that self-driving cars are inevitable
I am a programmer and I would never ever get in a self-driving car if I had a choice. I don't trust other programmers, I don't know if a backdoor has been put in by someone, and I don't want to get into a vehicle that can be hacked.
I believe self-driving cars will be a catastrophic failure.
Then how are you commuting currently? Almost every part of the vehicle is electronically controlled nowadays. All the components are connected - one way or another. So, it's easy to traverse around and make your way to CAN. Once, you are there, you can control the car.
It can pull the steering wheel, but I'm pretty sure the ratios are selected so that I can still overpower it. The steering wheel is still mechanically connected to the front wheels.
And it surely can't disable brakes. It can disable ABS or force it to cycle, turn off power assist, and apply electric parking brake, but brake pedal is still connected to the brakes through some old school hydraulics.
ABS is able to disengage your brakes even while the pedal is fully depressed, the old-school hydraulics are connected to ABS that can release the pressure so that the brakes disengage - that's what it does during normal operation. If it would intentionally release the brakes and keep them open instead of "pumping", there's nothing you can do.
The same applies for power assist - it's quite powerful; steering at high speed is possible but quite hard if it simply turns off; however, if it would be actively working against you (and do it suddenly without any warning), it's likely that you wouldn't be able to turn it back until you'd already smashed into the opposite lane.
put your car in neutral and turn off your engine, see what happens. You can still steer and brake, but for a sharp turn or down an incline you would be surprised how hard it is without servo steering and the vacuum servo.
If you don't trust the abilities of other people, who do you think is currently driving cars? You are trusting everyone else on the road with your life every time you get in a car.
You ever look at other drivers when you are stuck in traffic? You will see people looking at their phones. You will see people eating. You will see people shaving. You will see people doing their makeup. You will see people reading books. You will see people with dogs on their laps. And that is just the people who might accidentally kill you due to carelessness. Vehicular suicide is more common than most people expect and there is no telling if you might be collateral damage in one of those collisions.
Self driving cars don't have to be perfect to be dramatically safer than human drivers.
> Self driving cars don't have to be perfect to be dramatically safer than human drivers.
This statement is technically correct, but it severely downplays how close to perfect the autonomous cars have to be to be significantly better than human-driven cars.
If you look at European countries, current statistics are around 2 fatalities per billion km. The US is around twice that number. Either way it's actually a quite safe mode of transportation.
In fact, if you compare it to travelling by train, the average over European train travel over the past decade is around 0.2 deaths per billion passenger km. Trains are driven by professionals, still accidents happen.
In other words, the fatality rate for cars per billion passenger-kilometers is in the same order of magnitude as for trains driven by professional drivers. How much do you really expect autonomous cars to be able to improve on that?
Going from 2 to 0.2 deaths per billion km (a 10x improvement in safety!) would be an enormous success for autonomous vehicles. Globally, that would save hundreds of thousands of lives every year. Often the lives of innocent passengers and pedestrians.
First of all, it's closer to 5x (you have to divide the car number by the average number of passengers in a vehicle).
Second of all, I agree a 5x improvement would be impressive. But that's the level of a professional driver on a closed, dedicated track. I don't think autonomous vehicles will reach that level anytime soon.
I was going to post earlier that IMO the level they should be aiming at is that of a brilliant racer, otherwise who needs them.
There was a vid on here recently of the Porsche 919 beating the lap record at the Ring, and one of the comments was "I don't have the balls to drive that fast in a video game" such is the skill level of humans at the wheel-a few to be sure, but still and all there it is.
For what it's worth I find the Nurburgring record lap done last year with an Alfa Giulia even more ridiculous (https://www.youtube.com/watch?v=5gEdJmIVqLY). The 919 is a unique super-car while the Giulia QF is almost a "normal" car, which one can see parked while shopping at Whole Foods.
An autonomous driving AI doesn't need to perform like a professional racing driver in order to improve safety.
The causes of most crashes are human fallibilities that AI doesn't suffer from:
An AI isn't tempted to drive drunk. It isn't distracted by incoming text messages. It doesn't get fatigued after driving for hours late at night. It doesn't suffer from road rage, and it isn't tempted to drive aggressively and take risks because it's running late for work. Just by avoiding these issues you've made driving a lot safer!
An AI also has reaction times that no human can match, has no blind spots and can track other vehicles in 360 degrees at once, and "see" through fog and rain using radar to detect obstacles.
Conversely, some of the things that are easy for humans are also the most difficult for AI to grasp: the social cues that we use to resolve pathing conflicts (eye contact, a wave, a blink of the headlights, etc), or our ability to intuitively predict the behaviour of other road users.
So while we may be some way yet from true, socially-accepted Level 5 autonomy, we're not far at all from semi-autonomous, driver-assistance technologies that significantly improve safety.
What you say about the AI vision is true in the best case. But frequently we encounter the worst case. How many times have you had a stone chip your windshield? On a Level 5 car, a stone hitting the Lidar means best case you're broken down on the highway, worst case you're having an accident because the car can't steer properly. A whiteout on a road with L5 autonomous cars would mean you have potentially hundreds of people completely stuck in a blizzard, emergency services would be overwhelmed.
And incidentally, many of the human problems are being solved without autonomous driving. Modern cars already have systems to detect that you're falling asleep and pull the car gently over. People are working on in-cabin online breathalyzers, which will detect alcohol in the air and make the driver blow into the straw to verify (s)he's not drunk (just a passenger). Better integration of phones with cars (CarPlay, Android Auto) and voice input will make texting-while-driving less convenient than just talking to the car with your eyes on the road.
Don't get me wrong, many of the new driver assistant safety features are great. Stuff like blind zone warning and auto emergency stop for pedestrians is awesome. But I think where we are now (autonomous highway driving in good conditions) will be the approximately the endpoint for autonomous cars in the foreseeable future. I think none of us will live to see L5 cars (without any steering wheel at all) on the road.
The units are different though, 2 is per billion vehicle-km and the 0.2 is per billion people-km. The average number of people in a car is greater than 1.
Where did you get 0.2 deaths per billion passenger km?
The EU typically cites a value of 0.14 for the EU-28. Numbers are (statistically) worse in the least developed EU members, and better in more developed ones. For example in both the UK and Germany it was 0.06 in the last two year periods I looked at.
So how much can we improve? Well apparently a LOT.
Comment deleted. I would have been happy to discuss the point in a calm and respectful manner. But I don't appreciate being accused of intellectual dishonesty and being told that what I said was "ridiculous".
And "buff neck", really? What did that have to do with anything I said, except as a way to shut down the conversation?
You're being incredibly intellectually dishonest with yourself here. Suggesting that shaving makes you swivel your head and become more aware of traffic is akin to suggesting that shoulder checking during lane changes is going to give you a buff neck. It's ridiculous.
Some other driver, right now, could decide to pull out their phone and text and you could be dead instantly. Worrying about backdoors and hacking is like worrying about dying in terrorist attack. It's not like it won't happen to someone but there are more mundane ways to die. Ironically, getting into a car is a very common way to die.
I was rear-ended once because of that: stopped smoothly at a just toggled red light, driver behind received a phone call and compulsively looked at his phone briefly, not paying attention to neither the light nor me being fully stopped for a split second, covered the distance which should have been safe were he paying due attention, and impacted without braking. Luckily he was going below the legal speed or else both cars would have to be written off.
I’m a programmer and I would have absolutely no problem getting in a self driving car even at the level of current Waymo in Phoenix right now. I wouldn’t trust a car on that level to drive me around a windy cliff road when it’s snowing yet, but as is if I were in Arizona I already trust those Waymo-level cars more than my buddy who might not be paying attention 100% of the time.
If you don't trust software, don't look at reality. So many things that can directly or indirectly kill you are run by (often shitty) software, you won't leave the house again. And those systems aren't looked at as closely as self-driving cars.
I mean, not really. You're already trusting software to decide how your car should steer (automatic lane keeping), brake (automatic emergency braking), and accelerate (adaptive cruise control).
Is there anybody driving a car that does not use acceleration and braking? I could understand your argument for lane control, but otherwise your argument makes zero sense. Everyone's car is controlled by software, period.
Braking systems are controlled by a dedicated embedded software system that's extremely well-understood and well-tested (probably even formally verified). All it does is check the ABS (and anti-skid) sensors and moderate the braking pressure to avoid locking the wheels. It also has a fail-safe system that gets rigorously tested, e.g. if a sensor fails. All possible values of all inputs are known, and the configurational space of those inputs is small enough that you can exhaustively test correctness.
It's plainly obvious that a braking system controller software is a very different beast from an autonomous car software, and I have no problem understanding why someone would trust th former and not the latter.
> Braking systems are controlled by a dedicated embedded software system that's extremely well-understood and well-tested (probably even formally verified).
Are you sure? That code is closed source, and the peek behind the curtain we saw with Toyota's investigation did not inspire confidence:
That's a really interesting article for sure. But it does highlight that Toyota was being unusual in not following industry-wide (voluntary) coding standards for safety-critical embedded systems in cars, and they ended up losing big in court. So I do think (hope) that this example is worst-case, not normal.
The person you were replying to was talking about adaptive cruise control and automatic breaking. The majority of cars on the road do not have those features. Very different than plain acceleration and braking and much more likely to have glitches.
ABS saved me once from a big accident. I have heard\read about this feature before, but man practically seeing it, operating in front of your eyes - was just like beaming a torch through the darkness
Cars are already mostly software controlled drive by wire systems. Self driving cars will also be easily safer than meat bucket controlled ones. You should try roding a bicycle regularly. It's scary how bad people are at driving. Most shouldn't be on the road. It's like they think what they learned to pass their test isn't relevant one you have your license.
How are cars drive by wire? Sure, newer cars have electric power steering, but I would guess that 99% of cars older than 10 years use hydraulic power steering and brakes.
Even then, it takes very little software to do electric power steering, so I'm not sure how you would consider this at all comparable to autonomous driving.
We’re already granting the assumption that these self driving cars are generally popular. For that to be the case, they’ll have to be safer than humans or people won’t be okay with letting them on the roads in large numbers.
You don't trust it now, but when everyone will happily ride autonomous vehicles and will have demonstrated they are safer, then you will change your mind. That's how we were convinced to go into metal tubes with wings hurtling through the air.
I see writing software to be similar to writing music. Music has rules and structure, but leaves room for creativity and allows two or more highly skilled musicians to be able to play music together and improvise.
Static typing imposes limitations (kind of like government), whereas dynamic typing gives you more freedom (but requires responsibility)