Nikola Brežnjak blog - Tackling software development with a dose of humor
  • Home
  • About me
Home
About me
  • Nikola Brežnjak blog
  • Home
  • About me
Miscellaneou$

57th SQL/DEV user group meeting about refactoring and transpilers

I attended our local Microsoft community user group meeting which was about refactoring and transpilers. It’s full proper title (on Croatian) was 57. sastanak SQL/DEV UG Čakovec-Varaždin.

This was 57th meeting in a row, and the presenter Nikola Begedin had two awesome topics (with few notes I took):

Principi i konvencije u refaktoriranju koda (Principles and conventions in code refactoring)

57devug_1

There are typical problems in every code with typical fixes for each of these problems. So, it’s useful to know them in order to be able to detect them early in the code and fix them before they introduce technical debt.

Few of the principles:

  • extract temp to query
  • tell, don’t ask
  • data clump
  • decoupling

You should look to refactor

  • God objects
  • high churn code
  • bugs – “bugs like company”. If a bug appeared at the same function, then refactor it because it’s obviously too cumbersome and the bug will inevitably manifest itself again

Few of the recommended books:

  • Clean Code: A Handbook of Agile Software Craftsmanship
  • Refactoring: Improving the Design of Existing Code
  • Growing Object-Oriented Software, Guided by Tests

Korištenje transpilera (using transpilers)

57devug_2

Transpiler is a source to source compiler. What that means is that it’s basically a tool which translates from one language to another.

Transpilers allow us to write modern JavaScript code, to work with modules, use advanced language features (await, async, arrow functions, …), etc.

Some options that we have today are:

  • Babel
  • Google Traceur
  • Browserify
  • RequireJS

Visual studio 2015 supports Gulp task running via Task Runner Explorer.

The point is that we don’t need these but since sooner or later more and more browsers will support these functions and you can use them already today, I don’t see any reason why not to use all the benefits that they offer.

https://twitter.com/HitmanHR/status/679276361492598784

Ionic, Pluralsight

How to publish the app to the Apple’s App Store and Google’s Play Store

edit: These posts don’t exists in their separate form anymore. Instead, they have been merged into one big post that you can read here. But, in case you want to read them in its original form, make sure to check the book linked below.


The fourth post about Ionic framework for Pluralsight wraps the series in a whole where we showed how to create an application starting with an idea, through creating a prototype and implementing the application using Ionic framework to finally (in this tutorial) publishing it in the stores.

You can see the finished product on the header image and you can check out the application by downloading it from the App Store or Play Store here.

The post is live and you can access it for free here:  How to publish our calculator application to the Apple’s App Store and Google’s Play Store.

This was a series of posts which was intended to teach you how to take advantage of your web development knowledge in building hybrid applications for iOS and Android.

The first tutorial, as you may remember, was all about how to get started with Ionic framework on Mac andWindows. The second tutorial was about how to create a calculator application with Ionic framework by using Ionic Creator for UI. The third tutorial was about how to polish, create icons and splash screen images, add ads, share and test our calculator application.

IonicBook

If by some chance you would like to download a PDF version of these 4 posts you can do so via Leanpub. Yes, you can choose zero as the amount and I promise I won’t take it against you 😉

If you have any questions please don’t hesitate to ask, and please share if you like it.

How to #publish the #app to the Apple's App Store and Google's Play Store https://t.co/DkFBeTj8yi @ionicframework pic.twitter.com/SjROTSn5OO

— Nikola Brežnjak (@HitmanHR) December 15, 2015

Breaking News, Ionic

Ionic 1.2 is out!

The team from Ionic announced their new 1.2 version today. This should get you very excited because the things these guys are making are truly praiseworthy.

As they say in the report:

  • it has over 100 bug fixes
  • uses native scrolling by default on all platforms (which means better responsiveness on Android especially)
  • new Slide box component (use the new <ion-slides> tag)
  • support for Windows 10 and Edge, which runs on the new Windows Phone 10 platform
  • if you want to build a mobile website, you’re fully and officially encouraged to do so (not just an app for the app store). As many of you know, this was not the case so far.
  • new <ion-input> tag
  • dropping support for the raw HTML and CSS versions of Radio and Checkbox, instead you’ll have to use directives <ion-radio> and <ion-checkbox>
  • better integration with Cordova plugins in terms of better console log error output
  • Ionic Native
  • …

You can read the full report on their blog post: http://blog.ionic.io/announcing-ionic-1-2/.

@ionicframework Awesome Ionic 1.2 is out! Mobile website mode supported! https://t.co/QsdhghpPdP pic.twitter.com/pvFpZVARvg

