It is that time of the week for Obvious Javascript Tip of the week. You probably already know how to delete an item from an array, maybe not. Sometimes it can be confusing, do I use the delete keyword, do I use slice or do I use splice?
Splice of life Using splice we can remove items from an array by providing the index (with the first item being zero).
Show of hands if you can off of the top of your head remove/trim a character from the start or end of a string. If your hand remained down, don’t feel too bad. There are so many string manipulation methods in Javascript, it can be confusing.
We have; substr, substring and splice (just off the top of my head). Not many people can tell you the differences between the three without Googling.
If you have an array of objects and you want to filter the array to remove duplicate objects but do so based on a provided key/property, this might prove to be a problem you would expect Javascript to address natively. If you are using Lodash then you have many methods at your disposal that can help.
Fortunately, if you are working with ES6 and up, writing some basic Javascript using the filter and map functions makes this possible.
When it comes to brewing, besides perfect sanitisation the other deciding factor is temperature. If your equipment is sanitised correctly, from the pot you boil in to the spoon you stir the mixture with the only thing you have to contend with is the temperature of your wort (especially during the initial fermentation stage).
Depending on the style of beer you are making, your temperature will vary. One of the biggest problems I have as a homebrewer is cooling down the hot wort mixture before pitching my yeast.
Shame on you Stan, shame on you Australia.
In the video streaming wars you have the king sitting on the iron throne: Netflix and then you have everyone else fighting for their chance to sit on the throne.
In Australia we have Netflix, we have Presto, we have Foxtel, Foxtel Go and we have Stan. I have been a subscriber to Netflix since it launched, I tried Presto and found it to be too expensive, Foxtel is a relic of the past and Stan is somewhere in between.
Without-a-doubt layout in any modern website or application is one of the most challenging parts, especially when you want it to work on both desktop and small handheld devices like iPhone’s.
For a project I am working on, I have been extensively using Flexbox for the layout where applicable. One such layout is a grid of blog posts at the bottom of each page for clickthrough.
These items have varied length post titles and imagery. It only takes one title to be shorter than the others and float:left and display:inline-block solutions fall apart.
As great as CSS is, there are some glaring holes within the specification. We can perform calculations using the calc function in CSS, but for some reason there is no list-style-type: dash but other strange values like lower-greek and plenty of other language specific values.
The solution is quite simple and I decided to make this into a post for future reference and anyone else who finds themselves searching Google for the same thing.
I have been toying with an idea I have had for about 5 years now. The idea is rather simple: Airbnb meets yard advertising. The idea is to allow homeowners to rent their front yards to businesses who want to place a sign for a fee.
The idea came about after seeing businesses who put their sign up while working on your house, building a pool or painting in exchange for a discount on the overall cost of the job.
As Youi’s advertisements say: At Youi, we get you. Spoken by a smug looking guy with a face you can’t help but want to punch (I’m sure he is a nice guy, maybe).
After my recent experiences hunting down insurance for a brand new car, I have come to the conclusion that Youi are a bunch of scam artists who cannot compete with any other insurer out there. Considerably more expensive than any other insurer (even Suncorp) even though their ads claim they can save you hundreds.
I recently switched over to using Webpack in my Aurelia application that I have been building at my day job. One of the caveats I encountered as a result of ditching Jspm/System.js is the ability of being able to supply a URL to getViewStrategy because Webpack requires knowing all paths at bundle time, this approach goes out the window.
But, I recently encountered something cool that allows you to request HTML from the server and then use it as a view within your current custom component or wherever using InlineViewStrategy. Essentially this gives you the ability to take arbitary HTML wrapped in tags and use it as a view.