Mac Developers Reminded to Have Their Apps Notarized as Apple Tightens Security

December 7, 2018 Posted by News 0 thoughts on “Mac Developers Reminded to Have Their Apps Notarized as Apple Tightens Security”

Apple reminded Mac developers that it is encouraging them to have their apps notarized, meaning that the apps have been scanned by Apple and checked for malware and other security issues.

Notarization is not currently a requirement for apps distributed outside of the Mac App Store, but Apple says it will “more prominently highlight notarization status” starting in the spring of 2019. And in an unspecified “upcoming macOS release,” Apple will require any Developer ID-signed apps to be notarized.

When users on macOS Mojave first open a notarized app, installer package, or disk image, they’ll see a more streamlined Gatekeeper dialog and trust that it does not contain known malware. Starting spring of 2019, macOS Mojave will more prominently highlight notarization status. In an upcoming macOS release, Gatekeeper will require Developer ID–signed software to be notarized by Apple.
Apple introduced the notarization process for macOS Mojave back in June at WWDC, providing an extra level of confidence for users that apps are free of malware while also giving Apple finer-grained controls to shut down specific problematic releases instead of having to revoke an entire Developer ID.

Apple has stressed that notarization is not a full app review process and is only intended to analyze apps for security purposes.

Top 8 Trends That Will Change the Shape of Mobile App Development in 2019

December 3, 2018 Posted by Uncategorized 0 thoughts on “Top 8 Trends That Will Change the Shape of Mobile App Development in 2019”

Mobile app development service is as competitive as ever.  The app development process is advancing more than ever for businesses these days. All thanks to technological advancements, today, the enterprise-grade apps can readily address challenges and complexities of the modern business.

Here are the top 8 trends that will change the shape of mobile app development in 2019.

  • Internet of Things (IoT)

IoT is a buzzword in the corporate sector. From retail to real estate and farming to fitness, various industry sectors want to embrace this futuristic technology. IoT-enabled apps can act as a bridge between smartphones and connected devices, and more such apps are ready to become an integral part of a business ecosystem. It is because entrepreneurs and customers both want to jump on the IoT app bandwagon. As more enterprises will embrace the IoT concept, mobile app development companies would remain busy making IoT apps.

There is no exaggeration in mentioning the IoT will drive the future of mobile app development in the coming years.

  • Artificial Intelligence (AI)

Both Artificial Intelligence (AI) and Machine Learning (ML) will exert a huge impact on mobile application development in coming days. Data collection and analysis is possible with ML algorithms and enterprises can provide individualized and personalized experience to the app users. Here we can see the mobile-oriented aspect of AI. AI chatbots and other ML tools can be added to the mobile app to bring automation and convenience.

From bringing automation to improving customer services to reducing human errors, AI is ready to play a significant role in the development of next-gen enterprise mobile apps. AI will also play a major part of mobile app development services in the near future.

  • More Interaction

Well, you may not consider it as a technology trend, but it is fair to mention that as people become more tech-savvy, various technology trends are going to combine for providing the highly interactive user experience. Let’s take an example of an on-demand mobile application. This app involves technologies like AI, IoT, and Blockchain, and wearable for serving various objectives.

Also, as mobile app development companies come across diverse user requirements, they come up with innovative mobile app solutions that include more than one emerging technologies. Ever-changing business needs also promote interaction with tech trends.

  • Security Trends

Mobile apps have remained ‘soft target’ for hackers and cybercriminals. Therefore, enterprises tend to focus more on the app and data security these days. When it comes to B2C business where the app users share their personal and financial details like credit card number for initiating a transaction. There, technologies like AI and ML lend a helping hand in detecting any suspicious or fraud activities. Integration of these technologies in the mobile app can enhance the security.

What’s more, app security techniques like facial recognition and encryption are also integrated to save valuable data from hackers. Innovative technology trends will ensure app security in the year 2019 and beyond.

  • New Domains

Do you know that technology trends can meet new frontiers in the year 2019? For example, entrepreneurs or startups associated with culture, cooking, and art-related sectors will also come up with dedicated mobile apps.

Apart from technocrats, the mobile app development companies will also focus on these rising business domains in the near future. It is interesting to see how technological advancements will address the needs of such unique business concepts and how related mobile apps will work.

It is certain that in the coming time, no industry sector will afford to stay away from technological advancements and mobile apps.

  • Virtual Reality (VR) and Augmented Reality (AR)

