When I started an empty Webstorm project to do some light dabbling in Node.js the IDE would not recognize some pretty basic node globals for autocomplete. (version 2018.3.3)
The resources and posts I found all used solutions which didn't work for me or could not carry them out.
The solution is to simply go into the Node and NPM settings menu (Settings | Languages & Frameworks | Node.js and NPM) and check "the box". The box which says "Coding Assistance for Node.js".
Apparently people have also noticed this on other projects which may not have started on empty. Un-checking and re-checking looks like it can help.
Good Luck!
- Victor F
Thursday, January 31, 2019
Wednesday, January 30, 2019
The $27 Mechanical Keyboard from Aukey
I bought a $27 AUKEY mechanical keyboard with equivalent blue switches.
The action is more than I'm used to, having mostly typed on laptop and stock, included for free keyboards.
If, like me, you've wanted a mechanical keyboard but the prices and number of choices are paralyzing you - keeping you from your from your destiny - this one, among other low price Chinese offers, could be the one to get you through the door.
I'm actually really proud of those sheets.
The Aukey KM-G9 feels heavy. Weighing in at 1.83 pounds (according to Amazon) it's the heaviest keyboard I own now, in spite of it being the one with the least number of keys.
The sound of the clicks are very high pitched. So when typing softly that's primarily all I hear. When typing harder you'll get a deeper thwak (as keyboards do). I'm using this in the office now; It's pretty loud. There's a reverberation after the key strokes, like tapping on a metal bowl, when I listen to it in a quieter place.
As such it feels very different and I'm not having the best performance of my life.
If, like me, you've wanted a mechanical keyboard but the prices and number of choices are paralyzing you - keeping you from your from your destiny - this one, among other low price Chinese offers, could be the one to get you through the door.
Good Luck!
- Victor F
Tuesday, January 29, 2019
How to Look Under the Hood at Javascript Code
I'm finally taking the long overdue step of learning Javascript. Part of the process of learning language is to figure out what it is doing at a far lower level then the luxurious heights at which we get to program. Plus it's just damn interesting.
In the Node (using v10.14.2) usage description there is an option --v8-options. Run Node with this to see a long list of options to give directly to V8, the Javascript engine running under the hood of Node.
There are a few options in here that will get us a look at the inner workings of the Javascript code we write.
--print-bytecode prints the intermediate bytecode.
For even a simple program like hello world there are a few pages of bootstrapping code that also gets printed out. Your functions are put under a label that looks like this:
Use that to your advantage to find your code.
Good Luck!
-Victor F.
In the Node (using v10.14.2) usage description there is an option --v8-options. Run Node with this to see a long list of options to give directly to V8, the Javascript engine running under the hood of Node.
There are a few options in here that will get us a look at the inner workings of the Javascript code we write.
--print-code --print-bytecode--print-code prints the code out in x64 assembly, I think.
--print-bytecode prints the intermediate bytecode.
For even a simple program like hello world there are a few pages of bootstrapping code that also gets printed out. Your functions are put under a label that looks like this:
[generated bytecode for function: myadd]
Use that to your advantage to find your code.
Good Luck!
-Victor F.
Tuesday, October 16, 2018
Silicon Valley Code Camp 2018
This weekend I attended Silicon Valley Code Camp. Code Camp is a conference on its 12th year held in San Jose California and put on by volunteers. I’ve known about it for many years (I found the earliest email I got from them is from 2009), but this was my first year of attendance.
In this post I give quick play by play of my weekend, with summaries, impressions and/or takeaways from each of the talks I attended.
Saturday I arrived late and had no problem getting my pass as I had registered early. I arrived late to my first talk. It was about IoT with Edge. I’m very disappointed I missed as much as I did. I was able to glean how Edge devices and routers interact to communicate with the cloud. How twins of the device status are mirrored on the cloud and what role hubs perform when connection to the cloud is severed. It seems that it runs on raspberry pi, I was not aware of that.
The second talk was on C++ server API’s. The speaker was really entertaining and explained things well. He went on a few tangents which took a lot of his time, but they were entertaining so I forgive him. However, he couldn’t finish the talk on time so a few things were skipped over. I’m really not criticizing him for this. I don’t think that not getting the full talk made my experience on Saturday any less vaLuable. More than anything this talk was more a discussion on best practices when beginning new projects.
The third talk I went to was on java and Kubernetes. This one was tough. I do not know enough about docker to have gotten as much as I’d like from this. I got a general idea of workflow, of setup, of Java through docker with Kubernetes within IntelliJ.
Next was a talk on Recursion and Dynamic programming for technical interviews. This was really just a talk. It represented recursion and dynamic programming with simplified language as opposed to any detailed implementation or code. Dynamic programming fit into the talk really smoothly. Again, it used the same simple explanation technique as used for recursion. What’s more it seemed very natural to explain DP directly after explaining recursion as he had built up the concepts in such a way that the two example problems were nearly identical.
The final talk was not technical. It was about human learning techniques. Worth the time and part of the reason I’m writing this. The speaker was really good and covered some things that hold back learning, techniques students and educators could use (like a learning journal) and some myths.
Sunday was more laid back: fewer people, less prepared speakers, for lack of a better description, less popular topics.
I started by going to an intro to mongoDB. My take from the talk was that It sounds like a great way to get away from SQL tables and a carefully planned DB before implementation aka. prototyping.
For the rest of most of Sunday I attended a series of talks by 3 gentlemen. The series was ostensibly about creating drivers for android. That’s not what it was. It was implement Android’s Binder Inter-process communication as a linux device drivers.
The first talk was the best for anyone who went for an education on android. It covered concepts of binder which would help any Android programmer to better understand and better utilize the technology.
The second in the series was an introductory tutorial on writing kernel mods for linux and a bit on the Android Linux kernel.
The third talk was the curve ball. Where the speaker showed his implementation of Binder on an Ubuntu AWS machine. A little bit of a letdown but overall a really excellent series but for the expectations set. Now looking at the schedule I can see the signs.
Finally a talk on interfacing with C from Lua and Ruby. in all directions: Lua to C, C to Lua, Ruby to C, and C to Ruby. It’s apparently really easy to call C libraries in Ruby. The speaker spent more time than was needed on summarizing each language. I don’t believe anyone actually attended the talk which didn’t know one of the languages and so the subject of actually interfacing seemed to not get enough attention while the majority of the talk was used to educate everyone on the properties of Lua and Ruby which weren’t necessarily relevant to interfacing with C.
Food and drink were provided in the morning, at lunch each day with occasional snacks set out, and ice cream in the afternoon on Sunday. There were raffled prizes donated by the event’s sponsors. It was well worth the money paid. In fact it was worth far more than the money paid. I’m really kicking myself for 9 years of stupidity for not attending.
- Victor F.
Labels:
android,
conference,
lessons,
programming,
selfimprovement
Wednesday, November 8, 2017
Experiments in Basing I
The release of the 8th edition rules of 40k has brought me, as it has many others, back into the terrifying depths of the Warhammer 40k hobby where time is wasted never to be seen again. Having a great looking army is a distant dream of mine and though it may take until the god emperor of mankind reveals himself to start his crusade across the stars, my Waaagh! will be ready and goddammit it will look good.
A few types of bases caught my eye, particularly those with cracked earth, so I picked up a bottle of Agrellan Earth from Citadel. Now what to do with it?
As a young Warboss I put my army on bases as soon as I glued them together. I thought that's how it was done. I soon found out that was not how one became the flashiest git on the table. So instead of tearing my army apart and having my boyz unplayable while they undergo a makeover I picked up these cheap wooden 25mm bases. I don't know how well they work on the table compared to the plastic ones, but as for putting paint on them, I like 'em fine.
I slapped on my slate and the small basing accessories that I got in some basing kit years ago (using liquid elmer's glue & super glue).
I went straight to this color, I got this idea from someone I played a game against, but he used automotive primer. Go with something like that, don't go with this paint; it sucks. It drips than a hungry squig.I shouldn't have to say "After it dried," but for any young warbosses reading this I will say: always wait 'til a coat fully dries before moving on to the next one.
After the coat dried I put on the Agrellan Earth.
Here, I did not put a varnish on the painted wood before applying Agrellan Earth like I should have and almost sorely paid for it. A varnish will help make sure the Agrellan earth stays stuck firmly to it. Wood without varnish performed will in this manner in my experience, the paint above did not.Something flat and hard works better than a paint brush for this; I used sculpting tools. I spread it all over the flat wood portions and got it all the way to touching the base of the rocks and bits.
I did not wait long enough for it dry (around 4 hours) and I noticed some of the paint had shrunk more after I started the next step. The next step is applying a wash. I used both sepia colors they both look great. I used another red wash and went much lighter. This one is intended to be (but was not in practice) applied superficially to the surface of the paint flakes and not to run into the cracks as the sepias should. The red wash is for color variety.
The last step was dry brushing. I dry brushed gray onto the rocks and then oiled leather on everything, including the rocks. I might come back and dry brush an even lighter tan color for a dryer desert look. The oiled leather isn't very noticeable.
I am liking how they turned out and they definitely look better than what I did previously. It's not too time consuming which I like a lot. You get a great look out of a little bit of work. But my original idea was not satisfied and I may have found a way to make it as fast as this.
And here are a bunch of youtube videos I saw before trying this:
https://youtu.be/tWm38GgtGVs
https://youtu.be/iHWo8RG1NuY
https://youtu.be/P3zpcTHKS9U
Saturday, February 20, 2016
Game of Life
About eight years over due, I've finally programmed an implementation of Conway's Game of Life.
Here's my code.
Of course I had started and given up on this before. After watching the video below by Computerphile I decided to revisit it.
Saturday, November 7, 2015
REST API WEEK! App a Day 22: Reddit Images
https://github.com/victorman/RedditImagesAndroid
I'm not sure if this one is really accessing an API, technically. Though it does request subreddits in JSON in order to display thumbnails of images which doesn't require any authentication.
I'm not sure if this one is really accessing an API, technically. Though it does request subreddits in JSON in order to display thumbnails of images which doesn't require any authentication.
Subscribe to:
Comments (Atom)











