design

Flow control: If/else, switches and….dictionaries?

Flow control: If/else, switches and….dictionaries?

.NET languages have a variety of forms of flow control, if statements are easily among the most noticeable. When having to compare multiple statements it is common practice to utilize switch statements due to it’s improved performance, but is there another way? It turns out there is!  We can actually use a dictionary and delegates for flow control! Before we delve into this, how exactly are switch statements utilized by the compiler?

TLDR;

You can use dictionaries in place of large switches and the code is found here.

Continue reading →

Posted by DCCoder in General, Programming, 0 comments
Code Lint – What is it? What can help?

Code Lint – What is it? What can help?

So what exactly is code lint?  I’m sure we’ve all heard of a linter but how many out there have actually taken the time to sit down and use one?  What are they used for?  Well, getting rid of code lint, of course!  A linter is defined by Wikipedia as:

A linter or lint refers to tools that analyze source code to flag programming errors, bugs, stylistic errors, and suspicious constructs.

So obviously feeding off of the definition of a linter, a good explanation for the lint itself could possibly be clearly defined as:

Code lint is a software programming “smell” that is identified by programming errors, bugs, stylistic errors and/or suspicious constructs.

I personally believe that this is a good explanation to those.  There are linters out there for nearly every language, however; I’m going to focus on JavaScript for soon-to-be apparent reasons.

Continue reading →

Posted by DCCoder in Design and Best Practice, Programming, 0 comments
Material design, what is it and why you should be using it.

Material design, what is it and why you should be using it.

Lately there has been a lot of uptick in Material Design.  More bloggers are blogging, and more designers are designing, but as a developer what do you need to know about Material Design?  The best place to start is to define exactly what Material Design is.  Wikipedia defines this as:

 

Material Design (codenamed Quantum Paper) is a design language developed in 2014 by Google. Expanding upon the “card” motifs that debuted in Google Now, Material Design makes more liberal use of grid-based layouts, responsive animations and transitions, padding, and depth effects such as lighting and shadows.

Though this description technically does describe it, we can do a little better.  Material Design is a design language that focuses on “materials” or objects with physical surfaces and edges.  This was primarily created with mobile application design in mind. These days, however, Material Design is being extrapolated into many other realms such as web development.

Continue reading →

Posted by DCCoder in Design and Best Practice, 0 comments