WebStorm/PHPStorm Useful Shortcuts

I have decided to try WebStorm and PhpStorm by JetBrains. I assumed these 2 editors have similar shortcut functionality. Here are my most used shortcuts when developing. This is for my reference only and of course anyone who would like to use this reference, feel free to do so.

Ctrl + click to go the function or variable definition.
Ctrl + Alt + Right | Navigate forward
Ctrl + Alt + Left | Navigate back
Ctrl + Shift + Backspace | Navigate to last edit location
Ctrl + ] / [   – Move to code block end/start
Ctrl + N | Go to class
Ctrl + Shift + N | Go to file
Alt + Drag to block select and put your caret or selection in multiple places.
Shift + Shift – looks for files, action and search everywhere
Ctrl + Backspace – deletes the line
Ctrl + Shift + Backspace – where ever you had your last edit will take you to that point.

I started learning React

I have finally gotten to the point where its time for me to dive in to what everybody these days are buzzing about. The Javascript world of front end development. I wanted to learn VUE.js first but knowing how React is just a view I can implement them with any systems available and flexibility is the name of my game.

I love how Im able to implement the things that I know already, for example using PHP and MySQL and just making them work. I have already dived into PHP Frameworks such as Laravel and micro-frameworks plus I got a little bit of taste of Webpack which Im glad I did. There so many dependencies and tools out there that we have to get into that mindset that they are there to make our development a little easier.

Okay here are the links that help me understand how React world works. If you are beginner in React I suggest to start on this one:

Also you might want to have a read about the life cycle of the react components:

http://busypeoples.github.io/post/react-component-lifecycle/

And also you might to use this boiler plate to examine the code to have a feel of whats going on.

https://github.com/buckyroberts/React-Redux-Boilerplate

By the way Redux/Flux is sort of like an architecture for building react web apps. Maybe similar to MVC architecture but of course there are others out there but in this scenario will stick with the popular ones.

Once you brushed up and like have a firm grasp on react, you might want to do some more example and readings. Heres a good example of one.

https://dev.to/svinci/react-js-web-site-example-almost-real-life-like

Links of course is credit to the Author , I wouldnt have the knowledge I have now without them.

 

Javascript Galore ECMAScript

I have been using javascript on my day to day development but never really tried to analyze the standardization of things and the separation between versions over the years.

This is to remind myself that javascript has evolved to a really mature scripting language for the browser. Also a reminder when somebody says ES6 it actually means EcmaScript2015, just minus the number by 1 for example ES7 means Ecmascript2016.

Here below are some reading materials especially new features every iteration:

https://en.wikipedia.org/wiki/ECMAScript

ES6 Features: https://github.com/lukehoban/es6features#modules

Love at first Laravel Eloquent

Its been a while since I posted been a month it seems?

Well I have been doing a lot of developing and I just love Laravel’s Eloquent component. When doing small web applications, you dont wanna go full Laravel on that stuff. You would wanna just go small like Lumen small, when I say Lumen like micro-framework Lumen. Laravel is a full blown framework, if you just want a small application you can never go wrong with a micro-framework, there are a lot out there. Im currently working on Slim 2 Framework although very old, I needed it to support really old PHP 5.2.

I have learned alot, on my first month on the job. Namely composer and Im using alot of package manager lately. NPM and bower front end development stuff. But anyways I would like to share you links on how to make ORM Eloquent and using 2 databases without Laravel altogether.

First is how to use Eloquent ORM on your own project follow this link: http://www.edzynda.com/use-laravels-eloquent-orm-outside-of-laravel/ 

Then how to use 2 database connections, this is really big if you are using SQL Server and MySql hand on hand you need to be able to switch between your eloquent database. Follow link: https://stackoverflow.com/questions/25371871/two-databases-in-eloquent-orm-without-laravel

SQL Server remote access

I just found a gem of a post in how to make Sql Server talk to anyone in your network!

Source: https://stackoverflow.com/questions/11278114/enable-remote-connections-for-sql-server-express-2012

I will definitely go back to this everytime I want access to a database in our network.

Basically, this will show us how to set up SQL Server so that any program on the network is allowed access to its content given they have the right user access to it. It has something to do with enabling Sql Server browser and enabling TCP/IP connection.

Understanding DNS, Nameservers and Record types

Are you a web developer, who mainly focuses on developing your application? Do you only just update your nameserver and point to your hosting company at the registry and think everything will just work with no hiccups and go on your business coding? If yes then dont be that developer as I was.

Nameservers comes first! 

You have to understand this bit to understand everything else in the DNS realm (https://webmasters.stackexchange.com/questions/16297/which-comes-first-dns-or-name-servers link to the article) .  I have spent my night trying to uncover this puzzle basically there is 2 entities that you will likely come across when dealing with DNS, the Domain Registry(where you bought your domain) and your Web Host DNS manager(your webhost).

When you change your nameservers to your new hosting, you are basically saying to delegate all DNS records to that server thus allowing your new web host to handle your DNS or RR(Resource Records). Your Domain Registry will be free of responsibility when it comes to other records you have on it. I am saying the A , AAAA, MX records etc. These records will now be handled by your web host dns manager.

Very important if you have existing RR in your domain registry make sure you leave them be until you actually know whats happening and make sure you read this blog post before committing. So what you can do is to copy all your resource records from your original DNS to your hosting company, which to be honest is I dont like doing because a lot things can go awry when you get it wrong and will take time for it to get right.

OR

Create an A record for your domain.com to point to the IP address of your hosting company. Then create an MX record for that domain.com to point to your current mail.domain.com DNS, then do the rest for every RR you have, that includes FTP, SFTP sub-domains.

Source: https://serverfault.com/questions/149509/changing-domain-name-dns-to-redirect-web-traffic-to-one-server-and-leave-mail-t

So there you have it! If you are wondering what those records do here is a quick rundown below.

A records – translate domain name to IP address eg. domain.com -> 118.123.9.12

MX records – for email service that only points to domain name. eg mail.domain.com -> A record.

CNAME record – an alias to another name record or domain name.

AAAA record – A record but points to IPv6 instead of IPv4

More info:
CNAME https://www.web24.com.au/tutorials/cname-records-used

What is ‘@’ record used for:
http://forums.devshed.com/dns-36/mean-setting-dns-settings-636502.html

Windows: Do everything with shortcuts!

When working on your chosen OS, we tend to do repetitive work using our mouse. The time to move the mouse to the direction of the icon you wanna click is more effort than pressing 2 to 3 keystroke on the keyboard. So what do someone like us lazy people do to make this effortless and hopefully avoid injury to our hands in the future? Shortcuts! Here I will list my most used chores on windows that I often find doing.

Changing Explorer View
CTRL + SHIFT + 1 Extra Large
CTRL + SHIFT + 2 Large Icons
CTRL + SHIFT + 3 Medium Icons
CTRL + SHIFT + 4 Small Icons
CTRL + SHIFT + 5 List
CTRL + SHIFT + 6 Details
CTRL + SHIFT + 7 Tiles
CTRL + SHIFT + 8 Content

Using RUN command with WIN + R key:
cmd  To open cmd line.
Press win key , type cmd press ctrl + shift + enter Run as administrator.
services.msc  Open services window
control  Open control panel
ncpa.cpl  Open network connections
regedit Registry Editor
shift + F10 To display right click on any object selected
appwiz.cpl Very handy to open Add/Remove program

Open CMD on any window explorer open:
alt + d and type cmd This will open command line in that folder

Editing Text
shift + up or down – To select whole line or below line.
shift + home or end – to select from cursor left and right, very useful

Navigating Windows Explorer
F6 Very handy to navigate to different elements of the window like the left panel to get the drive you want
alt + DMove focus to the address bar and select current path.
ctrl + N Open new window on the same folder
Alt + Right Arrow Go forward.
Alt + Left Arrow Go back.

Paper sizes people!

Okay I just added a new category on my blog. Hello Printing! This is due to the fact that I have started in a new role and its an Industry that I have never dealt with before!

For most part its a marketing business that deals with all sort of things pertaining to the subject. And majority of the company deals with marketing print jobs such as flyers, brochures, letterheads, invoices etc. Mainly direct mails!

One thing you will want to know are of course the ‘stocks’ as the commercial term for papers!

Anyways first off you will definitely want to familiarize yourself with paper! We all know about A4 and A3 sizes but never really thought about what the numbering means. And to be honest I would never in my programming experience ever think about this stuff, but to effectively do my job there, I gotta to know this otherwise Im just shooting blanks!

In summary A letter is actually a standardize ISO 216(International Organization of Standardization) for paper. And there is a B which isn’t widely used but mostly good for posters, then there is the C, which I did not know anything about! Envelopes!

So if you are ever lost with the measurements and terms when it comes to paper sizes come back to this page and here is the link to make you come back home. And yes I am talking to myself here.

Below the link to paper sizes and a very informative website indeed:
http://www.paper-sizes.com/

Credit and big thanks to the author.

PS: You might also want to know about RA or SRA papers such as SRA3 for A3, these are untrimmed papers for cutting A3 bleeds but that is another post altogether!

Untrimmed Raw Format (RA and SRA)
http://www.papersizes.org/ra-sra-untrimmed.htm

http://papersize.org.uk/paper/sra-untrimmed-sizes/

Port forwarding and Software Update Implementation

Port Forwarding
I was trying to set up remote access to my router from outside world(I have done it before) and have access to network drive and for the love of me, could not seem to get it to work.

It is so easy for a long time of not doing it and understanding how they all work, your way of thinking just shifts and completely throw you off balance. You know how they work and such but you just need that one sentence to explain it all until… I only needed to see one picture.

Simple illustration of how port forwarding works.

And everything just became clear and smooth sailing!

Software Update Implementation
As you write software and programs and such, you think how do they actually perform an update onto itself, so I went and ask Google. Its actually pretty basic in terms of step by step process, although if you are only making a small simple program sometimes the technology you are using have it figured out for you.

Just like program in C#.NET, they have the ClickOnce installer where you can upload your package to a server and have it check by the computer if you have the latest version of the application. You can either go that way or a  more traditional route.

Have a separate process in your program that checks the server if you have the latest version installed, and allow the program to download the new version. Then ask the user to install the new version or have it closed and let the updater do the job for you by replacing all necessary files. An will run the newly updated program to continue.

For more information about this topic:
https://stackoverflow.com/questions/1748586/i-dont-get-how-a-program-can-update-itself-how-can-i-make-my-software-update#_=_

Windows Install change hardware configuration

Ever wondered how licensing works now comes Windows 10? Back in previous Windows OS, as soon as your pc glitches the last resort for salvation is through fresh install of the system.

I can just boot from my DVD drive using the OS CD and input back your serial number and away you go.

This is still applicable in the latest Windows 10. You can also create a boot USB disk if you are trying to install to a different drive. But somewhat came as a bit confusing as many devices now came pre-installed with the OS.

If you are building your own system, you will need to buy your own license or if you have a Windows 8 or 7. You can go to the upgrading route. When your build PC you have to know that, new motherboard = new license.

Here is a link that will help you understand a little bit the process how installation of new OS works.

How does Windows 10 licensing status change with changes in hardware configuration

In other words, when you buy a new PC loaded with operating system, you need to ask how they installed the OS. And make sure you get the serial key off them by hook or by crook if its not already on the physical box on the sticker.

 

2017 © Ideas, designs and algorithms