Both VR and AR have risen beyond Pokemon Go to provide an immersive experience to consumers, stakeholders, and clients globally. As these technologies are not restricted to games and interactive apps, we can expect that various industry sectors will embrace these technologies soon. AR is expected to become more popular than VR. As Statista has predicted, globally, AR revenue is expected to grow to 90 billion USD in 2020, which over three times higher than the same for VR.

With an aim to offer more pleasant and interactive user experience, the mobile app development domain will rely more on both VR and AR in the year 2019 and beyond.

  • Wearables will be Mainstreamed

Wearable devices are steadily gaining ground across the world. It will give rise to wearable app development. We have not unleashed the full potential of wearable technology, but in the coming years, we will have its benefits. A Business Intelligence report has predicted that the wearable market will increase up to 35 percent by 2019.

It will also open the doors of new scopes in the technology domain as wearable app developers will leverage the benefits of advancements for developing interactive and innovative wearable app solutions.

Both iPhone and Android device makers have come up with wearable devices, and they will continue this trend in the future as well. As a result, the mobile app developers will keep on making wearable apps that can either work individually or in sync with smartphones.

  • Blockchain will Prevail

Well, Blockchain technology has evolved significantly in a couple of years. With enhanced security and improved automation, blockchain can be a preferred choice for the BFSI sector.

The Blockchain app development process can integrate AI for a higher level of safety and AR for an immersive experience in the future.

We can certainly expect that this technology will bring bigger and better advancements from the year 2019 onward as its use will increase in the mobile app development process.

Emerging technologies are expanding with the advent of new advancements and they have brought radical changes in the mobile app development process. Be it an iPhone app development or an Android app development solution, these tech trends are going to impact on app development in 2019 and afterward.

How To Be Good Programmer

November 26, 2018 Posted by Programming 0 thoughts on “How To Be Good Programmer”

Programming isn’t only a technical skill its a art. That’s why there are millions of programmers and less than half of them are really good at it. To become a good programmer you need to practice. Here are some methods of strengthening your skills.

Few things to keep in mind before starting:

1. Remind  yourself  how much to learn

As we all know that programming is one of the most dynamic industries in the world. You just can’t rely on concepts that you have learned a few years back in your school or college. The game contstantly evolves so you have to keep up to date and keep practicing.

2. Stop trying to prove yourself right everytime

In order to learn well and do well, you always need to stay humble. Yes, it’s right. Keep your ego aside while learning why? because only then you will be able to focus completely.

For example when you assume that you already know everything then your subconscious mind tends to ignore important and most basic things while learning. It also ruins your learning experience.

So it’s very important to stay humble while learning as it is the best way to keep yourself focused.

3. Read code as much as you can

We always learn better by observing others. It’s a fact. So if you read other people’s code then you will have a great understanding of their coding skills.

The biggest example is solving a complex problem with a simple solution. Now, some of you must be thinking is it possible?. Then the answer is yes.

There are many ways to solve a problem. It can be solved by the way you thought fits best for it or it can be solved by the way other already solved by it. So reading other people’s code gives you the flexibility of thinking out of the box.

4. Practice code

Practice makes perfect you must have heard about it. After learning perhaps the most important step is to practice code as much as you can. There is no sense to learn until you practice it.

By practice, you will learn better as doing this will provide you a very raw experience of what to do or what not to.

5. Learn techniques more than tools

Yes, people often waste time in learning tools. But if you already know about the techniques then learning tools will be a piece of cake for you.

It’s important to know about the techniques such as using which framework at what place. So investing there will benefit you the most.

 

Resources

  1. Teach Yourself Computer Science – It covers all the basic topics that a computer science student must be aware of. So if you don’t have any clue about computer science and programming then this might be a great start for you.
  2. Github – Github is the world’s most leading software development platform. It’s a web-based hosting service for version control particularly using git. Not only that, but it also acts as a social media platform for programmers where they interact and share their problems and solutions of coding with each other.
  3. BitBucket – BitBucket is another great resource and platform similar like Github. The only difference between Bitbucket and Github is that Bitbucket allows you to create private repositories whereas in Github you have to pay for this feature.

 

Practice

After having the appropriate basic resources and text editors with you, all you need is to have the courage to start with. That’s it.

