Showing posts with label Blog. Show all posts
Showing posts with label Blog. Show all posts

Wednesday, 2 March 2016

Node JS - Project 2 - Bank Account

Hello! I'm back again!

In this project we want to be able to do the following things:

  1. Create new bank accounts
  2. Search for bank accounts
  3. Deposit and withdraw amounts
  4. Check account balances

In lesson 18 of The Complete Node JS Developer Course (check here for an update on my progress so far), the task was set out, and we had to go away and work through it independently. Lesson 19 is a step-by-step guide to a complete solution.

Getting Started


In lesson 18 we did the ground work for the project. This is the code we created to set the foundations:



We have created an empty array that will store all of the accounts, and there are some methods (or functions) that we can call on to make deposits, withdrawals, and check balances.

The Task


In the instructions we are told to create a new function called 'createAccount'. It's going to take an account object and store it in an array of accounts.

Each account object needs a 'balance', which should be a number, and a 'username', which should be a string.

The second function we're going to create is called 'getAccount' and takes one argument, which is 'username'.

The Solution


createAccount

We start with the 'createAccount' function. It accepts one argument, which is the object 'account'.


Basically, what we've done there is create a function, 'createAccount', that takes an account object and pushes it into the accounts array.

Now we can work on our 'getAccount' function.

getAccount


Within the function, we use forEach to iterate over the accounts and find any matching account.

We create a new variable called 'matchedAccount' within the function, which will store the account if a match is found.

Within the forEach, we want to check if the username of the account matches any of our accounts, so we create an if statement to do that. We then save the account to the matchedAccount variable that we created earlier.

We then return the matched account.

Re-cap


So, here's what we have so far:


Underneath that, we are going to create a new account.

New Account


We create a new account and save it to a variable. We then set that variable equal to createAccount, which is a function that expects an account object. The new object is created right within the function! Awesome! We give it a username and a balance. Yay!


Let's start as we mean to go on, and make a deposit into our account.

Deposit


We'll be using that function we created earlier on lines 19 to 21. Here's a quick reminder:


Here's how we make a deposit into our new account:


Lovely!

We use console.log to keep track of things, and we do this with the getBalance function (also created earlier on lines 27 to 29):


Withdrawal


Another old'un, but a good'un (on lines 23 to 25):


And here's how we use it:


getBalance makes another appearance :)

getAccount

The star of the show!

Create a new variable called existingAccount, and set it equal to getAccount, with the username passed in. It accepts one argument, a string.


It will return the balance of the my account!

We can test it out by creating another account for Pinky.


To make sure that everything is working as it should do, we can log out both of the accounts that we have created so far, by simply doing the following:


That will log them both out to the terminal, with their usernames and balances. Beautiful!

Finally, let's create a new variable for the Pinky's account (like we did with my account earlier):


Here's a re-cap of that code from line 31 onwards:


And it's all done! Until the next time :)

Sunday, 24 January 2016

How I got more hits on my blog



These three simple steps are my personal account of trial and error. Enjoy!

  1. Twitter analytics  I practically live on twitter and I tweet regularly about my blog posts. But when I was getting started with my blog, just tweeting alone was not translating into the number of hits that I wanted. Using twitter analytics, I noticed that although my number of twitter followers was only growing relatively gradually, I was actually getting a high number of profile views per day. I wanted to capitalise on that, so I designed a really simple banner for my twitter profile, which showcased my blog url as the heading. Bingo! My hits went up substantially from day one! And even on days that I don't post any new content, I'm getting a steady (and increasing) flow of visitors to my blog, thanks to my profile views on twitter.
  2. Google plus  It doesn't have the image enjoyed by twitter and Facebook, but it is a useful tool none the less! When I set up my blog on Google blogger, I also set up a gmail account, and Google+ seemed to come as part of the package. So, I tailored my Google profile and promptly forgot all about it. After a couple of months, however, I checked on my profile and found that I'd had thousands of hits! This was an unexpected result with practically zero effort! So, I started sharing my blog posts via G+ and found that it was generating consistent views, although not yet on par with those from twitter.
  3. Networking  I am quite a sociable person and I have built up a professional network using old-fashioned face-to-face methods. I tell people what I'm working on and I share it with them. If they like it, they share it with their contacts. That way, they know the story behind who I am and what I do, and they buy into that story. The value of real-world interactions and connections cannot be underestimated.
This is of course not an exhaustive list, and what it reveals is that you should use your strengths to your advantage. Keep an eye on the data and work with it to grow your brand!

Thursday, 5 November 2015

Mr. Robot - eps1.8_m1rr0r1ng.qt - Episode 9 - IT Nut Blog Review

Mr. Robot - Episode 9

That last episode ended a bit weird... Mr. Robot is Elliot's dad... Moving on!

Episode 9 begins! How did they get all those antique computers and pristine bits of hardware for the shop! It's like a museum piece. Amazing! So, this episode starts with a flashback to Elliot's youth, and his father's computer shop, which is called 'Mr. Robot'. Get it? Ok. It's all very lovely. Blah blah blah whatever.

It gives us an insight into Elliot's criminal past. He stole $20 from one of the shop's customers, and his dad covered up for him. "Even though what you did was wrong, you're still a good kid. And that guy was a prick. Sometimes that matters more." Right...

Mr. Robot mentions to Elliot that he met with Tyrell last night. We don't really know what they talked about at this point.

