|
Python is not unique in this. Haskell, F#, other FP languages... Basically, you get used to it. At least I did, pretty quickly.
Because it can get fuzzy, I tend to use a blank line to separate the end of an "if" or "loop" so I know something important is happening. That, and writing very small functions in Python. I have been known to write (psuedocode example, my Python is getting rusty!)
OperateOnList(someList)
foreach(item in somelist)
DoSomething(item)
|
|
|
|
|
I recently in the last year or so had to pick up python syntax as well. I have similar background, with C, some C++/C#. I can usually read and follow other derivatives like Java as well.
Python is described as being "easy" to learn for beginners, but for those of us used to "normal" languages, it's not so easy. My personal description is that it's a 'loosy, goosy' language to me. It seems that some syntax can be what ever you want, the interpreter just figures it out. The not having {} and ; chars drives me nuts. The data structures like tuples, and the fact that everything is a dict can be confusing. Add in that it's not strongly typed, and instantiates vars on the fly, and it's like a recipe for disaster for someone like me who is used to working with RULES! I know you can compile it in some cases, but the fact it's not compiled is even worse, as unless your IDE of choice is REALLY good, you can't even rely on the compiler catching trivial syntax/typo errors.
I often find myself trying to do things in Python like I would do it in other languages, it works usually, but then the Python religious will call out, "but that isn't pythonic!". When was the last time you heard someone say that about C or C#?..."You can't do it that way, it's not C-thonic!"
As someone who doesn't use it all the time, and still goes back and forth between Python and C languages, my only suggestion, is just "throw out what you think you know of programming, and learn Python like a beginner". While I didn't do that, my only conclusion is that it would help. Good luck, I still am not 100% comfortable with it.
|
|
|
|
|
The driver of the Buick was charged as follows:
- manslaughter
- intoxication manslaughter
- murder
- aggravated assault with a deadly weapon
- numerous parole violations (the violations were not enumerated, but I suspect two were committing a felony, and being under the influence)
The total bond amount was $1.25 million, but the parole violations prevents him from bonding out and walking/driving around with the rest of us while he's awaiting trial.
All that is left is to see if the justice system still works.
".45 ACP - because shooting twice is just silly" - JSOP, 2010 ----- You can never have too much ammo - unless you're swimming, or on fire. - JSOP, 2010 ----- When you pry the gun from my cold dead hands, be careful - the barrel will be very hot. - JSOP, 2013
|
|
|
|
|
Interesting, Manslaughter & Intoxication Manslaughter, I am not sure in the UK if we can charge someone separately for the same offence. I'm not sure if we have separate offences or you are charged with Being under the influence as well as the offence...some CPier with a better knowledge will no doubt in form me...
|
|
|
|
|
John Simmons / outlaw programmer wrote: All that is left is to see if the justice system still works. Let's hope so.
I'm watching the case in Kalamazoo Michigan of the intoxicated driver who hit nine cyclists[^], killing five in 2016. It pisses me off that Michigan doesn't have capital punishment.
Software Zen: delete this;
|
|
|
|
|
If Texas law is anything like Illinois law the first 4 charges are somewhat mutually exclusive.
The states attorneys make all 4 charges and take it to trial. The judge or jury decides which one sticks. The SAs likely want the murder conviction but if some detail doesn't fit they can "fall back" to a lesser charge without a retrial.
|
|
|
|
|
John Simmons / outlaw programmer wrote: All that is left is to see if the justice system still works.
Depends, are you talking about the justice system, or Texas justice?
Gotta admit, I've got more faith in the latter.
|
|
|
|
|
dandy72 wrote: Texas justice?
Do you mean:
- Give the miscreant a fair trial
- Take him to the nearest bridge
- Put a rope around his neck
- Kick him off
Or have they become wussified in Texas, too?
Ad astra - both ways!
|
|
|
|
|
A trial isn't needed. About 50 people saw him run over the guy, and twice as many witnessed the preceding and/or subsequent events. The defense is trying to claim the driver is schizophrenic.
".45 ACP - because shooting twice is just silly" - JSOP, 2010 ----- You can never have too much ammo - unless you're swimming, or on fire. - JSOP, 2010 ----- When you pry the gun from my cold dead hands, be careful - the barrel will be very hot. - JSOP, 2013
|
|
|
|
|
John Simmons / outlaw programmer wrote: The defense is trying to claim the driver is schizophrenic.
...which still doesn't make it ok. Should he get a lesser sentence because of that?
Your sig's as appropriate as ever. Shooting twice is just silly.
|
|
|
|
|
Do you have a link to the original post?
|
|
|
|
|
|
If your computer's got Miley Virus, has it stopped twerking?
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
AntiTwitter: @DalekDave is now a follower!
|
|
|
|
|
You seem to be really bottom-fishing for these puns. I don't know twitch is more disturbing, taking your post Cyrusly, or just that I keep replying, butt I'll keep doing it.
Ravings en masse^ |
---|
"The difference between genius and stupidity is that genius has its limits." - Albert Einstein | "If you are searching for perfection in others, then you seek disappointment. If you are seek perfection in yourself, then you will find failure." - Balboos HaGadol Mar 2010 |
|
|
|
|
|
nothing a light tap with a wrecking ball wouldn't fix
Signature ready for installation. Please Reboot now.
|
|
|
|
|
Are you using Docker or similar technologies today? What's been your experience like? What stack do you use it on? Thank you.
|
|
|
|
|
Drank like a fish and swore like a trooper
|
|
|
|
|
I'd be more impressed with drank like a trooper and swore like a fish.
This space for rent
|
|
|
|
|
PETA doesn't like sheep farmers to use a docker.
Signature ready for installation. Please Reboot now.
|
|
|
|
|
Just don't do what one of our vendors recently did: containerise an application that by definition had to run on a single server. Talk about "ooooh, shiny!". So now, that server runs one application plus docker to contain it. Same vendor must have a senior app architect addicted to coder newz. In the last two years what used to be a solid Windows server platform app built with C++ and .NET has added to their integrated app suite ... a module in Java that has to run on Windows, a module in Node.js that has to run on Ubuntu, two web apps and a module in a Docker container that is only supported on CentOS/RedHat. If only we could change vendors...
|
|
|
|
|
As Windows users developing mainly in Winforms we were disappointed, as Docker turns out to be a Linux thing.
We don't use it (yet)
|
|
|
|
|
There is a Windows version. I'm not saying it's great, but there is one.
This space for rent
|
|
|
|
|
Are you sure it's not based on a Linux virtual machine ?
|
|
|
|
|
Don't use the term "virtual machine" when close to Docker people, unless you are eager to listen to a 45 minute intense talk that Docker is NOT, I repeat: NOT virualization!
Virtualization is evil, Docker is good! And Docker isn't even "lightweight" virtualization. It is useless trying to discuss definitions of "virtualization" with Docker guys, or trying to compare the Docker way of providing isolation with a hypothetical minmal VM providing exactly those functions that your application needs while still being a VM (for the purpose of learning the details of what is so evil about virtualization). It is no use. The answer is given: VMs are evil, by definition.
On the more serious side:
Yes, the Docker demon is managed by a Linux kernel even in the Windows implemnentation.
This is not a Linux virtual machine. On Windows 10, the Docker demon runs inside a Hyper-V VM (so it requires a 64 bit CPU with Extended Page Tables. (On Server 2016 the implementation is somewhat different, and does not use Hyper-V.)
You can run Linux docker images in a Windows implementation; the Linux kernel functions are executed by the same kernel that runs the demon. You can obviously also run Windows docker images on Windows, but currently, the demon is in either Linux or Windows mode; it cannot run both flavors side by side. (I have seen rumours that this is being worked on, and will be possible in a future release.) The Linux implementation cannot run Windows images.
Docker is essentially suited for backend services: Until you start doing fancy tricks, a container's only interface to the world outside the Docker demon is one or more TCP ports, or for persistent data: Mapping (parts of) an external file system as a Docker volume.
There are two main alternatives for providing some sort of user interface: Either the container runs a web server, or you hook up a SSH console to it. In principle, I guess you could run e.g. an X.11 client in a Docker contiainer to give it a GUI interface; I doubt that anyone has seriously done anything like that.
I guess that Docker is as suitable for web servers running on a Windows host as for web servers running on a Linux host. But applications running a Windows GUI of any kind cannot be adapted to Docker. Nor can any application that requires user interaction for installation, installation must be pure command-line based, with all parameters supplied either on the call line or in a setup/ini-file.
When used for what it is good at, Docker is OK. Streching it to do "everything", being a complete replacement for traditional software design, installation and running, you should be prepared for some pains, in particular in environments where users prefer a highly functional GUI (like in high-quality native Windows applications).
|
|
|
|
|
Good info, thank you.
|
|
|
|
|