Below are some of the well-known learning resources you can opt for your programming practice.

  • w3schools.com – If you want to become a web developer then w3schools is perfect for you. This website has everything that you need to know as a web developer. It offers a great wide range of examples to learn and practice from. The best part about this website is that all the exercises and lessons are free of cost.
  • Free Code Camp – The website free code camp justifies its name very well. It offers free coding classes with numerous examples and the simplest UI (User Interface). Free code camp is also the first preferred website resource by developers.
  • Codecademy – The codecademy is among the popular online programming programs in the world. It offers the best resources to start from. It also has a live text editor right on the lesson page so you can practice while learning.
  • Codescracker.com – Codecracker.com is one the most loved online learning platform on the internet today. It offers a wide range of popular programming languages to learn from and with absolutely no cost. Not only that the website also has many how to and computer tricks sections for best possible Computer science knowledge. So in our honest opinion if you want the best overall computer science knowledge in one place then you must try this website.
  • Ruby Monk – Ruby Monk is just perfect for those who have interest in Ruby programming language. It offers very simple and straightforward courses for beginners.
  • Code Wars – Despite the fancy name this website offers a very cool way to learn to code online. The best part of this website is that it really offers you to interact with others on everyday coding challenges.

Books

Many people prefer learning from books only. So for that, we have mentioned below some of the best books to learn how to program from.

Important Note – You can purchase the books just by clicking on their names below.

  1. Coders At work – The first in our list is Coders at work from Peter Seibel (a programmer turned writer). This book is packed with over with 15 accomplished interviews from programmers and computer scientists including Joshua Bloch, Peter Norvig, Donald Knuth, Ken Thomson, and Jamie Zawinski. Coders at Work gives an insight into what makes some of the greatest programmers great and how they think basically share their mindset. So in our opinion definitely a must read!.
  2. Clean Code – A very well known book by developers. This book does justice with its title as well. Yes, we are talking about the book “Clean Code”. The book clearly offers best practices of writing clean code, and also presents increasingly challenging case studies. The best part about this books is that all the examples are given in Java programming language but is definitely applicable to nearly every programming language.
  3. Cracking the Coding Interview – As you can very well judge by its name. This book is a very go-to option for most of the people. Why? mainly because it covers more than 150 Programming Questions and Solutions to crack the coding interviews. Reading this book will boost your confidence in the programming and you may also get a great job by this. So worth having it with you.
  4. Programming Pearls – Have you ever heard about Old is Gold?. If yes then this book seems to be clearly proving that. Programming Pearls offers you with a deeper understanding of algorithms and algorithm design. So if you love solving problems on your own then this book will help you very much in that way.
  5. The Pragmatic Programmer – Yes, this great book is also on our list. The chances of having it with you after a glance are high. The Pragmatic Programmer has a very vast collection of lessons and recommendations for software developers. So if you have a very keen interest in programming then you must give this a try.

Security Problems With C/C++

November 20, 2018 Posted by News 0 thoughts on “Security Problems With C/C++”

Exploits and Bugs like WannaCry, Heartbleed, and Zero-Day might seem unrelated and unrealistic at first glance, but all of them share one root cause and that is common in popular coding languages like C and C++.

A report from Motherboard stated that this issue belongs to a category of errors called “memory unsafety,” which exists in decade-old programming languages like C and C++.

What is Memory Unsafety?

Alex Gaynor a software developer from Washington D.C provides an example of a program where there is a list of 10 numbers.

Theoretically, when someone asks for the 11th element, the program is expected to show some sort of an error, or at least that’s what a “memory safe” programming language (like Python or Java) would do.

But in the case of memory-unsafe languages like C and C++, the program looks up for the 11th element wherever it is supposed to be or if it existed and surely access its content. This is called a “buffer overflow” vulnerability that is exploited by bugs like HeartBleed.

And this isn’t the only one. There are various types of memory unsafety vulnerabilities with C and C++ such as:

  • Type confusion: it mixes up the type of value that exists at a place in memory
  • Use after free: it uses a piece of memory even after you are done with it
  • Use of uninitialized memory: it uses a piece of memory even before you’ve stored anything on it.

The worst part is that these vulnerabilities are widespread in widely used software such as Firefox, Chrome, Windows, Android, and iOS.

So why are we still using the C and C++?

It’s true that right now we have some new programming languages that are memory safe for example Python, Java, Rust, and Swift. But they are used in a relatively smaller number of projects and software.

Important software projects like OpenSSL, Linux, and the Apache web servers are decades old, and they have grown massively in size over time as well. So, simply rewriting them in a new language is an insanely difficult task to do.

Such huge projects need to be incrementally migrated, but again, it requires a lot of time, money and effort. It also means that radical changes will be required in software development teams across companies around the world — which is another obstacle.