Elliot is understandably disconcerted that neither his father nor his sister thought to reveal their identities earlier on. He thinks he's going crazy, and we see the first bit of passion from Elliot since the beginning of the series. Btw, has there been any mention of where Elliot's mother is?

Mr. Robot takes Elliot on a trip down memory lane, and they end up at his childhood home in New Jersey. They recreate the balcony scene from Romeo and Juliet, but a window is smashed and it's not very romantic. In the mean time, Angela and Darlene are frantically rushing around in search of Elliot because he has gone AWOL. They finally catch up with him and things descend further into confusion!

"Elliot. Who are you talking too?" That question is about 9 episodes too late! And no, we didn't know all along. It wasn't obvious at all! Elliot's dad is dead. He was dead all along. He didn't come back as a zombie or a ghost or anything like that. He was a hallucination.

Yes Elliot, we're going to make you say it. "I am Mr. Robot."

This is not a particularly rewarding revelation. What do you think?

Wednesday, 4 November 2015

Sprout Social - Free Trial - IT Nut Blog Review

I've heard a lot about Sprout Social, and I wanted to know what it can do, so I signed up for the free trial. If you are thinking of using Sprout, I hope you will find this review slightly helpful. If you do use it already, maybe you have some insights that I have missed, so please share your comments.

At the moment, I keep on top of the social media for my business using tweetdeck, twitter analytics, unfollowers, and the integrated analytics tools for Facebook and LinkedIn. That means I usually have at least half a dozen pages open on my laptop at any given time just to keep on top of the usual social media platforms. Plus the other platforms that I am exploring, such as medium, reddit and livejournal. That's not to mention keeping tabs on my website and blogs - Sumo.me and Google Analytics are my nbf's!


The Sprout Social Dashboard gives a quick snapshot of how your different social media profiles are performing. The main sections of the dashboard are:

  • Group Trends - Which displays the stats used by the various platforms (E.g. tweet impressions, engagement, etc.)
  • Audience Demographics
  • Connected Profiles

The buttons across the top of the app interface take you to the 6 main sections:
  1. Messages
  2. Tasks
  3. Feeds
  4. Publishing
  5. Discovery
  6. Reports


1. MESSAGES


The term 'messages' seems to be used as a loose term. It includes twitter Mentions, Direct Messages, Retweets, Retweets with Comments, New Followers and Sent Messages. For Facebook it includes Wall Posts, Comments and Private Messages.

The results are filtered by selecting / deselecting the checkboxes next to each of the above categories. You can also save messages here.

There is also an option to add 'Brand Keywords' to further filter / expand the results. You are able to add 5 'Brand Keywords' to filter the results. I sent Sprout a tweet asking if they just limit it to 5 keywords for the free trial, or if that's standard with the paid version too. They responded with the following tweet:




2. TASKS


Tasks are created by going back to the messages section, selecting the desired interaction and clicking on the drawing pin icon. You can then leave an 'internal' comment and select a 'Task Type' from the following options:

  • General Task
  • Sales Lead
  • Support Issue

The task will then show up in the Tasks section. This creates a 'to do' list that is very useful and easy to action / follow for future reference.


3. FEEDS


I connected my twitter, Facebook and LinkedIn profiles to sprout social. This section allows me to access those separate profiles in a central place within the Sprout Social app, rather than checking the profiles within the other apps individually. Having this central location definitely saves time.


4. PUBLISHING


This is a way to publish content across multiple platforms from one central location, and posts can be scheduled in the calendar for future dates. Again, this will doubtless save time for busy social media marketers.


5. DISCOVERY


The main subsections and sub-subsections are:

  • Suggestions - 'Your Followers', 'Conversed with', 'Have mentioned you'
  • Cleanup - 'Silent Accounts', 'Irregular Usage', 'Do not follow back' - I currently use unfollowers to check the accounts that are not following back. Sprout incorporates this into the app, so that is a plus.
  • Smart Search - This does what I use tweetdeck to do. It's great that this function is housed within the Sprout Social app, but the advantage that tweetdeck has over Sprout is that tweetdeck displays the keyword searches in columns, so you can glance across multiple topics, side-by-side, without having to change the display.


6. REPORTS


Last, but definitely not the least!

Note: This is where you can include Google Analytics for your website or blog. Very useful.

The subheadings are:

  • Group Report - This is similar to the Dashboard.
  • Engagement Report - Goes into more detail about the overall engagement across the group profiles.
  • Facebook Pages - Gives detail on engagement with Facebook pages.
  • Twitter Profiles - Gives detail on engagement with twitter profiles.
  • Trends Report - Reports for each individual twitter profile.
  • Twitter Comparison - This is a really useful tool! It allows you to generate comparison reports between your accounts and other twitter accounts. A great way to gauge your effectiveness compared to main competitors!
  • Sent Messages - Tracks the performance of tweets in which you have mentioned other users.


IN CONCLUSION...


Sprout Social is a great app with lots of very useful features. I'm sure it is an invaluable tool for very large or busy businesses, that are running lots of social media profiles and campaigns simultaneously. Running a small start-up company, however, I'm not sure if I can justify the cost just yet, when there are so many great tools out there already that I can use for free... It's definitely an aspirational app for me, and now that I know exactly what it does, I can make more informed choices in future. Thank you to Sprout Social for extending my free trial for an extra week.