— Nikola Brežnjak (@HitmanHR) December 10, 2015

Ionic, Pluralsight

How to polish, create icons and splash screen images, add ads, share and test our calculator application

In my third tutorial about Ionic framework for Pluralsight, I’m going to show you how to:

  • polish,
  • create icons and splash screen images,
  • add ads,
  • share and test our calculator application

The post is live and you can access it for free here:  How to polish, create icons and splash screen images, add ads, share and test our calculator application.

Btw, if you’re wondering where is the main image from, it’s actually from a landing page of the published apps (we’ll show you how to do that for both Play Store and App Store in the next tutorial), and you can take a look at it here: SuperSimple Calculator.

This will be a series of posts which will teach you how to take advantage of your web development knowledge in building hybrid applications for iOS and Android.

The first tutorial, as you may remember, was all about how to get started with Ionic framework on Mac andWindows. The second tutorial was about how to create a calculator application with Ionic framework by using Ionic Creator for UI.

If you have any questions please don’t hesitate to ask, and please share if you like it.

How to polish, create #icons and #splash screen images, add #ads, share and test our #ionic #calculator application https://t.co/52k5f1G9CH

— Nikola Brežnjak (@HitmanHR) December 9, 2015

Ionic, Pluralsight

How to create a calculator application with Ionic framework by using Ionic Creator for UI

edit: the old link is not working anymore and all four posts have now been merged into one huge post: Ionic Framework: A definitive 10,000 word guide.

In my second tutorial about Ionic framework for Pluralsight, I’m going to show you how to create a calculator application with Ionic framework by using Ionic Creator for UI.

The post is live and you can access it for free here: How to create a calculator application with Ionic framework by using Ionic Creator for UI.

The first tutorial, as you may remember, was all about how to get started with Ionic framework on Mac andWindows. This will be a series of posts which will teach you how to take advantage of your web development knowledge in building hybrid applications for iOS and Android.

If you have any questions please don’t hesitate to ask, and please share if you like it.

How to create a #calculator application with #Ionic #framework by using Ionic #Creator for UI https://t.co/A7wCaKOunX

— Nikola Brežnjak (@HitmanHR) December 1, 2015

Ionic, Pluralsight

My new post about Ionic on Pluralsight

I haven’t posted in three weeks now, but there’s a good reason for it – I was preparing a post for Pluralsight on the topic of Ionic. This will be a series of posts which will teach you how to take advantage of your web development knowledge in building hybrid applications for iOS and Android.

I’m super excited that the first  post is now live (I have additional 3 in the queue) and you can check it out here: How to get started with Ionic framework on Mac and Windows.

If you have any questions please don’t hesitate to ask, and please share if you like it.

Miscellaneou$

Ekobit DevArena X 2015

Post moved here: http://www.nikola-breznjak.com/blog/miscellaneou/ekobit-devarena-10-2015/

Miscellaneou$

Ekobit DevArena X 2015

I just came home from the ever so slightly awesome Ekobit DevArena X conference. As I usually do, I’ll share my notes that I took in my notebook and a few pictures.

Start your engines

Well, you can’t start a day on an empty stomach, right?

IMG_5014

This is how the accreditation looked like:

IMG_5015

The accreditation had a handy list of all the presentations on the back side:

IMG_5016

As you can see, there were 4 tracks between which you could choose (yes, you could go to any presentation in any of the tracks in a certain timeslot). Chalk n’ Talk presentations are actually a cool thing where they aren’t actual presentations rather something like a round table where the presenter(s) discuss their real life experiences (and the input from the crowd is also highly desirable).

Keynote

  • Presenters: Ivan Kardum, Nenad Bakić, Domagoj Pavlešić and Saša Tomičić
  • 10th in a row Ekobit DevArenaIMG_5017
  • A very interesting project called Croatian Makers by Nenad Bakić who was very inspiring and kudos for starting all this
    IMG_5018
  • They donated robotical equipment to over 50 schools in Croatia
  • Serwantes
  • Fantom 3
  • Lego Mindstorms – can’t wait to get this for my little girl! Yeah, I know it’s an excuse for me to play with it too 🙂
  • He shared a quite intriguing image with us:
    IMG_5019