But above all, a major reason is that no aspiring coder or programmer considers the security aspect of a language while choosing a programming language to learn. It isn’t taught by educational institutions either. So keep this in mind.

On the other hand, developers don’t want to deal with it as many of them believe that it’s not the language fault, rather it’s the other engineers who write buggy codes.

Google Launches ‘Play Academy’ Free E-Learning Platform for Android App Developers

November 14, 2018 Posted by News 0 thoughts on “Google Launches ‘Play Academy’ Free E-Learning Platform for Android App Developers”

The Android ecosystem is one of the most flourishing app marketplaces and Google now wants to further bolster the same by giving its app developers access to free, bite-sized interactive sessions via its newly launched ‘Play Academy‘ e-learning platform.

While you could certainly head to YouTube today to learn pretty much anything, but Google has partnered with e-learning company Intellum to provide developers the right knowledge about managing their apps through the ‘Academy for App Success,’ as seen down below.

The ‘Play Academy’ offers Android app developers access to courses that can help them learn how to use the Play Console (the management back-end where you publish and manage Android apps), getting the most out of it, best practices for when you are ready to publish apps, and analyzing downloads (and other data) to grow your app.

These courses will ultimately enable them to upgrade their app, and add features to not just improve the quality of your app but bring in more business as well.

You can consume this material on either mobile or desktop to earn an achievement badge after you complete the task at hand. This will help you grow your know-how of the Play Console and managing Android apps, paving the way for you to become an industry expert.

While there are a number of sessions that are already live on Play Academy, Google says that more content, that too in languages other than English, will be added to the console shortly. So, you will be to learn the ABC of app development, managing the app and also monetizing it via this e-learning platform.

Cross-platform frameworks brings one-code path to mobile dev

November 9, 2018 Posted by Apps, News 0 thoughts on “Cross-platform frameworks brings one-code path to mobile dev”

We’re one step closer to a mobile app developers dream: One day, they will share code across web and mobile, across Apple iOS and Google Android platforms.

Through open source cross-platform frameworks, such as NativeScript and React Native, developers can write one code base to create both native iOS and Android mobile apps. NativeScript, developed by Progress, a software company based in Boston, supports the Angular open source web development framework. React Native, developed by Facebook, is an extension of React JS.

With both cross-platform frameworks, developers can write code in JavaScript to develop true native apps. On the other hand, tools such as Adobe PhoneGap — now Apache Cordova — and Ionic, enable developers to run apps in a WebView, which displays web content in a native view, with native extensions, to create hybrid mobile apps.

At last week’s Progress conference in Boston, developers discussed the pros and cons of using cross-platform frameworks, such as NativeScript or React Native, to create native mobile apps.

It was all a dream

The creation of one code base that is easy to maintain and publishes well across multiple OSes is no easy feat, said Jonathan Marston, director of software at Optimus Ride, a self-driving car company in Boston. Tools such as Adobe Air have tried and failed to achieve it, he said.

“In the past, that dream has never lived up to the reality,” Marston said.

The ability to share code across multiple mobile OSes is getting more attainable with tools such as NativeScript and React Native, but the particular idiosyncrasies of each OS make it difficult to achieve complete code sharing, said Jesse Crossen, lead developer of VoiceThread, an education software company in Durham, N.C. For example, developers might want to write one set of code for an iOS visual component and another for an Android visual component, due to different screen sizes and resolutions.

“You’re always going to have that level of customization per platform or have [an app] that’s a little bit generic,” Crossen said.

NativeScript vs. React Native

Like coding languages, developers are fiercely dedicated to their preferred cross-platform framework. Organizations that need to decide which route to take should look at the skill sets of their development team, said Jason Wong, research director at Gartner. Developers that are familiar with React JS should develop apps with React Native, and those that use the Angular framework will be more comfortable with NativeScript.

The VoiceThread team ported its web app from the Adobe PhoneGap framework to React Native to make a mobile app, but it discovered React Native was not a good fit. The flexibility of NativeScript enabled the team to customize its complex app with plugins more easily than React Native did, he said.

“React is opinionated,” Crossen said. “It was an awkward fit. Our app is unusual. We quickly hit that point where we had to go outside the framework.”

Developers should also consider the open source community behind the framework, Wong said. React Native has a larger community of contributors than NativeScript, most likely due to the support of Facebook. NativeScript focuses on enterprise use cases more than React Native does, however, Wong said.

