|
Brilliant!
"Go forth into the source" - Neal Morse
|
|
|
|
|
NASA is inviting us to submit our names which they will then, send it to the SUN's surface! This is a part of Parker Solar Probe [^]. The objective of this mission is to study SUN's atmosphere.
Our names won't serve any purpose to the mission! However, I think it will show our support and interest towards these endeavors. Hence I submitted mine. Have you also submitted your name or planning to so? [^]
|
|
|
|
|
If I get my name above yours I can say: "My name is hotter than yours!"
... such stuff as dreams are made on
|
|
|
|
|
If they just want my name to put on a SD-card, then why do they need my email?
Am I to expect email-reactions from the surface of the sun?
Quote: You will be sent an email with instructions to complete the submission process. So.. instructions that cannot be shown on a browser, but require email?
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
"If you just follow the bacon Eddy, wherever it leads you, then you won't have to think about politics." -- Some Bell.
|
|
|
|
|
Only if they'll name it Sunny McSunface
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
AntiTwitter: @DalekDave is now a follower!
|
|
|
|
|
I'm not so sure, could be witchcraft
Signature ready for installation. Please Reboot now.
|
|
|
|
|
They should make it more interesting. Instead of a thumb drive, select a politician. And tattoo them, or laser inscribe them, with all the names sent in! Selecting the politician is left for the soap box, though!
|
|
|
|
|
David O'Neil wrote: Selecting the politician is left for the soap box
Why bother selecting just one? Send them all!
Ad astra - both ways!
|
|
|
|
|
No but I've got an ex I'll donate.
Everyone has a photographic memory; some just don't have film. Steven Wright
|
|
|
|
|
Obligatory Names Song
Their Names Escape Me.wmv - YouTube[^]
My name's not in there, but only 'cause I didn't know about it until after the fact.
"Go forth into the source" - Neal Morse
|
|
|
|
|
I actually sent my name to the Sun. Now the Oracle retains it.
|
|
|
|
|
No need - I have a Facebook account, my name is everywhere.
|
|
|
|
|
So Javascript is actually pretty cool. Queue "Join the dark side, Marc".
Working with arrays and dictionaries is really easy, particularly with functions like map, reduce, and Object.entries. I still have to give our own Sander's Javascript LINQ a whirl, but for now I haven't needed it yet.
set/get is incredibly useful.
this and bind is someone's idea of hell, but once you figure it out, it works.
Being able to pass functions as parameters is incredibly useful, and creating partial functions is also really useful.
partialOnDrag(anchors, anchorElement, onDrag) {
return (function (anchors, anchorElement, onDrag) {
return function (dx, dy) { onDrag(anchors, anchorElement, dx, dy); }
})(anchors, anchorElement, onDrag);
}
It let's you get away with murder. Good grief, I can create/assign a class' function to a completely different function with "=". Well, functions are functions!
It drives me nuts (as with any scripted language) to have to figure out if I wrote the code correctly by actually running it. Things like typos, forgotten this. and other stupid mistakes a compiler would catch. I need to explore some Lint apps.
Dealing with attributes, which are strings, when you want them as numbers to do math on. Ugh. And crazy workarounds, like +"1" is actually the number 1.
Classes are cool, but then there's the "class-like" hack of creating an object with key-value pairs where the key is the function "name" and the value is the function. Is that old school?
var vs. let . Riiight. That was useful to know about.
I haven't even touched what looks like the cesspool of prototype . Probably something I should learn.
But overall, I'm actually starting to get comfortable with what I'm doing. Meaning that I'm actually starting to spend more time debugging my code logic than debugging my stupid syntax mistakes or quirky Javascript behaviors.
Anyways, just thought you'd like all like to know what I've been learning writing my next article on dynamic SVG and creating a bare-bones diagramming app.
Latest Article - Contextual Data Explorer
Learning to code with python is like learning to swim with those little arm floaties. It gives you undeserved confidence and will eventually drown you. - DangerBunny
Artificial intelligence is the only remedy for natural stupidity. - CDP1802
|
|
|
|
|
Question #1: Who are you, and what have you done with our Marc Clifton?
Question #2: Why didn't you bring enough to share, dude?
Software Zen: delete this;
|
|
|
|
|
Subject: Javascript
Marc Clifton pulls pin, rolls grenade into forum...
With just one simple word.
|
|
|
|
|
JavaScript can be pretty neat, but with lots of rough edges.
> Classes are cool, but then there's the "class-like" hack of creating an object with key-value pairs where the key is the function "name" and the value is the function. Is that old school?
That's one old school way to do it, but it's not quite equivalent. Creating an object where the function names are the keys in the key value pairs is equivalent to creating a class with nothing but static methods in C#. Of course, using ES2017+ syntax, you can just create static functions in your JS class.
So something like this:
const AnObject {
aFunction: function() {
console.log("hi");
}
}
ends up being exactly the same as
class AClass {
static aFunction() {
console.log("hi");
}
}
The old school equivalent to a class declaration would look like this:
function MyClass(abc) {
this.abc = abc;
}
MyClass.prototype.printAbc = function() {
console.log(abc);
}
Which ends up doing the same as:
class MyClass {
constructor(abc) {
this.abc = abc;
}
printAbc() {
console.log(abc);
}
}
In either case, the following code will have exactly the same result:
let something = new MyClass();
something.printAbc();
The class syntax is mostly just syntactic sugar; at the end of the day, the JavaScript runtime ends up doing what's shown in the first example, i.e. creating a constructor function and then adding the class's methods to the constructor function's prototype.
Understanding protytypes is pretty useful. Understanding them means you understand how the entire JS class system works. And fortunately, protytypes aren't that big a cesspool if you've got a good teacher. Probably the best resource on the topic (even though it's quite old now) is JavaScript: The Good Parts. It's an easy read, and enjoyable because the author is a bit of a grump and isn't shy about noting the bad parts of JS along with the good ones.
The book predates some of the newer syntax, like let, const, and even class. But if you keep in mind that the class syntax is really just using prototypes under the hood, then almost everything in the book will be very relevant to what you're doing now.
One thing the book won't cover is Promises, along with how the new async/await that simplifies using Promises. Its very, very similar to how the async/await syntax in C# makes it easy to work with Tasks.
|
|
|
|
|
That was a fantastic write-up!
Latest Article - Contextual Data Explorer
Learning to code with python is like learning to swim with those little arm floaties. It gives you undeserved confidence and will eventually drown you. - DangerBunny
Artificial intelligence is the only remedy for natural stupidity. - CDP1802
|
|
|
|
|
Next to the book of Douglas Crockford, I would also recommend the videos on youtube "Crockford on Javascript". It is fun to watch and gives a good insight where Javascript comes from.
If on the otherhand you want a compiler, please do evaluate typescript. It is a language which is strongly typed and compiles to Javascript.
Have fun with Javascript.
|
|
|
|
|
I spend 2 years on a project using Typescript (from 0.8.xx to 2.x) along with JavaScript. At the end, on new projects, I went back to pure JS. I felt like the static type in TS is getting in the way and hinder me from what I want to do sometime. It reminded me back when I was coding using Assembler and C for kernel development. Man I feel old.
|
|
|
|
|
What did you drink Mr.Clifton ?
Caveat Emptor.
"Progress doesn't come from early risers – progress is made by lazy men looking for easier ways to do things." Lazarus Long
|
|
|
|
|
|
You may as well just change over to VB at this point, and be done with it. Hippie.
Typeless languages are for people that lack the mental fortitude to work within strongly-typed constraints.
I bet you drink coffee at Starbucks, instead of out of a boot, or a rusty can (like real men).
".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
modified 22-Mar-18 14:48pm.
|
|
|
|
|
John Simmons / outlaw programmer wrote: I bet you drink coffee at Starbucks, instead of out of a boot, or a rusty can (like real men).
Even worse, I drink tea, not coffee! Earl Grey at that!
Latest Article - Contextual Data Explorer
Learning to code with python is like learning to swim with those little arm floaties. It gives you undeserved confidence and will eventually drown you. - DangerBunny
Artificial intelligence is the only remedy for natural stupidity. - CDP1802
|
|
|
|
|
Marc Clifton wrote: Even worse, I drink tea, not coffee! Earl Grey at that!
BAH!
".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
|
|
|
|
|
Let me buy you a Zima, then! LOL
|
|
|
|