Modern web application development in Visual Studio 2015

  • Presenter: Ivan Popek
  • IMG_5022
  • IMG_5023
  • Bower and npm come preinstalled with Visual Studio 2015. I wrote a detailed tutorial for Digital Ocean about Bower if you want to take a look.
  • Gulp and Grunt are task runners which offer tools like minification, concatenation, linting, etc…
  • Personally, I like Gulp better because of it’s clearer syntax
  • Gulp is faster because it uses streams
  • Git and Node are also preinstalled by default on VS 2015
  • The way you “add” packages for Bower is that you create a bower.json file in the Solution explorer and as soon as you hit Save it installs the listed dependencies. It creates the Dependencies folder and a bower_components folder
  • bower install runns automatically after you open up the project
  • To add Gulp create a package.json file in the Solution explorer and as soon as you hit Save npm will install it. You can add additional Gulp dependencies the same way.
  • To start writing Gulp tasks, create a gulpfile.js and hack on 🙂
  • Visual Studio 2015 has a nice TaskRunner explorer where you can run the tasks manually. However, it’s way better to set a “watch” task inside Gulp so that it runs the tasks automatically for you. For example, if you’re using SASS it will compile to CSS automatically on every change to the SASS files. You can set the watch tasks to run after you reoppen the project with Watch -> Bindings->Project open

Clean code is your friend

  • Presenters: Bruno Brozović and Antonija Malenica
    IMG_5024
  • Technical debt
  • Writing code : Reading code = 1 : 10 in terms of time. It’s way better to invest time at the beginning to write “clean code” as it will pay of in the later stages of the project
    IMG_5025
  • The boy scout rule – always leave the campground cleaner than you found it
  • YAGNI (You ain’t gonna need it) – do not add functionality until deemed necessary
  • KISS (Keep It Simple Stupid) – Simplicity is better than complexity
  • DRY (Don’t Repeat Yourself) – every piece of knowledge must have single, unambigious, authorative representation within system
  • Principle of least surprise – do the least surprising thing
  • SRP (Single Responsibility Principle) – a class should have only one reason to change
  • Single level of abstraction
  • Methods
    • names – detail and descriptive
    • short
    • number of arguments as small as possible (0, 1, 2)
    • SRP
  • Comments – you should strive to write selfdocumenting code
  • Classes
    • QualitatyClassName (25-30 characters)
    • SRP
    • smaller number of cohesive classes
    • Open Closed Principle – open for extension, closed for modification
  • Learning test
  • And now, a spectacle! In a room of about 100 people when the question “How many of you are using Unit testing?” was asked only 4 people raised their hands 1415131129_smiley-evil

Lunch

smileyGlasses

IMG_5026

We’re outsorcing products and services, not people!

  • Presenters: Luka Abrus (Five Minutes), Vedran Brničević (Ekobit)
    IMG_5027
  • Ekobit started in 1992
    • ALM, BizDataX
  • Five minutes needed 7 years to come to the point where 100% of the things they do is on the USA market
  • Customer feedback by literally going live from door to door and ask
  • Landing pages + AdWords + Sign me up
  • Nobody buys enterprise software without a support
  • Europe’s problem is language barriers from country to country
  • Funny anecdote: when you say to an American that you’re from Croatia: “Oh, yes Dubrovnik – Game of Thrones!”. Also funny one was “oh, you’re just a Russian school of mathematics”. And thus, they believe we are good programmers; designers not so much.
  • You need to be willing to hop the plane and go to a meeting at any time
  • Five Minutes has currently 12 free spots
  • NY Area software developer 150-200$ per hour (jaw-dropping!)
  • Quality is everything!
  • Put your code to GitHub, designs to Dribble, Behance
  • The main problem that both of the presenters expressed was that there are just not enough (quality) developers

Where is this web going?

  • Presenters: Domagoj Pavlešić, Ivan Popek, Renato Železnjak, Josip Klarić, Ratko Ćosić
  • this was a round table like presentation
    IMG_5029
  • Browser as an Operating System
  • Microsoft is slowing down the Web standardization
  • Too many JS frameworks (you don’t say 😉)
  • NO for monolith framework
  • Use linting
  • Gridster, Selectize, Knockout
  • Throw jQuery out
  • TypeScript two thumbs up

Automated delivery in Visual Studio 2015

  • Presenters: Ognjen Bajić and Ana Roje Ivančić
    IMG_5030
  • Build vNext
  • 2015 Intentional Extensibility – open source
  • Custom build workflows
  • Real time output
  • Versioning
  • Cross-platform build (Win, Mac, Linux)
  • Build .NET, Java, Android, iOS
  • Ant, CMake, Maven, Xcode Build, Android Build
  • Agents, Pools, Queues
  • Testing, web performance, load tests