Glorified webpage

A hybrid app framework, such as Apache Cordova or Ionic, can also offer a native mobile feel, although it runs the app in a WebView.

Safety Insurance agency in Boston used Cordova to create a web-based app that is compatible with Android and iOS. Five years ago, hybrid apps suffered from performance issues because mobile devices didn’t have the strongest processing power, so NativeScript or React Native would’ve been a better option then, said Keith Carangelo, web development manager at the agency.

How To Get Your First Developer Job

November 7, 2018 Posted by News 0 thoughts on “How To Get Your First Developer Job”

Here are some tips for finding your first developer job.  Define what type of role you want, then look for job postings for JR positions in that role. Check what type of skills they are looking for, learn the skills you don’t know and practice the ones that you do. .

?Make a portfolio. I would recommend creating a GitHub account , if you don’t have one, and create a public repo for each of your projects. Make sure each repo has a README which explains what the project does and how to run it locally. Also, It is very important that all your code is as clean as possible. ( Indentation, variables naming, comments, etc..) .

? Resume. Create a simple and consistent resume. I would recommend to just use a Google Docs template. Talk about your past experiences, side projects, and education. Try to match your experience with the requirements of the job you are trying to apply. .

?️‍♀️Before the interview. Practice as much as you can with coding exercises. Use something like LeetCode, Codewars or HackerRank.

? Interview. Practice your interview with other people. Make sure you know your resume well, and know about the company. Be early, polite and confident. You got this! There are loads of articles about how to approach the interview process, do your research. .

? Network. Network. Network. Put your self out there. Attend meetups, lectures, and hackatons. It’s important to start building your professional network even as a newcomer to the industry.

I hope this gives you an idea on what to do, but I still recommend doing your research on this subject. As I mentioned before, there are a lot of useful content about this topic on the web. Do your research.

Google Releases The Official Android Dev Summit App

November 2, 2018 Posted by News 0 thoughts on “Google Releases The Official Android Dev Summit App”

With Google’s Android Developer Summit right around the corner, the company has announced the official app for the upcoming developer get-together.

The app lets you look through the conference schedule and all of the keynotes, sessions, and lightning talks that will take place over the two days. You can also save those events to your own calendar, they’re color-coded based on type (like breaks or sessions).

You can also stream the event from the app, though you can also stream it from the website if the app does not fit your needs.

As a nice bonus, the Android Dev Summit app also doubles as an Instant App. This lets you try out the app without needing to fully download it on your device. That is why you will see the “Open App” option when you get to the Android Dev Summit app on the Play Store.

As for the event itself, the Android Dev Summit is expected to bring together Android developers from various walks of life for two days of technical sessions with Google’s engineering team. There is even a keynote speech, which vice president of Android engineering Dave Burke and group product manager for Google Search and Ads Stephanie Cuthbertson hosted during 2017’s Android Dev Summit.

The discussions during this year’s Android Dev Summit will likely focus on the nitty-gritty of Android and its SDK tools. That compares drastically to Google I/O, which typically delivers more consumer-friendly news and developments.

You can download the Android Dev Summit 2018 app at the link below.The Android Dev Summit will be held in the Computer History Museum in California and go from November 7 through November 8.

10-Year-Old Child Prodigy Turns down a Job Offer from Google

October 25, 2018 Posted by News 0 thoughts on “10-Year-Old Child Prodigy Turns down a Job Offer from Google”

At an age where most of us were lost in cartoons, Samaira Mehta is taking Silicon Valley by storm! The 10-year-old is a skilled programmer and has become somewhat of an icon for aspiring coders.

Samaira has developed Coder Bunnyz- a coding board game that teaches children all the concepts necessary in computer programming. She has already attended events by technology giants like Google and Microsoft as a keynote speaker!

Speaking to Medium, the coding prodigy says, “I always loved board games, and I always loved computer programming, but I didn’t like the fact that I had to do both of them separately, so I thought if I can’t bring board game onto a computer coding screen, so why not bring the computer coding to a board game. And that’s when I got the idea to create a coding board game, and that’s what I’m doing today.”

However, it wasn’t just developing an enjoyable board game that made her the talk of Silicon Valley.

Samaira’s father, Rakesh, who is an engineer at Intel and Sun Microsystems/Oracle, had a strategic business plan in mind for Coder Bunnyz.

It started with young Samaira testing the game with her friends so they could point errors and share feedback. Accordingly, Samaira refined Coder Bunnyz to perfection.

