Jim Lynch Codes
  • Blog
  • About Jim

Writings about one coder's stories & experiences.

index.js- The "Document Class" of NodeJS

1/25/2016

0 Comments

 
Back in the Flash days (I'm not that old, really) we would call the first class that is run when your application starts up the document class. In was common to call this class Main.as or just the name of your project with dot as after it. The language didn't force you to use any specific file name, but it didn't give any special treatment to any name in particular either. Well, in Node.js the creators have blessed us with some special features of a Javascript file named index.js. The name and function is similar to html's index.html as the main html file for a page.

Read More
0 Comments

WhatDaFont Cool Font Finding Program

1/25/2016

0 Comments

 
Link: https://www.myfonts.com/WhatTheFont/

Do you ever wish that you could upload an image of some text, and have a program tell you what font the author used to write the text? Well, that's exactly what WhatDaFont is! Just upload an image and it will suggest some fonts for you!

Read More
0 Comments

How CSS Classes Conflicts Are Resolved: "The Last Class Defined Wins"

1/25/2016

0 Comments

 
Remember, the last class definition wins!

This post is going to be short and straight to the point! Freecodecamp.com said it best in one of their css challenges, "It doesn't matter which order the classes are listed in the HTML element.
However, the order of the class declarations in the <style> section are what is important. The second declaration will always take precedence over the first."

This means that if you have multiple classes for the same html element. Here's a quick example of this in action. Below, we set the css class on the <h1> element to blue-text and pin-text. The order there doesn't matter at all. What does matter is that in the style (note: inline css is for learning purposes only) the class blue-text is defined after the class pink-text. The same principle apples when defining multiple css files. You must declare them each in a <script> tag, and if properties are defined in more than one class then the <script> tags further down will override those above them. 

Read More
0 Comments

Really Cool Interactive Website for Learning Javascript: FreeCodeCamp.com

1/23/2016

0 Comments

 
Link: http://www.freecodecamp.com/
I like this site a lot because it is a much more interactive way to learn HTML and Javascript than most other sites. Instead of just a static page of text or a simple video file, this site is built in Javascript and is itself a simplified code editor. The lessons are called challenges, and you have to get the code correct to beat the challenge. Here's a screenshot:

Read More
0 Comments

Returning Multiple Values From a Function

1/18/2016

0 Comments

 
This tip works for many languages, and it’s not explicitly stated all the time when starting out. I had already known that you could do this, but kudos to the book “Javascript & JQuery” by Jon Duckett for inspiring me to write a post about it. It’s a very colorful and friendly book that is actually read fun to read which is a huge accomplishment for a book about programming. Anyway, this is a useful little tip to remember when crafting your functions.  
 
Let’s think about the function signature in different (statically typed) languages. Remember, the compile breaks out of the function when return method is called, and nothing after it is run. The function defines a return type, and to a naive programmer looking at the signature it seems that one can only return a single thing. And it’s true- you can only return one thing. But, that thing can be an Object or an Array.

Read More
0 Comments
<<Previous
Forward>>

    ​Author

    Picture
    The posts on this site are written and maintained by Jim Lynch. About Jim...
    Follow @JimLynchCodes
    Follow @JimLynchCodes

    Want FREE access to
    my daily stock tips 
    ​newsletter called,
    "The Triple Gainers"?

    Sign up here!

    Categories

    All
    Actionscript 3
    Angular
    AngularJS
    Automated Testing
    AWS Lambda
    Behavior Driven Development
    Blogging
    Business Building
    C#
    C / C++
    ClojureScript / Clojure
    Coding
    Community Service
    CS Philosophy
    Css / Scss
    Dev Ops
    Firebase
    Fitness
    Flash
    Front End
    Functional Programming
    Git
    Go Lang
    Haskell
    Illustrations
    Java
    Javascript
    Lean
    Life
    Linux
    Logic Pro
    Music
    Node.js
    Planning
    Productivity
    Professionalism
    Python
    React
    Redux / Ngrx
    Refactoring
    Reusable Components
    Rust
    Security
    Serverless
    Shell Scripting
    Swift
    Test Driven Development
    Things
    TypeScript
    Useful Sites
    Useful Tools
    Video
    Website Development
    WebStorm
    Writing

    Archives

    October 2020
    September 2020
    May 2020
    April 2020
    February 2020
    January 2020
    December 2019
    October 2019
    September 2019
    August 2019
    July 2019
    June 2019
    May 2019
    April 2019
    March 2019
    February 2019
    January 2019
    December 2018
    November 2018
    October 2018
    September 2018
    August 2018
    June 2018
    May 2018
    April 2018
    March 2018
    February 2018
    January 2018
    December 2017
    November 2017
    October 2017
    September 2017
    August 2017
    July 2017
    May 2017
    April 2017
    March 2017
    February 2017
    January 2017
    December 2016
    November 2016
    October 2016
    September 2016
    August 2016
    July 2016
    June 2016
    May 2016
    April 2016
    March 2016
    February 2016
    January 2016
    December 2015
    November 2015
    October 2015

    RSS Feed

  • Blog
  • About Jim
JimLynchCodes © 2021