Aurelia – new generation JavaScript framework

  • Presenters: Ratko Ćosić and Mario Peroković
    IMG_5036
  • AMD
    • modular programming
    • RequireJS
    • CommonJS
    • TypeScript
  • SPA
    • chunking
    • templating
    • controllers
  • Which framework should I choose?
    IMG_5037
  • Durandal -> Aurelia
  • JavaScript is a subset of TypeScript which is compiled in ES5. Microsoft is developing along with Anders Hejlsberg (C# creator)
  • Angular2 uses TypeScript
  •  Every view starts with <template>
  • MVVM – model view view-model
  • DI – dependency injection
  • Parent view models
  • Routing
  • Screen activation lifecycle
  • uses jspm
  • jspm install aurelia-http-client
  • <input type=”text” value.bind=”firstName” /> and then reference it like ${firstName}
  • Debugging
    • compile-spy
    • view-spy

They had a nice additional prize draw for those who asked questions (you get a small paper which you toos in a drawing bowl). I got mine on the last presentation. However, no luck in winning something 🙁

IMG_5039

However, as every year, they are giving prizes for the first few people who sign up for the conference. This year I signed up at 6th place, and because of that I got a nice 2 tickets at Terme Tuhelj, and also a nice hoodie with a number 6 🙂IMG_5047

Thanks and hope to see you next year!

Sublime Text

How to set up live Markdown preview on Windows with Sublime Text and Markmon

If you write on the web, you must have come across the awesome Markdown:

a text-to-HTML conversion tool for web writers. Markdown allows you to write using an easy-to-read, easy-to-write plain text format, then convert it to structurally valid XHTML (or HTML).

You can learn more about it from the official documentation.

There are many editors that allow you to write in Markdown but, as I found, most of them require a license. Besides, wouldn’t it be great that your own editor would have a Markdown support? That’s why I love Sublime Text, it has a plugin for everything. Well, ok, it doesn’t have a plugin to throw out sandwiches from your computer, but I guess it will be able to in the not so distant future. smileyGlasses

Ok, jokes and wishes aside, let see how to set up live Markdown preview on Windows with Sublime Text and Markmon plugin.

Install Markmon:

npm install -g markmon

Install pandoc.

Install Markmon Sublime Text plugin through its Package Control (search for “Markmon”).

Make sure you have markmon and pandoc in your PATH variable.

Run markmon in the folder where is your .md file, like this:

markmon myMDfile.md

open up your browser at localhost:3000.

Write on! hand_rock_n_roll

How to set up live #Markdown preview on #Windows with #Sublime Text and #Markmon http://t.co/ROZZxCbvGb

— Nikola Brežnjak (@HitmanHR) October 18, 2015

Miscellaneou$

The winner of my Grammarly prize draw

A month ago I started a Grammarly prize draw. I added all of the emails in the random.org and here are the top 5:

Screen Shot 2015-09-20 at 21.25.37

I’ve listed 5 in case someone will maybe not want it or would like to give it to someone else or would not get back to me in a decent period of time (I also sent a newsletter about this). I’m expecting the winner to contact me via my email address and also to comment below in this post.

Thanks all for participating, I’m hoping that I’ll have a next one soon, and this time I was thinking it would be great if the prize would be a Sublime Text 3 license – what do you think?

Page 5 of 9« First...«4567»...Last »

Recent posts

  • Why You Should Start Blogging (Even If Nobody Will Read It)
  • Speed Reading
  • Impostor Syndrome
  • Why Strange Images Make You Remember Better
  • Productivity tip: rate things 1-10 without 7

Categories

  • Android (3)
  • Books (114)
    • Programming (22)
  • CodeProject (36)
  • Daily Thoughts (78)
  • DevThink (5)
  • Go (3)
  • iOS (5)
  • JavaScript (128)
    • Angular (4)
    • Angular 2 (3)
    • Ionic (61)
    • Ionic2 (2)
    • Ionic3 (8)
    • MEAN (3)
    • NodeJS (27)
    • Phaser (1)
    • React (1)
    • Three.js (1)
    • Vue.js (3)
  • Leadership (1)
  • Meetups (8)
  • Miscellaneou$ (84)
    • Breaking News (8)
    • CodeSchool (2)
    • Hacker Games (3)
    • Pluralsight (7)
    • Projects (2)
    • Sublime Text (2)
  • PHP (6)
  • Quick tips (44)
  • Servers (8)
    • Heroku (1)
    • Linux (3)
  • Stack Overflow (82)
  • Unity3D (9)
  • VibeCoding (2)
  • Windows (8)
    • C# (2)
    • WPF (3)
  • Wordpress (2)

"There's no short-term solution for a long-term result." ~ Greg Plitt

"Everything around you that you call life was made up by people that were no smarter than you." ~ S. Jobs

"Hard work beats talent when talent doesn't work hard." ~ Tim Notke

© since 2016 - Nikola Brežnjak