The duo didn’t stop at that. They arranged for coding workshops for kid coders which Samaira conducted. They also established a company to launch the game.

“I think the most interesting story that’s happened since I started my company was when I was doing a workshop, and the day before I looked at the sign-up sheet to see how many people signed up, and I saw two sign-up sheets were filled instead of 1. And so I told my dad, and he contacted the librarian, and it turned out they accidentally put up 2 sign up sheets instead of one, and so the next day, so many people came that we couldn’t accommodate all of them and we had to pair kids up, and some didn’t get to play. But in the end, it was all great, and everyone had a fun time!” shares Samaira.

Samaira’s workshop and the game are loved by most who meet her. In fact, from the moment she launched Coder Bunnyz, Samaira has conducted over 60 workshops in Silicon Valley which has been attended by about 2,000 kids.

Within a year, she also sold about 1,000 boxes of her game, worth $35,000 in all.

Source: Coder Bunnyz/ Facebook.

Samaira’s game has earned her the second prize from Think Tank Learning’s Pitchfest in 2016, which included $2,500. She also received the first “real life Powerpuff girls” prize from Cartoon Network.

Perhaps one of the best highlights in her journey was when she met Google’s Chief Culture Officer, Stacy Sullivan, after the young prodigy conducted a workshop for the tech giant.

“After my back-to-back workshops at Google headquarters, we talked for an hour. She told me I was doing great and once I get out of college, I can come work for Google,” Samaira told Business Insider.

Understanding JavaScript Data Types and Variables

October 17, 2018 Posted by News, Programming 0 thoughts on “Understanding JavaScript Data Types and Variables”

Welcome, Fresh Coders!

If you’ve ever had the pleasure(or displeasure)of sitting through an Algebra 1 class, you’ve probably heard about variables. You know, x + 4 = 6 and all that good stuff. Don’t worry. JavaScript variables are much less scarier. You get to declare them so that you know exactly what they are. And, for the love of all that’s holy, don’t name your variables x or y or z. Give them reader-friendly names so that you’re not staring at a quadratic equation by the time you’re finished coding.

First, before we start messing around with variables and learning what variable deceleration even means, let’s learn to need them. By that I mean let’s get a little cozy with operators and data.

Data Types

Open up your Twitter or Instagram account and you’re hit with a log in screen prompting you to enter your information. When you enter your username and password, you’ve just entered data. You fill out a survey, you like a post, you order ten fidget spinners on Amazon — all of that is data.

In JavaScript, this data is divided into three groups:

1 ) Numbers

Numbers are exactly what you’ve known them to be all your life — 1, 50, 22.3, 5…Integers, decimals, fractions.

JavaScript is real friendly when it comes to numbers, because you don’t have to specify the type of number. We call this behavior untyped. JavaScript is untyped because determining whether a number is an integer or a decimal(float) is taken care of by the language’s runtime environment.

Why don’t you try entering typeof 5 into the editor and hit the run button. You should get 'number'.

Pro tip: typeof 5 is called a statement. You wrote JavaScript code and expected to get a value in return.

2) Strings: “Hello there”

Strings are simply fields of text. Even the words you’re reading now form a string. To encase these words, we use quotes. Keep in mind that strings aren’t limited to run-on sentences.

In JavaScript, this is also a string: "123";

typeof "1,2,3";
typeof "hello world";

You can probably guess by now that your passwords are stringy bytes of data.

3) Boolean: True, False

Don’t let the name throw you off. It’s the namesake of the mathematician George Bool. Booleans only have two values: true and false.

typeof true;
typeof false;

As you’ll come to know, these are important values when it comes to adding logic to our programs.With just those two values, you can create a complex system of loops and conditions.

But let’s not get ahead of ourselves. We will explore the depths of conditions and loops another time.

For now, let’s move onto what makes all of this data worthwhile.

Operators

What’s the use of data if you can’t do anything to it? That’s where operators come in. Each data type (Numbers, Strings, Boolean) share a set of operators that you can use to come up with nifty solutions to problems. There are four important categories of operators that you’ll use throughout your time as a JavaScript developer and they are

1)Arithmetic Operators

addition +

Number:1234 + 4579;

String:"hello" + "Jerry";

Yes, you can add a string. There’s a fancy term for this called string concatenation. Notice how the two strings glob together. We can solve this problem by adding an empty string in between.

"hello" + " " + "Jerry";

Boolean: true + false;

