32 karma · joined April 3, 2013
I have been learning it and the syntax is close to most C style programming languages. As a software developer this makes it much more approachable than Coq. The proof statements also feel more like the math I learned in college rather than the weird magic keywords of Coq.
Here's a great tool, https://quicktype.io/typescript . You can paste in JSON objects and it will spit out useful type definitions for your objects. The reality is that types exist in JavaScript and any other untyped language, they're just implicit. You have to read the code to know what they are. Then to help yourself or people who work with you, you will start writing examples either in the docs or in tests, and now you've informally specified your types. Or you don't do either then every time you or anyone else goes to edit a piece of code you have to read, understand, manually find all places you used that code and make sure you didn't break anything.
The purpose of a static type system is to find bugs, or issues with your code without even running it. The compiler will let you know if you make a change to the code which breaks the type you set. It can do a lot of the above mentioned work completely automatically.
You end up saving a lot of time not repeating work. One time working in python I had a problem that took me an hour to figure out. I had to look through a bunch of project code, then library code, and then I figured out that I just had put in the wrong shape of data. In a typed language it would have take me 30 seconds. The compiler would have complained and told me how I was wrong and then I would have fixed and moved on. At that moment I said "I'm getting too old for this shit", and then have never looked back from working with typed languages.
Secondly, TypeScript is not Java/C/C++. TypeScript has type inference and expressive type system. This means that you do not need to manually write the type for every single variable. Most you can omit because TypeScript is clever enough to figure it out.
Secondly, Structural typing is exactly how duck typing works in JavaScript and Python. Unlike those older languages you don't need to build huge class based hierarchies to make types that work in many situations. Define a minimal interface that you need for a function. Any object that has those properties will type check and work.
Check out Effective TypeScript, or Programming TypeScript. As a seasoned node developer I assure you that if you ever have teammates, types will help them contribute to a code base faster and with more confidence.
To that end when I was teaching students I would print out snippets of code and have them evaluate the code in their head/on paper and then have them run the code to see if there was anything wrong. Repeat this process until your mental model matches what the computer does.
The browser is a crazy environment and adds difficulty, but I find my server code can very strictly typed. The nodejs type definitions are good and if you pick an ORM library with good typescript support then both the in memory data structures and database objects can be well typed.
The build step with typescript is basically negated by ts-node for the server. Alternatively, by using tsc --watch and some clever indirection I've enabled hot reloading for most of my server code. So just to be clear, I have types helping me code using vs-code, I save and immediately see changes on the server.
If you know the tools well and how to set things up then TS + node can provide a better developer environment than many languages.
Even if you willingly accept the forced arbitration clause you still may not get justice because the company doesn't want to pay for it!
Obviously ex post facto law is bad for society. However, if an artist is receiving royalties for a work they made during which they raped several people, why should they still profit?
It boils down to he's saying that the suffering of any of the victims doesn't matter to him. Literally at all... More over there is a pretty deep undercurrent that that has been the attitude for a long time and that the suffering of others has been ignored for equally long.
If you want justification for removing the works of the artists then consider it a form of ill-gotten gains. Would that work of art have been made if they're crime had been revealed or convicted?
"The OAG could not review the practices and procedures of non-participating platforms (Binance, Gate.io, Huobi, and Kraken) concerning manipulative or abusive trading. However, the Kraken platform’s public response is alarming. In announcing the company’s decision not to participate in the Initiative, Kraken declared that market manipulation “doesn’t matter to most crypto traders,” even while admitting that “scams are rampant” in the industry."
https://basarat.gitbooks.io/typescript/content/docs/getting-... (ssl cert expired today -_-)
However, it is a handy feature for writing tests. I wrote a similar library for testing called magical-mock based on the python library. https://www.npmjs.com/package/magical-mock
http://logicaltypes.blogspot.com/2015/08/pure-functional-pro...
I'm a software developer working in Node.js, and very solid with JavaScript, MySQL, Mongo, and other web technologies (jQuery, Angular, etc...). I also have experience with a number of other languages including PHP, Java, C/C++. I'd be happy to mentor folks in those things as well.
1. There are no examples of how to use the code. (Add some instructions in the README.md)
2. There is no indentation in the code (most IDEs and some text editors can do this for you)
3. All of the code is one large file
4. There is no documentation
5. There are magic/unexplained numbers everywhere
6. There are lines of code over 80 characters wide. (many of these composed of multiple short statements that could easily be put on separate lines.
7. A lot of the code looks very repetitive and probably could be made a lot shorter with more general functions
8. The function names are descriptive but the variable names are not (consider longer but more informative names for your variables)
If you work on most of these I think the code will be a really good piece to show off.
On the issue of the name I highly doubt that it will be a problem. There are hundreds of other projects on Github similarly named. Now if he started making the toy and selling it as a "Rubik's cube" that would be a problem.