Performing arithmetic operations on boolean values actually returns a value. In this case, the value 1 isn’t just any ordinary 1. It’s a bitwise 1. In the language of computers, this translates to true. So, we can conclude that true plus false equals true.

Why is that so? You’ll understand once we turn true and false into what our computer actually sees.

computer:
true: 1, false: 0
result:
1 + 0 or 0 + 1 = 1

subtraction –

Number:1234 - 1234;
String: NaN Note: NaN(Not a Number) is the error you’ll get when you try to subtract String values.
Boolean: true - false; or false - true;

division /

Number:1234 / 1234;
String: NaN
Boolean: true / false; or false/true;

multiplication /

Number:1234 * 1234;
String: NaN
Boolean: true * false; or false * true;

modulo %

This cool operator tells us the remainder of a division of two values.

Number: 10%3;String: NaNBoolean: true % false; or false % true;

Increment ++

++ is a fancy way to say add 1 to any value. It matters where you put the incrementer. Oh, and by the way, we need variables now. JavaScript’s interpreter can’t read ++10 if 10 is not saved inside a variable. why? Because plus, plus is what we call syntactic sugar. It’s something that was created to make life easier for developers, because it turns out we’re pretty lazy. Instead of saying 10 + 1, we get to forgo adding the 1. Since plus,plus is technically not a real arithmetic operator, you need to define a variable so that you won’t get errors.

Before we start our lesson on variables, try playing around with them. Type this into a code editor:

var cookies = 5;
console.log(cookies++); > 5
console.log(++cookies); > 7

The variable names are arbitrary. You can name them whatever you like. As we’ll explore later, it’s best to name them appropriately.

Pro tip: var cookies = 5; is called an expression. You defined what value cookie has but you didn’t ask for its value. As you learned earlier, this would be a statement: cookies;

Note: console.log() is a web tool that prints JavaScript code to a console. Every web browser has a console you can access. This “web tool” is really called a Web API. It’s much easier to think of API’s as a set of tools that make your job a whole lot easier.

So…why are we not getting the values we expect???

Well, writing the variable before ++ gives us the original value before it can be incremented and vice versa.

Think of it this way: we asked the baker for 5 cookies before he knew we wanted to add one more to the order(cookies | ++).

We receive a receipt saying we ordered five, but when we ask for one more, the baker runs back to get us one more(so, we have 6 cookies now).

The baker returns, but we ask for one more again(++ | cookies).

Finally, when we ask for our cookies, our total is 7 cookies.

JavaScript’s interpreter is that poor baker when it comes to incrementing and decrementing.

decrement — –

Number: -- number

String: NaN
Boolean: --true

+= Plus Equals, and -= Minus Equals, and *= Times Equals, and /= Divided Equals

It turns out programmers are lazier than you thought. Yes, there are more arithmetic shortcuts.

Say you have var score = 5; and, instead of incrementing score by 1, you want to increment it by 6.

Normally you’d write score = score + 6;

With Plus Equals you simply have to write it as score += 6;
Why don’t you try it out with different operators?

2. Comparison Operators

logical operators return true or false. Without them, we wouldn’t have all of the apps that are available to us.

operators

equals ==
not equal !=
greater >
less <
greater/equal< =
less/equal> =

There’s also a special triple equals(===). This checks to make sure that the types are the same as well.

Try this out: 3 == '3';. You got true, right? The fact that JavaScript ignored our stringed ‘3’ can cause some unwanted bugs. To fix this, add another equals. Now you should get false. That’s because triple equals also ensures that the types are exactly the same as well.

Operators are useful for conditional logic. Let’s use an if/else statement to test out an equals operator.

If ('you feel overwhelmed by this new topic'){
 'Do not worry. Sometimes the best way to learn is to try and fail'
}else {
 'Let's get this show on the road!'
}

Try this real if/else statement.

if(2==3){
 console.log('correctomundo');
}else {
console.log('wrooong');
}

Note: the end of if statements don’t receive semi-colons. Here’s a pro tip: Exclude them from any statements or expressions ending in a bracket.
Be sure to use different data types in your if/else statement. You can even play around with all of the operators you’ve learned so far.

3. Logical Operators

Logical and &&, Logical or||, Logical not !

Logical operators allows us to add complexity to our conditional statements. Practically, if you want maximum control over a condition, you’d use && because all of the conditions must be met in order to be true. Conversely, if you want the condition to be more inclusive, you’d use || because only one condition has to be true to get a return value of true.

if(2==2&&3==3&&3==2){
 console.log('correctomundo');
}else {
console.log('wrooong');
}

Variables, Finally!

So, you were introduced to variables prematurely. Even then, you saw how badly we needed a variable in order to get the increment and decrement operator working.
Now, let’s think of numbers, strings, and booleans as Snap chat photos that ghost away after a short period. They don’t stay around long enough to be useful. If you want to use the same data, you’d have to re-type it somewhere else in your JavaScript file.

Imagine having to write this formula over and over again: 1/2(60 * 120);

Or this really long string: "superkalafragilisticespialadocious";.

What a variable does is allow us to save data so that we can use it again.
Let’s declare two variables

var triangleArea, poppinsQoute;

Now for some takeaways:

The var keyword creates what’s called a global variable. It’s like taking a shower in public. Everyone can see you. In JavaScript, we have blocks, like neighborhood blocks. Within our if/else statements, we wrote a block of code that only ran based on certain conditions. Those two variables can be accessed within that block, because we declared them in a global scope.

Think of scope as perspective. From the perspective of the outside, we can’t always see what is inside someone’s house. But from the inside, we can see everything that’s outside.

We shouldn’t be able to look inside an if/else statement and see its local variables. Local variables are variables that are declared within a block.
pro tip: any code within curly braces form a block.

if(3==3){
 var number = 3;
}

Notice the assignment operator. In this example, I’ve declared and initialized my variable at the same time. The equals sign in this case is not the same as the equal sign you use in math. It simply means that you want to assign particular data to a variable you made up. The operator used is called an assignment operator.

Alright. Remember what I mentioned about global and local variables. You’re probably guessing that if I were to use this variable outside of the block, we should get an error.

if(3==3){
 var number = 3;
}
console.log(number);

Wait…we were still able to access the variable outside of the block. Did we just acquire X-Ray vision? So all this talk about local and global variables must be a lie then, right?

Well, the problem with the var keyword is that it loves to expose itself in public. Even if it’s defined within a block, it’ll still want to be seen by everyone. The only thing that can tame it is a function.

function test(){
  var number = 3;
}
console.log(3);

We will get into functions another time, but all you need to know for now is that functions create their own scope. They’re like highly secured mansions.
That’s all fine and dandy that functions are so secure, but how do I secure an if/else statement?

There is a new way to declare variables as of Es6. Every so often Ecma International comes up with new ways for us to code in JavaScript. What they’ve come up with to solve this issue is the let keyword.

Let’s use it!

if(3==3){
 let number = 3;
}
console.log(number);

Great. Now we truly have global and local variables.

Going back to our original variable declarations, var triangleArea, poppinsQoute;, you can see that we are able to declare multiple variables at the same time by separating them with a comma. Also, look at how the second word in the variable name starts off with a capitalized letter. This convention is called camel case. It’s good to stick to this convention so that your code is legible to you and to others that might look at your code one day.

The Variable Warehouse

We’ve messed around with variables a little, but we haven’t pushed them to the limit. Let’s see what we can put inside of a variable.

numerical statement

triangleArea = 1/2(60 * 120);

strings

poppinsQoute = "superkalafragilisticespialadocious";

boolean

let true_ = true;

Wait. Why the underscore? See, you can’t name a variable anything that is already named by those who’ve designed the language. Just make sure that you don’t start naming your variables with numbers: 123true.

logical statement

let check = (2==2&&3==3&&4==4);

The parenthesis is there for readability. You can plug this right into your if statement and it’ll work beautifully.

if(check){
 console.log("true");
}

Pro tip: I did not have to type check === true because the if statement automatically checks for true or false.

functions

var myFunction = function(){
  return 'hello';
}

variables also consume functions. These functions are called anonymous functions because they aren’t named.

arrays

var myArray = [1,3,4,5];

Arrays are a collection of data.

objects

var myObject = {me: "too", save: "me"};

Objects also hold a collection of data.

Other variables.

var newVariable = oldVariable;

Multiple variables!

var varOne = varTwo = varThree = 1;

Don’t try this one at home, because it has unwanted side effects. Variable assignment works from right to left. So in order for varOne to finally receive value, the other two variables are pushed to the global scope automatically. This means even functions won’t recognize varTwo and varThree as local variables. This is called leaking and is a pretty big no,no.

Closing Note

Variables are here to stay so make sure you get into the habit of using them. Whenever you find yourself using the same data type repeatedly, try sticking it into a variable. You’ll be happy you did.