Jekyll2021-07-13T03:30:16+00:002021 CodeCarrot Blogs. All rights reserved.https://blog.codecarrot.net/feed.xmlCodeCarrot Blogs | CodeCarrot Blogs - Ruby on Rails, Web Development, Designing, Startups, Outsourcing, Remote work, Online Marketing and more.5 Key Steps for Writing Email Marketing Content2020-10-06T14:54:54+00:002020-10-06T14:54:54+00:00https://blog.codecarrot.net/5%20Key%20Steps%20for%20Writing%20Email%20Marketing%20Content<p>Digital marketing has taken over traditional advertising for quite a time now. According to a research paper in the <a href="https://www.worldwidejournals.com/paripex/recent_issues_pdf/2016/January/January_2016_1452586048__55.pdf">Indian Journal of Research</a>, digital marketing or e-marketing is one of the most innovative mediums for marketing. With everybody having access to the internet at all times and everything just a click away, more and more companies are adopting this method of marketing.</p>
<p>As one of my teammates that helped me with the PrepScholar review told me once: “It’s always good to do something right while doing it”. To make sure you leave no stones unturned while you configure email marketing contents that will help you convert a lead into sales, I have gathered some tips for email marketing that you do not want to miss below.</p>
<h2 id="1target-your-audience">1. Target Your Audience</h2>
<p>Segmentation is crucial when it comes to marketing. You must know who your audience is and what they want from your product. Age, gender, location, or income among others are factors that affect peoples’ interests. Gaining information on your target audience is the first step to drive successful email marketing.</p>
<p>When you target your audience for sending out emails, you reduce the chances of spamming your customers’ inbox with information to products or services that they have no use of. If a product has no use for people above 40, make sure to send out the email to people who are below that age.</p>
<h2 id="2personalized-emails">2. Personalized Emails</h2>
<p>Amazon, the world’s largest online retailer, personalizes every email they send out using every ounce of information they have on their customers. Users’ on-site behavior, spending habits, history of purchases, location, gender, and age are all taken into consideration before an email is sent.</p>
<p>When a woman of a certain age group buys an outfit, Amazon sends out an email including pictures of models of the same age group wearing various outfits from the store to pique their interest. Some companies have begun adding personalized statements that they are privy to in their emails to show the customers that they care.</p>
<h2 id="3get-an-attention-grabbing-subject">3. Get an Attention-Grabbing Subject</h2>
<p>The subject of the email is the first thing that is seen by the customer and will set the wheels in motion. Make it count. Have a simple yet creative subject line for your email. Your subject line must depict the message you want to convey to the reader. According to marketing experts, a humorous and creative subject line speaks to a reader more than anything else. Subject lines that have the customers name on it followed by something of their interest are most likely to be read.</p>
<h2 id="4perfectyour-preview-text">4. Perfect Your Preview Text</h2>
<p>A preview text is a fragment of writing pulled from the body of your email. It is displayed underneath the sender’s name and subject line in the inbox. When a person gets an email they read the preview text and decide whether or not to open the email and read its content. Preview text is like a teaser of the email. So, if this piece of text is attention-grabbing and read-worthy, you have a guaranteed reader and a possible lead into sales.</p>
<h2 id="5use-marketing-psychology">5. Use Marketing Psychology</h2>
<p>Everybody has different preferences and receiving an email relevant to their preferences will result in more conversion. Even when you’re segregating your customers into a concentrated group based on a certain factor such as age or gender, you can likely segregate them even more based on their choices. Such <a href="https://blog.hubspot.com/marketing/psychology-marketers-revealing-principles-human-behavior">niche marketing</a> takes time and effort, but it can help you reach out to the right customers at the right time.</p>
<h3 id="conclusion">Conclusion</h3>
<p>Email marketing might sound far-fetched in the beginning. It will be a bit tough when you are new to this and you are unable to convert leads as much as you thought you could. When you get a hang of it over time, it will prove to be a great medium of marketing.</p>alinaburakovaDigital marketing has taken over traditional advertising for quite a time now. According to a research paper in the Indian Journal of Research, digital marketing or e-marketing is one of the most innovative mediums for marketing. With everybody having access to the internet at all times and everything just a click away, more and more companies are adopting this method of marketing.Blockchain and Crypto Trends You Should Look Out For2020-04-23T07:08:04+00:002020-04-23T07:08:04+00:00https://blog.codecarrot.net/blockchain-and-crypto-trends-you-should-look-out-for<p>So far, blockchain technology and cryptocurrencies have been among the most popular buzzwords across both the offline and online world. It’s no secret that blockchain technology has a vast potential for implementations across various industries and cryptos are a new and interesting option for investors.</p>
<p>That said, both the crypto market and blockchain technology have been struggling for the past year. The main reason was the lack of understanding on both corporate and consumer sides regarding where it makes sense to implement this technology. However, the overall understanding is improving and blockchain technology is gaining momentum once again.</p>
<p>As for the cryptos, the market has been highly unregulated and volatile. Moreover, it’s also plagued with scams, hacks and companies offering tokens with no proof of concept or any viable solutions. People lost their trust in cryptocurrencies but the future might be bright for cryptos, after all. With that in mind, here are a few blockchain and <a href="https://www.circuitcitythebook.com/5-cryptocurrency-trends-for-2020/">crypto trends you should look out for</a>.</p>
<h2 id="blockchain-technology-matures">Blockchain technology matures</h2>
<p>As mentioned before, blockchain technology has been struggling for some time now. The main reason is that blockchain got stuck in the experimental phase, unable to provide any new and viable solutions.</p>
<p><a href="https://www.gartner.com/en/newsroom/press-releases/2019-10-08-gartner-2019-hype-cycle-shows-most-blockchain-technologies-are-still-five-to-10-years-away-from-transformational-impact">According to Gartner</a>, this technology began sliding into the Trough of Disillusionment because of this. Simply put, a lot of hype was generated around blockchain technology and its potential implementations but the technology itself couldn’t live up to the hype, at least not yet.</p>
<p>However, Gartner also predicts that blockchain will start to mature and that it will leave the experimental phase behind. In other words, blockchain will begin providing pragmatic solutions instead of small proof of concept projects.</p>
<p>The fact that blockchain developers couldn’t provide any new solutions caused many blockchain startups to fail and this trend will continue on for some time. It’s estimated that this technology won’t become technically and operationally scalable until 2028.</p>
<h2 id="the-crypto-market-gets-a-purge">The crypto market gets a purge</h2>
<p>Nowadays, there are well over 2500 coin and token offers in the crypto market. As you might imagine, a good portion of those coins are either bogus offerings or the projects are very far from market fit.</p>
<p>That said, the crypto market is about to get a significant purge when it comes to such coins. As a matter of fact, it’s estimated that there will be less than 1000 coins left in the market circulation by the end of 2020.</p>
<p>This is due to the fact that investors are shifting their attention to quality matured coins. For those who invested in a <a href="https://www.bitmain.com/">reliable Bitcoin mining rig</a>, they’ll be able to continue mining Bitcoins, as well as consider mining other, more relevant, coin offerings.</p>
<h2 id="the-regulation-enters-the-crypto-market">The regulation enters the crypto market</h2>
<p>The very essence of cryptocurrencies was decentralization from any governments and financial institutions. However, it seems that regulation is coming to the crypto market which will change a lot of things.</p>
<p>In fact, governments are growing more concerned about uncontrolled online financial assets. The thing that sparked it all was the announcement of <a href="https://blockgeeks.com/guides/understanding-facebooks-cryptocurrency-libra/">Facebook Libra</a> entering the cryptocurrency market. As a result, a global consensus was reached among governments and central bank leaders that they need to control money and its supply.</p>
<p>For example, China is already moving forward with launching their national digital currency and Russia is also considering a similar option. Moreover, the World Bank and the International Monetary Fund are developing their own blockchain technology.</p>
<p>Therefore, regulation is slowly finding its way into the cryptocurrency market as the need for regulation intensifies. Furthermore, in 2020 more banks will also enter the crypto market with their own solutions so that they can defend their positions.</p>
<h2 id="blockchain-gains-a-wider-adoption">Blockchain gains a wider adoption</h2>
<p>Blockchain technology hasn’t failed as most people believe. In fact, one of the first industries that actually adopted this technology was the finance sector. Now, blockchain is becoming widely popular across global financial institutions and more companies will start adopting this technology in the next few years.</p>
<p>More importantly, blockchain is also expected to experience a wider adoption across various industries other than the financial sector. Even though other industries have been hesitant towards adopting blockchain, it seems that there’s a change of perspective on the rise.</p>
<p>For now, various industries are assessing the disruptiveness of adopting blockchain technology. No one can deny the fact that this technology can, indeed, offer some innovative business models.</p>
<p>Industry giants, such as Microsoft and Amazon are already building services around this technology and it’s estimated that other companies will soon follow in their footsteps. Starting with 2020, we may see rushed adoption and the emergence of viable solutions based on blockchain technology across various industries.</p>
<p>The crypto market and blockchain technology it was based on are still growing and developing further. It’s completely normal for new and disruptive technologies, such as these to go through a rough period before they experience mainstream adoption. That’s why it’s important to keep an eye on the trend so that you can stay up to date with everything of relevance regarding these technologies.</p>elainecbennetSo far, blockchain technology and cryptocurrencies have been among the most popular buzzwords across both the offline and online world. It’s no secret that blockchain technology has a vast potential for implementations across various industries and cryptos are a new and interesting option for investors.
https://i.imgur.com/DcyoN0r.jpg
5 Steps to Streamline Your eCommerce Order Fulfilment Process2019-09-25T07:33:35+00:002019-09-25T07:33:35+00:00https://blog.codecarrot.net/5-steps-to-streamline-your-ecommerce-order-fulfilment-process<p>Today, eCommerce already accounts for some <a href="https://99firms.com/blog/ecommerce-statistics/#targetText=Ecommerce%20growth%20statistics%20show%20a,reach%20%244.88%20trillion%20in%202021">13.7% of all global retail sales</a>. By 2040, this number is expected to reach a whopping 95%! Yet, with great power comes great responsibility; especially in the order fulfillment department.</p>
<p>As eCommerce becomes more mainstream, it will become increasingly difficult to keep up with all the demand, as well as the competition. Therefore, businesses — both big and small — need to work on removing all the superfluous procedures that they can and streamline their order fulfillment process as much as possible. But first:</p>
<h2 id="whats-an-ecommerce-order-fulfilment-process">What’s an eCommerce Order Fulfilment Process?</h2>
<p>In a nutshell, this refers to the process of handling and delivering customer orders. From the moment an order is issued, to the moment it reaches your customers’ hands, you’re solely responsible for that order. If something goes wrong, guess who they’ll blame — you. Therefore, you need to <a href="https://www.entrepreneur.com/article/248142">make sure everything runs smoothly</a> and according to plan as much as humanly possible — and beyond.</p>
<p>Namely, the faster you can process these, the better it is for your bottom line (and your customer satisfaction rates). So, without further ado, here are five steps you need to take to ensure you have a fully streamlined eCommerce order fulfillment process.</p>
<h3 id="1-automate-processes-if-possible">1. Automate Processes If Possible</h3>
<p>It’s no secret that customers expect their goods to arrive as soon as possible after they’ve made a purchase. One way to increase the speed of delivery is by <a href="https://smallbiztrends.com/2018/01/automate-your-small-business-for-free.html">automating repetitive tasks</a> such as invoicing, billing, and order processing. That will help streamline the entire order fulfillment process and remove any potential human errors out of the equation. What’s more, you won’t have to worry about getting flooded with tons of paperwork due to too many orders pouring in all at once when your business starts growing.</p>
<p>Also, automating your core order fulfillment processes is perfectly scalable — and at minimal cost — allowing you to expand your business with ease.</p>
<h3 id="2-consider-smart-storage-solutions">2. Consider Smart Storage Solutions</h3>
<p>Your warehouse and storage facilities sit at the heart of your order fulfillment process. Any bottlenecks here can cause potential stalls in delivery, misplaced orders, and supply overstocking, to name a few. As a result, your customers will get extremely agitated with your service, causing them to vent their frustrations on social media and tarnish your brand’s good name.</p>
<p>To avoid this, you need to implement some sound storage strategies to speed the whole process up and reduce human error. For instance, using NetSuite ERP software as your warehouse management solution to keep track of inventory over multiple locations, calculate shipping costs automatically, and utilize smart cycle counts and safety stocks to prevent inventory shortage. That way you make sure your products are always delivered on time and at optimal cost.</p>
<h3 id="3-think-globally">3. Think Globally</h3>
<p>One of the many charms of eCommerce is the ability to compete on a global scale. Yet, to accomplish this goal, you must first cater to a wide audience comprised of different backgrounds and nationalities. For starters, their local currencies might be vastly different from the ones you’re displaying on your eCommerce store. Meaning, they’ll have to compare prices and do all the exchanges on their own. This adds unnecessary steps to the whole process making it more difficult instead of simplifying it for your customers. According to a <a href="https://www.zdnet.com/article/online-shopping-unease-with-foreign-currencies/">survey conducted by ZDNet</a>, 57% of people said they would not re-visit an eCommerce store that uses only U.S. Dollars instead of local currencies.</p>
<p>So, think globally; just don’t forget about the locals.</p>
<h3 id="4-communicate-throughout-the-whole-process">4. Communicate Throughout the Whole Process</h3>
<p>Don’t stall your customers — be honest; things happen. If a package goes missing or is unexpectedly delayed, communicate this to your customers. There’s nothing worse than being kept in the dark. You can also offer various discounts and coupons if this does occur to soothe any angry customer.</p>
<p>Besides, work on creating a personalized confirmation system that allows customers to keep tabs on their order in real-time; just don’t forget to supply them with a tracking number along with their order details via email. This will relieve any anxieties they might have and keep them satisfied for the duration of the order fulfillment process.</p>
<h3 id="5-find-the-right-shipping-service">5. Find the Right Shipping Service</h3>
<p>No matter how well you manage your other processes, if your shipping partners fail — you’ll get all the blame. That’s why you need to <a href="http://www.diligentagency.com/find-perfect-shipping-company-online-shop/">find a shipping service that truly delivers</a>; in every sense of the word. Do quarterly audits and write down the exact number of delayed or lost shipments. If you notice a decline, it’s time to find a new partner.</p>
<p><strong>Bonus Tip:</strong> Find a shipping service that you can integrate with your other systems. That way, when there’s a return or a refund, you can co-ordinate with your shipping partner a lot easier to make sure your customers get their refunds on time.</p>
<p>In the end, it all comes down to customer satisfaction. Completing any one of these steps will greatly improve your chances of making a customer happy. Still, always be on the lookout for fresh ideas and find new and innovative ways to implement them into your strategy.</p>elainecbennetToday, eCommerce already accounts for some 13.7% of all global retail sales. By 2040, this number is expected to reach a whopping 95%! Yet, with great power comes great responsibility; especially in the order fulfillment department.
https://i.imgur.com/8ckEcEY.jpg
Discrediting misconceived ideas surrounding passwords2019-09-24T00:31:05+00:002019-09-24T00:31:05+00:00https://blog.codecarrot.net/discrediting-misconceived-ideas-surrounding-passwords<p>If you have never received a notification informing you to change your password to protect yourself against cybercrime, then you must be among the minority group of people. If this has never happened to your data, how about that time that the IT manager mistakenly left an unencrypted password data or mishandled it?</p>
<p>A password is a secret which is memorized and then used to confirm the user’s identity. It may be an arbitrary string of characters which may include digits, letters, and other symbols.</p>
<p>There are various myths and <a href="http://www.expressvpn.com/blog/6-common-misconceptions-about-passwords/">password misconceptions you might have</a> heard. Understanding these misconceptions better can affect how you choose your password. They include;</p>
<h3 id="length-of-password">Length of password</h3>
<p>Although long passwords are generally considered strong, having a password with 30 or 40 characters is not necessary. It’s advisable to only use such long passwords when encrypting sensitive information. A good password should not only long but also contain both the upper- and lower-case letters. Adding symbols is good practice as it makes your password more strong.</p>
<p>This notwithstanding, it is very possible to come up with an insecure password even after following the rules. You should always remember that a shared new, reused or old password can be dangerous.</p>
<p>Simply put, password quality is just but one factor in the improvement of password security. Embracing and exploring better authentication alternatives as soon as they become available, and determining how they can be implemented is important.</p>
<h3 id="secure">Secure</h3>
<p>Contrary to normal belief, comparing with other options such as government ID, phone numbers and biometrics, passwords do have security gaps.</p>
<p>When enhanced with the two-factor technique, passwords are the top method of authentication. However, caution is advised as not all two-factor techniques are similar. A good password should be unique, strong and should be transmitted over a secure channel.</p>
<h3 id="obsolete">Obsolete</h3>
<p>It is believed by many IT professionals that in the coming few years, passwords will be a thing of the past. As much as authentication techniques and security will be highly advanced in years to come, the time is not now.</p>
<p>While cryptographic keys are a likely candidate to take over from passwords, they are still very susceptible to phishing. Moreover, the more advanced methods of recognition such as facial recognition and fingerprint kits are yet to fit in the authentication bill.</p>
<h3 id="regular-password-change">Regular password change</h3>
<p>Most users often assume that changing their password regularly helps them protect their accounts better. This, however, is not usually the case, since a regular change of passwords may lead to the generation of weaker passwords hence giving hackers an easy time.</p>
<p>Most companies demand a regular change of passwords from their employees. This is normally done as a protective mechanism that is geared towards protecting mass password leaks which could lead to hackers getting a hold of the employees’ credentials.</p>
<p>However, such attacks can be better prevented by securing the company’s server and password volt where logins are usually stored other than mandating for updates now and then.</p>
<h3 id="memorable">Memorable</h3>
<p>It is always believed that passwords should be created in such a way that makes them memorable. This, however, is not the case. Passwords need only be secure and strong.</p>
<p>Even when you cannot remember your password, a password generator can automatically help you fill in your password whenever you need it. Password generator also protects you from phishing.</p>
<p>A password generator also doubles as a password manager which is a very secure and perfect technique that generally simplifies your life. It also can generate random and unique passwords on your behalf.</p>
<h3 id="ignorance">Ignorance </h3>
<p>A press released from a recent survey by LastPass revealed that 59% of people had reused passwords on multiple sites. This, however, was not a result of ignorance.</p>
<p>According to those interviewed, they agreed to the fact that they already knew of the security risk attributed to reusing of passwords. So, the question that now emerges is, why do users reuse their passwords?. The main reasons why users do this is because; they have a desire to be on top and in control of their passwords and the fear of forgetting the passwords.</p>
<h3 id="getting-the-password-right">Getting the password right</h3>
<p>With many users being left to their own devices, they are continuously creating weak passwords. Some use the same passwords for multiple sites while others not only store them on insecure media, but they also share them with other</p>
<p>In so doing, many users are putting their data and the company’s data at a security risk. The most dangerous password practice have been exhibited by younger employees according to new research that was carried out by SailPoint.</p>
<p>This research revealed a generational difference in password savviness. Statistics indicate that poor password practice will continue to be engaged in by quite a significant number of end-users.</p>
<h3 id="conclusion">Conclusion</h3>
<p>Being the most used form of authentication, it is evident that we all need passwords. They are not only used on the internet but they are also used for opening safes, cash machines and even on telephones.
The best way in which you can avoid some of the most serious threats is by using a password generator to store unique and strong passwords, making sure that both your phone and computer are always up-to-date, and by also exercising caution, especially when clicking links in sites. Saving the sites that you frequently visit as a bookmark can also be helpful.</p>jackwarnerIf you have never received a notification informing you to change your password to protect yourself against cybercrime, then you must be among the minority group of people. If this has never happened to your data, how about that time that the IT manager mistakenly left an unencrypted password data or mishandled it?
https://i.imgur.com/72GN9J4.jpg
5 Professional Tips to Create a Privacy Policy Page for Your Site2019-07-24T06:38:54+00:002019-07-24T06:38:54+00:00https://blog.codecarrot.net/5-tips-to-create-privacy-policy<p>For the majority of website owners – the sites that collect some form of customer and visitor information – privacy policy is a must. This comprehensive document will share, in great detail, the privacy information that pertains to the customer, their use of your website, and how you collect, collate, and store their data. Needless to say, this is one of the most important pages on your site, especially if you collect sensitive customer data such as credit card information.</p>
<p>What’s more, a privacy policy is not something you can choose whether or not you want on your site, as many countries around the world have strict laws when it comes to personal online data and how websites use it. With all of that in mind, here are five professional tips that will help you write the best privacy policy page for your site.</p>
<h2 id="use-customer-friendly-language">Use customer-friendly language</h2>
<p>Assuming that you have already covered every technical step involved in the creation of a new page of your site, let’s address the challenge of writing a privacy policy that the customers will actually understand. Because clarity in writing, wording, and tone of voice can mean the difference between a privacy policy that protects your brand against lawsuits and, well, a lawsuit.</p>
<p>Nobody would blame you for thinking that the privacy policy page should be different from all other pages on your site in terms of the writing style you use, and the tone of voice you portray. However, using too much technical jargon in combination with a tone of voice that is not consistent with <a href="https://www.inc.com/molly-reynolds/5-steps-to-building-a-strong-brand-identity-when-the-game-is-constantly-changing.html">your brand identity</a> might not only confuse the readers but deter them from the page completely.</p>
<p>To avoid this, be sure to optimize the content to the unique preferences of your demographic. Likewise, make sure that the copy on the page is consistent with the rest of the content on your website in order to make it more familiar and appealing to the reader.</p>
<h2 id="follow-the-legal-letter-to-the-t">Follow the legal letter to the T</h2>
<p>While the policy itself doesn’t need to resemble an exhaustive legal document with so much technobabble that it’s completely incomprehensible to the reader, that doesn’t mean that it shouldn’t follow the letter of the law. In fact, it’s imperative that your privacy policy conveys the law on online personal data privacy clearly and consistently, all the while complying with the latest regulations, the likes of the GDPR and others.</p>
<p>This will cover your company from any legal loopholes and liabilities on all fronts, which will deter lawsuits or at least help you win the case if someone does file a suit against your brand. You will be required to inform the user on the kind of information you collect, why you collect it, what you do with it, where you store it, and whom you share it with. Leave nothing out, and don’t forget about third-party advertisers and other partners that might have the right to this data.</p>
<h2 id="choose-the-ideal-template-for-your-site">Choose the ideal template for your site</h2>
<p>Unless you’re a legal professional who is well-versed in interned and international law, you will need to get a privacy policy template. No, there is no need to hire a legal advisor, nor is there a need to write your policy from scratch. With a plethora of <a href="https://zegal.com/all-docs/">useful business document templates</a> readily available in the digital realm, you can easily find the privacy policy template that suits your company and the industry you operate in.</p>
<p>Once you have the template, you can make minor adjustments to the wording and tone of voice to make them more in line with your brand’s voice and identity in general. Don’t try to rewrite or erase any of the legal terms, and make sure that the core concepts that provide clear legal information stays intact. As for everything else, it’s yours to change as you see fit.</p>
<h2 id="keep-it-brief-transparent-and-honest">Keep it brief, transparent, and honest</h2>
<p>Depending on the size of your company, your business model, your partners, the amount of data you collect, and the industry you operate in, your privacy policy might vary in length to a significant degree. Your job is to make it as brief, honest, and transparent as possible in order to motivate people to actually read through it without losing their minds. This is not an easy goal to achieve, so here’s a quick three-step process:</p>
<ul>
<li>First, look for any elements in your template that don’t pertain to your brand’s architecture or your industry, and eliminate those sections.</li>
<li>Next, search for any fluff, extraneous details, and duplicated content, and eliminate those as well.</li>
<li>And finally, be sure to organize your privacy policy for <a href="https://medium.com/@bloghands/tips-and-tools-for-improving-your-content-readability-score-eed82e2ffa87">better readability</a> with subheadings, bullet points, and bolded text that highlights important areas.</li>
</ul>
<h2 id="make-it-as-specific-as-you-can">Make it as specific as you can</h2>
<p>The last thing you need to remember is that your privacy policy needs to be as specific as possible. Specificity is one of the keys to a bulletproof privacy policy, as it leaves no room for any guesswork – what is written in there pertains exactly to the customer, your niche, and your brand. Avoid any vague language and make sure that the information is consistent with the industry standards.</p>
<h2 id="conclusion">Conclusion</h2>
<p>A privacy policy is one of the most important, brand-saving documents on your website. So there really is a need to pay special attention to its structure, tone of voice and wording, as well as the information it contains. With these tips in mind, go ahead and create a privacy policy that will future-proof your WordPress site for years to come.</p>elainecbennetFor the majority of website owners – the sites that collect some form of customer and visitor information – privacy policy is a must. This comprehensive document will share, in great detail, the privacy information that pertains to the customer, their use of your website, and how you collect, collate, and store their data. Needless to say, this is one of the most important pages on your site, especially if you collect sensitive customer data such as credit card information.
https://i.imgur.com/T6Grcb5.jpg
How Much Does It Cost to Start a Business2019-05-17T13:45:08+00:002019-05-17T13:45:08+00:00https://blog.codecarrot.net/cost-to-start-a-business<p>We have redefined what it means to build a career and a meaningful professional life. Today, we are no longer confined by the notion of a traditional nine-to-five office job, nor do we attach that idea to “financial security”. With so many new businesses coming to life every day around the world, we have started to embrace the freedom that comes with running your own business, whether in the form of a freelance digital career, a startup, a franchise, or even a partnership.</p>
<p>However, this amazing and liberating experience comes with its own challenges. The first of many includes the financial planning that is necessary to start and run a company and grow it over time. For first-time business owners who are looking into all the different ways to fund their success, this can be a handy guide for deciding on your path forward. With so many decisions that go into the process of starting a company, you can start by taking the right steps to ensure financial viability in order to help your future business grow!</p>
<h2 id="select-a-financing-method">Select a financing method</h2>
<p>Considering the fact that starting new businesses has become more popular than ever, it’s only natural to see more <a href="https://www.thebalancesmb.com/types-of-equity-financing-for-small-business-393181">financing solutions</a> popping up to meet the needs of new business owners. It’s a market with so much potential, and the diversity of these new companies requires equal diversity in financing. You no longer have to stick to bank loans only, on the contrary. You can look into a wide range of funding options that can help you provide a steady influx of cash for your brand.
For starters, crowd-funding platforms are a helpful tool for particularly innovative products and solutions. Plus, they help you assess the level of interest your potential customers have in the product you intend to sell. Then again, there are alternative institutions you can go to for loans, as well as angel investors. Do some research, look into your options, and you can even combine your own personal savings with another financing solution.</p>
<h2 id="run-a-cost-estimate">Run a cost estimate</h2>
<p>What can help you determine the best possible financing solution for your business? Understanding the market and the business model you choose. Each structure comes with different investment needs as well as ongoing cost projections. Of course, depending on the region where you plan to run your company and the market you wish to serve, you’ll come across different rough estimations to serve as general guidelines.</p>
<p>What you’ll notice is that different business models require different funds. If you take a look at a typical <a href="https://www.theupsstorefranchise.com/cost">franchise cost</a> breakdown compared to a startup, you may determine that it might be more financially viable to join an existing franchise than to fund a brand-new business. Add to that the perks of existing market research and customer data, and you can already see that franchising allows you to cut various costs from the start. Then again, perhaps certain ideas that are perfect for a startup can bring more financial merit down the line, making that sizeable initial investment perfectly justifiable.</p>
<h2 id="determine-the-types-of-costs">Determine the types of costs</h2>
<p>Having a general idea of the funds you need to start a company is only one piece of the puzzle. Add to that, you need to have a clear view of how much money it will take to keep your daily operations running, provide a stellar service or product, and hopefully grow your business over time. That said, you should <a href="https://www.fundera.com/blog/business-startup-costs">consider various types of costs</a> that your future company may require.</p>
<ul>
<li>One-time costs include paying for registering your business, obtaining necessary licenses, equipping your office, and similar starting steps.</li>
<li>Recurring costs such as utility bills, bookkeeping, employee salaries, and other ongoing expenses can vary from month to month or season to season, which will affect your financial stability.</li>
<li>Essential costs are the ones you cannot possibly run a business without, such as registering your company.</li>
<li>Optional costs are typically investments you can make later in the process as your business matures and becomes more financially stable. However, it’s always wise to wait and not tap into your budget when you’re still in the early stages of earning your reputation.</li>
</ul>
<h2 id="allocate-your-funds-wisely">Allocate your funds wisely</h2>
<p>Do you really need a large office in the heart of the city for your small startup? Or a massive launch party that will set you back a decent sum of money? While the excitement of starting your business may be grand enough to inspire you to invest in certain “luxuries”, you should consider postponing or scaling down those expenses until your business becomes truly profitable. This will help you protect your reputation, but also <a href="https://www.inc.com/young-entrepreneur-council/3-ways-to-protect-your-businesss-finances-against-cash-flow-downturns.html">safeguard your cash flow</a> from too many fluctuations.
Whenever it’s time to tap into your business bank account, make sure you can predict how your business will benefit from every investment you make. ROI is not a term to be taken lightly, especially for a young company up against many well-established competitors.</p>
<p>Calculating and managing your expenses is a vital step in starting and protecting your business. Use these tips to gain a better understanding of what it takes to finance a business venture and how you can structure your investment to ensure years of success in your industry.</p>elainecbennetWe have redefined what it means to build a career and a meaningful professional life. Today, we are no longer confined by the notion of a traditional nine-to-five office job, nor do we attach that idea to “financial security”. With so many new businesses coming to life every day around the world, we have started to embrace the freedom that comes with running your own business, whether in the form of a freelance digital career, a startup, a franchise, or even a partnership.
https://i.imgur.com/VpIPgPG.jpg
Selling your website? Here’s why you need to clean it up before the vultures arrive!2019-04-26T07:45:14+00:002019-04-26T07:45:14+00:00https://blog.codecarrot.net/clean-it-before-selling-your-website<p>Selling your website? Here’s why you need to clean it up before the vultures arrive!</p>
<p>If you are in the market to sell your website, you need to be prepared for buyer’s to try to tear your website apart. Not literally, of course, but to get a better deal the vultures will pick out the smallest of flaws in your site. The only way you can avoid the vultures and get buyers to agree to your asking price is by making sure your site is in top shape before you set out to sell it.</p>
<p>There are certain elements within a website that are easy to pick apart, while others require more in-depth analysis. We will cover all of these elements so your website is as clean as possible before you sell it, whether that be on an auction or through a broker such as <a href="https://kingmakers.co/">Kingmakers</a>.</p>
<h2 id="make-the-site-design-more-appealing">Make the site design more appealing</h2>
<p>The design of a site is one of the first things a buyer will notice. We all know the importance of first impressions, so you don’t want them to think your site is generic or bland. This will automatically put them off and turn buyers away.</p>
<p>While elements of Flash and JavaScript are not well-received by search engines, as they increase page load time, there are many other options users have at their disposal to liven up their website. Use videos, images, and attractive colors to make your site design more appealing.</p>
<p>Aesthetically, your site design should be at its best in order to sell it for its most. If buyers like the design, they will be more interested in hearing about what else the site has to offer them.</p>
<h2 id="make-sure-the-website-is-optimized">Make sure the website is optimized</h2>
<p>Everyone is aware of how optimization is important for search engines. You need to focus on both on-page and off-page optimization tactics to get the most out of your website. Have a content marketing strategy so that your website ranks as high as possible.</p>
<p>While the content strategy is very important, there is more to site optimization. A properly optimized website also focuses on making a profit for the business. While SEO is vital to that process, there are a few more elements you need to focus on. SEO will help bring in the traffic and improve your content, design, and overall message on the site.</p>
<p>However, you still need to be able to convert those visitors into sales. You can’t expect visitors to buy or sign up for your solution just because you were one of the top search results. This means having a proper <a href="https://neilpatel.com/blog/how-to-create-the-perfect-call-to-action/">call-to-action</a> on your site to ensure that the bounce rate is low and that visitors are prompted to take action.</p>
<h2 id="go-mobile">Go mobile</h2>
<p>With more mobile users today accessing the internet, you need to make sure your site is optimized for mobile access. Not only do users appreciate this, but search engines do as well. They give preference to sites that are mobile-optimized. Buyers will check to make sure your site is optimized for mobile devices so that you are appearing high in all search engines.</p>
<p>There is more to optimizing a site for mobile devices than just making it responsive. Yes, responsiveness helps in adjusting the size of the site size to adjust for different screens. However, you also need to make sure the images, videos, and features you have on your site work and function on mobile devices. Only then will you have a completely mobile-optimized site.</p>
<h2 id="enhance-user-experience">Enhance user experience</h2>
<p>User experience has become a vital part of SEO, and at the same time ensures that users remain on your website. Do you remember the last site where you waited for over 10 seconds for it to load? You probably can’t—because you ended up closing out of that site. Little elements like load time make a huge impact on users, which is why you need to ensure that development elements of your site are high performing.</p>
<p>To ensure your site loads quickly, here are some little things you can do:
Host any videos on video streaming sites and embed them to your site. This way videos won’t add more weight, which adds to load time, to your site.
Limit the use of Flash and JavaScript. As appealing as they look, both add a lot of weight to your site.</p>
<p>Optimize images by resizing them before putting them on the site. With high-resolution pictures reaching well above 10 MB, you need to keep the file size as small as possible while also maintaining picture resolution. Programs such as Photoshop allow you to reduce file size while maintaining image quality.</p>
<p>You also want to make sure that the site makes it easy for <a href="https://blog.codecarrot.net/what-do-76-of-consumers-want-from-your-website/">users to find what they want</a>. Integrating a search tab along with a site map can help achieve that. These will make it easier for users to get the information they are searching for, ensuring that they keep coming back for more.</p>
<h2 id="monetize-the-site-if-needed">Monetize the site, if needed</h2>
<p>For those interested in selling a site that doesn’t sell a solution, such as a blog, you can easily monetize it before you sell it. Here are two main ways to monetize your site:</p>
<p>Google ads: You can host Google ads directly on your site with Google Adsense. It’s simple: the more visitors that come and click through to these ads from your website, the more money you make. You just need to make sure that your site has high traffic for this tactic to be fruitful.</p>
<p>Affiliate marketing: This is a great way for bloggers to monetize their sites. Big brands such as Amazon have affiliate marketing programs where sites that host and promote the big brand’s product get a commission for each product that is sold when clicked through from your site.</p>
<p>Selling a website isn’t as easy as you may think. You need to ensure your website is in complete order to get your asking price. If not, chances are you will be met with offers from vultures, who will pick your site’s flaws apart and pitch low-ball offers.</p>KarenEvansSBOSelling your website? Here’s why you need to clean it up before the vultures arrive!
https://i.imgur.com/nrKf2CG.jpg
One stop to all Git repository2019-04-19T06:05:45+00:002019-04-19T06:05:45+00:00https://blog.codecarrot.net/one-stop-to-all-git-repository<h1 id="what-is-thermal">What is Thermal?</h1>
<p><a href="https://thermal.netlify.com">Thermal</a> is open-source desktop application allows you to manage all Git repository at one place by providing you a simple to use graphic user interface with built-in features commits, history, repository settings and more.</p>
<p><img src="https://thepracticaldev.s3.amazonaws.com/i/t0733ds66gdecza1m2ys.png" alt="Thermal app screenshots" /></p>
<h2 id="features">Features</h2>
<ul>
<li>Commit changes</li>
<li>Commit history</li>
<li>Commit details</li>
<li>File diff</li>
<li>Repository settings</li>
<li>Push to a remote repository</li>
<li>and a lot more…</li>
</ul>
<p><em>We are just getting started with this application and there are lot more planned features to build, <a href="https://discord.gg/s2PYYJV">join our discord server</a> for your questions regarding the application and to stay up to date with the development.</em></p>
<p>Try now for free, by downloading the <strong><a href="https://thermal.netlify.com/download/">thermal application</a></strong>.</p>yashumittalWhat is Thermal?
https://thepracticaldev.s3.amazonaws.com/i/37a9zxxdtl5okmstio9l.png
Hardware Vs Software Firewall - Which One is Right for Your Business2019-04-15T10:16:39+00:002019-04-15T10:16:39+00:00https://blog.codecarrot.net/hardware-software-firewall-for-your-business<p>In this digital day and age of seamless global communication where sensitive data travels the world and is exchanged on a daily basis, you cannot afford to get hacked.</p>
<p>Not just for the sake of your brand’s reputation in the competitive market, but also for the sake of your customers. Cybersecurity has become a hot topic in the modern world with the rise of cyber-crime ranging from phishing scams to ransomware, all the way to organized cyber-attacks intended to weaken the competition and put your company at a disadvantage.</p>
<p>Remember, it’s a dog-eat-dog world out there, and no matter if you are running a small business or a global enterprise, you should always remain vigilant and be prepared for the worst scenario. After all, within your computers’ storage units resides sensitive information many of your top competitors would pay handsomely to obtain.</p>
<p>This means that you need to have a strong, comprehensive firewall system in place that will protect your company from malicious intent. Here are tips that will help you figure out whether hardware or software firewalls are for you.</p>
<h2 id="defining-the-software-firewall">Defining the software firewall</h2>
<p>Used primarily on private computers and laptops, software firewalls are the most common kind of cyber protection systems in the world. As the name implies, these are software-based solutions that come in the form of proprietary anti-virus software such as Microsoft Defender, Kaspersky, and many others.</p>
<p>A software firewall is easy to install on a computer and is affordable to boot.</p>
<p>Typically, these systems require little to no <a href="https://www.pcworld.com/article/117557/article.html">knowledge of computer firewalls</a>, as they a user-friendly dashboard to make management and optimization a breeze. Complemented with comprehensive vendor support, you can easily manage your firewall settings to accommodate the needs of your personal computer.</p>
<p>However, these solutions are often suboptimal for business, as they do not offer the level of intricate security needed to deter the growing number of skilled hackers and surgical cyber-attacks. Before we move on to the concrete pros and cons, let’s define the hardware firewall first.</p>
<h2 id="the-essentials-of-hardware-firewalls">The essentials of hardware firewalls</h2>
<p>The hardware firewall is the next-generation level of cyber security, and even though software-based solutions have their benefits, they cannot hope to compete with the added level of protection offered by the hardware firewall. The <a href="https://sangfor.com/product/sxf-network-security-ngaf.html">modern hardware firewall</a> works on the basis of perimeter network monitoring in which the physical device is positioned between the router and the rest of the computing system in your company, effectively scanning all incoming and outgoing traffic as it connects to the router.</p>
<p>This means that before any traffic can reach your computers, it will first have to pass the hardware firewall checkpoint. Think of the device as the gatekeeper between the web and your business that doesn’t rely on the efficacy of your operating systems or any other software you might be using. These solutions are becoming increasingly popular in the modern business world simply due to their reliability and scalability.</p>
<h2 id="pros-and-cons-of-software-solutions">Pros and cons of software solutions</h2>
<p>Starting with the pros of software-based firewalls, these systems are usually very affordable. This makes them the go-to choice for individuals and small businesses that are looking to cut overheads and minimize expenditure across the board. Needless to say, this pro is also in of itself, a con. The price of the system means that it’s not well-suited to accommodate the needs of a growing business, or a network of computers.</p>
<p>This means that every computer has its own software firewall which may or may not break under pressure, which in turn means that any of your computers can come under attack at one point or another. While these systems usually come with out-of-the-box features and are ready to go the moment you install them, it also means that they are suited for general cybersecurity and not comprehensive protection.</p>
<h2 id="pros-and-cons-of-hardware-solutions">Pros and cons of hardware solutions</h2>
<p>In these cons of software, firewalls lie the biggest pros of hardware solutions. These firewalls are built with the needs of the business industry in mind, offering full scalability and <a href="https://security.berkeley.edu/managed-hardware-firewall-guideline">easy management across the board</a>. However, their greatest advantage is the level of business-wide protection they offer, as the device monitors all incoming and outgoing traffic for your entire business network.</p>
<p>This means that your entire computing infrastructure is protected by a single device with multiple layers of protection. What’s more, this negates the need to update the firewall on every single device as updates carry across the entirety of your infrastructure. Given the fact that these devices have their own operating systems, you can rest assured that the software inside is optimized for larger traffic volumes.</p>
<p>Lastly, seeing as how the device is its own separate entity that is not a part of your system, it’s not a drain on resources like a software-based solution. This means that the performance of your computer network will not suffer due to the requirements of your firewall system.</p>
<p>When it comes to its drawbacks, it’s important to know that the hardware firewall is an investment. It will usually come with a higher price tag than its software-based counterpart, but the benefits might prove to be worth the expense. Another con is that the hardware firewall needs to be maintained by a skilled and professional team, as maintenance and repair are processes that require an experienced approach. Nevertheless, this shouldn’t be an issue if your provider offers managed IT services.</p>
<h2 id="conclusion">Conclusion</h2>
<p>Both the software and the hardware firewall solutions have their pros and cons, however, when it comes to business solutions, the hardware firewall is the most cost-effective option. If you are looking to protect your company from all nefarious intent in the online world, you should consider upgrading from simple software solutions to a business-wide hardware firewall.</p>elainecbennetIn this digital day and age of seamless global communication where sensitive data travels the world and is exchanged on a daily basis, you cannot afford to get hacked.
https://i.imgur.com/JtXAVUP.jpg
Recapping the video marketing trends of 20182019-04-10T07:50:00+00:002019-04-10T07:50:00+00:00https://blog.codecarrot.net/recap-video-marketing-trend-2018<p>By now, you’re probably well aware of the magic of video when it comes to marketing. In fact, <a href="https://www.wordstream.com/blog/ws/2017/03/08/video-marketing-statistics">51% of marketers</a> name video as the type of content with the best ROI, and marketers who take advantage of video in their campaigns grow revenue 49% faster than non-video users.</p>
<p>Incorporating video into a strategy can help marketers expand their reach, increase engagement, boost understanding, and distinguish their brand. A whopping 64% of consumers make a purchase after watching branded social videos, and social video generates 1200% more shares than text and images combined.</p>
<p>It’s clear just why videos are being used more and more in marketing, but how is this delightful medium being utilized? The following article will cover some of the most notable video marketing trends we saw in 2018, and discuss their significance for marketers in 2019 and beyond.</p>
<h2 id="1-live-streaming">1. Live streaming</h2>
<p>Live streaming continues to increase in popularity, and with good reason. <a href="https://marketingland.com/longer-facebook-live-streams-mean-engagement-207346">According to Facebook</a>, live broadcasts earn six times more interactions than regular videos, making them invaluable tools for brands looking to connect with their audiences on a deeper level. Live streaming feels more personal than your average video, and it is a great way to address concerns or respond to consumer queries in real time.</p>
<p><img src="https://i.imgur.com/nxHy2SJ.jpg" alt="twitch app opened on iPhone" /></p>
<p>This medium gives viewers instant gratification, and it is a fantastic way to build anticipation over product launches, introduce employees, host helpful Q&A sessions, provide tutorials and tips, or simply give audiences a behind-the-scenes look at the inner workings of your business. Buzzfeed uses live streaming to showcase quirky stunts, Dunkin Donuts gives followers a behind-the-scenes look into their kitchens, and Benefit cosmetics is just one of the many beauty brands using live streaming to teach viewers how to apply their products.</p>
<p><strong>What this means for you going forward:</strong> The popularity of live streaming proves that consumers value accessibility in brands. Connect with your audience by taking advantage of all that live streaming has to offer. For 2019, make it a point to live stream at least once a week. Remember that live streaming isn’t reserved for breaking developments— consumers will appreciate even seeing the day-to-day operations of your brand, and this will build trust and loyalty.</p>
<h2 id="2-video-transcription">2. Video transcription</h2>
<p>You’re having a slow day at work so you decide to have a scroll through your Facebook newsfeed. Before you die of boredom, you decide to click on a marketing video from one of the brands you follow. Not wanting to alert your boss or colleagues to what you’re up to, you make sure to mute the volume. Luckily, you can still enjoy your cheeky workday video, thanks to video transcription.</p>
<p>Today, <a href="https://digiday.com/media/silent-world-facebook-video/">85% of videos</a> are watched without sound, which means that transcribing your videos is essential in order to ensure your message is still absorbed.</p>
<p>In 2018 brands continued to realize the importance of videos with text, and this trend isn’t likely to disappear in 2019, or anytime soon. Food-centric brand Tasty ensures subtitles are available on all of their videos, and entertainment website Hellogiggles adorns most of their videos with big, bold text so that they’re easily digested regardless of sound.</p>
<p><strong>What this means going forward:</strong> A good rule of thumb for 2019 is to assume that your video will be watched without sound. Create your video with this in mind, and use larger text so that it can be read easily, in fonts and colors that stay true to your brand image. It’s also a good idea to keep text simplified, because long paragraphs may frustrate viewers and lead to swift navigation away from your page.</p>
<h2 id="3-mobile-optimized-videos">3. Mobile optimized videos</h2>
<p>With the busy lifestyles of today, mobile devices have become central to the way we live and operate. Wherever we go, our mobile decides can easily come along too— they are the pinnacle of modern convenience.</p>
<p><img src="https://i.imgur.com/bln4geJ.jpg" alt="Using mobile phone in public" /></p>
<p>There are over 3.7 billion mobile users worldwide, and over <a href="https://www.statista.com/statistics/241462/global-mobile-phone-website-traffic-share/">half of the global internet traffic</a> is generated through mobile phones alone. 90% of Facebook users log in through mobile devices, so it’s never been more important to have your videos optimized for mobile.</p>
<p>The 1:1 square video format is a much better fit when considering mobile devices. These square videos are not only more aesthetically appealing for mobile users, but they are also responsible for <a href="https://www.adweek.com/digital/instagrams-box-shaped-videos-are-influencing-facebook-marketers-172490/">increasing completion rates</a> of <a href="https://buffer.com/resources/square-video-vs-landscape-video">cropped videos</a> by 67%, and for helping your videos get noticed by taking up 78% more space within Facebook’s newsfeed.</p>
<p><strong>What this means for you going forward:</strong> These days, it’s hip to be square. If you’re creating a video and want it to be enjoyed in all its glory, be sure to stick to the square 1:1 format. Additionally, optimize videos for mobile even further by making text big and easily readable on these smaller devices, keeping videos short and sweet so busy mobile users on-the-go have the time and patience to watch them, and be sure to preview your videos on mobile before releasing them to make sure they’re playing as they should be.</p>
<h2 id="4-brands-collaborating-with-customers-via-video">4. Brands collaborating with customers via video</h2>
<p>Collaborating with customers is one of the best things brands can do to earn the trust of their audience. When you add video to the equation, it becomes an even more effective tactic. This year has seen an increase in brands utilizing the voices of their customers through video. After all, who better to tell your story to your customers than one of their own?</p>
<p>Sportswear brands such as Nike have partnered with a variety of their customers to tell each of their unique stories and illustrate how Nike has helped them on their journeys. Fashion brands such as Ban.do and Manrepeller often have customers take over their Instagram feeds and provide video footage of shopping trips and dressing room try-on, or scenes from their stylish daily lives. Through these collaborative videos, customers feel more valued and more connected to the heart of the brand.</p>
<p><strong>What this means going forward:</strong> It’s time to start using your customers as ambassadors for your brand. Encourage your valued customers to share their video stories for a chance to be featured on your social media pages, or choose <a href="https://lobsterdigitalmarketing.co.uk/how-to-use-instagram-based-influencer-marketing-to-grow-your-ecommerce-sales/">specific brand representatives</a> to “takeover” your feeds from time to time. This will spice up your social media content with something new, and show your followers how valuable they are to you.</p>
<h2 id="5-video-accessible-to-everyone-regardless-of-budget">5. Video accessible to everyone, regardless of budget</h2>
<p>Those days are gone when you had to have a large budget in order to produce a quality video. Now you can create a great video quickly, easily, and without spending a fortune. Each year seems to welcome <a href="http://www.markuptrend.com/the-top-ten-website-tools-for-small-businesses/">new tools and updates</a> that streamline and economize essential marketing tasks, and 2018 welcomed plenty of these— many of which were aimed at video production specifically.</p>
<p><img src="https://i.imgur.com/sVAEsnb.jpg" alt="Recording video on iPhone" /></p>
<p>Tools such as iMovie, Magix Movie Edit Pro, Adobe Premiere Elements, CyberLink PowerDirector and <a href="https://www.designwizard.com/online-video-editor">Design Wizard’s online video editor</a> allow marketers to reap the benefits of video for their brand, at a fraction of the cost.</p>
<p><strong>What this means going forward:</strong> Since more and more brands have access to useful video software and <a href="https://www.designwizard.com/blog/b2b-tips/video-hosting-sites">platforms to upload</a> them to, more videos will be made. It’s therefore essential that you do what you can to stand out from the crowd. Do your research and invest in video software that aligns with your media goals. Make videos that give value to your customers while highlighting your brand ethos.</p>
<p>In 2018, video reigned supreme, and the forecast for 2019 is sunny with a chance of more videos! What were some of your favorite video marketing trends of 2018? What do you hope to see more of in the years to come?</p>ellandineenBy now, you’re probably well aware of the magic of video when it comes to marketing. In fact, 51% of marketers name video as the type of content with the best ROI, and marketers who take advantage of video in their campaigns grow revenue 49% faster than non-video users.
https://i.imgur.com/LLTHkL2.jpg
5 Things You Should Know Before You Start a Blog For Your Business2019-03-21T19:56:59+00:002019-03-21T19:56:59+00:00https://blog.codecarrot.net/5-things-before-you-start-blog-for-your-business<p>So you’ve heard about the benefits of blogging and want to cash in on them? Luckily, anyone who desires this can easily start a blog. It is an effective marketing tool for businesses to generate more traffic and, in turn, leads.</p>
<p>While starting a blog might be easy, it isn’t as easy to get results from it, which can leave businesses feeling hopeless. So before you decide to establish a blog for your business, there are 5 things you should know.</p>
<h2 id="1-you-wont-get-results-right-off-the-bat">1. You won’t get results right off the bat</h2>
<p>The phrase, “patience is a virtue,” definitely applies to blogs. It doesn’t matter if you are blogging to get more traffic, increase SEO, or to establish your business as a thought leader. All of these take time and effort.</p>
<p>Don’t expect to see drastic results after only your first week of <a href="https://startbloggingonline.com/">starting your blog</a>. Online marketing is highly competitive. Nowadays, there isn’t an industry online in which there is no competition. You’ll start off with little to no traffic on your blog, but don’t let that dishearten you. Results will come if you keep at it and continue to provide valuable information for your audience.</p>
<h2 id="2-know-your-target-audience-before-you-start-writing">2. Know your target audience before you start writing</h2>
<p>It’s an obvious comment to make that you should write content that’s related to the industry you’re in. But that doesn’t automatically mean that you will get readership.</p>
<p>The only way you can ensure your blog gets visitors is if you research your target audience. This will allow you to determine the niche and <a href="/your-roadmap-to-creating-killer-blog-post-ideas/">decide on a topic to focus on</a>, helping you get more traffic and readership from your target audience.</p>
<p>You also want the topics to solve your audience’s problems, be it in the form of tips, a guide, or answering a direct question that stems from your keyword research. A smart blogger will explain how their products/services can help the audience solve their problems, which will entice them to opt for your solution, knowing it is valuable to them.</p>
<h2 id="3-be-ready-to-be-more-social">3. Be ready to be more social</h2>
<p>You can’t rely solely on search engines to direct traffic to your blogs. If you do, you’re doing yourself a disservice and not getting the most out of your content. The most effective way to get traffic to your blog is with the help of social media, with <a href="/how-to-build-a-massive-following-on-instagram/">Instagram kicking up a storm</a> for online marketers.</p>
<p>There are two effective ways to use social media to generate traffic towards your blog:</p>
<ol>
<li><strong>Post the blog on your social media profiles:</strong> this will increase the likelihood of your audience reading your content and sharing it.</li>
<li><strong>Run an ad campaign:</strong> an ad campaign featuring your blog post will enable you to reach out to a wider audience, an audience that is and isn’t already following you, having twice the impact.</li>
</ol>
<p>Your target, at first, is to get them to your blog. And as long as you follow the 10 commandments of blogging below, you will have them hooked to keep coming back each time you post something new.</p>
<h2 id="4-consistency-is-key">4. Consistency is key</h2>
<p>It’s true, one blog post per month is better than not writing anything, but will it really get you the results you’re after? According to a <a href="https://www.hubspot.com/blog-readers">study conducted by Hubspot</a>, blogging once a month only gets you 1% more subscribers than not blogging at all. However, you can get an 11% increase in subscribers if you were to blog regularly, more than once a week.</p>
<p>You don’t have to go all out and blog on a daily basis. Blogging twice a week is more than enough to keep engagement and subscription levels up.</p>
<p>Be ready to stay committed to blogging, because it can be the difference between customers choosing you over your competition, and, after all, there is no harm in increasing your amount of followers.</p>
<h2 id="5-learn-to-grab-attention-with-your-writing">5. Learn to grab attention with your writing</h2>
<p>You don’t have to be a Pulitzer Prize-winning author, but you do need to know the basics of writing in a style that grabs and keeps readers’ attention.</p>
<p>It all starts with your headline. The headline needs to be as catchy as possible. But at the same time, remember that you are dealing with professionals, so no clickbait headlines.</p>
<p>To make headlines more appealing, make them as specific as possible. You want to entice the reader to want to read it. So if your topic is online marketing, don’t just have a basic title like, “ What you should know about online marketing.” Instead, make it more appealing; something like, “5 online marketing tips that online marketers don’t want you to know.” The latter headline is more mysterious and attention-grabbing than the former.</p>
<h2 id="final-words">Final words</h2>
<p>There’s no doubt that blogging is an extremely popular marketing tool. But it needs to be done the right way.</p>
<p>By ensuring that your content is relevant to your target audience, that you do your research, and back up any facts and claims you make, you’re going to establish yourself as an authority in time.</p>
<p>Combining the power of a blog and the 10 commandments with the popularity of social media, you’ll be well on the way to increase your viewer base and the prosperity of your business.</p>KarenEvansSBOSo you’ve heard about the benefits of blogging and want to cash in on them? Luckily, anyone who desires this can easily start a blog. It is an effective marketing tool for businesses to generate more traffic and, in turn, leads.
https://i.imgur.com/3dEhQeh.jpg
How to Turn Invoicing into a Marketing Opportunity?2019-02-04T18:14:55+00:002019-02-04T18:14:55+00:00https://blog.codecarrot.net/turn-invoicing-into-marketing-opportunity<p>Invoice emails help you get paid on time for your products and services. They keep your billing processes transparent and build a stronger relationship with your clients. Precisely because of that, many businesses have started using comprehensive invoice templates that make their invoices presentable and professional.</p>
<p>However, did you know that you can use your online invoices for more than billing? As your invoice emails have high open rates and are valued by your customers, they can also serve as an outstanding marketing opportunity.</p>
<p>So, here are a few practical ways to use your invoices to promote your business.</p>
<h2 id="personalize-incentives-to-boost-user-experiences">Personalize Incentives to Boost User Experiences</h2>
<p>The small business ecosystem is growing at an astonishing rate. And, the only way to stand out in the sea of businesses similar to yours is to <a href="https://www.forbes.com/sites/jiawertz/2017/06/02/7-principles-to-building-a-strong-brand/">build a solid brand</a>. A brand is your company’s identity. It gives you a unique personality, voice, and values that evoke emotions in your customers and motivate them to come back. Just look at popular brands like Coca-Cola or Nike. Probably the first thing that comes to your mind when I mention them is their logo, slogan, or brand colours, right?</p>
<p>Precisely because of that, you need to consider your major brand elements like your logo, social media buttons, email address, colour scheme, and tagline when crafting your incentive. Believe it or not, adding these elements to your invoices is one of the most effective ways to spread your brand awareness and build stronger relationships with your customers.</p>
<p><a href="https://financesonline.com/top-10-invoicing-software-solutions-company/">There are numerous invoicing software options</a> that let you create branded invoices. They let you choose the themes that reflect your brand personality and add customized band elements. Once you create your perfect template, save it for your future usage to create consistent user experiences.</p>
<h2 id="provide-flexible-payment-options">Provide Flexible Payment Options</h2>
<p>When designing your billing system, you need to tailor it to your customers’ needs and cash flow. Let them pay their invoices when it suits them most and provide them with multiple payment options. This is how you will build trust with them.</p>
<p>For example, many accounting companies and CPAs face the problem of outstanding accounts receivable. Namely, almost <a href="http://blog.insidepublicaccounting.com/2017/09/inside-public-accounting-releases-2017-national-benchmarking-report/">30% of these invoices are 90 days past due</a>. Now, the solution to this problem isn’t angry emails or phone calls. Even late invoices can be a good opportunity to strengthen customer relationships and promote your business as customer-oriented. Precisely because of that, many <a href="https://www.quickfee.com/fee-financing/accounting/">accounting firms need fee financing</a> to boost their cash flow faster. By submitting their clients to the fee financing service, businesses give their customers the opportunity to pay their invoices in smaller, monthly instalments and provide them with greater flexibility.</p>
<h2 id="offer-incentives">Offer Incentives</h2>
<p>Customers love brands that value their loyalty. And, if you want them to keep buying from you, you need to reward them.</p>
<p>Now, there are <a href="https://blog.hubspot.com/service/customer-loyalty">numerous types of incentives to choose from</a>, depending on your brand personality and needs. These could be, for example, coupons, discount codes, loyalty promotions, freebies, free shipping, and so on.</p>
<p>Why should you integrate loyalty programs and invoicing? Well, invoices are bills and receiving a bill is never a pleasant experience. So, your goal is to personalize your invoice emails and use them to provide some additional value. Sending out incentives is a nice surprise that keeps your customers happy and reminds them why they chose you over your competitors in the first place. It also helps you build trust with your customers and get them to spread the positive word of mouth about your brand.</p>
<h2 id="send-out-referral-codes">Send out Referral Codes</h2>
<p>Today’s customers don’t trust ads anymore. To make the right buying decisions, they ask for their friends and families’ reviews. Above all, they <a href="https://www.inc.com/craig-bloem/84-percent-of-people-trust-online-reviews-as-much-.html">value online reviews as much as personal recommendations</a>.</p>
<p>This is why asking for customer referrals is incredibly important. It gains your customers’ trust and helps you position yourself as a credible online resource. All you need to do is add a unique referral code your customer needs to share with their contacts or social media followers. In return, they will get some of the incentives mentioned above.</p>
<h2 id="promote-new-products">Promote New Products</h2>
<p>One of the most beautiful things about invoices is that people read them carefully. As your recipients’ eyes are glued to your email, why not use it to spread the word about your new product and offer a sneak peek into its features.</p>
<p>The idea behind this tactic is simple - to create buzz around your new products and demonstrate that their experience will be even higher the next time they buy from you.</p>
<p>Sure, this form of brand or product promotion needs to be relevant to the person reading it. Focus on your customers’ previous negative experiences and let them know how your new products can help them solve these problems.</p>
<h2 id="ask-for-feedback">Ask for Feedback</h2>
<p>Your business doesn’t exist in an isolation. To stay competitive and keep your customers happy, you need to tailor it to their needs and expectations. After all, satisfied customers are a reason for your existence.</p>
<p>This is whey collecting customer feedback is important. Now, you’re probably familiar with <a href="https://www.optimonk.com/15-ways-e-commerce-websites-get-customer-feedback/">different tactics of gathering customer feedback</a>, from online surveys to social media reviews. However, did you know you can use your invoices to find out how they feel about you?</p>
<p>All you need to do is post a link to a page where your customers should leave feedback. Provide your email address, phone numbers, and social media links to help reach out to you easily, via multiple platforms.</p>
<p>Pro tip: Customer feedback is an amazing opportunity to take your business to the next level and boost customer relationships. So, whether it’s positive or negative, reply to your customers’ reviews regularly and make sure your answers are polite and professional.</p>
<h2 id="over-to-you">Over to You</h2>
<p>Invoices have always been the backbone of your business. Unlike your promotional email newsletters and ads that may go unnoticed, invoice emails grab your users’ attention and are analyzed thoroughly. This is what makes them a perfect place for your business promotion.</p>
<p>However, keep in mind that your customer doesn’t expect to open the document and see a bunch of ads and links everywhere. This would only hurt their user experience and discourage them from buying from you again.</p>
<p>To keep them satisfied, add your marketing elements subtly. Choose colours that blend with the rest of the page, pick legible fonts, make your text easy to follow and, above all, keep the space clean and decluttered.</p>elainecbennetInvoice emails help you get paid on time for your products and services. They keep your billing processes transparent and build a stronger relationship with your clients. Precisely because of that, many businesses have started using comprehensive invoice templates that make their invoices presentable and professional.
https://i.imgur.com/HTQpW8J.jpg
4 Data Storage Tips for Businesses2019-01-21T11:05:42+00:002019-01-21T11:05:42+00:00https://blog.codecarrot.net/4-data-storage-tips-for-businesses<p>Nowadays, countless businesses deal with various types of data on a daily basis. Modern technology has allowed companies to digitalise their business operations and daily tasks. Today, a paperless office is no longer a possibility but a reality. Companies store information and data in digital format on computers and hard drives. Every piece of essential information regarding a business can easily be found and accessed via company computers.</p>
<p>However, the importance of data dictates that it has to be stored properly. Even so, businesses must create backups of stored data, in order to ensure that their vital information will remain intact even in case of a disaster. Not only that but operating in the digital world also means other threats, such as cybercriminals who are looking to steal information and make profits from it. That’s why proper data storage is crucial for businesses of any size. That being said, here are a few data storage tips for businesses.</p>
<h2 id="understand-your-data">Understand your data</h2>
<p>Companies must make an effort to understand the data they have. That includes setting <a href="https://www.forbes.com/sites/baininsights/2017/07/18/the-business-case-for-prioritizing-the-i-in-it/#40a6983a3636">a priority level</a> for information that circles around the company each day. Determining how data should be stored depends on how important it is and how often it needs to be accessed. For instance, if your employees work with certain data on a daily basis, then it must be stored in a way that makes it easy for them to access it.</p>
<p>It’s important to allow employees freedom of access to information that’s vital for their work. Otherwise, you’re hindering their productivity, especially if they need to seek permission each time they need access to data. On the other hand, data that’s not vital for work but it’s otherwise important in any way, should be stored in a way that limits free access. That way your company ensures that information cannot be lost or misused through effective data management.</p>
<h2 id="always-backup-your-data">Always backup your data</h2>
<p>Aside from proper storage, it’s of the utmost importance for companies to consider data backups. Data backup means you’ll have copies of any essential information stored away for safekeeping. The main reason backups are so important is that they allow companies to protect themselves from any potential threats that may cause loss of information, such as natural disasters, system failure, physical or digital data thefts and so on.</p>
<p>Data backups can be stored on external hard drives that are kept either in-house or in remote locations. Backups can also be stored in the cloud. Even company related data stored on mobile devices deserves a backup if it’s important for the company in any way. You can find some easy-to-follow guides that will show you <a href="https://simplymac.com/starting-mac-backups-with-time-machine-is-easy/">how to backup iPhone</a> and Mac devices step by step, it doesn’t take much effort but it can really help you avoid potential disaster.</p>
<h2 id="consider-moving-to-a-cloud">Consider moving to a cloud</h2>
<p>Today, technology has provided many benefits to businesses when it comes to data storage. From keeping data in digital format to storing vast amounts of information on hard drives, technology has made data storing seamless. As expected, new solutions emerge every time technology advances and today is no different. That being said, companies can now opt for a <a href="https://www.businessnewsdaily.com/6294-benefits-of-online-data-storage.html">cloud-based solution</a> for their data storage.</p>
<p>Cloud services provide additional security and accessibility options aside from storage. As a matter of fact, companies can safely store data in remote data centres also called “the cloud” where their data is safeguarded and encrypted. What’s more, any piece of data or relevant information can easily be accessed from any device and from anywhere in the world. In other words, companies no longer have to rely on in-house solutions when it comes to data storage.</p>
<h2 id="in-house-data-storage">In-house data storage</h2>
<p>As mentioned before, data can be stored on company premises. If you don’t trust cloud solutions or you cannot afford their services, storing data in an old-fashioned way is still a good option. Specialized hardware for <a href="https://www.zdnet.com/article/six-reasons-why-companies-hang-on-to-their-data-centers/">on-premise data storage</a> is still quite common and can be found in many companies today. However, storing data in-house has certain risks. Natural disasters, such as fire, flood, earthquakes and others can potentially destroy company data if kept in-house.</p>
<p>Also, someone can break in and steal information if your building isn’t properly secured. What’s more, hackers can steal your company’s sensitive data through a data breach and wipe any traces of information from existence. These scenarios can potentially ruin the entire company. Therefore, if you decide to store data in-house, make sure you improve security and develop a risk management plan for worse case scenarios. That way, even if something bad were to happen, your company will be able to protect itself and its data.</p>
<p>Data storage is vital for businesses. The main reason is that it allows a company to properly manage information and ensure that data is always safe, as well as available when needed. After all, it’s always better to ensure that any company related information doesn’t get lost, altered, misused or stolen.</p>elainecbennetNowadays, countless businesses deal with various types of data on a daily basis. Modern technology has allowed companies to digitalise their business operations and daily tasks. Today, a paperless office is no longer a possibility but a reality. Companies store information and data in digital format on computers and hard drives. Every piece of essential information regarding a business can easily be found and accessed via company computers.
https://i.imgur.com/EpVpBbe.jpg
Why is font pairing important online?2019-01-15T09:58:48+00:002019-01-15T09:58:48+00:00https://blog.codecarrot.net/why-is-font-pairing-important-online<p><img src="https://i.imgur.com/1RcsHP0.gif" alt="Font combination tool preview" /></p>
<p>It’s vitally important to choose the correct font styles when designing a website, but with over 800 Google fonts alone, and with many, other fonts available to download, the question is where do we start?</p>
<p>The style of font will drastically change the overall look and feel of the website and are just as important as the photography and web page layout.</p>
<p>We begin the process of font selection often based on the customers logo. There font style will determine whether we use a script font like Alex Brush, or a more rounded font style like Open Sans.</p>
<p><img src="https://i.imgur.com/voe8Dv9.jpg" alt="Select the font from font combination tool" /></p>
<p>It’s also best to use a bolder text for your main headings and a smaller slimmer text style for your sub fonts. We recommend using Serif and sans serif, or a bold text with thin.</p>
<p>We created the font combination tool with a selection of 170 different header fonts because we believed that this would give Web Designers a wide variety of styles and option to view.</p>
<p><img src="https://i.imgur.com/Fpcm5RN.jpg" alt="Review the font combinations" /></p>
<p>Each of these main header fonts has 3 sub fonts that are displayed in a webpage format to give clients an idea of what different fonts would work well together. You can also change the text on the screen and put in your own wording, to give a better idea of what your text would look like displayed on your website.</p>
<p>It’s important to remember when selecting a font style for your website to experiment a little with them until you find something that’s just right for your design. What may look amazing for one website, will not look right for another.</p>debbiemorgan
https://i.imgur.com/ioq2OVO.jpg
How to Use Press Release in Telling a Better Brand Story - 10 Sure Tips That Work2018-12-01T11:38:38+00:002018-12-01T11:38:38+00:00https://blog.codecarrot.net/how-to-use-press-release-in-telling-a-better-brand-story<p>Every day, thousands of press releases are distributed via the newswires and publications. However, a lot of them is set up to fail.</p>
<p>Today, releases remain as one of the most misunderstood marketing tools in public relations. Varied controversies are linked to it, claiming that it is no longer useful for gaining media coverage. Many believe that it is already dead.</p>
<p>It can no longer be used for search engine optimization (SEO) tool, and it doesn’t serve any use in gaining backlinks. Are you thinking why it remains as an effective tool for marketers, despite these issues, <a href="https://www.newswire.com/features/distribution">check this out</a> to find out.</p>
<p>The secret lies behind the art of storytelling. Surely, it is a great accompaniment for your content marketing tactics because it helps you tell a better story.</p>
<h2 id="storytelling-in-a-release">Storytelling in a Release</h2>
<p>What do you think is the relevance of a story in your content? Through a release, a brand can tell what is happening in their own company. People, including customers, potential investors and clients, influencers and the media are able to know how a brand develops or evolves through time.</p>
<p>For instance, a potential investor finds that they want to collaborate with you after they found out that in 2012, your company began as a startup. In 2013, your company was awarded as one of the top performers in the industry. In 2014, you introduced a new process and machine that improved the production in the industry.</p>
<p>In 2015, your company collaborated with another multi-awarded brand. After a potential investor saw the stories through your releases, they will be more encouraged to express their partnership with you.</p>
<p>As you see, storytelling makes it easy for brands to announce their offer. With a release, it is also easy for them to attract potential partners in the business, and earn the trust of customers.
If you issue a release only for one time, it would be impossible for you to show these improvements in your business. A release helps tell a story of how your company changes through time.</p>
<blockquote>
<p>Storytelling is a powerful way to inspire, serve and connect with the audience. It enhances relationships, and improves trust.</p>
</blockquote>
<h2 id="a-release-should-be-part-of-your-content-plan">A Release Should Be Part of Your Content Plan</h2>
<p>Releases should be part of your overall content marketing plan. Blogs, articles and releases should be part of your content toolbox. If you want to maximize the effect of your content marketing, use them in conjunction with the other. For example, when you issue a release that is designed to make you a thought leader in your industry, make sure that you issue a blog before and after you sent out your release.</p>
<p>Simply issuing a content isn’t going to be effective. However, when used in combination with other content tools, you can easily achieve your goal to become a credible brand and widen your online presence.</p>
<p>So, how do you use a release to tell a better story?</p>
<h2 id="focus-on-your-target">Focus on your target</h2>
<p>When writing a release, it’s a number one rule to focus on your target media and customers, rather than your own brand. What is the value that you want to share with your audience?</p>
<p>If you focused too much on your brand, you’ll forget how a newsworthy release should be written. You’ll be writing information about your achievements like your collaboration with another big company, or the new product you are introducing. You forget that while highlighting these stories, you need to make your audience feel how they can benefit from it.</p>
<p>In storytelling, make sure that you tell them the benefits that they should be receiving. In writing your story, emphasize the things that they are more likely to get from you.</p>
<h2 id="keep-it-concise">Keep it concise</h2>
<p>When writing your release, present the key facts on point and fast. Offer the key information right in the beginning, including the “who,” “what,” “where,” “when,” “why” and “how” of your story.
Avoid including needless words. Cut the jargons and adjectives. Use a bullet list to present the information in an easy consumable format.</p>
<p>Since journalists only spend less than a minute in a release, make sure to grab their attention at once. When you are able to create a story that appeals to the audience, you can tell a better story.</p>
<h2 id="you-need-to-become-a-better-storyteller">You need to become a better storyteller</h2>
<p>Think outside the box. Rather than including quotes from a company CEO or president, interview a product manager. Ask the manager to share their insights on how effective your product is, what makes it different from the products in the market, the issues it address, or why consumers should try it.</p>
<p>You can include a video that shows how your product is manufactured. Or perhaps, you can show in a video how a consumer uses the product.</p>
<p>You don’t need to stick to the basics. With a modern approach, you can improve how you present the story.</p>
<h2 id="include-interesting-visuals">Include interesting visuals</h2>
<p>Do you know that visuals or multimedia assets can enhance the readability of your content? Having them in your content boost brand awareness, engagement and message of your content.
Some of the visuals that you can include are illustrations, charts, infographics, images and videos. All of these can have a huge impact on how people consume information.</p>
<p>Several studies have shown that having visuals can have a huge effect on the content. With modern technology, audiences are changing how they digest the information.</p>
<p>One research has shown that having visual can improve readership by 650%. Despite the statistics, a lot of PR professionals and writers are just concentrating on text releases.</p>
<h2 id="craft-an-attention-grabbing-headline">Craft an attention-grabbing headline</h2>
<p>With a good headline, you can improve how your audience will perceive your story. Keep it short and concise. It should have the keyword within the first three words of the headline.</p>
<p>Do not include hype, adjectives, buzzwords and industry jargons. Present the key information. Make sure that the message is clear.</p>
<p>Although the main message is in the headline, you need to encourage your audience to keep on reading. Entice them to learn more</p>
<h2 id="include-a-story-arc">Include a story arc</h2>
<p>For your release to be really effective, apply the story arc. Include the classic crisis, climax and resolution.</p>
<p>In your story, think of the issue that your product or service is solving. Prove how it can help solve the problem. Mention the features or its unique selling points. You can also include proofs that can back up your claims like studies.</p>
<h2 id="stand-from-your-audiences-point-of-view">Stand from your audience’s point of view</h2>
<p>In order for you to tell a good story, don’t just focus on your brand. Place yourself in the shoes of the audience.</p>
<p>Think of this way, when a reporter or an audience read your content, they will ask themselves, “What is in for me?” If you are confused on how to answer this question, your story will automatically get ignored.</p>
<p>Think of your audience. What is interesting for them? What excites them? Your audience should be able to relate to your story.</p>
<p>Have you ever thought what makes a story memorable? Actually, it is the story itself.</p>
<p>It also applies in your release. When you write a good story, your audience will not easily forget the message you want to share. It will remain in their mind longer.</p>
<p>For you to do this, make sure that you choose an interesting angle to offer. Make sure that it is relevant and newsworthy. Don’t repeat what has already been published.</p>
<p>Reporters should be able to relate to your story. Your story should be appropriate to their niche or interest. Since they know what their audience is looking for, presenting a story that isn’t relatable is just a complete waste of time.</p>
<p>To come up with related topics for the reporters, research. Find out the story they are working on, the type of stories they write, their voice, and language.</p>
<p>Knowing all these elements can help you craft a story that resonates to the audience. Personalize your story according to the taste of the media. The more personalize your content for them, the more likely they will pick up your story.</p>
<h2 id="make-sure-that-it-is-flawless">Make sure that it is flawless</h2>
<p>A good story has no grammar, spelling and punctuation mistakes. Before sending it to newswire and reporters, run an app to check these elements. You can also ask someone to edit it for you.
Avoid the hype. Do not include exclamation points and bold letters. You don’t need them to highlight something. Exclamation points look like you are shouting to your readers. It is useless and inappropriate. Moreover, using caps lock doesn’t look good too.</p>
<h2 id="frame-the-message">Frame the message</h2>
<p>Before you start crafting your story, think about your target audience. What they are going to get from your product, service or event? If they tried it, what experience they are more likely to get?
Make sure that you include the experience in your content. Make it easy for the readers to visualize and experience your brand, even before they make a buying decision.</p>
<p>Each time you write a release, focus on how you’re going to tell a story than sell your product or service. Present a story arc. Create a catchy and punchy headline that will entice people to read.
Make it easy for your audience to understand it. Use a simple, conversational tone, voice and language.</p>
<p>If you remember all these tips, you will be able to craft a great story that your target can relate to. Apply these guidelines in your next story.</p>fredgriffinEvery day, thousands of press releases are distributed via the newswires and publications. However, a lot of them is set up to fail.
https://i.imgur.com/Zgih19n.jpg
How to Increase Website Traffic by Running an Online Contest2018-11-29T11:14:01+00:002018-11-29T11:14:01+00:00https://blog.codecarrot.net/how-to-increase-website-traffic-by-running-an-online-contest<p>Who said Christmas comes only once a year? Everybody loves presents, right? So, why not use this to our advantage? Namely, I’m talking about running your own online competition to bring about that holiday spirit we all know and love, and share it with your loyal fans and followers. In essence, online contests are not only an excellent way of engaging with your followers, but also an awesome way to boost your traffic, spread brand awareness, and make people happy in general. However, in this post, we’ll focus primarily on how online contests can drive more traffic towards your website; and not just any traffic, but traffic that converts. So, without further ado, let’s delve a little deeper into the art of contest making and see how it can benefit your business.</p>
<h2 id="choose-the-right-contest-type-for-your-target-audience">Choose the Right Contest Type for Your Target Audience</h2>
<p>The first thing you ought to do is pick a contest type that clearly matches your goals. For example, giveaways offer people the chance to win an exciting prize without too much fuss. Usually, all it takes is a like or a share to gain entry and the winner(s) are then chosen randomly. As a result, this method is fantastic at promoting your social media profiles. However, its main downside is that it generates less social buzz than a fully fledged competition. Contests, on the other hand, offer a lot more engagement than giveaways as they actually encourage users to be creative; examples of these include: photo contests, video contests, caption contests, and so on. Moreover, with contests there’s a distinct possibility that your <a href="https://sproutsocial.com/insights/user-generated-content-guide/">user-generated content goes viral</a> overnight, turning your brand into an online sensation for the time being. So, don’t go too heavy on the rules and regulations and instead keep them clear and simple for everyone to adhere to.</p>
<h2 id="create-a-dedicated-landing-page">Create a Dedicated Landing Page</h2>
<p>When people follow a link they expect to see relevant content on the other side, otherwise, they’ll feel like you’ve simply ‘click-baited’ them. If that happens, they’ll pack their bags and leave, and they’ll think twice before trusting your brand like that ever again. To prevent this from happening, you need to create a <a href="https://kickofflabs.com/blog/how-to-attract-more-contest-entries-by-creating-a-dedicated-landing-page/">dedicated landing page</a> for your online contest on your website. There, you can slowly but surely draw in new visitors into your amazing contest by showing them just how cool it really is. Write exciting copy that’ll keep them drooling at the chance to win an awesome prize and greet them with engaging visual content the moment they land on your page. Essentially, this will make your contest the coolest kid on the block and people will share it with their friends and family; and more people equals more traffic.</p>
<h2 id="incentivize-them-with-neat-prizes">Incentivize Them with Neat Prizes</h2>
<p>Now, what’s the point of a contest if there aren’t any prizes worth competing for? In other words, you need to provide your followers with an adequate incentive to make it worth their while. So, consider all the things your target audience would appreciate as an enticing reward and don’t go overboard trying to appeal to everyone. As an example, you can offer them your own products or services free of charge, an all-inclusive vacation package to someplace exotic, or perhaps you could even reward them with cold hard cash in the form of a <a href="https://www.unicard.hk/programs/gift-card">branded Master gift card</a>. That way, you encourage them to spend money on your products and services, potentially turning them into your loyal customers. Also, be sure to announce the end of the contest on your website to get even more exposure, as people will most likely come back to check who won.</p>
<h2 id="strike-while-the-iron-is-hot">Strike While the Iron is Hot</h2>
<p>As Christmas season is just around the corner, this is the most opportune moment to begin your campaign. Holidays, in general, are always a legit cause for celebration, so make sure you capitalize on their festive spirit whenever possible. Likewise, <a href="https://blog.wishpond.com/post/1940/why-you-should-run-your-next-contest-with-a-theme">theme your contests</a> accordingly so they fit the overall mood of the occasion. For example, a spooky costume contest on Halloween, best Christmas tree selfie contest, and so on… you get the idea. Now, apart from the holidays, you can use other occasions such as a hike in sales, company milestones, etc. to run a contest as well. In fact, whenever you feel like your traffic is getting low you can come up with new things to celebrate just to keep the ball rolling.</p>
<h2 id="online-contests-done-right">Online Contests Done Right</h2>
<p>The frozen waffle brand, Eggo, made a brilliant contest on their Facebook page recently where they encouraged people to submit and vote for their favourite waffle recipes. The prize: $10,000. The result: tons of branded user-generated content that was shared over social media and beyond. Dove is yet another brand that knows its customers pretty well, as seen in their fill-in-the-blank photo contest which was a major success. In short, people had to upload a picture of their friend, fill in their name and add two things that made them beautiful. The reward? Becoming the next face of Dove. Hence, they not only succeeded in engaging their audience but also succeeded in effectively <a href="https://www.forbes.com/sites/forbescoachescouncil/2018/01/03/five-simple-and-effective-ways-to-humanize-your-brand-with-social-media/#5e7a58f9a1d0">humanizing their brand</a>.</p>
<p>All in all, it doesn’t end there. Now that you’ve thought of an idea for your contest, you still need to promote it over the internet. Maybe write a few hashtags, create a YouTube video, and get the word out. Let us know how did your online contest go in the comment section below!</p>elainecbennetWho said Christmas comes only once a year? Everybody loves presents, right? So, why not use this to our advantage? Namely, I’m talking about running your own online competition to bring about that holiday spirit we all know and love, and share it with your loyal fans and followers. In essence, online contests are not only an excellent way of engaging with your followers, but also an awesome way to boost your traffic, spread brand awareness, and make people happy in general. However, in this post, we’ll focus primarily on how online contests can drive more traffic towards your website; and not just any traffic, but traffic that converts. So, without further ado, let’s delve a little deeper into the art of contest making and see how it can benefit your business.
https://i.imgur.com/10EMglu.jpg
LogChimp 🐵 A new way to changelog2018-08-20T16:46:31+00:002018-08-20T16:46:31+00:00https://blog.codecarrot.net/logchimp-a-new-way-to-changelog<blockquote>
<p>Keep customers in the loop ➰ about your product with LogChimp.</p>
</blockquote>
<h1 id="description">Description</h1>
<p><a href="https://logchimp.now.sh/">LogChimp</a> by <a href="https://www.codecarrot.net/">CodeCarrot</a> is modern way to create changelog for your product, no need to learn any language or tool to use it, it’s just like publishing a blog.</p>
<p><a href="https://logchimp.now.sh/"><img src="https://i.imgur.com/L9aeRDU.png" alt="LogChimp website screenshot" /></a></p>
<p>At the core it is powered 🌟 by <a href="https://jekyllrb.com">Jekyll</a> and <a href="https://rubygems.org/gems/logchimp">LogChimp default theme</a> and the awesome 👓 part is, it’s free and open-source.</p>
<h1 id="features">Features</h1>
<ul>
<li>🆓 Free and Open Source</li>
<li>🎀 Branding</li>
<li>👨👨👧👧 Team management</li>
<li>🌈 Permalinked changelogs</li>
<li>📂 Markdown supported</li>
<li>📛 Badges</li>
<li>📅 Relative date</li>
<li>🤖 Scheduled publishing</li>
<li>📰 RSS feeds</li>
<li>✅ Tested</li>
<li>🔨 Maintained</li>
<li>✨ more features <em>(coming soon)</em></li>
</ul>
<h1 id="why">Why?</h1>
<p>You must have created a <code class="highlighter-rouge">changelog.md</code> file in your repository which looks quite boring 💤 or the the GitHub releases…</p>
<p><img src="https://i.imgur.com/gz9BnTf.gif" alt="Old way of changelog" /></p>
<p>Now let’s see 😲 how it looks like with LogChimp</p>
<p><a href="https://mittalyashu.gitlab.io/jasper-changelog/"><img src="https://i.imgur.com/BYmQOsY.gif" alt="Jasper Logchimp changelog" /></a></p>
<h1 id="how-to-get-started">How to get started?</h1>
<p>It’s time to ditch <code class="highlighter-rouge">changelog.md</code> files and get started with LogChimp by cloning this repository.</p>
<div class="language-ssh highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="k">git</span> clone https://gitlab.com/codecarrot/logchimp/logchimp-starter-kit
<span class="k">cd</span> logchimp-starter-kit
<span class="k">bundle</span> exec jekyll servegit clone https://gitlab.com/codecarrot/logchimp/starter-kit
</code></pre></div></div>
<p>and you are good to go 🔰.</p>
<h1 id="links">Links</h1>
<ol>
<li><strong>Website:</strong> <a href="https://logchimp.now.sh/">https://logchimp.now.sh/</a></li>
<li><strong>Demo:</strong> <a href="https://mittalyashu.gitlab.io/jasper-changelog/">https://mittalyashu.gitlab.io/jasper-changelog/</a></li>
<li><strong>LogChimp Starter kit:</strong> <a href="https://gitlab.com/codecarrot/logchimp/logchimp-starter-kit">https://gitlab.com/codecarrot/logchimp/logchimp-starter-kit</a></li>
</ol>yashumittalKeep customers in the loop ➰ about your product with LogChimp.
https://i.imgur.com/Tk3Vv21.png
Why Your Website Needs UPI?2018-08-03T07:07:22+00:002018-08-03T07:07:22+00:00https://blog.codecarrot.net/why-you-need-upi-for-your-website<p>Unified Payment Interface (UPI) allows easy and convenient medium of fund transfer between bank accounts in real-time using a virtual payment address <strong>(VPA)</strong> without entering bank details whatsoever. Customers can pay the merchant either using their VPA or by scanning the QR code at the retail stores.</p>
<p>As a result, more and more online retailers and apps are offering UPI payment methods to make financial transactions easier for its customers. UPI is an initiative of the National Payment Corporation of India <strong>(NPCI)</strong> which provides a common library module comprising of the UPI integration programme for the websites and mobile apps.</p>
<h2 id="integrating-upi-in-a-websiteapplication">Integrating UPI in a website/application</h2>
<p>Currently, only the banks can act as Payment Service Providers <strong>(PSPs)</strong> for UPI and hence the first step to integrate UPI in your website/application is to partner or tie up with a bank as a merchant. The banks which are offering the UPI SDK include RBL, ICICI, Yes Bank, and Axis Bank.</p>
<p>Once you have the access to UPI SDK, you just need to add it to your website/application to enable transactions using UPI.</p>
<h2 id="benefits-of-integrating-upi-in-apps">Benefits of integrating UPI in apps</h2>
<p>Though NPCI has set UPI specifications only for the Android phones, soon iOS and Windows based mobiles will also be able to download UPI based apps. Some of the benefits for the applications for integrating UPI include:</p>
<ol>
<li><strong>Instant transfers</strong></li>
</ol>
<p>Considering that UPI also works in real-time and transfers funds immediately without revealing the bank account details to the payee. Undoubtedly, it has become one of the most used payment modes other than the debit/credit cards. Integrating UPI will add another payment mode to your app which attracts users, as the more payment options an app has, the better it is for the users.</p>
<ol>
<li><strong>Negligible charges</strong></li>
</ol>
<p>Moreover, as compared to the other payment methods like NEFT and IMPS, UPI does not charge anything. So, integrating your app with UPI gives your users a free of charge payment method.</p>
<ol>
<li><strong>More secure</strong></li>
</ol>
<p>Further, as paying through UPI does not require users to enter their bank account and card details for making payments, it is definitely a more secure mode of payment. So, if your app offers payments through UPI, the users can make quick and easy payments without having to load their e-wallet or enter bank details.</p>
<p>UPI is being considered as an incredibly well-designed payment solution as compared to all the other payment mediums. Integrating UPI in your website/application would surely attract more users as it is a convenient and a preferred payment mode.</p>yashumittalUnified Payment Interface (UPI) allows easy and convenient medium of fund transfer between bank accounts in real-time using a virtual payment address (VPA) without entering bank details whatsoever. Customers can pay the merchant either using their VPA or by scanning the QR code at the retail stores.
https://i.imgur.com/E0nIdlV.jpg
How to add a class name or id to an image tag inside a markdown file?2018-07-05T18:18:59+00:002018-07-05T18:18:59+00:00https://blog.codecarrot.net/add-class-id-to-image-tag-in-markdown<p>When you want to add class name or id to an image tag inside a markdown file, you always have to use <code class="highlighter-rouge">HTML</code> to make it work.</p>
<p>For example:</p>
<div class="language-html highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="nt"><img</span> <span class="na">src=</span><span class="s">"https://www.codecarrot.net/images/favicon.png"</span> <span class="na">alt=</span><span class="s">"Image"</span> <span class="na">class=</span><span class="s">"className"</span> <span class="nt">/></span>
</code></pre></div></div>
<p>But that’s not the case now.</p>
<p>When I started using Jekyll a year ago, there was this question always bugging me <em>“How to add class name or id to an image tag inside a markdown file?”</em></p>
<p>A year later, when I was working on a new open source theme called <a href="https://gitlab.com/mittalyashu/jasper">Jasper</a> 👻, the same question strikes again.</p>
<p>And after an hour’s of searching the web, reading the documentation and talking to the people in different communities.</p>
<p>This time I nailed it down.</p>
<p>Here’s the solution:</p>
<h3 id="add-a-class-name">Add a Class Name</h3>
<div class="language-markdown highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="p">![</span><span class="nv">Image</span><span class="p">](</span><span class="sx">https://www.codecarrot.net/images/favicon.png</span><span class="p">)</span>{:.className}
</code></pre></div></div>
<h3 id="add-an-id">Add an Id</h3>
<div class="language-markdown highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="p">![</span><span class="nv">Image</span><span class="p">](</span><span class="sx">https://www.codecarrot.net/images/favicon.png</span><span class="p">)</span>{:#id}
</code></pre></div></div>yashumittalWhen you want to add class name or id to an image tag inside a markdown file, you always have to use HTML to make it work.
https://i.imgur.com/pbt6G5N.jpg
How Google Makes Improvements To Its Search Algorithm?2018-06-20T06:51:02+00:002018-06-20T06:51:02+00:00https://blog.codecarrot.net/google-search-algorithm<p>Here’s a short video Google has put together that gives you a sense of the work that goes into the changes and improvements that Google do almost every day. While an improvement to the algorithm may start with a creative idea, it always goes through a process of rigorous scientific testing.</p>
<iframe width="100%" height="315" src="https://www.youtube.com/embed/J5RZOU6vK4Q?rel=0" frameborder="0" allow="autoplay; encrypted-media" allowfullscreen=""></iframe>yashumittalHere’s a short video Google has put together that gives you a sense of the work that goes into the changes and improvements that Google do almost every day. While an improvement to the algorithm may start with a creative idea, it always goes through a process of rigorous scientific testing.
https://i.imgur.com/fkkVqsF.jpg
Why Is Vue.js Gaining 🔥 Heat These Days?2018-06-18T05:47:11+00:002018-06-18T05:47:11+00:00https://blog.codecarrot.net/why-is-vuejs-gaining-heat-these-days<p>Vue.js has released 1 year after react.js and still, it has completed in the terms of stars and believe me or not in past few days it is one of the trending repositories on GitHub Trends.</p>
<p><img src="https://i.imgur.com/wwVwsqZ.png" alt="Comparising between Vue and React Github stars" /></p>
<p><strong>That’s not all</strong></p>
<p>Both Vue and React, shares lot of similarities</p>
<ul>
<li>Allow you to use JSX</li>
<li>Use some version of Javascript</li>
<li>Support TypeScript and Flow</li>
<li>Rich front-end experience in the user interface</li>
<li>They both utilize Virtual DOM</li>
<li>There are many extensive development tools available for Vue and React</li>
<li>Finding Vue developers wouldn’t be difficult</li>
</ul>
<p>In my experience, Vue introduces you to the concepts more gently. The default templating feels similar to Angular, with it’s <code class="highlighter-rouge">v-</code> directives. Building your components using the <code class="highlighter-rouge">Vue</code> object will feel familiar if you have experience with Ember, Backbone or similar MV frameworks.</p>
<p>React is definitely more simple. It provides only what’s necessary and gives you (nearly) complete freedom over how you use it. But that simplicity can sometimes be frustrating if you’re looking for guidance on the right way to do something. Vue is slightly more opinionated, but I’ve felt that its opinions help guide towards doing things the right way, which can allow you to be more productive in the long run. Plus the Vue documentation has always been great; very clear and easy to understand! Though React’s documentation has improved a lot recently.</p>
<p>All that said, I’m not sure I have an opinion on which is better but Vue definitely deserves the popularity it’s gained. To me, it feels like the better tool if the visual design of your app is more complex. When you’re focusing on markup and styling, having everything in one <code class="highlighter-rouge">.vue</code> file is a great experience!</p>
<p>Still, you can certainly accomplish all the same things with React. With Vue, you get a few more things out of the box and a bit more guidance and structure. Personally, there are times when I value that structure more than the freedom I get from React.</p>
<p>What do you think about this, let me know in the comment section below?</p>
<p>Continue the discussion on <a href="https://spectrum.chat/?t=7c51868a-a940-41d9-b618-a5d5837f9654">Spectrum</a>.</p>yashumittalVue.js has released 1 year after react.js and still, it has completed in the terms of stars and believe me or not in past few days it is one of the trending repositories on GitHub Trends.
https://i.imgur.com/rG85ckS.jpg
5 Kind of Bugs Every Programmer Faces During Coding2018-05-23T10:19:12+00:002018-05-23T10:19:12+00:00https://blog.codecarrot.net/5-kind-of-bugs-every-programmer-faces-during-coding<p>As a programmer, you have to expect bugs. In simple terms, <strong>a bug can be defined as an error in a program</strong>. During the coding of a program, we often make some mistakes. These mistakes showcase themselves as bugs in your code. Writing a code is the easy part. The hard step is the debugging <em>(searching for the errors or bugs in a program)</em>. And it can get especially frustrating in situations where you create more bugs instead of fixing the current one. If you haven’t encountered the following bugs, you should expect them any time soon:</p>
<h2 id="1-tiny-bugs">1. Tiny Bugs</h2>
<p>These types of bugs may be miniature, but dealing with them is no easy task. You will receive compiler errors, and then spend hours, or even days trying to figure out where you went wrong. Such bugs include forgetting that little semicolon or bracket. In a programming language like Python, you can face trouble when indentation is wrongly done. Tiny bugs can be spotted when using the right IDEs. Little errors are the most annoying of them all because you know they can be easily fixed, yet, you spent so much time trying to locate them.</p>
<h2 id="2-non-existent-bugs">2. Non-existent Bugs</h2>
<p>This type of bugs doesn’t even exist. Yet, you are getting compiler errors. These may happen when you use a wrong or malfunctioning compiler. You may start to see errors when there are none. Old compilers may not support recent changes. You should also update your compiler as often as possible. A piece of advice; choose your compiler with more care than you will choose a life partner. Sometimes, your code may run perfectly, but you could get errors after a compiler update. This means the compiler simply showed you the existent bugs which couldn’t be detected before.</p>
<h2 id="3-big-bugs">3. Big Bugs</h2>
<p>You get this when you make syntax errors or spelling mistakes. Such also appear from arithmetic, logic or resource errors. Resource faults can include using a wrong data type and access violations. Every programming language has its own syntax, which should be followed meticulously. A mild deviation from what is expected could ruin everything. Luckily, a good compiler could spot such errors. It will then be left for you to fix it.</p>
<h2 id="4-hidden-bugs">4. Hidden bugs</h2>
<p>Such bugs never show themselves in the compiler. It is only after the software is installed and in use would you start seeing their manifestations. There will be crashes and unexpected behavior. In most cases, hidden bugs are in the form of vulnerabilities which render the software insecure and prone to hacking.</p>
<h2 id="5-surprise-bugs">5. Surprise bugs</h2>
<p>Surprise bugs appear out of nowhere. Your code may run flawlessly today. Somehow, it won’t work well the next day. It will leave you wondering whether someone messed with your code while you were sleeping.</p>
<p>With more time coding, you get better at debugging. Some bugs can be fixed in 5 seconds. Others can be fixed in 5 days. And there are some bugs which you may never fix, sadly. Recall that you can create 5 bugs while trying to fix two. If your code works, you probably shouldn’t touch it.</p>yashumittalAs a programmer, you have to expect bugs. In simple terms, a bug can be defined as an error in a program. During the coding of a program, we often make some mistakes. These mistakes showcase themselves as bugs in your code. Writing a code is the easy part. The hard step is the debugging (searching for the errors or bugs in a program). And it can get especially frustrating in situations where you create more bugs instead of fixing the current one. If you haven’t encountered the following bugs, you should expect them any time soon:
https://i.imgur.com/e3xBjyS.jpg
How to Save People From Getting Lost on Your Website2018-04-16T12:21:36+00:002018-04-16T12:21:36+00:00https://blog.codecarrot.net/how-to-save-people-from-getting-lost-on-your-website<p>Have you ever visited a website, only to leave it because you couldn’t easily find what you were looking for? It’s highly likely, and you’re not alone. Over <a href="/what-do-76-of-consumers-want-from-your-website">75% of consumers feel the most important factor in a website’s design</a>, is that the website makes it easy for them to find what they want.</p>
<p>To put it bluntly, a website that is difficult to navigate, will ultimately cost you customers. At best, users will lose interest and abandon. At worst, it may damage your credibility, causing them to never return. Either way, your bottom line will suffer as a result.</p>
<p><strong>But how do you know what is happening on your website?</strong></p>
<p>Here, we show you how to assess the usability of your site and identify whether, and where, people are getting lost. Then we look at how you can use that data to refine your website structure and navigation, allowing you to give users what they want, and boost conversions.</p>
<h2 id="assess-your-website">Assess your website</h2>
<p>To uncover whether your website is effectively converting visitors, or sending them to your competition, you need to examine how they interact with it. There are <a href="/make-decisions-not-guesses-how-web-data-analytics-can-drive-your-digital-product-development">several methods available to assess your website’s usability</a>, each with varying levels of cost and complexity. Let’s take a look at some of them:</p>
<p><strong>Site search data</strong></p>
<p>A good place to start, is examining the data from your website search feature. If your search function is highly used, this can be indicative that your navigation is not clear and people can’t easily find what they are looking for. This is particularly relevant for e-commerce sites.</p>
<p><strong>Google Analytics</strong></p>
<p><a href="https://analytics.google.com/">Google Analytics</a> can be a treasure trove of information and is a great free tool.</p>
<p>Looking at ‘Behaviour Flow’ can highlight visitors moving through your site via a path you wouldn’t expect. This could indicate that your navigation is misleading, or that users are struggling to find what they are looking for.</p>
<p>‘Exit pages’ shows you the percentage of visitors leaving from a particular page. Whether a high exit rate is a cause for concern, depends on the particular page. For example, you would expect your ‘checkout complete’ page to have a high exit rate, as this means that people have simply achieved what they came for and left. However, if you are losing visitors on your product or services pages, this could indicate a potential problem and would warrant further investigation to find out why.</p>
<p>While Google Analytics can tell you a lot about what people are doing on your site, it can’t give you the complete picture, so is best used with other methods of <a href="/knowledge-is-power-harnessing-desk-research-to-boost-your-business">user research</a>.</p>
<p><strong>Hotjar</strong></p>
<p><a href="https://www.hotjar.com/">Hotjar</a> is an analytics and feedback tool that allows you to measure and observe user behaviour on your site, in order to improve its performance and experience.</p>
<p>Heatmaps; a visual representation of users’ clicks, tap and scrolling behaviour, can help you to understand what users do on your site, and what they want.</p>
<p>Visitor recordings can show you individual users’ mouse movements, clicks and taps and is great for quickly highlighting usability issues.</p>
<p><strong>Survey users</strong></p>
<p>Don’t be afraid to ask users what they want directly. You can find out where they are struggling or what is standing in the way of a conversion. An easy way to do this is via the use of chat and bots, for example with a platform like <a href="http://www.drift.com/">Drift</a>. Hotjar also offers a polls and surveys feature.</p>
<p><strong>Cognitive walkthrough</strong></p>
<p>A cognitive walkthrough involves defining a set of tasks that you would expect a user to complete on your website, then having an evaluator work through them from the perspective of the user.
The focus is to gain a better understanding of your website’s learnability for new users, and identify any usability issues.</p>
<p>This method can be quick and cost effective, but be sure to make your evaluator someone who is not already familiar with your system and company jargon, as they may miss issues that a user would experience.</p>
<p><strong>Heuristic evaluation</strong></p>
<p>One of the most involved methods of testing your website for usability, is to conduct a heuristic evaluation. Usability experts will compare your site to a set of predetermined heuristics, or best practice rules of thumb, and highlight any issues in relation to user experience.</p>
<p>It is recommended to use at least three experts to maximise the effectiveness of the review. This can mean that it is beyond the in-house capabilities of many companies and outside assistance may be beneficial.</p>
<p><a href="/how-various-types-of-expert-evaluation-can-increase-your-website-effectiveness">Check out other expert evaluation methods.</a></p>
<h2 id="putting-your-analysis-to-work">Putting your analysis to work</h2>
<p>Once you have completed the process of assessing your website, you should know the areas that are causing problems for your users, and be more in touch with what they want.</p>
<p>Use this information to plan the necessary changes to your site. Your analysis should allow you to make your solutions laser accurate and bespoke to the needs of your users.</p>
<p>Whilst the specific solutions may be different for each website, there are some overriding principles that will help you create an effective structure and navigation. Bear these in mind as you work through any changes:</p>
<p><strong><a href="/fix-the-unnecessary-complexity-of-your-product-and-simplify-user-experience">Keep it simple.</a></strong> Everything on your site should lead users logically through the journey you want them to take. Keep navigation menus as simple as possible and limit the number of options to avoid indecision or confusion.</p>
<p><strong>Minimise distractions.</strong> The more pages you include in the user’s journey through your sales funnel, the more likely you are to see a drop off. Remove pages that do not add value.</p>
<p><strong>Do not overload users with information.</strong> On each page, only include what is essential. Use a clear call to action so users know exactly what you want them to do next.</p>
<p><strong>Meet user expectations.</strong> Most websites adopt a similar layout, for example placing the main navigation at the top of the page. Users know this and expect to find it there. Keep your navigation familiar and intuitive.</p>
<p><strong>Provide a good search function.</strong> While some users like to browse their way through a website, some prefer to search for what they want and be taken straight there. Make sure that your search feature is easily accessible throughout the site and that it produces relevant results.</p>
<p><strong>Make use of colour.</strong> Use the visual design of your website to create emphasis on the important elements of your webpage, such as your main navigation and your call to action. Also use white space to create a simple layout, and avoid overloading the user.</p>
<h2 id="the-role-of-information-architecture">The role of information architecture</h2>
<p>Refining information architecture is the key to improving user experience, and increasing the likelihood of converting users into customers.</p>
<p>The goal of information architecture in web design, is to structure and organise the information on your website in a clear and logical way. This means that users should always understand where they are currently within your site, and where to find the information they want.</p>
<p>When making any changes to the way users navigate through your website, keep in mind existing users who will already have developed habits and intuition based on its current design. If existing users are important from a business standpoint, take steps to ensure that they are not lost in the refined structure.</p>
<p>Give thought to your content as you make changes. Structure and content cannot live independently, so adapting your content to the refined structure may be important. The reverse is also true; structure should reflect the actual content.</p>
<p><a href="https://www.codecarrot.net/services/ux-design">Check out our UX services</a>.</p>
<h2 id="summary"><strong>Summary</strong></h2>
<p>There is little doubt that user experience directly affects conversions. Having a website that is poorly structured or difficult to navigate will frustrate users and ultimately cost you customers.
It is therefore critical to assess the usability of your site, and develop a strong understanding of what your users want.</p>
<p>Use the findings of your assessment to guide the design of your website, keeping it simple, intuitive, and easy to use. When making any changes, ensure that content matches the structure, and vice-versa.</p>yashumittalHave you ever visited a website, only to leave it because you couldn’t easily find what you were looking for? It’s highly likely, and you’re not alone. Over 75% of consumers feel the most important factor in a website’s design, is that the website makes it easy for them to find what they want.
https://i.imgur.com/LAhhOw6.jpg
Types of dependencies2018-04-09T13:03:39+00:002018-04-09T13:03:39+00:00https://blog.codecarrot.net/types-of-dependencies<p>Dependencies serve many different purposes. Some dependencies are needed to build your project, others are needed when you’re running your program. As such there are a number of different types of dependencies that you can have (e.g. <code class="highlighter-rouge">dependencies</code>, <code class="highlighter-rouge">devDependencies</code>, and <code class="highlighter-rouge">peerDependencies</code>).</p>
<p>Your <code class="highlighter-rouge">package.json</code> will contain all of these dependencies:</p>
<div class="language-json highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="p">{</span><span class="w">
</span><span class="nl">"name"</span><span class="p">:</span><span class="w"> </span><span class="s2">"my-project"</span><span class="p">,</span><span class="w">
</span><span class="nl">"dependencies"</span><span class="p">:</span><span class="w"> </span><span class="p">{</span><span class="w">
</span><span class="nl">"package-a"</span><span class="p">:</span><span class="w"> </span><span class="s2">"^1.0.0"</span><span class="w">
</span><span class="p">},</span><span class="w">
</span><span class="nl">"devDependencies"</span><span class="p">:</span><span class="w"> </span><span class="p">{</span><span class="w">
</span><span class="nl">"package-b"</span><span class="p">:</span><span class="w"> </span><span class="s2">"^1.2.1"</span><span class="w">
</span><span class="p">},</span><span class="w">
</span><span class="nl">"peerDependencies"</span><span class="p">:</span><span class="w"> </span><span class="p">{</span><span class="w">
</span><span class="nl">"package-c"</span><span class="p">:</span><span class="w"> </span><span class="s2">"^2.5.4"</span><span class="w">
</span><span class="p">},</span><span class="w">
</span><span class="nl">"optionalDependencies"</span><span class="p">:</span><span class="w"> </span><span class="p">{</span><span class="w">
</span><span class="nl">"package-d"</span><span class="p">:</span><span class="w"> </span><span class="s2">"^3.1.0"</span><span class="w">
</span><span class="p">}</span><span class="w">
</span><span class="p">}</span><span class="w">
</span></code></pre></div></div>
<p>Most people only have <code class="highlighter-rouge">dependencies</code> and <code class="highlighter-rouge">devDependencies</code>, but each of these are important to understand.</p>
<h3 id="dependencies">dependencies</h3>
<p>These are your normal dependencies, or rather ones that you need when running your code <em>(e.g. React or ImmutableJS)</em>.</p>
<h3 id="devdependencies">devDependencies</h3>
<p>These are your development dependencies. Dependencies that you need at some point in the development workflow but not while running your code <em>(e.g. Babel or Flow)</em>.</p>
<h3 id="peerdependencies">peerDependencies</h3>
<p>Peer dependencies are a special type of dependency that would only ever come up if you were publishing your own package.</p>
<p>Having a peer dependency means that your package needs a dependency that is the same exact dependency as the person installing your package. This is useful for packages like <code class="highlighter-rouge">react</code> that need to have a single copy of <code class="highlighter-rouge">react-dom</code> that is also used by the person installing it.</p>
<h3 id="optionaldependencies">optionalDependencies</h3>
<p>Optional dependencies are just that: optional. If they fail to install, Yarn will still say the install process was successful.</p>
<p>This is useful for dependencies that won’t necessarily work on every machine and you have a fallback plan in case they are not installed (e.g. Watchman).</p>
<h3 id="bundleddependencies">bundledDependencies</h3>
<p>Array of package names that will be bundled when publishing the package.</p>
<p>Bundled dependencies should be inside your project. The functionality is basically the same as normal dependencies. They will also be packed when running <code class="highlighter-rouge">yarn pack</code>.</p>
<p>Normal dependencies are usually installed from the npm registry. Bundled dependencies are useful in cases normal dependencies are not sufficient:</p>
<ul>
<li>When you want to re-use a third party library that doesn’t come from the npm registry or that was modified.</li>
<li>When you want to re-use your own projects as modules.</li>
<li>When you want to distribute some files with your module.</li>
</ul>yashumittalDependencies serve many different purposes. Some dependencies are needed to build your project, others are needed when you’re running your program. As such there are a number of different types of dependencies that you can have (e.g. dependencies, devDependencies, and peerDependencies).
https://i.imgur.com/PjIYzyi.jpg
5 Useful Tips For A Better Commit Message2018-04-08T06:14:13+00:002018-04-08T06:14:13+00:00https://blog.codecarrot.net/5-useful-tips-for-a-better-commit-message<p>You’re already writing decent commit messages. Let’s see if we can level you up to awesome. Other developers, especially you-in-two-weeks and you-from-next-year, will thank you for your forethought and verbosity when they run <code class="highlighter-rouge">git blame</code> to see why that conditional is there.</p>
<ol>
<li>The first line should always be <a href="http://stopwritingramblingcommitmessages.com/">50 characters or less</a> and that it should be followed by a blank line. Vim ships with syntax, indent, and filetype plugins for Git commits which can help here.</li>
<li>Add this line to your <code class="highlighter-rouge">~/.vimrc</code> to add spell checking and automatic wrapping at the recommended 72 columns to you commit messages.
<code class="highlighter-rouge">autocmd Filetype gitcommit setlocal spell textwidth=72</code></li>
<li>Never use the <code class="highlighter-rouge">-m <msg></code> / <code class="highlighter-rouge">--message=<msg></code> flag to <code class="highlighter-rouge">git commit</code>.</li>
</ol>
<p>It gives you a poor mindset right off the bat as you will feel that you have to fit your commit message into the terminal command, and makes the commit feel more like a one-off argument than a page in history:</p>
<p><code class="highlighter-rouge">git commit -m "Fix login bug"</code></p>
<p>A more useful commit message might be:</p>
<div class="highlighter-rouge"><div class="highlight"><pre class="highlight"><code>Redirect user to the requested page after login
https://trello.com/path/to/relevant/card
Users were being redirected to the home page after login, which is less
useful than redirecting to the page they had originally requested before
being redirected to the login form.
* Store requested path in a session variable
* Redirect to the stored location after successfully logging in the user
</code></pre></div></div>
<ol>
<li>
<p>Answer the following questions:</p>
<ol>
<li>
<p><strong>Why is this change necessary?</strong>
This question tells <a href="https://codecarrot.gitbook.io/guides/code-review">reviewers of your pull request</a> what to expect in the commit, allowing them to more easily identify and point out unrelated changes.</p>
</li>
<li>
<p><strong>How does it address the issue?</strong>
Describe, at a high level, what was done to affect change. <code class="highlighter-rouge">Introduce a red/black tree to increase search speed</code> or <code class="highlighter-rouge">Remove <troublesome gem X>, which was causing <specific description of issue introduced by gem></code>are good examples.
If your change is obvious, you may be able to omit addressing this question.</p>
</li>
<li>
<p><strong>What side effects does this change have?</strong>
This is the most important question to answer, as it can point out problems where you are making too many changes in one commit or branch. One or two bullet points for related changes may be okay, but five or six are likely indicators of a commit that is doing too many things.
Your team should have guidelines and rules-of-thumb for how much can be done in a single commit/branch.</p>
</li>
</ol>
</li>
<li>
<p>Consider making including a link to the issue/story/card in the commit message a standard for your project. Full urls are more useful than issue numbers, as they are more permanent and avoid confusion over which issue tracker it references.</p>
</li>
</ol>
<p>This is generally done as the first paragraph after the summary, on line 3.</p>
<p><img src="https://i.imgur.com/2kiIOFX.png" alt="git" /></p>
<p>Having a story in your git log will make a huge difference in how you and others perceive your project. By taking great care in commit messages, as you do in your code, you will help to increase overall quality.</p>yashumittalYou’re already writing decent commit messages. Let’s see if we can level you up to awesome. Other developers, especially you-in-two-weeks and you-from-next-year, will thank you for your forethought and verbosity when they run git blame to see why that conditional is there.
https://i.imgur.com/2kiIOFX.png
What is the difference between asynchronous and synchronous?2018-04-06T10:01:20+00:002018-04-06T10:01:20+00:00https://blog.codecarrot.net/what-is-the-difference-between-asynchronous-and-synchronous<p>In programming, synchronous means that the requester is blocked (unable to do anything else) until a response is returned; asynchronous refers to the fact that the requester makes the request, moves on to other tasks, and be notified when a response is ready.</p>
<p>Suppose you go to a restaurant and find out that no seat is immediately available. If the restaurant asks you to sit there until seats are available, this is “synchronous”;</p>
<p><img src="https://i.imgur.com/OJq4fWK.gif" alt="synchronous" /></p>
<p>if you are given a device which vibrates with flashing lights when your seats are ready, and you are free to roam around while you wait, this scenario is “asynchronous”.</p>
<p><img src="https://i.imgur.com/ntejuMZ.gif" alt="asynchronous" /></p>
<p>A software application usually chooses the asynchronous approach to improve user experience. In our restaurant example, your wait time does not differ whether you wait there or not, but that 20 minutes wait feels more tolerable when you are given the freedom to roam around.</p>
<p>One of the greatest Internet browser features was the adoption of asynchronous paradigm. In the beginning of Internet, a webpage is a reflection of a file on the server. Loading a webpage requires the browser to completely download that file, and then present it on the user’s screen.</p>
<p>This changed with AJAX, or “asynchronous javascript and XML”, where someone recognizes that a webpage can contain many many smaller elements, and each individual element can be retrieved in the background, with the browser presents the elements asynchronously as they come in. The result is a much better user experience, and that makes all the modern web sites such as <a href="https://www.facebook.com/codecarrotinc">Facebook</a> or <a href="https://www.twitter.com/codecarrotnet">Twitter</a> possible.</p>yashumittalIn programming, synchronous means that the requester is blocked (unable to do anything else) until a response is returned; asynchronous refers to the fact that the requester makes the request, moves on to other tasks, and be notified when a response is ready.
https://i.imgur.com/2a4ZiSN.png
10 Tips To Make Your Users Engaged Till They Pay On Your Website2018-04-05T18:35:20+00:002018-04-05T18:35:20+00:00https://blog.codecarrot.net/10-tips-to-make-your-users-engaged-till-they-pay-on-your-website<p>There is a direct correlation between the amount of time someone spends on your website, and the likelihood that they will take a desired action – the action that is often hidden behind this shiny “Purchase” or “Register” button. Usually, the more engaged they are, the greater the chance that they will register, sign-up, or make a purchase. If you are able to provide a better user experience and keep your visitors engaged, you will be able to increase the conversion, and ultimately, grow your business.</p>
<p>The question is, in a world of increasing competition and dwindling attention spans, how do you <a href="/quality-content-to-boost-sales-and-improve-ux">keep users engaged on your website</a>?</p>
<p>Use the following ten actionable tips to boost engagement, and turn more visitors into customers.</p>
<h2 id="1-get-the-basics-right">1. Get the basics right</h2>
<p>With users becoming increasingly impatient, any flaws in your website’s usability will lead to missed opportunities to convert potential customers.</p>
<p>Pay attention to the basics such as the site speed and your navigation structure. Users aren’t going to stay long on a website that is too slow, complicated or unclear. <a href="/fix-the-unnecessary-complexity-of-your-product-and-simplify-user-experience">Make it easy for them to quickly find what they are looking for</a>, and lead them to the action you want them to take.</p>
<p>Also, consider how mobile friendly your website is. The fact that well over 50% of all users are now accessing the internet via mobile devices, presents both an opportunity and a challenge. On one hand, you are closer to them, on the other – engagement tends to be lower among mobile users. This means that a responsive design is now more important than ever in order to provide the best possible user experience, maintain engagement, and drive conversions.</p>
<h2 id="2-make-sure-users-understand-your-offer">2. Make sure users understand your offer</h2>
<p>It may sound obvious, but to convert users into customers, they need to be able to clearly understand what you are offering and how it will benefit them.</p>
<p><a href="/how-various-types-of-expert-evaluation-can-increase-your-website-effectiveness">Invest time in getting to know exactly who your target audience is, and communicate directly to them</a>. Understand what they want to know, and <strong>use the same language</strong> and level of terminology they use, avoiding jargon and marketing speak. Remember that they may not share the excitement and visionary way you are talking about your product – it needs to hit their needs as simply as possible.</p>
<h2 id="3-communicate-value">3. Communicate value</h2>
<p>For a user to commit to buying a product or service from you as opposed to someone else, you need to present a clear and strong <strong>value proposition</strong>.</p>
<p>Drill down into the wants and needs of your potential customers and show them how your product or service can solve their problem. Highlight what is special about it, but also provide enough quantifiable, credible information that users can draw their own conclusions as to its value.
Providing proof, such as verifiable facts and data, or customer testimonials, not only helps users to see how your product or service could work for them, but also builds trust they have for your solution and brand.</p>
<h2 id="4-tell-a-story">4. Tell a story</h2>
<p>Use storytelling to develop an <strong>emotional connection</strong> with potential customers and get them excited about what you have to offer.</p>
<p>For storytelling to be effective, you need to tap into the needs and emotions of your users and give them a solution to their problem using a story they can identify with.</p>
<p>Using the experiences and successes of existing customers can be a great way to inspire new customers.</p>
<p>Don’t just rely on words either. Images and videos are a fantastic way of capturing your users’ imaginations.</p>
<h2 id="5-inspire-confidence">5. Inspire confidence</h2>
<p>Would you give your information to an unprofessional looking website, or one that was littered with spelling and grammatical errors? Probably not, and neither would your users.
Building trust is an important part of increasing conversions. Fortunately, there are a few, simple things you can do to convey your professionalism and give your website credibility:</p>
<ul>
<li><strong>Allay users’ fears about the security</strong> of their information by using a security certificate and displaying the SSL and padlock symbol. Also, have a link to your privacy policy clearly visible in the footer of every page.</li>
<li><strong>Provide contact details</strong>, such as a physical address and phone number, plus photos of your offices or team, to show them that there is a real company behind your website.</li>
<li><strong>Invest in a website that looks professional</strong>, with good quality images and well written copy. Be especially careful to eliminate any errors, such as spelling and grammar, or broken links.</li>
</ul>
<h2 id="6-provide-the-payment-methods-your-customers-want-to-use">6. Provide the payment methods your customers want to use</h2>
<p>Make buying from you as easy as possible. As your customers reach the checkout, make multiple payment methods available, and offer them the payment methods they will want to use.
In some countries for example, PayPal is not commonly used. In others however, it may be preferred.</p>
<p><strong>See also:</strong> <a href="/knowledge-is-power.-harnessing-desk-research-to-boost-your-business">Knowledge is Power. Harnessing Desk Research to Boost Your Business</a></p>
<h2 id="7-use-gradual-engagement">7. Use gradual engagement</h2>
<p>While it may be tempting to send your users to a registration or sales page as soon as possible, using gradual engagement and slowly building a relationship with your visitors, can yield better results in the long run.</p>
<p>Gradual engagement involves giving users some value upfront, allowing them to see the benefits of your product or service, before asking them to sign up or register. At some point, they fall into an engagement trap, a situation when they have already invested a lot into the process so far that they will not want to lose it – and thus they will register. A good example of this, is the hotel booking websites that allow you to search for deals, before requiring you to create an account.</p>
<h2 id="8-support-returning-visitors">8. Support returning visitors</h2>
<p>Recognising and supporting returning visitors to your site massively improves user experience, which in turn increases engagement.</p>
<p>Using a chat module such as <a href="http://www.drift.com/">Drift</a> or Intercom, is a cost effective way of picking up the conversation and quickly providing answers to questions that may be standing in the way of a conversion.</p>
<p>Storing cookies to save the work a visitor has already done is another great way of improving user experience, for example, saving a partially completed insurance form.</p>
<h2 id="9-keep-the-conversation-alive">9. Keep the conversation alive</h2>
<p>Continue to strengthen your relationship with your users and keep them engaged, even when they are away. Send emails to keep your service visible and alive in the minds of your visitors.</p>
<p>A good approach when doing this is humanising your communication with personalisation, for example by having your CEO sign off mailings.</p>
<h2 id="10-leave-the-door-open">10. Leave the door open</h2>
<p>Finally, always communicate your openness to your visitors coming back. You may not have converted them this time, but leaving the relationship on a good note may encourage them to return in the future.</p>
<p>For customers who may be coming to the end of their time with you, show you appreciate their business and reward their loyalty, for example by offering a discount for renewal.</p>
<h2 id="summary">Summary</h2>
<p>At a time where competition is rising and users are becoming increasingly impatient, we must take every advantage of the opportunity to convert visitors into customers.</p>
<p><a href="/make-decisions-not-guesses-how-web-data-analytics-can-drive-your-digital-product-development">Invest in really understanding your target audience and use that information to communicate with them effectively</a>. At the same time, make it as easy as possible for potential customers to take your desired action, by removing both the physical and mental barriers to doing so.</p>
<p>A focus towards keeping your visitors better engaged and improving <a href="https://www.codecarrot.net/services/ux-design">user experience</a>, will undoubtedly see your conversions rise and your business grow.</p>yashumittalThere is a direct correlation between the amount of time someone spends on your website, and the likelihood that they will take a desired action – the action that is often hidden behind this shiny “Purchase” or “Register” button. Usually, the more engaged they are, the greater the chance that they will register, sign-up, or make a purchase. If you are able to provide a better user experience and keep your visitors engaged, you will be able to increase the conversion, and ultimately, grow your business.
https://i.imgur.com/7o5biHN.jpg
Fix the Unnecessary Complexity of Your Product and Simplify User Experience2018-04-05T14:19:07+00:002018-04-05T14:19:07+00:00https://blog.codecarrot.net/fix-the-unnecessary-complexity-of-your-product-and-simplify-user-experience<p>Today, more and more businesses are trying to load their products with technology. From smartphones to washing machines, we see a lot of embedded technology that greatly enhances their functionality and improves convenience and personalisation.</p>
<p>However, this often creates complexity that has the potential to reduce the effectiveness of product strategies and sales. This complexity is a result of an interplay of a number of factors, including:</p>
<ul>
<li>ineffective collaboration between tech experts and product managers,</li>
<li>feature development,</li>
<li>technology selection,</li>
<li>code,</li>
<li>design,</li>
<li>execution.</li>
</ul>
<p>Here, we’re going to go through methods used to prevent complexity and introduce a whole new game plan to resolve this issue.</p>
<p><strong>See also:</strong> <a href="/knowledge-is-power-harnessing-desk-research-to-boost-your-business">Knowledge is Power. Harnessing Desk Research to Boost Your Business</a></p>
<h1 id="digital-product">Digital Product</h1>
<p>Creating a useful product that provides delightful experiences and is easy to use is an art as much as a science. Many products fail shortly after launch because product managers and technical specialists fail to provide meaningful value. This is why detecting these situations, which can be done, for example, at the <a href="https://www.codecarrot.net/services/product-design-sprint">Product Design Sprint</a> stage, is crucial at the very beginning of creating a digital product.</p>
<p>A truly great product, whether it’s a washing machine or an app, provides an innovative approach to solving a problem that a target audience has, and causes change in people’s behavior. These products are well-known and admired, and every product manager wants to create something like them.</p>
<h1 id="how-to-build-great-digital-products">How to Build Great Digital Products</h1>
<p>The main goal of every manager working on a digital product is threefold:</p>
<ul>
<li><strong>Focus on the things that matter</strong> most to the target audience. Typically, it is a problem that they have. This problem should be significant enough to be solved.</li>
<li>Make the product scalable to sell it to a large online audience.</li>
<li>Make the product sustainable from a business perspective. For a product strategy to be successful and sustainable, business needs must drive technical ones.</li>
</ul>
<p>Remember: you need to build a technically feasible and economically viable innovation that many people care about. Unnecessary product complexity, on the other hand, means that only a few customers want it.</p>
<h1 id="the-problem-of-technical-complexity">The Problem of Technical Complexity</h1>
<p>Unnecessary complexity is created by a number of factors, including the following.</p>
<h3 id="poor-product-architecture">Poor Product Architecture</h3>
<p>Developers sometimes fail to understand that poor architecture decisions upfront can have painful downstream implications. In many companies, developers don’t have the software-engineering skills required to anticipate potential upgrade and programming issues.</p>
<p>Issues like these can create unnecessary complexity by making poor design decisions and negatively affecting the architecture presented to the end user, making it hard to understand and use. In turn, the complexity can be harmful to the reputation of the business and lead to additional costs, so it should be avoided with good architecture design.</p>
<h3 id="lack-of-problem-solution-fit">Lack of Problem-Solution Fit</h3>
<p>To find out what digital product must be built, one should <strong>explore the problem-solution space</strong> and <strong>understand the business opportunity</strong>. The most important goal here is to identify a problem which is significant enough and worth solving for a particular customer group that – on the other hand – would want to buy it. Also, finding ways to provide a proper solution that has the potential to make an appreciable impact in people’s lives is necessary.</p>
<p>The best way to ensure a pleasant user experience is to place the end user at the center of the problem-solving exploration. This will increase the chance that you’ll develop something that everybody wants to use. Making general assumptions is a very dangerous road because it doesn’t allow you to empathize with the product’s target customer group.</p>
<h3 id="lack-of-product-market-fit">Lack of Product-Market Fit</h3>
<p>When one figures out if the digital product is something one wants to use, the next step is to find product-market fit, which means: produce something and keep improving it until that product provides economic viability and user value.</p>
<p>In other words, the business needs to ensure that it’s building the right product for the right customer group and that the need they address has not been already solved. This also means there is a need to constantly improve quality, features, and design based on the feedback from the target customer group.</p>
<h3 id="weak-link-to-business-priorities">Weak Link to Business Priorities</h3>
<p>For many online businesses, a conflict between digital products and business strategy – or sometimes even a lack of this link – is a problem. The modern online business environment requires a faster pace of product change and a longer learning period. If a business doesn’t adapt to these conditions, it faces a high risk of increasing costs, or even failure.</p>
<p>To make sure that the strategy for a digital product is sustainable, business considerations must drive technical considerations. If programmers are facing pressure from the management to develop a new product in a quick and cost-efficient way, a conflict between business strategy and a technical capacity will emerge.</p>
<h1 id="wrapping-up">Wrapping Up</h1>
<p><a href="/how-various-types-of-expert-evaluation-can-increase-your-website-effectiveness">Understanding the ways a digital product can be improved helps meet the needs of the target audience and generate higher engagement</a>.</p>
<p>That’s why solving unnecessary complexity by establishing the right framework for development of digital products is the best strategy for achieving product goals.</p>
<p>I hope this guide will help you started on ensuring that simplification is a core component of your product strategy. The customers are going to get exactly what they want - whether they get it from you or someone else - so do your best to ensure that your product meets their needs.</p>
<p>And the reward for that will include <a href="/10-tips-to-make-your-users-engaged-till-they-pay-on-your-website">higher conversions</a>, positive user feedback and business growth.</p>yashumittalToday, more and more businesses are trying to load their products with technology. From smartphones to washing machines, we see a lot of embedded technology that greatly enhances their functionality and improves convenience and personalisation.
https://i.imgur.com/f9uFeOU.jpg
How should I name my Git commit messages?2018-04-03T14:57:49+00:002018-04-03T14:57:49+00:00https://blog.codecarrot.net/how-should-i-name-my-git-commit-messages<p>These are <em>fantastic</em> questions! I can’t stress enough how important it is to spend some time writing a <em>good</em> commit message.</p>
<p>Now, what makes a “good” commit message? That’s a great question and has been written about a number of times. Here are some important things to think about when crafting a good commit message:</p>
<p><strong>Do</strong></p>
<ul>
<li>do keep the message short (less than 60-ish characters)</li>
<li>do explain <em>what</em> the commit does (not <em>how</em> or <em>why</em>!)</li>
<li>do use <strong>present time</strong> in your messages</li>
<li>do remove unnecessary <strong>punctuation marks</strong></li>
<li>do use <strong>small case</strong></li>
<li>do make a <strong>single commit</strong> for single change (even really small)</li>
<li>do point out the <strong>path to the file</strong>, if it’s not obvious which one has been changed by the commit.</li>
</ul>
<p><strong>Do not</strong></p>
<ul>
<li>do not explain <em>why</em> the changes are made (more on this below)</li>
<li>do not explain <em>how</em> the changes are made (that’s what <code class="highlighter-rouge">git log -p</code> is for!)</li>
<li>do not use the word “and”if you have to use “and”, your commit message is probably doing too many changes - break the changes into separate commitse.g. “make the background color pink <em>and</em> increase the size of the sidebar”</li>
<li>do not use dates, name and other <strong>inappropriate marks</strong></li>
</ul>
<p>The best way that I’ve found to come up with a commit message is to finish this phrase, <em>“This commit will…“</em>. However, you finish that phrase, use <em>that</em> as your commit message.</p>
<p>If you need to explain <em>why a change is being made</em> or <em>how does it address the issue?</em></p>
<p>You can add a <strong>blank line</strong>, separating the commit message from description.</p>
<p>When you’re writing the commit message, the first line is the message itself. After the message, leave a blank line, and then type out the body or explanation including details about why the commit is needed (e.g. URL links).</p>
<blockquote>
Git is smart enough to distinguish the first line of your commit message as your summary. In fact, if you try *git shortlog*, instead of *git log*, you will see a long list of commit messages, consisting of the id of the commit, and the summary only.
</blockquote>
<p>Further paragraphs come after blank lines.</p>
<ul>
<li>Bullet points are okay, too.</li>
<li>Typically a hyphen or asterisk is used for the bullet, followed by a single space. Use a hanging indent.</li>
</ul>
<p>Here’s what a commit message edit screen might look like:</p>
<p><img src="https://i.imgur.com/bS9ItsV.png" alt="Git Commit Message Example" /></p>yashumittalThese are fantastic questions! I can’t stress enough how important it is to spend some time writing a good commit message.
https://i.imgur.com/bS9ItsV.png
Card Sorting in Product Design Sprint2018-04-03T10:04:13+00:002018-04-03T10:04:13+00:00https://blog.codecarrot.net/card-sorting-in-pds<p>When we design a product, we choose words and group content to help users use the product. Those decisions form the basis of the product’s “information architecture.” During this process, it’s tempting to project our ideas of who our users are, how they behave, and what they want.</p>
<p>To combat against this tendency toward our biases, we run design exercises such as <a href="https://codecarrot.gitbook.io/product-design-sprint/introduction/card-sorting">card sorting</a>.</p>
<p><img src="https://i.imgur.com/TjVp8qh.jpg" alt="card-sorting" /></p>
<h2 id="what-is-card-sorting">What is “card sorting”</h2>
<p>Card sorting is a design exercise that guides us toward creating the most coherent information architecture of a product. During a card sorting session, participants are asked to associate two sets of flashcards by grouping them. While the first set of flashcards contains categories, the second set contains sample content.</p>
<p>For example, if these are our <strong>categories</strong>:</p>
<ul>
<li>Subscribe</li>
<li>Unsubscribe</li>
<li>Connect</li>
</ul>
<p>Then our <strong>sample content</strong> might be:</p>
<ul>
<li>Follow someone</li>
<li>Post a new message</li>
<li>Send private message</li>
<li>Like a post</li>
<li>Share a post</li>
<li>Delete content</li>
<li>Unfriend</li>
</ul>
<p>We observe how they map one set of information to another to create <strong>category-content mappings</strong>. When we conduct card sorting, we ask this question:</p>
<blockquote>
How do people organize content into categories?
</blockquote>
<p>The way participants group and sort the cards will reveal a users’ mental model and guide the information architecture of the product.</p>
<h2 id="preparation">Preparation</h2>
<p>Card sorting is a low-cost and time-efficient way to validate assumptions and identify new learnings about our users and product.</p>
<p>Here’s what we need:</p>
<ul>
<li>30 minutes</li>
<li>3-5 participants</li>
<li>Flash cards or Post-it notes</li>
</ul>
<p>After we’ve scheduled time to meet with our participants, we:</p>
<ol>
<li>Create <strong>category</strong> cards (set #1).</li>
<li>Create <strong>sample content</strong> cards (set #2). Set #2 should have about twice as many cards as Set #1.</li>
</ol>
<p><img src="https://i.imgur.com/Qugi0w7.png" alt="card-sorting" /></p>
<h2 id="running-the-exercise">Running the exercise</h2>
<p>Each participant goes through this exercise one at a time.</p>
<ol>
<li>Ask the participant to match cards in set #2 (sample content) to corresponding cards in set #1 (categories) based on what makes sense to them. There is no right or wrong answer.</li>
<li>Observe and take notes of the participants’ category-content mappings.</li>
<li>At the end of each participant’s session, take a picture of which cards in set #1 were matched to cards in set #2.</li>
<li>Repeat.</li>
</ol>
<p><img src="https://i.imgur.com/O4d3fbw.gif" alt="card-sorting-gif" /></p>
<h2 id="gathering-results">Gathering results</h2>
<p>In order to learn about our participants’ category-content mappings, we plot our collected data onto a spreadsheet. We’re looking for common patterns in the resulting mappings, as these are the things that will influence our product decisions. Here’s how we organize the spreadsheet:</p>
<ol>
<li>Label the first row with category card names.</li>
<li>Label the first column with sample content names.</li>
<li>Since we have images of results by participant, place a tally inside the cell where category column and sample row intersect.</li>
<li>Repeat for each participant.</li>
</ol>
<p><img src="https://i.imgur.com/ybrwJRZ.png" alt="card-sorting" /></p>
<p>The resulting spreadsheet reveals the frequency of each category-content mapping by participants. We now have our data gathered.</p>
<h2 id="deriving-outcomes">Deriving outcomes</h2>
<p>To determine the best outcomes given our data, we identify the strongest and weakest category-content mappings.</p>
<p>The cells with the most tallies represent strong category-content mappings. Cells with the fewest tallies represent weak category-content-mappings. In my example, I had only four participants. So, the most number of tallies that a cell can have is four (<code class="highlighter-rouge">IIII</code>).</p>
<p><img src="https://i.imgur.com/z5NvVEl.png" alt="card-sorting" /></p>
<p>The strongest category-content mappings are represented by the categories with the largest number of tallies. There is general consensus about these informational relationships.</p>
<p>Now, let’s identify the weakest category-content mappings.</p>
<p><img src="https://i.imgur.com/CVK4RwF.png" alt="card-sorting" /></p>
<p>Cells with fewer tallies represent weaker category-content mapping. Another way to identify weak category-content mapping would be to look for rows with a wide distribution of tallies.</p>
<p>Weak category-content mappings deserve our attention because they reveal a lack of consensus about how one type of information relates to another. They highlight cognitive gaps that must be addressed so that our wider user base can understand how to use our product.</p>
<p>Typically, categories with lower tallies could be reconsidered, as they did not reveal themselves to be a significant group of information.</p>
<h2 id="questions-to-ask-ourselves">Questions to ask ourselves</h2>
<p>Here are some questions to ask in order to learn from the results:</p>
<ul>
<li>What common patterns have been revealed?</li>
<li>Are there any unexpected groupings from the participants?</li>
<li>Which relationships were discovered?</li>
<li>Should I consolidate any of these categories?</li>
<li>Do I need to create any new categories?</li>
<li>What have I learned about the participants’ mental models?</li>
<li>How might I create a workflow that matches the participants’ mental models?</li>
</ul>
<h2 id="next-steps">Next steps</h2>
<p>To address uncertainties about users’ understanding of a product, try running this low-cost and time-efficient exercise. For assistance running this or other product design exercises, <a href="https://www.codecarrnt.net/">contact us</a>.</p>yashumittalWhen we design a product, we choose words and group content to help users use the product. Those decisions form the basis of the product’s “information architecture.” During this process, it’s tempting to project our ideas of who our users are, how they behave, and what they want.
https://i.imgur.com/TjVp8qh.jpg
How Various Types of Expert Evaluation Can Increase Your Website’s Effectiveness2018-04-02T10:32:28+00:002018-04-02T10:32:28+00:00https://blog.codecarrot.net/how-various-types-of-expert-evaluation-can-increase-your-websites-effectiveness<p>Keeping your website in good shape is not an easy task, even if you are an expert in that field. You may know the reasons and solutions for the problems that your website is facing, but it can be a tricky job if you are torn between dozens of everyday duties like meetings, company management, and legal issues.</p>
<p>Besides, website maintenance and improvement can be very expensive, and maybe your current position doesn’t allow you that kind of investment. Or maybe you would prefer to invest those assets into something that will be more beneficial to your organisation. Expert evaluations prove to be very useful in these kinds of situations. They are easy, quick, cheap, and, above everything else, they can help you fix your website problems.</p>
<h2 id="heuristic-evaluation">Heuristic Evaluation</h2>
<p>This is a <a href="https://medium.com/@mittalyashu/what-is-heuristic-evaluation-291917865f4e">usability engineering method</a> that tests website usability. Its primary goal is to discover problems in user interface design and make them solvable. This process involves usability experts who inspect and assess the interface’s compliance with predetermined usability principles.</p>
<p><strong>See also:</strong> <a href="/fix-the-unnecessary-complexity-of-your-product-and-simplify-user-experience">Fix the Unnecessary Complexity of Your Product and Simplify User Experience</a></p>
<p>It is recommended for the site to be tested by an experienced UX expert so that you have a professional perspective at the end of the evaluation. This method will deliver you a clear picture of your product’s shortcomings.</p>
<p>If money is an issue, heuristic evaluation can be done by some of your employees using an informal method of reviewing, called heuristic markup. In this method, someone will spend a couple of hours going through the product and doing a set of tasks, just like users would do. This will give you a full close-up of all the weaknesses of your product.</p>
<p>The major advantages of heuristic evaluation are that <strong>it doesn’t require extensive involvement</strong>, and that it <strong>can be used in all phases of the product development</strong>, giving you useful guidelines to improve your website and provide a much more friendly experience to its users.</p>
<h2 id="cognitive-walkthrough">Cognitive Walkthrough</h2>
<p>This task-specific approach is made to check product usability. It was designed to test whether new users can handle the interface and easily complete wanted tasks. This is <strong>a very cost-effective and fast approach compared to the other usability tests</strong>, and it checks product functionality in practice. You can become aware the usability of the product before investing large amounts of money into something that doesn’t work.</p>
<p>The whole process starts by defining the tasks that the user would normally do, and then goes on to the examination of their usability. In other words, tasks are divided into smaller steps. The login process on a website might look like this:</p>
<ul>
<li>Open browser</li>
<li>Navigate to site</li>
<li>Click login button</li>
<li>Enter the username in the username field</li>
<li>Enter the password in the password field</li>
<li>Click the login button</li>
</ul>
<p>A cognitive walkthrough should let you know whether the product is intuitive enough for regular users, will they achieve what they want, are the needed actions available, etc.</p>
<p>The good thing about this process is that <strong>can be carried out by anyone</strong>, and that it can help you prioritize the problems that need solving. It gives you the user’s perspective and, most importantly, fast feedback.</p>
<h2 id="conversion-oriented-evaluation">Conversion-oriented Evaluation</h2>
<p>By definition, a conversion rate is the percentage of users who take a desired action – for instance, the percentage of users who purchased something on a website. But conversions can also refer to other actions, such as registrations on a website, or signing up for a subscription. There are also microconversions, which are actions like clicking on a certain link or watching a video. From the perspective of UX analytics, <strong>microconversions can provide valuable information concerning web page design</strong>. An increase of microconversion rates is a clear indicator of a design improvement.</p>
<p>In order for you to make a <a href="/10-tips-to-make-your-users-engaged-till-they-pay-on-your-website">conversion evaluation that will have a real impact on your product</a>, you should first know what your product goal is. With that in your mind, it will be much easier to use the conversion measurement results in a proper way, and focus on the things that will be beneficial. For example, a website may be focused on selling products and solutions, but also on building up a partnership network – this is where understanding what the split between these two is becomes crucial for the person doing the evaluation.</p>
<p><strong>See also:</strong> <a href="/knowledge-is-power-harnessing-desk-research-to-boost-your-business">Knowledge is Power. Harnessing Desk Research to Boost Your Business</a></p>
<h2 id="content-audit">Content Audit</h2>
<p>Performing a content audit is where content strategy begins. Its primary goal is to conclude if the content is up to date and whether it’s usable. Is it accurate, is it SEO-friendly, can the tools and software deal with it? All in all, <strong>an</strong> <a href="/how-to-conduct-a-content-audit">audit</a> <strong>shapes content management and helps estimate the feasibility of future projects and determine what the necessities are.</strong></p>
<p>The whole process of auditing begins with the creation of a content inventory, which is a record of the entire website content saved into a spreadsheet and organized into an outline. After this comes a review of the material and grading it, which provides a much better insight and answers many questions. Is it accurate? Does it support both users’ and business goals? Is it useful, is it professional? And most importantly, what are its weaknesses and inconsistencies and what are its strengths?</p>
<p>Once you know your weak spots and strong points, it is much easier to determine future strategies and establish distinctive plans for future product improvements and developments.</p>
<h2 id="ux-review">UX Review</h2>
<p><a href="https://www.codecarrot.net/services/ux-review">A UX review</a> is an affordable and fast way to solve your UX issues. This is a professional analysis of user experience and usability based on scientifically-backed methods. The results are compared with the best practices in order to provide the most accurate information concerning market goals, strategy, app usability, its visual impact, intuitiveness, etc.</p>
<p>With a UX Review you will <strong>improve your product’s competitiveness and value, and create something that will expand its marketing reach and fully meet your business goals</strong>. The data-driven report will provide you with a full assessment of your app’s potential, needs, and a roadmap for creating a product that will meet all your goals.</p>
<h2 id="the-final-words">The Final Words</h2>
<p>It is always hard to strike a balance between the least possible involvement, low costs and efficient work. <a href="https://www.codecarrot.net/services/ux-design">The UX approaches</a> we mentioned satisfy exactly that, and provide a proper way to <a href="/10-tips-to-make-your-users-engaged-till-they-pay-on-your-website">analyse your website and get a true perspective of its current shape</a>. These methods are not perfect, but the results that they provide, separately or when combined, are more than a good cornerstone for design improvements and full development of your product. When you take into account their costs and results, it is absolutely clear that you’ll get more than you bargained for.</p>yashumittalKeeping your website in good shape is not an easy task, even if you are an expert in that field. You may know the reasons and solutions for the problems that your website is facing, but it can be a tricky job if you are torn between dozens of everyday duties like meetings, company management, and legal issues.
https://i.imgur.com/rZGNjDK.jpg
Make Decisions, Not Guesses – How Web Data Analytics Can Drive Your Digital Product Development2018-03-25T00:12:16+00:002018-03-25T00:12:16+00:00https://blog.codecarrot.net/make-decisions-not-guesses-how-web-data-analytics-can-drive-your-digital-product-development<p>No matter where you are with your business, it is driven by your decisions. You may already know this, but what exactly is it that gives you the urge to turn right, and not left – or to take a few steps back instead of going further at any cost? Is it just a gut feeling or are your decisions powered by more measurable pieces of information?</p>
<p>Well, in order to not fail with your digital product development, your decisions should always be based on the latter. Only <a href="/how-various-types-of-expert-evaluation-can-increase-your-website-effectiveness">measurable information can you steer your business in the right</a> – and by “right” I mean <em>profitable</em> – direction. It will give you no room no room for making vague assumptions that can lead you astray.</p>
<h2 id="data-driven-decision-making---why-does-it-matter">Data-driven decision making - why does it matter</h2>
<p>In order to make sure your digital product development is on the path to success, you need to have a rock-solid basis for checking <strong>the current condition of your product</strong>. And taking a data-first approach is essential to staying well-informed, so that you can make accurate decisions.</p>
<p><strong>See also:</strong> <a href="/fix-the-unnecessary-complexity-of-your-product-and-simplify-user-experience">Fix the Unnecessary Complexity of Your Product and Simplify User Experience</a></p>
<p><strong>“In God we trust, all others must bring data”</strong>
Edwards Deming (an American professor and management consultant) was right. Every decision or approach has to be backed by data in order to…</p>
<ul>
<li><strong>…check what works and what doesn’t</strong></li>
<li>Do you know for sure what <a href="/quality-content-to-boost-sales-and-improve-ux">kinds of content</a> or functionalities <strong>resonate best</strong> with your target group and drive <a href="/10-tips-to-make-your-users-engaged-till-they-pay-on-your-website">the highest number of conversions</a>? Don’t guess. A proper set of data will help you identify this, and you may be surprised by the results. Similarly, you’ll also be able to realise <strong>what doesn’t work at all</strong>, and avoid any costly maintenance and further development of unnecessary features.</li>
<li><strong>…act faster and be more efficient</strong></li>
<li>Data allows you to <strong>reduce</strong> <strong>costs</strong> by optimising your processes and allowing you to act faster. How? Well, as Peter Drucker, the management expert, once wrote: <strong>“What gets measured, gets managed”</strong>. You don’t have to waste your precious time wondering what the best course of action may be. A set of data indicators can guide you through any decision-making and planning processes. As a result, overall management becomes easier, and goes more swiftly and more effectively.</li>
<li><strong>…equip yourself with forecasting superpowers</strong></li>
<li>Through data analytics, you’re not only able to give your clients what they want, but sometimes even <strong>predict</strong> customer behaviour and needs. You can also be the first to discover burgeoning trends in your industry. This will give you an opportunity to start working on new features and functionalities for your product, or even develop new products or services, <strong>opening new streams of revenue</strong>. You will also stay ahead of your competition.</li>
</ul>
<p>So, if you don’t have any analytical tool installed yet, it might be something worth considering. But… which tools are we talking about, exactly?
Let’s see.</p>
<h2 id="numbers-and-data-flows---one-solution-to-rule-them-all"><strong>Numbers and data flows - one solution to rule them all</strong></h2>
<p>There are a number of different <strong>all-in-one website analytics tools</strong>, with <a href="https://www.google.com/analytics/">Google Analytics</a> at the helm. <a href="https://www.hotjar.com/">Hotjar</a> and <a href="https://piwik.pro/">Piwik</a> are also pretty popular and highly valued by users. And it wouldn’t be an overstatement to say that they are a contemporary equivalent of goldmines in digital product development.</p>
<p>Besides these tools, don’t forget to use the <strong>analytical features</strong> offered by any comprehensive solutions you’ve already implemented and have been using on a daily basis. For example, Shopify has a nicely designed analytical panel, and Facebook allows you to track user behaviour regarding the campaigns you’re running.</p>
<p>The analytical information you get from these tools often makes it <a href="/how-various-types-of-expert-evaluation-can-increase-your-website-effectiveness">possible to detect performance</a> <a href="/how-various-types-of-expert-evaluation-can-increase-your-website-effectiveness"><strong>bottlenecks</strong></a>, find the features that <strong>do not matter</strong> (yet trigger development costs) and learn which fields <strong>are worth investing in</strong>.</p>
<p>But… even when you have installed the tools that are adequate to your needs, you may still <strong>struggle with analysing</strong> the data they produce.</p>
<p><strong>See also:</strong> <a href="/10-ux-tips-to-improve-website-navigation">10 UX Tips to Improve Website Navigation</a></p>
<h2 id="data-is-gold-but-analytics-is-platinum"><strong>Data is gold, but analytics is platinum</strong></h2>
<p>Collecting data is basic groundwork on your way to improving the quality of your decisions. However, data is really nothing without analytics, which can <strong>turn the</strong> <a href="/knowledge-is-power-harnessing-desk-research-to-boost-your-business"><strong>information you find into actionable insights</strong></a>.</p>
<p>First and foremost, you have to cut through the massive informational noise out there, where pieces of data are flowing back and forth in real time. You need to identify which figures could be significant, separate them from the rest, and use them as a beacon for product development. As certain paths can be more important than others, <strong>setting up and optimising your funnels is the key to success</strong>.</p>
<p>Not all businesses are capable of doing this. Some organisations also struggle with <strong>analysing and benchmarking their data from multiple analytical systems</strong>. This is a complex and difficult task, and more often than not, there are no in-house professionals who specialise in this.
However, there are ways to deal with this situation.</p>
<h2 id="data-is-gold-and-analytics-is-platinum-but-a-helping-hand-is-key">Data is gold and analytics is platinum, but a helping hand is key</h2>
<p>In some cases, not everything can be done internally from within a single company. Sometimes, it is wise to accept some assistance from an outside source. Having a strong partner who not only understands the data, but is able to optimise data collection and drive a product towards reasonable development can be a game-changer.</p>
<p>So, if you need a helping hand and just some basic – or complete – guidance through data analytics, we are always ready to help you make the most out of it! <a href="https://www.codecarrot.net/hire-us">Contact us</a> and check other <a href="https://www.codecarrot.net/services/ux-design">UX design services</a>. Let us help you steer your business in the right direction and get on the path to present and future success.</p>yashumittalNo matter where you are with your business, it is driven by your decisions. You may already know this, but what exactly is it that gives you the urge to turn right, and not left – or to take a few steps back instead of going further at any cost? Is it just a gut feeling or are your decisions powered by more measurable pieces of information?
https://i.imgur.com/PKmEDXh.jpg
Knowledge is Power. Harnessing Desk Research to Boost Your Business2018-03-24T13:04:14+00:002018-03-24T13:04:14+00:00https://blog.codecarrot.net/knowledge-is-power-harnessing-desk-research-to-boost-your-business<p>Getting ahead in business is all about <a href="/how-various-types-of-expert-evaluation-can-increase-your-website-effectiveness">identifying opportunities</a> and executing on them. This, of course, is easier said than done. Desk research is a tool that will help you turn the motto from the first sentence into actual performance, by giving you the information and know-how you need to move forward.</p>
<h2 id="what-is-desk-research">What is desk research</h2>
<p>Before we dive into the specifics of what desk research is about in business context, it might be useful to explain what desk research actually <em>is</em>. One good way would be to refer to a different name it goes by: secondary research. As the moniker implies, secondary research (as opposed to primary research) is all about gathering useful information from studies that have already been done by others. This means that, instead of starting from scratch, <a href="/make-decisions-not-guesses-how-web-data-analytics-can-drive-your-digital-product-development">you interpret, collate, and analyse existing data sets</a>.</p>
<p>Desk research is a well-established practice in business and scholarship, in part due to its potentially huge ROI. After all, it is much less resource-intensive to make use of things that are already out there, rather than build a team, design a methodology, and execute a major research project. Even if you want to do some brand-new primary research in the future, it seems obvious to review the existing information before you do so – it might save you a lot of money and effort. Either way, it makes sense to do some desk research whenever you want to gain some insights into any subject.</p>
<p><strong>See also:</strong> <a href="/fix-the-unnecessary-complexity-of-your-product-and-simplify-user-experience">Fix the Unnecessary Complexity of Your Product and Simplify User Experience</a></p>
<h2 id="main-types-of-desk-research">Main types of desk research</h2>
<p>Desk research can be divided into two main types: internal and external. The types refer to whether the information analysed is being sourced internally (from your organisation) or externally (from somewhere else).</p>
<p>Internal research has a number of advantages, especially with regards to costs and resource consumption. This is because everything is done in-house – both the information and the researchers come from within your company. Another added benefit of this approach is that it essentially generates additional value from your work you have already done – any new knowledge gained this way is, indirectly, a result of the existing know-how developed by your business.</p>
<p>External research, while more expensive and resource-intensive, has the obvious benefit of covering a much broader scope of data: after all, no matter how advanced your organisation is, most of the world’s information exists outside of it. This is where a sub-typology based on the source of information used comes in. The three main types of sources are online data, government data, and customer desk data. The first two need no explanation, besides perhaps the fact that some useful data may not be available online (such as print books or specialized journals), so it might make sense to visit a library or a book retailer for some more niche information. The last one – customer desk data – boils down to directly communicating with existing or prospective customers.</p>
<h2 id="from-theory-to-practice">From theory to practice</h2>
<p>The last few paragraphs might have given you the sense that desk research is a fairly rigid and structured approach that does not adapt well to individual businesses or sectors. This impression could not be farther from the truth. While the methodologies described above can serve as a starting point for your knowledge search, they are by no means an exhaustive list and should not be perceived as a set of limitations. Research – be it about the unused potential of your company, the weak spots of your competitors, or the pain points of your customers – can be conducted in any number of ways depending on your particular needs.</p>
<p>A wise man (John Donne, to be exact) once said that no man is an island. The same is true for companies. No business exists in a vacuum: all companies, big or small, operate in a competitive environment, where the technologies, best practices, and customer expectations can change in a matter of days. Another wise man (Francis Bacon this time) said that knowledge is power. Combine the wise words of the two, and the benefits of desk research will become immediately apparent: having as much knowledge as possible about your market, competitors, and customers can give you <a href="/take-advantage-of-lean-product-experiments-for-top-market-fit">the power to succeed as a business</a>.</p>
<p><strong>See also:</strong> <a href="/10-tips-to-make-your-users-engaged-till-they-pay-on-your-website">Make Them Stay Till They Pay – 10 Tips For Keeping Your Users Engaged on Your Website</a></p>
<h2 id="get-started-with-desk-research">Get started with desk research</h2>
<p>We strongly believe in the power of research and knowledge. Whether your business is a brand new startup or an established enterprise, you can always gain something from research. Be it a new technology, an untapped market or a new design paradigm that will delight your existing customers – opportunities for growth are out there. But there is no way to take advantage of them if you do not go looking.</p>
<p><strong>See also:</strong> <a href="/10-ux-tips-to-improve-website-navigation">10 UX tips to improve website navigation</a></p>
<p>Are you looking to turn your company around, improve an existing process or launch a new product? Whatever the goal, desk research and other <a href="https://www.codecarrot.net/services/ux-design">UX design services</a> might be a great solution to create a strategy that will ensure your success.</p>
<p>Intrigued? <a href="https://www.codecarrot.net/hire-us">Get in touch</a> – we would love to talk.</p>yashumittalGetting ahead in business is all about identifying opportunities and executing on them. This, of course, is easier said than done. Desk research is a tool that will help you turn the motto from the first sentence into actual performance, by giving you the information and know-how you need to move forward.
https://i.imgur.com/S3b7Uhl.jpg
Really Bad UX Mistakes That Even Great Teams Make2018-03-18T13:37:31+00:002018-03-18T13:37:31+00:00https://blog.codecarrot.net/really-bad-ux-mistakes-that-even-great-teams-make<p>Some of your most important UX decisions will be the things you <em>don’t</em> do.</p>
<blockquote>
You can learn as much from failures as successes, but only if you take the time to reflect on why something worked or didn’t work.
</blockquote>
<p>Not building that hamburger menu, not changing your scrolling direction, and not adding more modals could be key decisions that actually make it easier for people to use your app and keep people engaged longer.</p>
<p><img src="https://i.imgur.com/5zmKzRy.png" alt="Microsoft Word's toolbars have become the iconic example of really bad UX" /></p>
<p>But say you did build that hamburger menu—not all is lost. It’s easy even for great teams building great products to make big UX mistakes because it’s not always clear what’s going to resonate with users.</p>
<p>If you’re experimenting and iterating on your product and you make mistakes along the way, that’s okay—these mistakes are also opportunities to understand more what users need. But to make sure your mistakes are constructive, you need to be informed on why certain things work and certain things don’t.</p>
<p>Really bad UX mistakes—when overlooked for too long—will frustrate and even alienate your users. <strong>Below, we break down some really bad UX mistakes that show up even in popular products with talented teams</strong>. Learn these mistakes and understand why they don’t work so that you can avoid them in your own product—or, if some of these look familiar, understand the fix so you can work towards a better overall experience for your user.</p>
<h2 id="mistake-1-you-built-a-norman-door">Mistake 1: You built a Norman door</h2>
<blockquote>
“When I look at something, I should be able to discover what operations I can do... When [discoverability] is not there, well, you don't know how to use something.”
</blockquote>
<p><strong>The Norman door, in UX, is any button, menu, or other digital object that doesn’t give you any hint on how to use it.</strong></p>
<p>Every element of your product gives your user some kind of signal—whether you intend it to or not. You can unknowingly create really bad UX when the signals you’re sending the user don’t align with how they actually use the app. This creates low “discoverability”—people can’t figure out how to use the product or feature.</p>
<p>This isn’t just an aspect of bad digital design—bad discoverability plagues the analogue objects we interact with every day. Design consultant Don Norman coined the term “Norman door” to refer to a door that doesn’t signal with its design how someone should open it.</p>
<p><img src="https://i.imgur.com/mYXSKMd.jpg" alt="Double Doors" /></p>
<p>Some apps do this same thing by building buttons or features that aren’t self-explanatory. If someone has never used the app before—they leave a user unsure of exactly how they should use the feature.</p>
<p><img src="https://i.imgur.com/9OigOiL.png" alt="Google Translate App Screenshot" /></p>
<p>For example, to someone who has never used Google translate before, this symbol—is it a snake? a lasso?—is not easily understood from the context clues. You’d have no way of knowing that this button allows you to write words for translation with your finger on your phone.</p>
<p>Discoverable isn’t synonymous with intuitive. You can introduce a new symbol and give enough signals in your product to help a new user understand the function, even if they’re not familiar with it. Some key ways to do this include:</p>
<ul>
<li><strong>Building prototypes and collecting user feedback</strong>: Most of the time, discoverability is improved with simplicity—but sometimes you can simplify too much and take out the necessary context. Testing out prototypes and seeing how real users who are new to the app interact with it is the best way to find out exactly how much context is necessary for your users.</li>
<li><strong>Providing clear and simple user onboarding</strong>: Simple explanations should always be built into your product’s onboarding. You don’t always have to keep a text label next to a button—but while a user is learning how to navigate the product the label should stay there, or the introduction to the feature should include a tooltip explaining the feature or button’s function.</li>
</ul>
<p>Building your onboarding should give you a clear idea of how discoverable your features are. If you find you’re having to over-explain your feature’s functions, they’re probably too complex.</p>
<h2 id="mistake-2-you-used-last-resort-ui-as-your-first-choice">Mistake 2: You used last-resort UI as your first choice</h2>
<blockquote>
“It’s tempting to rely on menu controls... But hiding critical parts of an application behind these kinds of menus could negatively impact usage.”
</blockquote>
<p>Last-resort UI elements make navigation more difficult for your user. But too often they’re first choice elements for product designers because they’re widely used and convenient to build.</p>
<p><strong>In reality, these last-resort UI elements—like dropdown selections and hamburger menus—can almost always be replaced with something more convenient for the user.</strong></p>
<p>Dropdown menus are not only annoying—they make users click multiple times to make a choice—but they make it easy for users to make a mistake by clustering the choices so close together in horizontal lines.</p>
<p>Similarly, hamburger menus should be considered last-resort UI. They’ve overused because they let designers fit a ton of stuff into a small space. But ultimately they make users forget about features (because they’re out of sight), and cause more work for the user (because it takes more taps or clicks to navigate).</p>
<p><img src="https://i.imgur.com/3hYYAv2.png" alt="Instagram Feed Screenshot" /></p>
<p>For example, when Facebook changed their iOS mobile design to include a tab bar on the bottom instead of a hamburger menu in the top left corner, they saw increased engagement, increased user satisfaction, increased revenue, and increased perception of speed.</p>
<p>To avoid falling back on convenient but last-resort UI, look for alternatives that show users what they want and make it hard for them to mess up:</p>
<ul>
<li><strong>Put choices in sight and give users more control</strong>: Put simply, engagement increases when users can see what their options are. Instead of building hamburger menus, experiment with tab bars. Instead of dropdown menus, try steppers or sliders for quantitative options and radio groups or button inputs for qualitative options.</li>
<li><strong>Identify what’s important enough to show</strong>: Not everything can be visible. You have to prioritize the features that you want users to engage with most, which starts with understanding what is most valuable to your users.</li>
</ul>
<p>Don’t fool yourself into thinking that these menu controls are simplifying your user’s experience—they’re just hiding complexity.</p>
<h2 id="mistake-3-you-under-utilized-user-data-in-personalization">Mistake 3: You under-utilized user data in personalization</h2>
<blockquote>
“Personalization is a hypothesis like any other design or functionality change, and should be treated with similar rigor, looking at the data to make sure it’s improving the conversion rate and other important metrics.”
</blockquote>
<p>When you use data about your user to build genuine, personalized recommendations, it goes so much further than a “Hi there, {customer.first_name}}!” It takes a little more effort, but yields a much higher payoff in UX and engagement.</p>
<p>Everyone’s inbox is full of subject lines with their name. This was once a useful tactic for building better relationships with customers by adding in an element of personalization that they could connect to, but it’s dated.</p>
<p>Now that many marketers are savvy to liquid tags, a superficial personalization like a name doesn’t make as much of an impact. It’s a nice touch, but your personalization can’t stop there.</p>
<p><strong>The value of personalization is in using what is unique about a person and their usage to help them reach their goals and increase engagement.</strong></p>
<p>This type of superficial personalization—that doesn’t rely on any meaningful data—isn’t enough because it doesn’t speak to what the user wants to do or help them get there.</p>
<p><img src="https://i.imgur.com/jPnXFbg.jpg" alt="Apple Email Application Screenshot" /></p>
<p>For example, a company marketing a new membership can’t settle for just a name in the subject line—because it opens them up to mistakes like this that make personalization seem hollow.</p>
<p>Instead, it would have been more beneficial to this company to use the data they have on the user’s class history and recommend specific class packages that fit within their preferred genre and time schedule.</p>
<p>Really good UX is about more than a well-designed interface—it’s about optimizing every single interaction your user has with your brand. <strong>Data-driven personalization can help you do this by forging a deeper connection with your user and providing them with genuinely helpful ways to reach their unique goals.</strong></p>
<p>To really provide value and increase engagement, look for ways to use the data you have about your customers to offer personalized advice and recommendations:</p>
<ul>
<li><strong>Use behavioral data to affect users’ future actions</strong>: By providing users with metrics about their usage, you can give them tailored recommendations for improvement. Not only will this increase user’s satisfaction, but your advice drives them back into the product and makes them more likely to be successful. AdRoll does a great job of this by providing email roundups of usage metrics along with targeted suggestions.</li>
<li><strong>Enrich your lead data to offer specific personalizations</strong>: You can pull more information on your leads or current customers to learn important details—like the industry they work in. Some companies use this data to provide helpful personalizations, like landing pages targeted to particular verticals that address the specific concerns of customers in that industry.</li>
</ul>
<p>There’s a huge variety of data that you can use to make personalization genuine and helpful—behavioral, locational, industry-related, et cetera. Build better user experiences that offer three-dimensional personalizations.</p>
<h2 id="mistake-4-you-prioritized-polish-over-performance">Mistake 4: You prioritized polish over performance</h2>
<blockquote>
“Responsiveness is a basic user interface design rule that's dictated by human needs, not by individual technologies... A snappy user experience beats a glamorous one, for the simple reason that people engage morewith a site when they can move freely and focus on the content instead of on their endless wait.”</blockquote>
<p>The first things that people notice about your website or app are loading time and response time. <strong>No matter how much time you spend perfecting your navigation menu or your color scheme, people will never applaud your design if they leave before a screen loads.</strong></p>
<p>According to Jakob Nielson at the Nielson Norman Group, responsiveness is so important because humans have strict needs around attention and control:</p>
<ul>
<li>We have <strong>natural limitations to our attention</strong>, and the longer we spend waiting for a page to load, the more our attention wanes and the more likely we are to get distracted.</li>
<li>We would <strong>prefer to be in control</strong> of our own navigation, and poor performance makes us feel like we’re being subjected to someone else’s incompetence.</li>
</ul>
<p>Kissmetrics published an infographic detailing all of the ways that slow response time will sentence your product to death—but the most alarming and noteworthy observation was that literally every second of slowness counts.</p>
<p><img src="https://i.imgur.com/FsyLcaG.png" alt="Kissmetrics infographic" /></p>
<p>After just two seconds of waiting, over 10% of users have already abandoned your site. And the frustrating with waiting is so visceral that the consequences aren’t isolated—poor performance will leave such a lasting memory on your user that they can even come to associate slowness with your brand.
Even though it’s much less sexy than UI optimizations, these improvements to your product’s performance can have big payoffs:</p>
<ul>
<li><strong>Build around the limitations of attention</strong>: Users generally feel that a 0.1 second response is instantaneous, a 1 second response is fast but delayed, and a 10 second response is at the edge of tolerability. Keeping response time around 0.1 seconds helps users to feel like they’re directly manipulating the product, instead of waiting for the product to do work for them.</li>
<li><strong>Be conscious of where you’re using elements that slow loading time</strong>: If a special widget or complex data processing feature on your site is going to slow down your response time, don’t put it on the landing page. If you do need to include something that will slow down the response time, acknowledge it in a message to the user so they feel more informed and in control.</li>
</ul>
<p>Small improvements matter here. Even just a 0.1 second improvement in response time can improve conversion rates. Discrediting performance optimization means missing out on tangible engagement results.</p>
<h2 id="mistake-5-you-loved-too-much-of-your-product">Mistake 5: You loved too much of your product</h2>
<blockquote>
“Making the simple complicated is commonplace; making the complicated simple, awesomely simple, that’s creativity.”
</blockquote>
<p>When you’re too attached to your product’s features or design elements, it’s difficult to get rid of them. But this can be detrimental to UX because adding complexity can overwhelm and confuse your user.</p>
<p>Like many things in life, simplicity in product design is often more difficult than complexity. <strong>True simplicity requires you to identify what’s most important and ruthlessly prioritize it—which is often much more work than adding everything you can think of.</strong></p>
<p>This is difficult because some products are just genuinely complex. On top of that, the people who build products are overwhelmingly aware of how complicated they are and how interesting and nuanced all of the features are. Imposing a hierarchy of importance on features and actions for a user is difficult from this perspective.</p>
<p><strong>Two of the biggest contributors to complexity are content overload and visual overload</strong>. For example, take a look at this comparison of two financial service reporting applications from Jason Fried at Basecamp.</p>
<p><img src="https://i.imgur.com/GXFeFxR.png" alt="comparison of two financial service reporting applications" /></p>
<p>These two interfaces are actually for the same app. The screen of the left is what the app actually showed in its interface, and the screen on the right is what the user actually needed to know. But when the most important information is lost in content or visual overload, it makes it much harder for the user to find what they need or figure out what to do next.</p>
<p>It’s not always easy to figure out what to cut, but it’s critical to building a good UX. There are a couple of ways you can overcome the disparity between what a product designer or engineer wants to build and what the user actually needs:</p>
<p>*- <strong>Focus on the core value of your product</strong>: If your product is getting overcrowded, go back to basics - what is your market demanding? The best way to figure this out is by talking to users and doing market research. Identify the core features that drive towards the underlying value and prioritize those. If necessary, you may have to cut features or content that doesn’t drive towards this value and deny tangential feature requests.
*- <strong>Prioritize visual simplicity</strong>: Many users perceive that less visually-crowded interfaces are easier to use, even if they’re objectively less helpful. It’s simple, but visual elements like whitespace and clear calls to action give create the effect that a product is easier to use.</p>
<p>To actually execute on simplicity within your product you need a strong product vision at the foundation of your team, supported by real user experiences and preferences that will drive you towards your most important elements.</p>
<h2 id="building-really-good-ux-is-a-constant-process">Building really good UX is a constant process</h2>
<p>As your market and product evolve, your UX is always changing. That’s why you can’t think of really good UX as a single good element. You have to deliver great experiences to your users over and over again. You have to understand the mechanics of different user experiences and how your product affects your user.</p>
<p><strong>“The bigger question is</strong> <strong><em>not</em></strong> <strong>how we know a product has a great design. It’s how you get there—in other words, what it takes to produce great user experiences repeatably.”</strong></p>
<p>Understanding the significance of really bad UX mistakes—and realizing their effects on your users—are the first and foundational steps.</p>yashumittalSome of your most important UX decisions will be the things you don’t do.
https://i.imgur.com/5zmKzRy.png
The Laziness That Kills Good Products 😑2018-03-17T12:20:28+00:002018-03-17T12:20:28+00:00https://blog.codecarrot.net/the-laziness-that-kills-good-products<p>Over the years, you start hearing some phrases that keep coming up over and over in product or design meetings. They can be indicative of laziness, disorganization, or a poor process — so it’s actually important to address them. Here is my collection of the phrases I’ve heard, and how you can respond.</p>
<p><strong>“Maybe we can A/B test it.”</strong>
A/B tests consume a lot of time and effort. Do you really feel it’s worth investing that time? It may be a better use of our time to make a gut decision on this, or find proxy data that we can use now.</p>
<p><strong>“Let’s add that into the settings menu”</strong>
How many of our core users will actually need this? Can we instead show this feature only when we think a user would actually need it?</p>
<p><strong>“Facebook/Apple/Google did it that way”</strong>
Is it actually helpful to keep our designs consistent with Facebook here? If our users are truly expecting consistency, then that’s fine — but otherwise let’s think more about the right experience for our users.</p>
<p><strong>“We don’t have analytics for that.”</strong>
Ok, so what’s the plan for filling that gap in our analytics?</p>
<p><strong>“Maybe we could build this feature idea later on.”</strong>
No, it’s better to cut this altogether. We already have a ton of features in our backlog that are higher priority. It’s better to stay focused.</p>
<p><strong>“My friends were complaining about our app this weekend, and they recommended we change X, Y, and Z.”</strong>
We can add that to our mental library of anecdotes to pull from, but let’s not change our decision making process so suddenly.</p>
<p><strong>“How about we trigger a notification to encourage our users to do X?”</strong>
The world is getting fed up with notification spam. This will just get us blocked by the user. Let’s think a bit more about why they aren’t doing X.</p>
<p><strong>“We don’t want to constrain ourselves. We’re building this product for everyone.”</strong>
Making tough design decisions is an order of magnitude more complex without a clear definition on a few types of users to target.</p>
<p><strong>“I think our users are going to like this.”</strong>
Hey — you’re usually right, but in this instance, can you elaborate on how you know that?</p>yashumittalOver the years, you start hearing some phrases that keep coming up over and over in product or design meetings. They can be indicative of laziness, disorganization, or a poor process — so it’s actually important to address them. Here is my collection of the phrases I’ve heard, and how you can respond.
https://i.imgur.com/l1Wr4Lw.jpg
What Do 76% of Consumers Want From Your Website?2018-03-15T18:01:24+00:002018-03-15T18:01:24+00:00https://blog.codecarrot.net/what-do-76-of-consumers-want-from-your-website<h2 id="76-of-consumers-say-the-most-important-factor-in-a-websites-design-is-the-website-makes-it-easy-for-me-to-find-what-i-want"><strong>76% of consumers say the most important factor in a website’s design is “the website makes it easy for me to find what I want.”</strong></h2>
<p><img src="https://i.imgur.com/PXlgVPe.png?2" alt="What is the most important factor in the design of a website?" /></p>
<h2 id="what-does-this-mean-for-marketers"><strong>What does this mean for marketers?</strong></h2>
<ul>
<li><strong>Don’t</strong> obsess over the visual design of your website</li>
<li><strong>Do</strong> obsess over the usability by your customers and prospects</li>
<li><strong>Don’t</strong> worry if you or the CEO think your website design does not look pretty</li>
<li><strong>Do</strong> worry about the conversion rate of your website (Are people finding what they need and completing their tasks?)</li>
<li><strong>Don’t</strong> use flash, heavy graphics, or tons of video</li>
<li><strong>Do</strong> use these things if it helps your customers get what they want from your website</li>
<li><strong>Don’t</strong> reinvent the wheel when it comes to design and layout</li>
<li><strong>Do</strong> use a basic layout that will be familiar to your customers</li>
<li><strong>Don’t</strong> differentiate with the design/functionality of your website</li>
<li><strong>Do</strong> differentiate your company by making it really easy for your customers to find what they want on your website</li>
<li><strong>Test, test, test!</strong> The only thing that matters is what your customers do on your website. Sit down with a potential customer, and watch them use your website. See if they can figure out how to get what they want; see if they can easily do the tasks you want your consumers to do. (e.g. “Show me how you would register for our free demo.”)</li>
</ul>yashumittal76% of consumers say the most important factor in a website’s design is “the website makes it easy for me to find what I want.”
https://i.imgur.com/wHHqaGp.jpg
How Technical Writing Can Save Your Project2018-03-12T19:35:28+00:002018-03-12T19:35:28+00:00https://blog.codecarrot.net/how-technical-writing-can-save-your-project<p>Yes, technical writing can save your software project. And if the project doesn’t need saving, it will save you time, money and, in the long run, lots of effort.</p>
<p>This may sound like a paradox, because documentation is pretty often the last thing that comes to your mind when you’re thinking of the development process. It’s a pain in the neck that needs to be done, but nobody’s exactly raising their hands to do it.</p>
<p>Aaah, wait, there actually are people crazy enough to nosedive into zillions of documents most of which only get read once. They’re called technical writers. It’s a strange bunch. They do things that hardly any outsider would consider rewarding: pack knowledge into consumable pieces to save the world from a universal catastrophe. And save your project in the process.</p>
<h2 id="save-your-developer">Save Your Developer</h2>
<p>If you let your people walk in the dark, they’re bound to walk in circles. Even the genius ones are not omniscient. That’s why they’re going to ask questions, talk to others, gather information. They need a reference. Admittedly, they can do without a single-source knowledge base that would provide them with all the necessary details. They can store such information on shared drives. Hell, they can even write it down on a blackboard and erase it every 24 hours.</p>
<p>Why shouldn’t they? Because it’s a waste. It’s a waste of time to look for the same pieces of information scattered among people, email inboxes and company drives. It’s a waste of effort to spend time on deciphering poorly written and unhelpful content. It’s a waste of money to make your people guess.</p>
<p>Now, when your project changes hands, well-done technical writing stops being merely a luxury. It’s a must. What if some of the key people working on the project drop out for some time? What if a different team takes over? What if you outsource parts of the work? What if new people join the project part way through? Then the lack of decent technical documentation can result in serious delays, unnecessary work, and general turmoil.</p>
<p>If you take care of your docs at the very beginning, doing technical writing right really pays off. It renders things transparent. It makes your project more agile and future-proof. It also makes things faster, because everybody working on the project knows where they stand.</p>
<h2 id="save-your-user">Save Your User</h2>
<p>Let’s say it once again: you are not the user. At least not of your product. If it’s an app for the everyman, peruse <a href="https://www.nngroup.com/articles/computer-skill-levels/">this research</a>, which basically concludes: people still don’t know how to use technology. If it’s a specialized platform for a specific group, you are not a member of that group (even if you were a member before). It’s just the way it is – you can’t be the average listener to a song you’ve written yourself. Maybe 20 years later.</p>
<p>That’s where technical writing comes in again – because it’s not just about drafting manuals no one ever reads. It’s about making technology accessible. Technical writing around your app places the user in the forefront, just like good UX design. But it takes technical writing done right to actually help the user deal with real-life problems. If you’re worried that your technical content isn’t of much use, make it better! Look at the big players out there. Consider different sorts of output. Test your docs like you test your app. Monitor the user’s needs.</p>
<p>Technical writing not only enhances your UX design process. It’s actually part of it. You can’t ignore it if you treat UX seriously.</p>
<h2 id="save-your-brand">Save Your Brand</h2>
<p>The way you run your technical content influences the way your brand is perceived.
A long time ago, we would buy a product first, then open the box and find a manual inside it. Now, we usually have access to technical content of various sorts before we buy a product. And the product content influences our buying decisions, <a href="/what-influences-the-marketing-technology-buying-decision">more than vendors’ social media accounts</a>.</p>
<p>Technical content and marketing content are not as far from each other as it may seem. Not anymore. They may be, if you treat the former as an irritating necessity done on short notice. But why do it that way if you can harness technical content to work for your brand instead? Treat it as a marketing asset. Make it look neat. Make it sound friendly. Give it a nice feel. Keep it coherent with your overall marketing strategy. After all, every page is page one today.</p>
<h2 id="save-yourself-some-headache">Save Yourself (some headache)</h2>
<p>Of course, technical writing takes some effort too, like anything else that needs to be done right. But this shouldn’t discourage you from developing tech content from the very beginning of any software project. What may seem like a nuisance at the start can save you a lot of headaches later on. And work for you in the background.</p>yashumittalYes, technical writing can save your software project. And if the project doesn’t need saving, it will save you time, money and, in the long run, lots of effort.
https://i.imgur.com/A9uD51D.jpg
What Influences the Marketing Technology Buying Decision?2018-03-12T18:26:19+00:002018-03-12T18:26:19+00:00https://blog.codecarrot.net/what-influences-the-marketing-technology-buying-decision<p>Marketers tend to personally consider themselves as early adopters or in the early majority when it comes to technology adoption, but they’re more likely to see their companies as being in the late majority or laggards, per results from a Walker Sands study. There appears to be demand for more marketing technology, according to the report, as more than 4 in 10 feel that their existing stack is out-of-date and insufficient. So how does the buying decision take place?</p>
<p><img src="https://i.imgur.com/EYrVDKO.png" alt="Most Influences Marketing Technology Research Sources" /></p>
<p>Not surprisingly, the search for a new marketing technology most commonly takes place when respondents recognize a need (44% share) or when the current solution isn’t delivering the right results (21%). But marketers typically learn about marketing technologies before they turn to search: 30% said they usually first learn about them from peers or colleagues; 20% first from publications or blogs; and 13% first from search. As for the publications that inform them, Forbes (44%), Wired (37%) and the Wall Street Journal (35%) are the destinations where the largest proportion of respondents read about marketing technology solutions and marketing industry news.</p>
<p>When it comes to beginning an online search for a vendor or solution, forget mobile devices. Instead, 91% said they begin their search on a desktop or laptop, with just 6% beginning on a smartphone and 3% on a tablet. And while a greater proportion of marketers conduct at least some research on smartphones (56%) and tablets (40%), the most time is easily spent on desktops and laptops, with 92% doing most (48%) or all (44%) of their research on those devices.
When researching solutions, peer recommendations are easily the most influential source of information, per the report, cited by 63% as being very influential. As such, peers are not only the most likely to be the first source of information about solutions, they’re also the most influential.</p>
<p>Following peer recommendations, online reviews (44%) and analyst reports (33%) are the most influential sources of information, indicating a desire for independent content about the solution. Not far behind, though, 29% cite the vendor’s website or blog as being very influential, and vendor content is also cited as being very influential by 29%. As for vendors’ social media accounts? Only 7% see them as being very influential, while almost half say they have no influence at all.</p>
<p>The lack of influence attributed to vendors’ social media is supported by data contained in MarketingCharts’ B2B Digital Marketing Insights Report, in which few B2B buyers reported that a company’s social media activity impacts their vendor decision-making process. However, the study also demonstrates that buyers feel that vendors’ social activity can help establish a company’s credibility.
Meanwhile, although vendor content falls behind third party independent reviews and recommendations in terms of influence, it does have some influence for about 9 in 10 buyers. When asked what kind of content most influences their technology buying decisions, respondents pointed first to product demos (52%), followed closely by case studies and testimonials (47%). Surprisingly, videos (15%) and webinars (14%) are much further down the list, despite B2B content marketers reporting a sizable degree of success with those content types.</p>
<p>There have been differing reports about the role of the salesperson; the Walker Sands study finds that most marketers prefer to first engage with a vendor’s sales representative during the research (59%) stage, as opposed to pre-research (5%) or at decision time (28%). As for the oft-quoted statistics about how far along the decision process buyers are when they first contact a sales rep? This study has its own results: 40% say they are at least 70% of the way to making a decision before engaging a representative, and about two-thirds are at least half-way.</p>
<p>When it comes time to make a decision, a plurality (25%) of respondents say that 3 people are typically involved in the decision, though a majority typically have 4 or more involved. This appears to be somewhat influenced by company size, as 42% of marketers from large companies (1,000+ employees) say at least 10 people are involved in the decision. This makes it important to remember that it’s not just the C-suite that influences buying decisions; data in the MarketingCharts report demonstrates that non C-suite employees also have some influence over B2B purchase decisions.</p>
<p>In segmenting respondents by titles, the Walker Sands study notes that:</p>
<ul>
<li>Price is the top purchase factor for CMOs (note: small sample size), while it comes second to ease of use for VP/Directors and Managers;</li>
<li>Peers are the first place each job title first learns about solutions, and each cites peer recommendations as being their most influential source of information;</li>
<li>The company or product website is on par with product demos as the top content source for CMOs, while product demos are second to case studies/testimonials among VP/Directors and co-ordinators/specialists; and</li>
<li>Budget is the biggest obstacle to a purchase for each job title, and while difficulty of implementation and internal resistance are the next-largest obstacles for all those beneath the CMO, the CMO’s next biggest obstacle is the inability to find something to meet the company’s needs.</li>
</ul>
<p>Finally, in contrasting the buying behavior of Millennials and Boomers, Walker Sands finds that Millennials are more likely to prefer making decisions with a small group of decision-makers, and are also more likely to rank online reviews as the most influential source of information when searching for marketing technology solutions.</p>
<p><strong>About the Data:</strong> The Walker Sands State of Marketing Technology 2016 Study surveyed 313 marketers across the United States on how they make marketing technology purchase decisions. The survey was fielded online between July 1-20, 2015, and respondents were limited to professionals who currently work in the marketing department of a company or organization. The survey has a 5.5% margin of error at a 95% confidence level.</p>yashumittalMarketers tend to personally consider themselves as early adopters or in the early majority when it comes to technology adoption, but they’re more likely to see their companies as being in the late majority or laggards, per results from a Walker Sands study. There appears to be demand for more marketing technology, according to the report, as more than 4 in 10 feel that their existing stack is out-of-date and insufficient. So how does the buying decision take place?
https://i.imgur.com/IGYVcUg.jpg
What is a coder’s worst nightmare?2018-03-09T10:36:04+00:002018-03-09T10:36:04+00:00https://blog.codecarrot.net/what-is-a-coders-worst-nightmare<p><em>The life of a developer is not easy.</em></p>
<ul>
<li>Your code (or a bug in it) accidentally kills or maims someone</li>
<li>Internet Explorer (if you are a Web developer).</li>
<li>Requirement changed, again.</li>
<li>GitHub merge conflict</li>
<li>Accidentally typing rm -rf * in a wrong directory. THE END. :(</li>
<li>Stack Overflow is down!</li>
<li>Going to Stack Overflow and seeing someone’s post with the exact same question you have been trying to get answered. Posted a year ago with no answers.</li>
<li>Reaching your question limit on Stack Overflow</li>
<li>The bug only occurs in production and can’t be replicated or triggered locally.</li>
<li>The probability of the bug occurring is low, but not low enough to ignore.</li>
<li>The cause of the bug involves a race condition that only occurs under load.</li>
<li>The cause of the bug is unknown.</li>
<li>You didn’t write the code that caused the bug but are responsible for fixing it; the person who wrote the code no longer works for the company.</li>
<li>The issue that caused the bug is in some library that is reliable 99.9% of the time and thus is the last place you would look.</li>
<li>Hardware bug, but everybody assumes it’s the software.</li>
<li>Many others have attempted to debug it over the years; nobody succeeded.</li>
<li>The bug is a logical error that only occurs at run-time after a long period of time.</li>
<li>Debugging requires expertise in a field you know nothing about.</li>
<li>You have a tight deadline to fix the bug.</li>
<li>The bug can’t be ignored because your job is at stake.</li>
</ul>
<p><img src="https://i.imgur.com/nGjCZ2B.jpg" alt="Semicolon key not working" /></p>
<ul>
<li>Semicolon key not working</li>
<li>Seeing your uncommented code a year later on an awesome working project and screaming while struggling, “How the hell did I do this?” and “Did I really write this code?” It’s like getting lost in your own house.</li>
<li>A library with no documentation.</li>
<li>= instead of ==</li>
<li>Overconfidence. Lack of preparation. Underestimation. Furious activity instead of groking.</li>
<li>“My code works, I don’t know why”</li>
</ul>
<p><img src="https://i.imgur.com/SVyuXVl.jpg" alt="Fixing 1 error, got 927234 error more" /></p>
<ul>
<li>Fixing 1 error, got 927234 error more.</li>
<li>Under-communication: Programmers need to understand what they are building, and how it will be used. You need to establish context. This is because while building something there are about 100 different points in which you need to make a judgment call. Having the context allows you to make the judgment call.</li>
<li>Over-communication: Meetings, meetings, meetings… can be death of programmers.</li>
<li>Have to wait a day for getting clarifications, if the “Client” is in another Time Zone</li>
<li>No documentation or much worse, useless documentation. (e.g., stating the obvious, having nothing to do with the code, etc)</li>
<li>Indentation is messy and you cannot debug your code because of the illogical structure</li>
<li>The program stops responding due to a bug in a particular version of the OS you do not have access to.</li>
<li>The boss tries to test the program with an old version.</li>
<li>A client does something unimaginable that stops your program from working. You don’t know what the client did and your manager wants you to fix it by the next day. THE END :(</li>
</ul>yashumittalThe life of a developer is not easy.
https://i.imgur.com/h9gYCcD.jpg
Passing Data Between React Components2018-03-02T15:59:00+00:002018-03-02T15:59:00+00:00https://blog.codecarrot.net/passing-data-between-react-components<p>React is popular in writing reusable and modular UI components, and one-way data flow. One-way data binding can make React more performant than Angular.</p>
<p>But the tricky part is to pass the data from one component to another. Data sometimes needs to be passed from children to parent, parent to children, or between the siblings.</p>
<p>Here is an <strong>tree structure</strong> of an React Navigation components:</p>
<div class="language-js highlighter-rouge"><div class="highlight"><pre class="highlight"><code> <span class="nx">App</span>
<span class="o">|</span>
<span class="o">|</span><span class="nx">__</span> <span class="nx">Navigation</span>
<span class="o">|</span>
<span class="o">|</span><span class="nx">__</span> <span class="nx">Navitem</span>
<span class="o">|</span>
<span class="o">|</span><span class="nx">__</span> <span class="nx">Navlinks</span>
</code></pre></div></div>
<p>One of the easiest way to pass the data is from Parent to it’s childern.</p>
<h2 id="parent-to-childuse-prop">Parent to Child — Use Prop</h2>
<p>If you have access to data your childern componet need from the parent component, all you need is to pass it as a prop to the child.</p>
<p><strong>Passing data</strong> from the App to the Navigation:</p>
<div class="language-js highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="kd">class</span> <span class="nx">App</span> <span class="kd">extends</span> <span class="nx">React</span><span class="p">.</span><span class="nx">Component</span> <span class="p">{</span>
<span class="nx">render</span><span class="p">()</span> <span class="p">{</span>
<span class="k">return</span> <span class="p">(</span>
<span class="o"><</span><span class="nx">div</span><span class="o">></span>
<span class="o"><</span><span class="nx">Navigation</span> <span class="nx">itemNameFromParent</span><span class="o">=</span><span class="p">{</span><span class="nx">itemName</span><span class="p">}</span><span class="sr">/</span><span class="err">>
</span> <span class="o"><</span><span class="sr">/div</span><span class="err">>
</span> <span class="p">);</span>
<span class="p">}</span>
<span class="p">}</span>
</code></pre></div></div>
<p>Using <code class="highlighter-rouge">this.props.itemNameFromParent</code> will give access to that data, inside Navigation component.</p>
<h2 id="child-to-parentuse-a-callback-and-states">Child to Parent — Use a callback and states</h2>
<h3 id="option-1">Option 1</h3>
<p>Here’s the best part. Having some data that the parents need access to:</p>
<ol>
<li>Define a callback in parent which takes the data as a parameter.</li>
<li>Pass that callback as a prop to the child <em>(see above)</em>.</li>
<li>Call the callback using <code class="highlighter-rouge">this.props.[callback]</code> in the child, and pass in the data as the argument.</li>
</ol>
<p><strong>Passing data</strong> from the <code class="highlighter-rouge">Navlinks</code> to the <code class="highlighter-rouge">Navitem</code>:</p>
<div class="language-js highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="kd">class</span> <span class="nx">Navitem</span> <span class="kd">extends</span> <span class="nx">React</span><span class="p">.</span><span class="nx">Component</span> <span class="p">{</span>
<span class="nx">Callback</span> <span class="o">=</span> <span class="p">(</span><span class="nx">dataFromChildern</span><span class="p">)</span> <span class="o">=></span> <span class="p">{</span>
<span class="c1">// Using the dataFromChildern</span>
<span class="p">},</span>
<span class="nx">render</span><span class="p">()</span> <span class="p">{</span>
<span class="k">return</span> <span class="p">(</span>
<span class="o"><</span><span class="nx">div</span><span class="o">></span>
<span class="o"><</span><span class="nx">Navlinks</span> <span class="nx">callbackFromParent</span><span class="o">=</span><span class="p">{</span><span class="k">this</span><span class="p">.</span><span class="nx">Callback</span><span class="p">}</span><span class="sr">/</span><span class="err">>
</span> <span class="o"><</span><span class="sr">/div</span><span class="err">>
</span> <span class="p">);</span>
<span class="p">}</span>
<span class="p">}</span>
</code></pre></div></div>
<p>Passing something to <code class="highlighter-rouge">callbackFromParent</code> within <code class="highlighter-rouge">Navitem</code>:</p>
<div class="language-js highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="kd">class</span> <span class="nx">Navitem</span> <span class="kd">extends</span> <span class="nx">React</span><span class="p">.</span><span class="nx">Component</span><span class="p">{</span>
<span class="kd">function</span> <span class="o">=</span> <span class="p">()</span> <span class="o">=></span> <span class="p">{</span>
<span class="c1">// Define a variable NavitemInfo, containg useful data</span>
<span class="k">this</span><span class="p">.</span><span class="nx">props</span><span class="p">.</span><span class="nx">callbackFromParent</span><span class="p">(</span><span class="nx">NavitemInfo</span><span class="p">);</span>
<span class="p">},</span>
<span class="nx">render</span><span class="p">()</span> <span class="p">{</span>
<span class="c1">// ...</span>
<span class="p">}</span>
<span class="p">};</span>
</code></pre></div></div>
<h3 id="option-2">Option 2</h3>
<p>Use <code class="highlighter-rouge">NavitemInfo</code> in a different function within <code class="highlighter-rouge">Navitem</code>.</p>
<div class="language-js highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="kd">class</span> <span class="nx">Navitem</span> <span class="kd">extends</span> <span class="nx">React</span><span class="p">.</span><span class="nx">Component</span> <span class="p">{</span>
<span class="kd">constructor</span><span class="p">(</span><span class="nx">props</span><span class="p">)</span> <span class="p">{</span>
<span class="k">super</span><span class="p">(</span><span class="nx">props</span><span class="p">);</span>
<span class="k">this</span><span class="p">.</span><span class="nx">state</span> <span class="o">=</span> <span class="p">{</span>
<span class="na">listDataFromChildern</span><span class="p">:</span> <span class="kc">null</span>
<span class="p">};</span>
<span class="p">},</span>
<span class="nx">Callback</span> <span class="o">=</span> <span class="p">(</span><span class="nx">dataFromChildern</span><span class="p">)</span> <span class="o">=></span> <span class="p">{</span>
<span class="k">this</span><span class="p">.</span><span class="nx">setState</span><span class="p">({</span> <span class="na">listDataFromChildern</span><span class="p">:</span> <span class="nx">dataFromChildern</span> <span class="p">});</span>
<span class="p">},</span>
<span class="kd">function</span> <span class="o">=</span> <span class="p">()</span> <span class="o">=></span> <span class="p">{</span>
<span class="c1">// You have access to this.state.listDataFromChildern</span>
<span class="p">}</span>
<span class="nx">render</span><span class="p">()</span> <span class="p">{</span>
<span class="k">return</span> <span class="p">(</span>
<span class="o"><</span><span class="nx">div</span><span class="o">></span>
<span class="o"><</span><span class="nx">Navlinks</span> <span class="nx">callbackFromParent</span><span class="o">=</span><span class="p">{</span><span class="k">this</span><span class="p">.</span><span class="nx">Callback</span><span class="p">}</span><span class="sr">/</span><span class="err">>
</span> <span class="c1">// Pass this.state.listDataFromChildern as a prop to any other child component</span>
<span class="o"><</span><span class="sr">/div</span><span class="err">>
</span> <span class="p">);</span>
<span class="p">}</span>
<span class="p">});</span>
</code></pre></div></div>
<p><strong>Note:</strong> By using the arrow function in the definition of <code class="highlighter-rouge">Callback</code>. Allows you to avoid using <code class="highlighter-rouge">.bind</code> when invoking, as it will retain the context of where it is called.</p>
<h2 id="between-siblings">Between Siblings</h2>
<p>To pass data between siblings, you have to use the parent as an intermediary. First pass the data from the child to the parent, as an argument into a callback from the parent.</p>
<p>Set this incoming parameter as a state on the parent component, then pass it as a prop to the other child. The sibling can then use the data as a prop.</p>
<div class="language-js highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="kd">class</span> <span class="nx">Navitem</span> <span class="kd">extends</span> <span class="nx">React</span><span class="p">.</span><span class="nx">Component</span> <span class="p">{</span>
<span class="nx">getInitialState</span><span class="p">()</span> <span class="p">{</span>
<span class="k">return</span> <span class="p">{</span>
<span class="na">initialState</span><span class="p">:</span> <span class="dl">"</span><span class="s2">init</span><span class="dl">"</span>
<span class="p">};</span>
<span class="p">},</span>
<span class="nx">updateShared</span><span class="p">(</span><span class="nx">action</span><span class="p">)</span> <span class="p">{</span>
<span class="k">this</span><span class="p">.</span><span class="nx">setState</span><span class="p">({</span>
<span class="na">initialState</span><span class="p">:</span> <span class="nx">action</span>
<span class="p">})</span>
<span class="p">},</span>
<span class="nx">render</span><span class="p">()</span> <span class="p">{</span>
<span class="k">return</span> <span class="p">(</span>
<span class="c1">// ...</span>
<span class="p">);</span>
<span class="p">}</span>
<span class="p">};</span>
<span class="kd">var</span> <span class="nx">Navlinks1</span> <span class="o">=</span> <span class="nx">React</span><span class="p">.</span><span class="nx">createClass</span><span class="p">({</span>
<span class="nx">updateShared</span><span class="p">()</span> <span class="p">{</span>
<span class="k">this</span><span class="p">.</span><span class="nx">props</span><span class="p">.</span><span class="nx">updateShared</span><span class="p">(</span><span class="dl">'</span><span class="s1">clicked</span><span class="dl">'</span><span class="p">);</span>
<span class="p">},</span>
<span class="nx">render</span><span class="p">()</span> <span class="p">{</span>
<span class="k">return</span> <span class="p">(</span>
<span class="o"><</span><span class="nx">button</span> <span class="nx">onClick</span><span class="o">=</span><span class="p">{</span><span class="k">this</span><span class="p">.</span><span class="nx">updateShared</span><span class="p">}</span> <span class="nx">style</span><span class="o">=</span><span class="p">{</span><span class="k">this</span><span class="p">.</span><span class="nx">props</span><span class="p">.</span><span class="nx">initialState</span> <span class="o">==</span> <span class="dl">'</span><span class="s1">clicked</span><span class="dl">'</span> <span class="p">?</span> <span class="p">{</span><span class="na">color</span><span class="p">:</span> <span class="dl">"</span><span class="s2">green</span><span class="dl">"</span><span class="p">}</span> <span class="p">:</span> <span class="kc">null</span><span class="p">}</span> <span class="o">></span>
<span class="c1">// ...</span>
<span class="o"><</span><span class="sr">/button</span><span class="err">>
</span> <span class="p">);</span>
<span class="p">}</span>
<span class="p">});</span>
<span class="kd">var</span> <span class="nx">Navlinks2</span> <span class="o">=</span> <span class="nx">React</span><span class="p">.</span><span class="nx">createClass</span><span class="p">({</span>
<span class="nx">updateShared</span><span class="p">()</span> <span class="p">{</span>
<span class="k">this</span><span class="p">.</span><span class="nx">props</span><span class="p">.</span><span class="nx">updateShared</span><span class="p">(</span><span class="dl">'</span><span class="s1">touch</span><span class="dl">'</span><span class="p">);</span>
<span class="p">},</span>
<span class="na">render</span><span class="p">:</span> <span class="kd">function</span><span class="p">()</span> <span class="p">{</span>
<span class="k">return</span> <span class="p">(</span><span class="o"><</span><span class="nx">button</span> <span class="nx">onClick</span><span class="o">=</span><span class="p">{</span><span class="k">this</span><span class="p">.</span><span class="nx">updateShared</span><span class="p">}</span> <span class="nx">style</span><span class="o">=</span><span class="p">{</span><span class="k">this</span><span class="p">.</span><span class="nx">props</span><span class="p">.</span><span class="nx">initialState</span> <span class="o">==</span> <span class="dl">'</span><span class="s1">touch</span><span class="dl">'</span> <span class="p">?</span> <span class="p">{</span><span class="na">color</span><span class="p">:</span> <span class="dl">"</span><span class="s2">orange</span><span class="dl">"</span><span class="p">}</span> <span class="p">:</span> <span class="kc">null</span><span class="p">}</span><span class="o">></span>
<span class="c1">// ...</span>
<span class="o"><</span><span class="sr">/button></span><span class="se">)</span><span class="err">;
</span> <span class="p">}</span>
<span class="p">});</span>
</code></pre></div></div>
<p>Passing data between React components can be a little tricky for new commers, but once you practice these techniques it will like second hand for you.</p>yashumittalReact is popular in writing reusable and modular UI components, and one-way data flow. One-way data binding can make React more performant than Angular.
https://i.imgur.com/JGMaIAf.jpg
How To Build A Massive Following On Instagram2018-02-28T22:12:24+00:002018-02-28T22:12:24+00:00https://blog.codecarrot.net/how-to-build-a-massive-following-on-instagram<p>Used correctly, Instagram can be a highly-targeted, visual advertising channel for your brand. In fact, in a recent study it was discovered that Instagram provides brands with 25% more engagement over other social platforms. This mean that Instagram is a prime channel to build your brand for your ecommerce business.</p>
<p>Like any social network out there, there are right ways to use it, wrong ways to use it, and clever ways to use it.</p>
<p>In this post, we will show you how to most effectively use Instagram to increase engagement and build a massive following.</p>
<h2 id="how-to-get-followers-on-instagram">How to Get Followers on Instagram</h2>
<p>There are five tactics that will help you get more followings on Instagram.</p>
<ol>
<li>Use the right hashtags</li>
<li>Use the right filters</li>
<li>Post at the right time</li>
<li>Steal your competitors followers</li>
<li>Sponsored posts and product reviews</li>
<li>Let’s dive deeper into how to implement each tactic.</li>
</ol>
<h3 id="1-use-the-right-hashtags">1. Use The Right Hashtags</h3>
<p>Your goal on Instagram is to engage your current audience while also growing your following. Posting new, interesting and engaging photos will satisfy the first requirement but to begin growing you’ll find hashtagging your photos to be extremely important. Hashtagging your photos makes it easy for people to find your photos that are searching for those specific terms.</p>
<p>So which hashtags should you use?</p>
<p>Just like with Twitter and other social sites, users on Instagram use certain hashtags over others. If you use the right hashtags within your photos, you’re much more likely to reach new users and be discovered.</p>
<p>Here are the current top 20 hashtags on Instagram according to Websta:</p>
<ol>
<li>#love (1,027,917,810 posts)</li>
<li>#instagood (552,537,705 posts)</li>
<li>#photooftheday (394,332,818 posts)</li>
<li>#beautiful (367,636,422 posts)</li>
<li>#tbt (360,522,758 posts)</li>
<li>#happy (2353,202,629 posts)</li>
<li>#cute (351,930,751 posts)</li>
<li>#fashion (351,195,493 posts)</li>
<li>#followme (326,083,312 posts)</li>
<li>#me (314,611,081 posts)</li>
<li>#follow (311,454,486 posts)</li>
<li>#like4like (306,277,038 posts)</li>
<li>#picoftheday (306,277,038 posts)</li>
<li>#selfie (293,039,427 posts)</li>
<li>#summer (261,573,181 posts)</li>
<li>#friends (258,756,470 posts)</li>
<li>#instadaily (258,189,528 posts)</li>
<li>#girl (244,327,385 posts)</li>
<li>#fun (238,836,598 posts)</li>
<li>#art (233,524,357 posts)</li>
</ol>
<p>If you looked at the list above and said “But none of those apply to my products or brand”, you’re likely correct.</p>
<p>Using hashtags is one thing, using the right tags is a completely other thing. Popular tags like the ones listed above will likely net you additional engagement and likes, however, they will not lead to increased long-term engagement, new interested followers and most importantly, sales.</p>
<p>If you want to tag your photos properly, you’ll need to find and use the most relevant hashtags. This means doing the appropriate research to make sure you’re using the most relevant hashtags that not only describes your brand, but is also being searched for on Instagram.</p>
<p>To find relevant hashtags, you’ll want to use a free online program like <a href="http://iconosquare.com/">IconoSquare</a> or <a href="http://web.stagram.com/">Websta</a>.</p>
<p>Below, I used Websta to find relevant, related and popular hashtags for my men’s accessory brand by searching for key hashtags that are closely related to my brand.</p>
<p>As an example, searching the hashtag #MensFashion, I was able to pull the following list of additional keyword hashtags along with the number of times they have been used (popularity).</p>
<p><img src="https://i.imgur.com/RhhypUU.jpg" alt="Use The Right Hashtags" /></p>
<p>You’ll want to go through this exercise trying different keywords that describe your brand and products, building out your hashtag keyword list as you go.</p>
<p>Keep in mind that Instagram allows for a maximum of 30 hashtags per post. Additionally, the popular words will change over time, so make sure you revisit your hashtag keywords every few months to make sure you’re using the best possible terms.</p>
<p><strong>Protip #1:</strong> Here’s a trick that I use for my ecommerce businesses. For every product and product category for my stores, I have done the research to see which are the most popular Instagram hashtags around those product categories. I came up with 15-20 popular hashtags for each category of products I sell, as well as a base of 5-10 popular tags that describe my brand and product offering overall. Finally, I also created a list of popular local specific hashtags that relate to my brand.</p>
<p>For example:</p>
<ul>
<li><strong>(Brand Keyword Hashtags)</strong> #mybrandname #mensfashion #mensaccessories #mensgoods #fashion #mensstyle #instafashion #menswear</li>
<li><strong>(Product Category Keyword Hashtags)</strong> #bugatchisocks #happysocks #corgisocks #socks #sockswag #socksoftheday #sockgame #sockswagg #socksofinstagram #happysockday #sockwars #funsocks #happysockday</li>
<li><strong>(Location Specific Keyword Hashtags)</strong> #Toronto #TorontoFashion #TorontoFashionBloggers</li>
</ul>
<p>All of these groups of keyword hashtags are stored in a page on Evernote. This makes it easy and efficient when I’m on the go to post a new Instagram image, optimized for the most relevant keywords. I can easily open my Evernote and copy my standard brand, product and location specific hashtags to post with each photo.</p>
<p><img src="https://i.imgur.com/ghNFiYC.png" alt="Use The Right Hashtags" /></p>
<p>Doing the work upfront of researching, organizing and saving the most applicable and popular hashtags will save you a ton of time down the road, increase your engagement and help garner new followers.</p>
<p><strong>Protip #2:</strong> If you’ve been posting to Instagram for a while and feel like you’ve missed out on all these opportunities to build your audience by using keyword hashtags, fret not. You can still go back and post a comment with your new hashtag keyword lists and watch the likes and followers roll in.</p>
<h3 id="2-use-the-right-filters">2. Use The Right Filters</h3>
<p>Keyword hashtags aren’t the only thing you should pay attention to. The Instagram community respond to certain photo filters more favorably than others. Using these preferred filters can have an impact on your engagement.</p>
<p>Here are the 10 current most popular filters on Instagram according to Iconosquare:</p>
<ol>
<li>Normal (No Filter)</li>
<li>Clarendon</li>
<li>Juno</li>
<li>Lark</li>
<li>Ludwig</li>
<li>Gingham</li>
<li>Valencia</li>
<li>X-Pro II</li>
<li>Lo-fi</li>
<li>Amaro</li>
</ol>
<p>TrackMaven recently did a study on Instagram accounts to see how filters affected engagement and found that Mayfair, no filter and Inkwell drove the most interaction.</p>
<p><img src="https://i.imgur.com/xDz58bC.png" alt="TeackMaven 1" /></p>
<p>More important than the overall Instagram communities favorite filters are your particular audience’s favorite filters. Consider this custom graph which correlates filter usage to engagement from your own Instagram account:</p>
<p><img src="https://i.imgur.com/sKr1aOz.png" alt="TeackMaven 2" /></p>
<p>You can use IconoSquare to review the performance of your own account to understand what is and is not currently working for you.</p>
<h3 id="3-post-at-the-right-time">3. Post at the Right Time</h3>
<p>Beyond adding the appropriate hashtags and using the best filters, you should also be considering the timing of your posts.</p>
<p>A targeted approach is to analyze what has and has not worked for you in the past. By visiting IconoSquare’s optimization section, you can get a detailed analysis of your posting history vs. engagement. This report will also highlight the best times of the day and days of the week to post.</p>
<p>The dark circles indicates when you usually post media. The light gray circles shows when your community has been interacting. The biggest light gray circles represent the best times for you to post.</p>
<p><img src="https://i.imgur.com/lMxVf41.png" alt="Post On The Right Days And Time" /></p>
<p>You may want to consider using a scheduling program to schedule your post. For that, you can use a (paid) program like ScheduGram.</p>
<h3 id="4-steal-your-competitors-followers">4. Steal Your Competitors Followers</h3>
<p>One of the best ways to find and attract new following is by seeking out your closest competitors’ Instagram accounts and engaging with their audience. These people have already shown some level of interest in the products you carry simply by following your competitors’ account.</p>
<p>So how do you effectively steal your competitors’ followers?</p>
<p>You can steal your closest competitors’ followers by engaging with them. There are several ways to engage with Instagram users, and predictably, the more work you put in, the more followers and return engagement you’ll get out of it.</p>
<p>The three types of engagement on Instagram are:</p>
<ul>
<li>Follow a user</li>
<li>Like a photo</li>
<li>Comment on a photo</li>
</ul>
<p>I ran an informal test with my business account to see how my competitors’ followers responded to my marketing advances. I targeted the followers of a close, local competitor. Since I know many of his followers would be local, I added my city to my profile to create a greater sense of familiarity between my brand and the people I am targeting.</p>
<p>I began by simply following 100 of my competitor’s followers. Later, I followed another 100 of my competitor’s followers but I also took the time to like one of their photos. Finally, I followed another 100 of my competitor’s followers and commented on one of each of the 100 user’s photos as well as liked that same photo.</p>
<p>Here were the results:</p>
<ul>
<li>Follow: 14% followback</li>
<li>Follow + Like: 22% followback</li>
<li>Follow + Like + Comment: 34% followback</li>
</ul>
<p>Although the are many variables and the test was far from scientific, the results were clear. The more you put in and engage with people, the more you’ll get out of it.</p>
<h3 id="5-sponsored-posts-and-product-reviews">5. Sponsored Posts and Product Reviews</h3>
<p>All this optimized posting to your account is great but if you really want to make an impact, you need to take advantage of influencer marketing on Instagram, exposing your brand to a wider audience.</p>
<p>So how do you do that?</p>
<p>First, unlike the tactics above to grow your account this one isn’t free. However, if done correctly, it’s good value.</p>
<p>To get started, you’ll need to make a list of large accounts in your niche. For example, if you sell beauty products, you’ll want to find large accounts from beauty bloggers.</p>
<p>You may already be following these accounts, if not you’ll need to find them. One of the best ways is to use Webstagram and search for some of the closest hashtag keywords you uncovered in the beginning of this post. When you do a search for your keywords, not only will it show you the related keywords, but it also shows you the top Instagram accounts that feature those keywords.</p>
<p>There are a few things to look for in the profiles results:</p>
<ul>
<li>Large following - Usually 20k-200k</li>
<li>An email address in the profile</li>
</ul>
<p>If there is an email address in the profile, it usually means they’re open to sponsored posts. You’ll want to email them and ask them their sponsored post pricing. In general, I have found the average rate to be around $20-$50 per post, depending on the size of their following. However, if you’re selling an unique and original product, you may also want to consider sending them your product to review and post. The more natural and less advertisement like the image, the greater the engagement and response usually.</p>
<p>Here is a great product placement from Maxim model Ashley Sky that received over 16 thousands likes:</p>
<p><img src="https://i.imgur.com/WxTity9.png" alt="Tea Posts And Product Reviews" /></p>
<p>The results from the Instagram sponsored post promotion was a flood of traffic to their Instagram account and website, supposedly causing their server to crash.</p>
<p><img src="https://i.imgur.com/wLWSib3.jpg" alt="traffic to the Instagram account" /></p>
<p>In a final example, Classified Apparel used the tactic of getting featured on a larger account to jump start their Instagram following. Starting with only 22 followers, they were able to net nearly 3,500 new followers in less than 24 hours. A few months later and they are now sitting at 10,000 followers.</p>
<p><img src="https://i.imgur.com/0gvklAc.jpg" alt="Proof of increasing instgram followers" /></p>
<h2 id="instagram-tool-roundup">Instagram Tool Roundup</h2>
<p>There are hundreds of Instagram tools out there that can help you and your Instagram strategy. In this post I mentioned three key ones help you build your audience and engage with them.</p>
<ul>
<li><a href="http://schedugr.am/">Schedugram</a> - Schedule your Instagram post for the most engaging times.</li>
<li><a href="http://iconosquare.com/">IconoSquare</a> - Info, analytics and insights into your account and followers.</li>
<li><a href="http://web.stagram.com/">Webstagram</a> - Find the best hashtags for your posts and people for your sponsored posts.</li>
</ul>
<p>Once you’ve built up a large following on Instagram, check out these tactics for making money on Instagram.</p>
<h2 id="conclusion">Conclusion</h2>
<p>In this post we talked about the most effective ways to use Instagram to build a targeted following, but it’s not always a numbers game. As with any social network, the most successful strategy overall is to be authentic and social.</p>
<p>If used correctly, Instagram can be a highly-targeted, visual advertising channel for your products and brand that can lead to a healthy stream of revenue for your business.</p>yashumittalUsed correctly, Instagram can be a highly-targeted, visual advertising channel for your brand. In fact, in a recent study it was discovered that Instagram provides brands with 25% more engagement over other social platforms. This mean that Instagram is a prime channel to build your brand for your ecommerce business.
https://i.imgur.com/EZEv6Kf.jpg
Tools you need to start coding2018-02-28T07:40:15+00:002018-02-28T07:40:15+00:00https://blog.codecarrot.net/tools-you-need-to-start-coding<p>In the tech world, there are thousands of tools that people will tell you to use. How are you supposed to know where to start?</p>
<p>As somebody who started coding relatively recently, this downpour of information was too much to sift through. I found myself installing extensions that did not really help me in my development cycle, and often even got in the way of it.</p>
<p>I am by no means an expert, but over time I have compiled a list of tools that have proven extremely useful to me. If you are just starting to learn how to program, this will hopefully offer you some guidance. If you are a seasoned developer, hopefully you will still learn something new.</p>
<p>I am going to break this article up into Chrome Extensions and VS Code extensions. I know there are other browsers and other text editors, but I am willing to bet most of the tools are also available for your platform of choice, so let’s not start a religious argument over our personal preferences.</p>
<p>Feel free to jump around.</p>
<h2 id="chrome-extensions">Chrome Extensions</h2>
<p><img src="https://i.imgur.com/4LrKRk9.jpg" alt="Chrome Extensions" /></p>
<p>Now that I am a self-proclaimed web developer, I practically live in my Chrome console. Below are some tools that allow me to spend less time there:</p>
<ul>
<li><a href="https://chrome.google.com/webstore/detail/whatfont/jabopobgcpjmedljpbcaablpmlmfcogm?hl=en">WhatFont</a> — The name says it all. This is an easy way of finding out the fonts that your favorite website is using, so that you can borrow them for your own projects.</li>
<li><a href="https://chrome.google.com/webstore/detail/pesticide-for-chrome/bblbgcheenepgnnajgfpiicnbbdmmooh?hl=en">Pesticide</a> — Useful for seeing the outlines of your <code class="highlighter-rouge"><div></code>s and modifying CSS. This was a lifesaver when I was trying to learn my way around the box-model.</li>
<li><a href="https://chrome.google.com/webstore/detail/colorzilla/bhlhnicpbhignbdhedgjhgdocnmhomnp?hl=en">Colorzilla</a> — Useful for copying exact colors off of a website. This copies a color straight to your clipboard so you don’t spend forever trying to get the right RGBA combination.</li>
<li><a href="https://chrome.google.com/webstore/detail/css-peeper/mbnbehikldjhnfehhnaidhjhoofhpehk?hl=en">CSS Peeper</a> — Useful for looking at colors and assets used on a website. A good exercise, especially when starting out, is cloning out websites that you think look cool. This gives you a peek under the hood at their color scheme and allows you to see what other assets exist on their page.</li>
<li><a href="https://chrome.google.com/webstore/detail/wappalyzer/gppongmhjkpfnbhagpmjfkannfbllamg?hl=en">Wappalyzer</a> — Useful for seeing the technologies being used on a website. Ever wonder what kind of framework a website is using or what service it is hosted on? Look no further.</li>
<li><a href="https://chrome.google.com/webstore/detail/react-developer-tools/fmkadmapgofadopljbjfkapdkoienihi?hl=en">React Dev Tools</a> — Useful for debugging your React applications. It bears mentioning that this is only useful if you are programming a React application.</li>
<li><a href="https://chrome.google.com/webstore/detail/redux-devtools/lmhkpmbekcpmknklioeibfkpmmfibljd?hl=en">Redux Dev Tools</a> — Useful for debugging applications using Redux. It bears mentioning that this is only useful if you are implementing Redux in your application.</li>
<li><a href="https://chrome.google.com/webstore/detail/json-formatter/bcjindcccaagfpapjjmafapmmgkkhgoa?hl=en">JSON Formatter</a> — Useful for making JSON look cleaner in the browser. Have you ever stared an ugly JSON blob in the face, trying to figure out how deeply nested the information you want is? Well this makes it so that it only takes 2 hours instead of 3.</li>
<li><a href="https://chrome.google.com/webstore/detail/vimeo-repeat-speed/noonakfaafcdaagngpjehilgegefdima?hl=en">Vimeo Repeat and Speed</a> — Useful for speeding up Vimeo videos. If you watch video tutorials like most web developers, you know how handy it is to consume them at 1.25 times the regular playback speed. There are also versions for YouTube.</li>
</ul>
<h2 id="vs-code-extensions">VS Code Extensions</h2>
<p><img src="https://i.imgur.com/QJb6qAo.jpg" alt="VS Code Extensions" /></p>
<p>Visual Studio Code is one of my editor of choice.</p>
<p>People love their text editors, and I am no exception. However, I’m willing to bet most of these extensions work for whatever editor you are using as well. Check out my favorite extensions:</p>
<ul>
<li><a href="https://marketplace.visualstudio.com/items?itemName=formulahendry.auto-rename-tag">Auto Rename Tag</a> — Auto rename paired HTML tags. You created a <code class="highlighter-rouge"><p></code>tag. Now you want to change it, as well as its enclosing <code class="highlighter-rouge"></p></code> tag to something else. Simply change one and the other will follow. Theoretically improves your productivity by a factor of 2.</li>
<li><a href="https://marketplace.visualstudio.com/items?itemName=ecmel.vscode-html-css">HTML CSS Support</a> — CSS support for HTML documents. This is useful for getting some neat syntax highlighting and code suggestions so that CSS only makes you want to quit coding a couple of times a day.</li>
<li><a href="https://marketplace.visualstudio.com/items?itemName=abusaidm.html-snippets">HTML Snippets</a> — Useful code snippets. Another nice time saver. Pair this with <a href="https://emmet.io/">Emmet</a> and you barely ever have to type real HTML again.</li>
<li><a href="https://marketplace.visualstudio.com/items?itemName=dzannotti.vscode-babel-coloring">Babel ES6/ES7</a> — Adds JavaScript Babel syntax coloring. If you are using Babel, this will make it much easier to differentiate what is going on in your code. This is neat if you like to play with modern features of JavaScript.</li>
<li><a href="https://marketplace.visualstudio.com/items?itemName=CoenraadS.bracket-pair-colorizer">Bracket Pair Colorizer</a> — Adds colors to brackets for easier block visualization. This is handy for those all-too-common bugs where you didn’t close your brackets or parentheses accurately.</li>
<li><a href="https://marketplace.visualstudio.com/items?itemName=dbaeumer.vscode-eslint">ESLint</a> — Integrates ESLint into Visual Studio Code. This is handy for getting hints about bugs as you are writing your code and, depending on your configuration, it can help enforce good coding style.</li>
<li><a href="https://marketplace.visualstudio.com/items?itemName=spywhere.guides">Guides</a> — Adds extra guide lines to code. This is another visual cue to make sure that you are closing your brackets correctly. If you can’t tell, I’m a very visual person.</li>
<li><a href="https://marketplace.visualstudio.com/items?itemName=whtouche.vscode-js-console-utils">JavaScript Console Utils</a> — Makes for easier console logging. If you are like most developers, you will find yourself logging to the console in your debugging flow (I know that we are supposed to use the debugger). This utility makes it easy to create useful <code class="highlighter-rouge">console.log()</code> statements.</li>
<li><a href="https://marketplace.visualstudio.com/items?itemName=streetsidesoftware.code-spell-checker">Code Spell Checker</a> — Spelling checker that accounts for camelCase. Another common source of bugs is fat-thumbing a variable or function name. This spell checker will look for uncommon words and is good about accounting for the way we write things in JavaScript.</li>
<li><a href="https://marketplace.visualstudio.com/items?itemName=eamodio.gitlens">Git Lens</a> — Makes it easier to see when, and by whom, changes were made. This is nice for blaming the appropriate person when code gets broken, since it is absolutely never your fault.</li>
<li><a href="https://marketplace.visualstudio.com/items?itemName=christian-kohler.path-intellisense">Path Intellisense</a> — File path autocompletion. This is super handy for importing things from other files. It makes navigating your file tree a breeze.</li>
<li><a href="https://marketplace.visualstudio.com/items?itemName=esbenp.prettier-vscode">Prettier</a> — Automatic code formatter. Forget about the days where you had to manually indent your code and make things human-legible. Prettier will do this for you much faster, and better, than you ever could on your own. I can’t recommend this one enough.</li>
<li><a href="https://marketplace.visualstudio.com/items?itemName=robertohuertasm.vscode-icons">VSCode-Icons</a> — Adds icons to the file tree. If looking at your file structure hurts your eyes, this might help. There is a helpful icon for just about any kind of file you are making which will make it easier to distinguish what you are looking at.</li>
</ul>
<h2 id="conclusion">Conclusion</h2>
<p>You likely have your own set of tools that are indispensable to your development cycle. Hopefully some of the tools I mentioned above can make your workflow more efficient.</p>
<p>Do not fall into the trap, however, of installing every tool you run across before learning to use the ones you already have, as this can be a huge time-sink.</p>
<p>I encourage you to leave your favorite tools in the comments below here, so that we can all learn together.</p>yashumittalIn the tech world, there are thousands of tools that people will tell you to use. How are you supposed to know where to start?
https://i.imgur.com/qzGqDb9.jpg
Modern Ruby Frameworks Comparison - RoR vs Hanami2018-02-27T19:30:00+00:002018-02-27T19:30:00+00:00https://blog.codecarrot.net/modern-ruby-frameworks-comparison-ror-vs-hanami<p>We love using Ruby On Rails at <a href="https://www.codecarrot.net/">CodeCarrot</a>. It’s our framework of choice in most cases. We know its best and worst aspects, and we feel comfortable using it. That said, we’re aware that there are other Ruby frameworks worth looking at. Today, we want to show you Hanami – an alternative to RoR.</p>
<h2 id="a-little-bit-of-history">A little bit of history</h2>
<p>Hanami is still a very young framework. Its stable 1.0 version was finally released only a few months ago (version 1.1.0 has been released recently). From that point on, we can consider this technology for any real-world scenarios without worries.</p>
<h3 id="pros-of-hanami">Pros of Hanami</h3>
<ol>
<li><strong>Lightweight, modular solution</strong></li>
</ol>
<p>Ruby on Rails is a great framework with lots of features, which makes building apps really easy and quick (at least at the beginning). But all RoR’s features come in one package, which means costs in terms of memory and CPU consumption. Hanami, on the other hand, is much more flexible, and you can very easily select parts of the framework you need in your project. You can start with something very basic and add more features only when you need them. It might come in handy when you are starting a new project, and you know it will be quite simple or when you want to extend your application, and it will be easier to create a small separate service just for this feature instead of changing the existing codebase.</p>
<ol>
<li><strong>Enforces good code structure</strong></li>
</ol>
<p>It is a well-known fact that building applications with Rails is fun at the beginning, but as the codebase grows, the default code structure proposed by Rails often becomes a source of frustration. This means that you will need to spend some time on code refactoring, or use a better code structure from the start. Hanami offers a different approach – which might look like a bit of an overkill when you’re building something really small – but will bring large benefits as soon as the codebase grows. Hanami is worth considering if you have a feature-stable application, but you’re struggling with some performance issues or bugs because the code structure is so complicated.</p>
<ol>
<li><strong>Great documentation and growing community</strong></li>
</ol>
<p>When we are interested in a technology, we look at the documentation first. If it’s poor, we will probably stick with our current technology stack. This is not the case with Hanami: the documentation is really good, and there are also many great tutorials. There is even a step-by-step guide to rewriting a complete application from Rails to Hanami. And when it comes to community, there are already many ready-to-use libraries. On top of that, many solutions in Hanami are very similar to those that we know from Rails, so you won’t feel lost when you look at the code for the first time.</p>
<h3 id="cons-of-hanami">Cons of Hanami</h3>
<p>There is only one really important disadvantage of Hanami: it’s much less popular than Rails.
Ruby on Rails is the most popular web framework in the Ruby world, and it’s hard to compete with that. Hanami has fewer ready-to-use libraries, tutorials, and other great resources – you can find them all in Rails, though. The community is also smaller (but hey, it is growing!), so sometimes you will have to wait a bit longer for some answers. If that’s important for you, or you’re used to building applications quickly from ready-to-use blocks, Hanami shouldn’t be your first choice.</p>
<h2 id="summary">Summary</h2>
<p>Even though we’re used to some technologies, there will always be an alternative. It’s good to know about the available alternatives in case you’re planning a new project, or trying to complete overhaul an existing one. As with any other framework, whether Hanami is a good fit for you will always depend on your individual case. Before you get tied to one framework or another, make a list of pros and cons and decide! Feel free to use our list as a guide.</p>yashumittalWe love using Ruby On Rails at CodeCarrot. It’s our framework of choice in most cases. We know its best and worst aspects, and we feel comfortable using it. That said, we’re aware that there are other Ruby frameworks worth looking at. Today, we want to show you Hanami – an alternative to RoR.
https://i.imgur.com/caRHcba.png
10 Must Know Image Optimization Tips2018-02-27T09:44:39+00:002018-02-27T09:44:39+00:00https://blog.codecarrot.net/10-must-know-image-optimization-tips<p>If you run an website, image optimization is an art that you want to master. From attracting visitors perusing Google images to reducing site load time, image optimization is an important part of building a successful website.</p>
<p><img src="https://i.imgur.com/aevTkgF.jpg" alt="You can't be a web performance export without being an image expert" /></p>
<p><em>You can’t be a web performance export without being an image expert</em></p>
<p>So,</p>
<h2 id="what-is-image-optimization">What is image optimization?</h2>
<p>Image optimization is about reducing the file size of your images as much as possible without sacrificing quality so that your page load times remain low. It’s also about image SEO. That is, getting your product images and decorative images to rank on Google and other image search engines.</p>
<p>Have the following questions ever left you scratching your head?</p>
<ul>
<li>Why is it that when I do a Google image search, my product photos never show up?</li>
<li>Do I need to add alt attributes to my images?</li>
<li>What’s the difference between JPEG, GIF and PNG? When should I use one over another?</li>
</ul>
<h2 id="1-name-your-images-descriptively-and-in-plain-language">1. Name your images descriptively and in plain language</h2>
<p>It’s really easy to blow through hundreds of product shots and keep the default file names your camera assigns.</p>
<p>When it comes to image SEO, it’s important to use relevant keywords to help your webpage rank on search engines. Creating descriptive, keyword-rich file names is crucial for image optimization. Search engines not only crawl the text on your webpage, they also crawl your image file names.</p>
<p>Take this image, for example.</p>
<p><img src="https://i.imgur.com/v97gFtY.jpg" alt="2012 Red Ford Mustang LX" /></p>
<p>You could use the generic name your camera assigned to the image <em>(e.g. DCMIMAGE10.jpg)</em>. However, it would be much better to name the file 2012-Ford-Mustang-LX-Red.jpg.</p>
<p>Think about how your customers search for products on your website. What naming patterns do they use when they search? In the example above, car shoppers may search terms like:</p>
<ul>
<li>2012 Red Ford Mustang LX</li>
<li>Ford Mustang LX Red 2012</li>
<li>Red Ford Mustang LX 2012</li>
</ul>
<p>Look at your website analytics to see what keyword patterns your customers follow. Determine the most common naming patterns they use and apply that formula to your image file naming process.</p>
<p>If you’re not going to get that data-driven, just be sure to use relevant, helpful keywords when naming your images (i.e. try to be descriptive).</p>
<p>Check out this Q&A from Moz to understand the importance of strategically naming the image files on your site. It can definitely improve your on-page SEO, but it can also help your pages and images rank higher on search engine results pages (SERPs).</p>
<h2 id="2-optimize-your-alt-attributes-carefully">2. Optimize your alt attributes carefully</h2>
<p>Alt attributes are the text alternative to images when a browser can’t properly render them. They’re also used for web accessibility. Even when the image is rendered, if you hover over it, you will see the alt attribute text (depending on your browser settings).</p>
<p>The alt attribute also adds SEO value to your website. Adding appropriate alt attributes that include relevant keywords to the images on your website can help you rank better in the search engines. As a matter of fact, using alt attributes is probably the best way for your ecommerce products to show up in Google image and web search.</p>
<p>Let’s take a look at the source code of an alt attribute.</p>
<p><img src="https://i.imgur.com/xRtzluU.png" alt="Alt Attribute" /></p>
<p>The number one priority when it comes to image optimization is to fill out each alt attribute for each product image on your site.</p>
<p>Here are some simple rules for alt attributes:</p>
<ul>
<li>Describe your images in plain language, just like you did for your image file names.</li>
<li>If you sell products that have model numbers or serial numbers, use them in your alt attributes.</li>
<li>Don’t stuff your alt attributes full of keywords (e.g. alt=”ford mustang muscle car buy now cheap best price on sale”).</li>
<li>Don’t use alt attributes for decorative images. Search engines may penalize you for over optimization.</li>
</ul>
<p>Finally, always do a sanity check from time to time. View the source of your webpages and check to see if your alt attributes are filled out properly. You’ll be surprised by what you miss when you’re moving at the speed of entrepreneurship.</p>
<h2 id="3-choose-your-image-dimensions-and-product-angles-wisely">3. Choose your image dimensions and product angles wisely</h2>
<p>It’s common practice to show multiple angles of your product. Going back to the Ford Mustang example, you wouldn’t want to show just one shot of the car, especially if you’re trying to sell it. It would be in your best interest to show shots of:</p>
<ul>
<li>The interior.</li>
<li>The rear, especially that air spoiler.</li>
<li>The rims.</li>
<li>The engine… it is a Mustang after all.</li>
</ul>
<p>The best way to capitalize on these extra photos is to fill out your alt attributes. And the way you would do that is by creating unique alt attributes for each product shot.</p>
<ul>
<li>2012-Ford-Mustang-LX-Red-Leather-Interior-Trim.jpg -> using the alt attribute of: alt=”2012 Ford Mustang LX Red Leather Interior Trim”</li>
<li>2012-Ford-Mustang-LX-Red-Rear-View-Air-Spoiler.jpg -> using the alt attribute of: alt=”2012 Ford Mustang LX Red Rear View Air Spoiler”</li>
</ul>
<p>The key here is to add descriptions to your base alt attribute so that potential searchers land on your website. If you do the extra work, Google will reward you with searchers.</p>
<h3 id="a-word-of-caution-on-providing-larger-images">A word of caution on providing larger images</h3>
<p>Now you might want to provide larger views for your visitors, which can make for a great user experience, but be careful.</p>
<p>Whatever you do, don’t place the largest image on your webpage and simply shrink the dimensions via the source code. This will increase your page load time because of the larger file size associated with the image.</p>
<p>Instead, make it a smaller image and provide the option to view a larger image in a pop-up or on a separate webpage.</p>
<h2 id="4-reduce-the-file-size-of-your-images">4. Reduce the file size of your images</h2>
<p>Consider this:</p>
<ul>
<li>Nearly 50% of consumers <a href="https://www.codecarrot.net/services/progressive-web-apps">won’t even wait 3 seconds</a> for an ecommerce site to load.
…and, globally, the average page load time is actually increasing.</li>
<li>Amazon found that if their pages were to slow down by just one second, they would lose $1.6 billion a year.</li>
<li>Google uses page load time as a ranking factor in their algorithm.</li>
</ul>
<p>So, if you have images that slowly “drool” down the screen and take over 15 seconds to load? Well, you can kiss that prospective customer goodbye!</p>
<h3 id="so-what-can-you-do">So, what can you do?</h3>
<p>When a customer arrives on your site, it can take a while to load everything, depending on how large your files are. The larger the file sizes, the longer it takes a webpage to load.</p>
<p>If you can decrease the size of the image files on your webpage and increase page load speed, less people who visit your site will click away.</p>
<p>One way you can reduce image file size is by using the “Save for Web” command in Adobe Photoshop. When using this command, you want to adjust the image to the lowest file size possible while keeping an eye out for image quality.</p>
<p><img src="https://i.imgur.com/qv5wljJ.png" alt="Save for Web in Photoshop" /></p>
<ul>
<li><strong>Quality:</strong> Find this in the top, right-hand corner (i.e. 70).</li>
<li><strong>File format:</strong> Find this in the top, right-hand corner (i.e. JPEG).</li>
<li><strong>Optimization:</strong> Find this checkbox in the top, right-hand corner (i.e. Optimized).</li>
<li><strong>Color:</strong> Find this checkbox in the top, right-hand corner (i.e. Convert to sRBG).</li>
<li><strong>Downsizing and sharpening:</strong> Find this in the bottom, right-hand corner (i.e. W: and H:).</li>
<li><strong>Expected file size:</strong> Find this in the bottom, left-hand corner (i.e. 136.7K).</li>
</ul>
<p>You can also opt to use “Export As”.</p>
<p><img src="https://i.imgur.com/E9FY92M.png" alt="Exporting the image in Photoshop" /></p>
<h3 id="how-to-optimize-images-without-photoshop">How to optimize images without Photoshop</h3>
<p>If you don’t have Adobe Photoshop, there are numerous online tools you can use for image editing. Adobe even has a free image editing application for smartphones and tablets, Photoshop Express. This tool doesn’t have all of the capabilities of the desktop version of Adobe Photoshop, but it covers all the basics of image editing and doesn’t cost an arm and a leg.</p>
<p>Other impressive online image editing tools are:</p>
<ul>
<li>PicMonkey has been described by experts as a “staggeringly great photo editing tool”.</li>
<li>PIXLR is super user-friendly and comes with a 100% free app for your smartphone, so you can edit on the go.</li>
<li>Canva is another fairly advanced online image editor.</li>
</ul>
<p>Finally, there is always GIMP. GIMP is an open-source, free image editing software application that can be run on Windows, Mac or Linux. It can do everything Photoshop can do, but tends to be a bit clunkier. But for a free image editing application, you can’t beat it.</p>
<h3 id="how-large-should-image-files-be">How large should image files be?</h3>
<p>For ecommerce images, a good rule of thumb is to try to keep your image file size below 70 kb. That can be difficult at times, especially for larger images.</p>
<h2 id="5-choose-the-right-file-type">5. Choose the right file type</h2>
<p>There are three common file types that are used to post images to the web: JPEG, GIF, and PNG.</p>
<p>Let’s look at the three file types and how they affect the same image:</p>
<p><img src="https://i.imgur.com/bnHyx6Y.jpg" alt="JPEG file type" /></p>
<p>JPEG (or .jpg) images are somewhat of an old file type. JPEG has become the de facto standard image of the Internet. JPEG images can be compressed considerably, which results in quality images with small file sizes. In the image above, the JPEG format allows decent quality at a low file size.</p>
<p><img src="https://i.imgur.com/Pl5hcCM.gif" alt="GIF file type" /></p>
<p>GIF (.gif) images are lower quality than JPEG images and are used for more simplistic images, such as icons and decorative images. GIFs also support animation, as I’m sure you know.</p>
<p>Regarding image optimization, GIFs are great for those plain, simple images on a webpage (which include just a few colors). But for complex images and photos, GIFs are not always as attractive. This is especially true for large images.</p>
<p>We can get away with using GIF in the MacBook image above because the photo is small enough that a GIF works well.</p>
<p><img src="https://i.imgur.com/yujWsN8.png" alt="PNG-8 file type" /></p>
<p><img src="https://i.imgur.com/mjWj5ok.png" alt="PNG-24 file type" /></p>
<p>PNG images are becoming more popular as an alternative to GIFs. PNGs support many more colors than GIFs and they don’t degrade over time with re-saves, like JPEGs do. Even though the PNG file type is starting to be used more often, the file sizes can still be much larger than JPEG images.</p>
<p>Notice how the PNG-24 image is over three times larger in file size than the PNG-8. This is why you need to be very careful with PNGs.</p>
<p>Here’s an extreme example, where the image file size has been held constant at 24 kb for all three file types:</p>
<p><img src="https://i.imgur.com/1VKSDRR.jpg" alt="File type comparison" /></p>
<p>As you can see, JPEG is the clear winner here. GIFs and PNGs must degrade in quality in order to remain at the same low file size.</p>
<p>Here are some tips to remember when choosing file types:</p>
<ul>
<li>In most cases in ecommerce, JPEGs will be your best bet. They provide the best quality for the smallest file size.</li>
<li>Never use GIFs for large product images. The file size will be very large and there is no good way to reduce it. Use GIFs for thumbnails and decorative images only.</li>
<li>PNGs can be a good alternative to both JPEGs and GIFS. If you are only able to get product photos in PNG format, try using PNG-8 over PNG-24. PNGs excel as simple decorative images because of their extremely small file size.</li>
</ul>
<p>Most image editing software can save images to any of the file formats discussed above.</p>
<h2 id="6-optimize-your-thumbnails">6. Optimize your thumbnails</h2>
<p>Many ecommerce sites will use thumbnail images, especially on category pages. They quickly showcase products without taking up too much real estate.</p>
<p><img src="https://i.imgur.com/Euem1pW.png" alt="Thumbnails" /></p>
<p>Thumbnails are great, but be careful; they can be a silent killer. The victim? Your page load speeds. Thumbnails are usually presented at critical points during the shopping process. If they are preventing your category pages from loading quickly, you could lose a potential customer.</p>
<p>So, what can you do?</p>
<ul>
<li>Make your thumbnail file sizes as small as possible. It may be worth letting quality slide in favor of a lower file size here. Remember, the cumulative impact of your thumbnails will have a huge impact on your page load time.</li>
<li>Vary your alt attribute text as to not duplicate text that you would use for the bigger versions of the same image. As a matter of fact, make your alt text wildly different. The last thing you want is the thumbnail being indexed instead of the larger image. A case could be made to leave out the alt text entirely.</li>
</ul>
<h2 id="7-use-image-sitemaps">7. Use image sitemaps</h2>
<p>If your site uses Javascript galleries, image pop-ups or other “flashy” ways to improve the overall shopping experience, image sitemaps will help get your images noticed by Google.</p>
<p>Web crawlers can’t crawl images that are not called out specifically in the webpage source code. So, in order to let crawlers know about unidentified images, you must list their location in an image sitemap.</p>
<p>You can insert the following line in your robots.txt file, showing the path to your sitemap:</p>
<div class="highlighter-rouge"><div class="highlight"><pre class="highlight"><code>Sitemap: http://example.com/sitemap_location.xml
</code></pre></div></div>
<p>Or you can <a href="https://www.google.com/webmasters/tools/sitemap-list">submit the sitemap to Google</a> using the Search Console.</p>
<p>Google has <a href="https://support.google.com/webmasters/answer/114016?hl=en">many guidelines for image publishing</a>, which may help your website rank higher on SERPs. In addition, you can use Google sitemaps to give Google more information about the images on your website, which can help Google find more of your images than it would on its own.</p>
<p>Using sitemaps doesn’t guarantee that your images will get indexed by Google, but it’s certainly a positive step towards image SEO. Google Webmaster Tools has many suggestions for correctly formatting your sitemap.</p>
<p>It is important for you to add specific tags for all of your images. You can also create a separate sitemap to list images exclusively. What’s important is to add all the necessary information, while using specific tags, to any sitemaps you have or will create. <a href="https://support.google.com/webmasters/answer/178636?hl=en">Follow these guidelines</a> that Google suggests when creating a sitemap with image information.</p>
<h2 id="8-beware-of-decorative-images">8. Beware of decorative images</h2>
<p>Websites often have an assortment of decorative images, such as background images, buttons and borders. Anything non-product related can likely be considered a decorative image.</p>
<p>Although decorative images can add a lot of aesthetic appeal to a webpage, they can result in a large combined file size and slow load times. Therefore, you might want to consider taking a closer look at your decorative images so they won’t impair your website’s ability to convert visitors into customers.</p>
<p>You want to check the file sizes of all the decorative images on your site and use a template that minimizes file sizes.</p>
<p>Here are some tips for reducing the file sizes of your decorative images:</p>
<ul>
<li>For images that make up borders or simple patterns, make them PNG-8 or GIFs. You can create good looking images that are only a few hundred bytes in size.</li>
<li>If possible, use CSS to create colored areas instead of using images. Use CSS styling as much as possible to replace any decorative images.</li>
<li>Take a close look at that large wallpaper-style background image. Those can be huge files. Shrink them down as much as possible without ruining the image quality.</li>
</ul>
<p>One trick you can use to eat away at your background image size is to cut out the middle of the background image, and make it a flat color or even transparent. This can decrease the file size substantially.</p>
<h2 id="9-use-caution-when-using-content-delivery-networks-cdns">9. Use caution when using content delivery networks (CDNs)</h2>
<p>Content delivery networks (CDNs) are a go-to place to host images and other media files. They can increase your page load speeds and help solve bandwidth issues.</p>
<p>The one drawback is when it comes to backlinks. As you may know, backlinks are critical for SEO and the more backlinks you have, the better your site does in the search engines.</p>
<p>By placing your images on a CDN, you are most likely removing the image from your domain and placing it on the domain of the CDN. So when someone links to your image, they are actually linking to the CDN domain.</p>
<p>Therefore, the best practices are:</p>
<ul>
<li>Just because something is “trendy” doesn’t mean you should follow it like a sheep. Determine if it is really the best move for your business first.</li>
<li>If your website is doing tons of business every month, then a CDN is most likely a good idea since it can help solve bandwidth issues.</li>
<li>If your site only gets thousands of visitors a day right now, chances are your current hosting situation can handle the load.</li>
</ul>
<p>There are ways around the image SEO issues associated with CDNs, but be sure to have a professional help you strategize your move first.</p>
<h2 id="10-test-your-images">10. Test your images</h2>
<p>The entire point of optimizing your images is to help increase your bottom-line. We’ve talked about reducing file sizes and getting the search engines to index your images, but what about testing images to see what converts to more customers?</p>
<ul>
<li>
<p><strong>Test the number of product images per page:</strong> Since load times are an issue for some non-hosted ecommerce sites, you may find that reducing the number of images on a page will increase click through rates and sales. It’s also possible that providing a lot of images per page will improve the user experience and lead to more sales. The only way to find this out is to test it.</p>
</li>
<li>
<p><strong>Test what angles your customers prefer:</strong> You may see an increase in customer loyalty by providing the views your customers want to see. A great way to figure this out is to survey your customers about what they liked the most when viewing your product shots. Surveying and talking to your customers is a great habit to get into, in general. Still, verify by testing.</p>
</li>
<li>
<p><strong>Test how many product listings you should have on category pages:</strong> 10, 20, 100 products? Test the number of products you list on category pages to see what works best for your customers.</p>
</li>
</ul>
<h2 id="keeping-beautiful-photos-functional">Keeping beautiful photos functional</h2>
<p>Now questions about your ecommerce images won’t leave you tossing and turning for hours.</p>
<p>You know some image SEO strategies to get your product photos into Google image search results. You know how to fully leverage alt attributes. You know the difference between file types and when to choose each option.</p>
<p>Still, image optimization is complex and we’ve just scratched the surface, so feel free to leave any questions you might have in the comments below.</p>yashumittalIf you run an website, image optimization is an art that you want to master. From attracting visitors perusing Google images to reducing site load time, image optimization is an important part of building a successful website.
https://i.imgur.com/7FWoVFo.jpg
Upload To FTP Servers The Git Way2018-02-26T20:07:02+00:002018-02-26T20:07:02+00:00https://blog.codecarrot.net/upload-to-ftp-servers-the-git-way<p>If you are a person who love Git and don’t want to use FTP, becuase it doesn’t support Git, then this article is for you.</p>
<p>Are you using Git and want to upload your files to an FTP server, <a href="https://github.com/git-ftp/git-ftp">Git-ftp</a> can save you some time and bandwidth by determining which local files to upload or which files to delete on the remote host and uploading only those files that changed since the last upload.</p>
<p>It saves the deployed state by uploading the SHA1 hash in the <code class="highlighter-rouge">.git-ftp.log</code> file. There is no need for Git to be installed on the remote host.</p>
<p>It keeps track of the uploaded files by storing the commit id in a log file on the server. It uses Git to determine which local files have changed.</p>
<p>Even if you play with different branches, git-ftp knows which files are different and handles only those files or go back in the Git history to upload an older version.</p>
<p><strong>For example:</strong></p>
<div class="language-ssh highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="c1"># Setup</span>
<span class="k">git</span> config git-ftp.url "ftp://ftp.example.net:21/public_html"
<span class="k">git</span> config git-ftp.user "ftp-user"
<span class="k">git</span> config git-ftp.password "secr3t"
<span class="c1"># Upload all files</span>
<span class="k">git</span> ftp init
<span class="c1"># Or if the files are already there</span>
<span class="k">git</span> ftp catchup
<span class="c1"># Work and deploy</span>
<span class="k">echo</span> "new content" >> index.txt
<span class="k">git</span> commit index.txt -m "Add new content"
<span class="k">git</span> ftp push
<span class="c1"># 1 file to sync:</span>
<span class="c1"># [1 of 1] Buffered for upload 'index.txt'.</span>
<span class="c1"># Uploading ...</span>
<span class="c1"># Last deployment changed to ded01b27e5c785fb251150805308d3d0f8117387.</span>
</code></pre></div></div>
<h2 id="installation">Installation</h2>
<p>There are lot of way you can install git-ftp:</p>
<ol>
<li>Windows</li>
<li>Mac</li>
</ol>
<h2 id="windows">Windows</h2>
<p>There are at least two ways to install git-ftp on Windows.</p>
<ul>
<li>Using Git for Windows, former msysgit (recommended)</li>
<li>Using cygwin</li>
</ul>
<p><strong>Git for Windows, former msysgit (recommended)</strong></p>
<p>Install <a href="https://git-for-windows.github.io/">Git for Windows</a>. It comes with curl installed, but it doesn’t support SFTP by default. In order to use SFTP, <a href="http://curl.haxx.se/download.html">download curl</a>for Windows with SFTP support. Win32 2000/XP MSI or Win64 2000/XP x86_64 MSI is recommended. If you installed curl, then remove <code class="highlighter-rouge">bin/curl.exe</code> from your Git for Windows installation directory. It will fall back to the newly installed version.</p>
<p>Finally, open the Git Bash which is located in <code class="highlighter-rouge">C:\Program Files (x86)\Git</code> by default.</p>
<div class="language-ssh highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="k">curl</span> https://raw.githubusercontent.com/git-ftp/git-ftp/master/git-ftp > /bin/git-ftp
<span class="k">chmod</span> <span class="m">755</span> /bin/git-ftp
</code></pre></div></div>
<p><em>Note: the</em> <code class="highlighter-rouge">*/bin*</code> <em>directory is an alias. By default this is the same as</em> <code class="highlighter-rouge">*C:\Program Files (x86)\Git\usr\bin*</code><em>.</em></p>
<p><strong>cygwin</strong></p>
<p>Install cygwin and install the package ‘curl’. Then open the cygwin console and install Git-ftp with the following commands:</p>
<div class="language-ssh highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="k">curl</span> https://raw.githubusercontent.com/git-ftp/git-ftp/master/git-ftp > /bin/git-ftp
<span class="k">chmod</span> <span class="m">755</span> /bin/git-ftp
</code></pre></div></div>
<p><strong>Git for Windows and cygwin both installed</strong></p>
<p>If you have both Git for Windows and cygwin installed on Windows and want to use Git for Windows for Git commands, you may get an error “No such file or directory” for a path starting with “/cygdrive/”, for example:</p>
<div class="language-ssh highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="k">creating</span> `/cygdrive/c/TEMP/git-ftp-m7GH/delete_tmp': No such file or directory
</code></pre></div></div>
<p>The problem is that Git-ftp use commands from both Git for Windows and cygwin directories. But by default, cygwin is configured to start paths with the prefix “/cygdrive” while Git for Windows starts paths with “/”. To fix the problem, open file “\etc\fstab” (e.g. “c:\cygwin\etc\fstab”) and change parameter “/cygwin/” to “/”, for example:</p>
<div class="language-ssh highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="c1"># This is default:</span>
<span class="k">none</span> /cygdrive/ cygdrive binary,posix=0,user <span class="m">0</span> <span class="m">0</span>
</code></pre></div></div>
<p>change to:</p>
<div class="language-ssh highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="c1"># This is changed:</span>
<span class="k">none</span> / cygdrive binary,posix=0,user <span class="m">0</span> <span class="m">0</span>
</code></pre></div></div>
<p>After this, close all console windows and try again.</p>
<h3 id="macos">MacOS</h3>
<p>First, ensure you have installed Xcode and command line tools. Command line tools can be download at <a href="https://developer.apple.com/download/more/">https://developer.apple.com/download/more/</a> or via command:</p>
<div class="language-ssh highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="k">xcode</span>-select --install
</code></pre></div></div>
<p>Using homebrew:</p>
<div class="language-ssh highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="k">brew</span> install git
<span class="k">brew</span> install curl --with-ssl --with-libssh2
<span class="k">brew</span> install git-ftp
</code></pre></div></div>
<h2 id="limitations">Limitations</h2>
<ul>
<li>
<p>Windows and OS X: I am very limited in testing on Windows and OS X. Thanks for helping me out fixing bugs on these platforms.</p>
</li>
<li>
<p>git-ftp as deployment tool: git-ftp was not designed as centralised deployment tool. While a commit is being pushed and uploaded to the FTP server, all files belonging to that revision must remain untouched until git-ftp has successfully finished the upload. Otherwise, the contents of the uploaded file will not match the contents of the file referenced in the commit.</p>
</li>
</ul>yashumittalIf you are a person who love Git and don’t want to use FTP, becuase it doesn’t support Git, then this article is for you.
https://i.imgur.com/fM8d703.png
Got An App Idea? Take These 4 Steps To Make It Happen2018-02-25T15:31:00+00:002018-02-25T15:31:00+00:00https://blog.codecarrot.net/got-an-app-idea-take-these-4-steps-to-make-it-happen<p><em>Even if you’ve got the best app idea in the world, you believe in it 100%, and you’re willing to do whatever it takes to make it work, not knowing where to start could be the simple reason you fail.</em></p>
<p>Because I’m in the <a href="https://www.codecarrot.net/">app development business</a>, people often approach me to talk about their app idea. The ideas are all pretty different, but everyone asks me the same thing: <em>What should my next steps be?</em></p>
<h2 id="define">Define</h2>
<p><img src="https://i.imgur.com/jbkkUl2.png" alt="Define" /></p>
<p>In order to turn your idea into a tangible product, you’ve got to understand its every detail.</p>
<p>For example, let’s say you want to create a ride-sharing app. Your goal is to make travelling easier and less expensive. But is that enough information for a designer to design it? Is this enough for a developer to code it?</p>
<p>Of course not.</p>
<p>In fact, this isn’t even enough for you to fully understand your own business. There are many questions that you need to answer, like:</p>
<ul>
<li>How will you determine the cost of the trip?</li>
<li>What’s your target market?</li>
</ul>
<p>Perhaps you want to focus on students with long commutes home. Will there be multiple car options for passengers to choose from? Can you select the pick-up time in advance, or does the car come the moment you order?</p>
<div class="callout">
“You can’t turn an idea into a product if you don’t understand its every detail.”
</div>
<p>To answer these and other questions, at <a href="https://www.codecarrot.net/">CodeCarrot</a> we complete 2 very important documents for all of our clients: a features list and an app business canvas.</p>
<p>The features list includes all the features of your app. Start building this list with the main features, and then include secondary features (such as login and registration feature).</p>
<p>In the case of a ride-sharing app, the main features could include:</p>
<ol>
<li>As a driver, a user can create a trip by selecting the start and end point. They can also add information about their car (make, model, color, number of available seats).</li>
<li>The cost of each trip per passenger shall be calculated using formula: <em>total trip distance in miles MULTIPLIED BY $2 and DIVIDED BY the number of available seats PLUS $1 transaction fee</em>.</li>
<li>The driver revenue per completed trip shall be calculated using formula: <em>total trip distance in miles MULTIPLIED BY $2</em>.</li>
<li>Users can see available trips on the map that will show their starting point, or in a list format. Trips that are shown can be filtered by choosing starting point, end point, and driver rating.</li>
<li>As a passenger, a user can order a ride by selecting a trip from one of the available options</li>
</ol>
<p>In other words, when creating a features list you need to second guess every assumption you have and be as detailed as possible. Your final features list will most likely have at least 20 feature bullet points—no matter how simple your app is. Once this is done, you’ll have a well-defined idea that you can start prototyping.</p>
<h2 id="research">Research</h2>
<p><img src="https://i.imgur.com/1o4smR1.png" alt="Research" /></p>
<p>But before you invest any more time, make sure your idea passes a <strong>business stress test</strong>.</p>
<p>To do this, we use our special App Business Canvas. It’s a slightly modified version of a well known Business Model Canvas.</p>
<blockquote>
“Can your app idea pass a business stress test?”
</blockquote>
<p>Let’s go through its main components:</p>
<ul>
<li><strong>Target audience.</strong> Who are the users that will benefit from your app the most?</li>
<li><strong>Value proposition.</strong> How does your application benefit users?</li>
<li><strong>Platforms.</strong> What platforms will the app work on? Is there a web version?
Customer relationships. How can users communicate with you? How do you prevent a bad review on the App Store?</li>
<li><strong>Monetization.</strong> How will your app earn money? Cost to download? Freemium? Ads?</li>
<li><strong>Key resources.</strong> What’s needed for the app to function after it’s developed? For example, does your app require at least 10 drivers in each city for it to provide ride-sharing services?</li>
<li><strong>Key activities.</strong> What’s needed for the app to function well? For example, do you check driving history? Do you ban drivers with low ratings?</li>
<li><strong>Key integrations.</strong> What third-party work will you need? Are you using maps? Accessing a database of restaurants?</li>
<li><strong>Cost structure.</strong> Who will wireframe, design, and develop your app? What would that cost?</li>
</ul>
<h2 id="prepare">Prepare</h2>
<p><img src="https://i.imgur.com/kFnAsPK.png" alt="Prepare" /></p>
<p>Now that our idea has passed our business stress test, it’s time to prepare for the execution. Generally speaking, software products can be built using one of the 2 popular methodologies: <strong>agile</strong> or <strong>waterfall</strong>.</p>
<p>To keep it short, waterfall approach requires that you create a product in stages. For example, first you create complete wireframes of the whole app, then you create complete design of the whole app, and only then do you go into development and fully develop the app.</p>
<p>Agile approach focuses on features as opposed to stages. So, first you might choose to build a trip creation feature. Then you’ll design just this section, and before anything else is designed you’ll develop this section, resulting in a fully designed and developed trip creation section.</p>
<p>The main advantage of the agile approach is that it allows you to pivot at any moment. If after building one feature you decide to change something about another section, you wouldn’t lose any time already spent designing it as you would with waterfall. This difference is important to know as, following our agile approach, we suggest starting with the main user stories and first working on them before building out other parts of the app.</p>
<p>So first you need to create a block diagram with your main user story. In our example with the ride-sharing app, it’s important that we also have 2 user types: passengers and drivers. We need to prototype both of them.</p>
<p>Your passenger user flow can look like the one below:</p>
<p><img src="https://i.imgur.com/WKUQMGM.png" alt="passenger user flow" /></p>
<h2 id="execute">Execute</h2>
<p><img src="https://i.imgur.com/IIFsWaZ.png" alt="Execute" /></p>
<p>Once you have your main user flow, start wireframing it. Note that because my organization works with clients, we always do wireframing before design so we can confirm the outline of the app before moving into stylistical details.</p>
<p>However, if you’re a designer and you’re working on your own app, you might want to skip wireframing and design right away—you probably already have some style you like in mind.</p>
<blockquote>
“Your wireframes don’t need to be pretty—keep them simple.”
</blockquote>
<p>When wireframing, remember these simple tips:</p>
<ol>
<li><strong>Don’t use color.</strong> Color will distract you from creating the perfect flow.</li>
<li><strong>Use real content.</strong> One of the most common problems is using a placeholder 3-word sentence that will need to be replaced with a 10-word sentence in the real design, shifting your whole screen out.</li>
<li><strong>Avoid barriers of entry.</strong> Don’t force people to register or do anything else before their desired end goal unless it is absolutely necessary.</li>
<li><strong>Keep it simple.</strong> Remember—wireframes don’t need to be pretty. Don’t overcomplicate things. Stick to creating a perfect flow, not a gorgeous design. That comes later.</li>
</ol>
<p>Once your wireframes are done, it’s time to begin our test and adjust phase.</p>
<p>First, we want to get feedback from <em>real</em> people—and we can’t do that without first creating a prototype. Once the prototype is ready, go out and ask real people what they think. Start with your friends and family. Just be careful to talk to people who will give you honest feedback. Welcome negative feedback—it’ll tell you what you missed.</p>
<p>After the initial feedback round, go back to your wireframes and make the adjustments, then move to the design. This will start a loop that you should repeat for every section of the app: Wireframe -> prototype -> gather feedback -> adjust -> design -> prototype -> adjust.</p>
<h2 id="just-do-it">Just do it</h2>
<p>The best advice I ever heard came from Nike: Just do it! Stop wasting time—get out there and start working on your app.</p>yashumittalEven if you’ve got the best app idea in the world, you believe in it 100%, and you’re willing to do whatever it takes to make it work, not knowing where to start could be the simple reason you fail.
https://i.imgur.com/TeVOFI9.jpg
How to Not Suck at Coding - Part 22018-02-24T23:17:26+00:002018-02-24T23:17:26+00:00https://blog.codecarrot.net/how-to-not-suck-at-coding-part-2<p>In the <a href="/how-to-not-suck-at-coding-part-1">first part</a> we talked about strategies for learning coding when you’re starting out. Now we’ll move on to a topic that has been the source of blood, sweat, tears, and flipped tables for many a developer…</p>
<p>Debugging, also known as the “<em>why the $#!%</em> isn’t this working?*” phenomenon.</p>
<h2 id="stuck-on-a-coding-problem">Stuck on a Coding Problem?</h2>
<p>It’s impossible to describe just how demoralizing it can be to try and fail at bug fixing. If you haven’t yet, at some point you will feel like a prize idiot despite your best efforts.</p>
<p>BUT, when you hack away at a bug and finally figure it out… oh man. Pure exhilaration will flood your veins and you’ll feel like you conquered the highest mountain.</p>
<p>You want more of that mountain conquering feeling, and less of that crushing inadequacy feeling, right? So let’s attack debugging from an efficiency standpoint, the same way we approached learning coding last time.</p>
<p>Here are a few strategies I try to follow if I can’t immediately fix a problem:</p>
<h2 id="break-it-down-into-components">Break It Down Into Components</h2>
<p>This is the first method I use when fixing bugs. If you’re having trouble figuring out how to solve a particular problem, try to break the big problem down into smaller chunks. Tackle the smaller chunks one by one, because they’re easier to solve individually.</p>
<p>This process of elimination will make it easier for you to identify where any issues are happening. Once you fix all the small problems, you’ve solved the original big problem!</p>
<p>Dividing a problem into smaller parts has a couple of benefits:
First, it <em>immediately</em> makes the problem less scary and overwhelming. <strong>Fixing a series of smaller, simpler problems instead of one giant problem seems way more doable.</strong></p>
<p>In addition, once you fix that first item, that small success will give you a sense of accomplishment. This will keep you motivated to continue on to the rest of the problems.</p>
<p><img src="https://i.imgur.com/posDokV.gif" alt="Null reference exception, you got nothin’ on me! AYIYIYIYIYIYIYIYI" /></p>
<h2 id="talk-to-the-duck-debugging">Talk to the Duck Debugging</h2>
<p>If you try going through the steps above and are still stuck, you can try a different technique, rubber duck debugging.</p>
<p>To try this out, you start with an object — it doesn’t have to be a rubber duck. It could be an action figure, bobble-head, or stuffed Totoro. When you are stumped by a problem, talk to this inanimate object. Explain what your code should do and how it’s not doing it.</p>
<p>It seems insane, I know, but it really does work — it’s another brain hacking trick. Describing out loud how your code should function requires you to mentally trace through each of the steps. <strong>You will look at your code with fresh eyes, and you’ll often see something that you didn’t see before.</strong></p>
<p><img src="https://i.imgur.com/3m4CEmw.gif" alt="Yessss that’s right. Tell me all your secrets, my precious." /></p>
<p>I can’t tell you how many times this approach has helped me. (Even before I knew that talking to the duck was a thing!)</p>
<p>At work, I would often be completely stumped by a problem after hours of Googling. Once I got to this point, I knew I needed help. I would pick my head up from where I’d been banging it on the keyboard, and ashamedly chat my boss.</p>
<p>We worked in different locations, so I would be typing this all out on a chat program. Of course, I’d have to describe what I was trying to do and where it seemed to be breaking. Then in the middle of typing out the problem, the solution would just pop into my head. It was always a bit embarrassing to have to say, <em>“nvm!”</em> in chat, but at least I had solved my problem.</p>
<p>So you don’t have to necessarily talk it out, out loud. You can also write out your description of the bug, like I was doing. This will have a similar effect on your brain. Nowadays I usually write out my problems on a small dry erase board I keep at my desk. It helps a ton!</p>
<h2 id="avoid-tunnel-vision-and-take-a-break">Avoid Tunnel Vision and Take a Break</h2>
<p>All right. You’ve done everything you can think of to figure a bug out: you’ve combed through Google and StackOverflow, you’ve tried breaking it down into components, and you’ve tried talking to the duck even though your officemate was giving you weird looks. No dice.</p>
<p>One last suggestion that may help your brain find the solution is to just…</p>
<p><strong>Stop trying</strong>.</p>
<p>Sounds crazy, right? I’m not saying to throw in the towel completely, but to just step back for a few minutes and give your brain a break.</p>
<p><img src="https://i.imgur.com/XrTFdM6.jpg" alt="Sometimes too much focus will prevent you from seeing the big picture" /></p>
<p><strong>How many times have you furiously tried to work something out, only to have a eureka moment a few minutes or hours later?</strong></p>
<p>It’s fascinating how the brain keeps running in the background even when you’re not explicitly putting it to work.</p>
<p>There’s actually some science behind this. Graham Wallas, a 19th century psychologist, wrote about how the mind uses an “<a href="http://ist-socrates.berkeley.edu/~kihlstrm/Underwood96.htm">incubation phase</a>,” where the mind would subconsciously work on an unsolved problem. <strong>The brain would eventually hit on the solution in what he called the “flash of success.”</strong></p>
<p>So how do you get this to work and get more eureka moments? In order to leverage this incubation phase, you could do one of the following:</p>
<ul>
<li>Stop actively thinking and working,</li>
<li>Or move on and work on a different issue.</li>
</ul>
<p>Personally, I’m a proponent of the first option– to stop just hammering away at what’s in front of you. One method I like to use is stepping back and taking a quick walk for a few minutes.</p>
<p>Why choose walking, instead of staying at your desk and browsing Reddit? Well, taking a walk has some important benefits:</p>
<ol>
<li>Physically, it’s good for your body to not just be sitting for hours and hours.</li>
<li>Mentally, the act of walking actually helps our brain to function!</li>
</ol>
<p>This second point was a new discovery for me. You would have thought that your brain doesn’t care if you’re sitting, standing, or walking. It just needs to be fed problems and it’ll pump out solutions, right?</p>
<p>In reality, while the brain <em>is</em> like a computer processor, it’s also a biological organ. One function of this organic nature is that our brains work better with movement.</p>
<p>Engaging in physical activities like walking, running, or biking increases blood flow to the brain. This in turn leads to neurological benefits such as improved memory and creative thinking. These capacities are crucial to problem solving.</p>
<p><img src="https://i.imgur.com/y1VrMrN.gif" alt="Walking also can contribute positively to your general mood. Look at these guys!" /></p>
<p>So the next time you’re stuck on a problem, take a quick break. It may be just the thing you need to figure out the solution.</p>
<h2 id="final-thoughts">Final Thoughts</h2>
<p>One big takeaway from this short series is understanding that we as humans are not just machines. We can’t input code and immediately convert it into knowledge in our data banks. <strong>But if we can understand how our brains operate, we can leverage that understanding and maximize the learning process.</strong></p>
<p>Why do something slowly if we can do it more quickly and efficiently, right? :)</p>yashumittalIn the first part we talked about strategies for learning coding when you’re starting out. Now we’ll move on to a topic that has been the source of blood, sweat, tears, and flipped tables for many a developer…
https://i.imgur.com/NxlQjwO.jpg
An Introduction to Source Maps2018-02-24T17:47:40+00:002018-02-24T17:47:40+00:00https://blog.codecarrot.net/an-introduction-to-source-maps<p>One of the easiest performance wins you can gain for your website is to combine and compress your JavaScript and CSS files. But what happens when you need to debug the code within those compressed files? It can be a nightmare. Fear not however, there is a solution on the horizon and it goes by the name of source maps.</p>
<p>A source map provides a way of mapping code within a compressed file back to it’s original position in a source file. This means that – with the help of a bit of software – you can easily debug your applications even after your assets have been optimized. The Chrome and Firefox developer tools both ship with built-in support for source maps.</p>
<p>In this blog post you’re going to learn how source maps work and take a look at how to generate them. We’re going to be focussing primarily on source maps for JavaScript code but the principles apply to CSS source maps too.</p>
<hr />
<p><strong>Note</strong>: Support for source maps is enabled by default in Firefox’s developer tools. You may need to enable support manually in Chrome. To do this, launch the Chrome dev tools and open the <strong>Settings</strong> pane (cog in the bottom right corner). In the <strong>General</strong> tab make sure that <strong>Enable JS source maps</strong> and <strong>Enable CSS source maps</strong> are both <strong>ticked</strong>.</p>
<hr />
<h2 id="how-source-maps-work">How Source Maps Work</h2>
<p>As the name suggests, a source map consists of a whole bunch of information that can be used to map the code within a compressed file back to it’s original source. You can specify a different source map for each of your compressed files.</p>
<p>You indicate to the browser that a source map is available by adding a special comment to the bottom of your optimised file.</p>
<div class="highlighter-rouge"><div class="highlight"><pre class="highlight"><code> //# sourceMappingURL=/path/to/script.js.map
</code></pre></div></div>
<p>This comment will usually be added by the program that was used to generate the source map. The developer tools will only load this file if support for source maps is enabled and the developer tools are open.
You can also specify a source map is available by sending the <code class="highlighter-rouge">X-SourceMap</code> HTTP header in the response for the compressed JavaScript file.</p>
<div class="highlighter-rouge"><div class="highlight"><pre class="highlight"><code> X-SourceMap: /path/to/script.js.map
</code></pre></div></div>
<p>The source map file contains a JSON object with information about the map itself and the original JavaScript files. Here is a simple example:</p>
<div class="language-ssh highlighter-rouge"><div class="highlight"><pre class="highlight"><code> <span class="err">{</span>
<span class="k">version</span>: <span class="m">3</span>,
<span class="k">file</span>: "script.js.map",
<span class="k">sources</span>: [
<span class="err">"</span><span class="k">app</span>.js",
<span class="err">"</span><span class="k">content</span>.js",
<span class="err">"</span><span class="k">widget</span>.js"
<span class="err">],</span>
<span class="k">sourceRoot</span>: "/",
<span class="k">names</span>: ["slideUp", "slideDown", "save"],
<span class="k">mappings</span>: "AAA0B,kBAAhBA,QAAOC,SACjBD,OAAOC,OAAO..."
<span class="err">}</span>
</code></pre></div></div>
<p>Lets take a closer look at each of these properties.</p>
<div class="language-ssh highlighter-rouge"><div class="highlight"><pre class="highlight"><code> <span class="k">version</span> – This property indicates which version of the source map spec the file adheres to.
<span class="k">file</span> – The name of the source map file.
<span class="k">sources</span> – An array of URLs for the original source files.
<span class="k">sourceRoot</span> – (optional) The URL which all of the files in the sources array will be resolved from.
<span class="k">names</span> – An array containing all of the variable and function names from your source files.
<span class="k">mappings</span> – A string of Base64 VLQs containing the actual code mappings. (This is where the magic happens.)
</code></pre></div></div>
<h3 id="generating-source-maps-with-uglifyjs">Generating Source Maps with UglifyJS</h3>
<p><a href="https://github.com/mishoo/UglifyJS2">UglifyJS</a> is a popular command line utility that allows you to combine and compress JavaScript files. Version 2 supports a number of command line flags that help with generating source maps.</p>
<div class="language-ssh highlighter-rouge"><div class="highlight"><pre class="highlight"><code> <span class="err">--</span><span class="k">source</span>-map – The output file for the source map.
<span class="err">--</span><span class="k">source</span>-map-root – (optional) This populates the sourceRoot property in the map file.
<span class="err">--</span><span class="k">source</span>-map-url – (optional) The path to the source map on your server. This will be used in the comment that is placed in the optimized file. //<span class="c1"># sourceMappingURL=/path/to/script.js.map</span>
<span class="err">--</span><span class="k">in</span>-source-map – (optional) An input source map. This can be useful if you are compressing JavaScript files that have already been generated from source files elsewhere. Think JavaScript libraries.
<span class="err">--</span><span class="k">prefix</span> or -p – (optional) Removes n number of directories from the file paths that appear in the sources property. For example, -p <span class="m">3</span> would drop the first three directories from the file path, so one/two/three/file.js would become file.js. Using -p relative will make UglifyJS figure out the relative paths between the source map and the original files for you.
</code></pre></div></div>
<p>Here’s an example command that uses some of these command line flags.</p>
<div class="language-ssh highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="k">uglifyjs</span> [input files] -o script.min.js --source-map script.js.map --source-map-root http://example.com/js -c -m
</code></pre></div></div>
<hr />
<p><strong>Note</strong>: If you use the <code class="highlighter-rouge">grunt-contrib-uglify</code> plugin for Grunt, refer to the <a href="https://github.com/gruntjs/grunt-contrib-uglify#sourcemap">documentation</a> for information on how to specify these options in your Gruntfile.</p>
<hr />
<p>There are also a number of other utilities available that have support for generating source maps. A selection of these are listed below.</p>
<ul>
<li><a href="http://www.html5rocks.com/en/tutorials/developertools/sourcemaps/#toc-howgenerate">Closure</a></li>
<li><a href="http://coffeescript.org/#source-maps">CoffeeScript Compiler</a></li>
<li><a href="https://github.com/twolfson/grunt-jsmin-sourcemap">GruntJS Task for JSMin</a></li>
</ul>
<h3 id="source-maps-in-chrome-dev-tools">Source Maps in Chrome Dev Tools</h3>
<p><img src="https://i.imgur.com/FH0zaUR.png" alt="The Sources Tab in Chrome Dev Tools" /></p>
<p>If you have your source maps set up correctly, you should see each of the original JavaScript files listed in the file pane of the <strong>Sources</strong> tab.</p>
<p>Examining the HTML for your page will confirm that only the compressed JavaScript file is being referenced. The dev tools is loading the source map file for you and then fetching each of the original source files. <a href="http://demos.mattwest.io/source-maps/"><strong>Try a Demo</strong></a></p>
<h3 id="source-maps-in-the-firefox-developer-tools">Source Maps in the Firefox Developer Tools</h3>
<p><img src="https://i.imgur.com/nuoqNzm.png" alt="The Debugger Tab in the Firefox Developer Tools" /></p>
<p>Firefox users can see the individual source files in the <strong>Debugger</strong> tab of the developer tools. Again the dev tools has identified that a source map is available and has then fetched each of the referenced source files.</p>
<p>Should you wish to view the compressed versions instead, click the cog icon in the top right corner of the tab and deselect <strong>Show original sources</strong>. <a href="http://demos.mattwest.io/source-maps/"><strong>Try a Demo</strong></a></p>
<h2 id="final-thoughts">Final Thoughts</h2>
<p>Using source maps allows developers to maintain a straight-forward debugging environment while at the same time optimizing their sites for performance.
In this post you have learned how source maps work and seen how you can generate them using UglifyJS. If you ever ship websites with compressed assets (which you should), it’s really worth taking the time to integrate source map creation into your workflow.</p>
<h2 id="useful-links">Useful Links</h2>
<ul>
<li><a href="https://docs.google.com/document/d/1U1RGAehQwRypUTovF1KRlpiOFze0b-_2gc6fAH0KY0k/edit">Source Maps Revision 3 Proposal</a></li>
<li><a href="https://github.com/mishoo/UglifyJS2">UglifyJS</a></li>
<li><a href="http://demos.mattwest.io/source-maps/">Source Maps Demo</a></li>
</ul>yashumittalOne of the easiest performance wins you can gain for your website is to combine and compress your JavaScript and CSS files. But what happens when you need to debug the code within those compressed files? It can be a nightmare. Fear not however, there is a solution on the horizon and it goes by the name of source maps.
https://i.imgur.com/FH0zaUR.png
Your code stinks. Here’s what you can do about it.2018-02-24T14:57:14+00:002018-02-24T14:57:14+00:00https://blog.codecarrot.net/your-code-stinks-heres-what-you-can-do-about-it<p>Humans stink. It’s nothing to be ashamed of: it is the inevitable consequence of our animal nature.</p>
<p>But humans aspire to be more than animals.</p>
<p>Humanity’s singular endeavor throughout history has been the journey to eliminate stink. We’ve always hated it. Even in antiquity, we sent people on ridiculous journeys around the world in rickety sailboats, and across deserts on tiny horses, to find some remedy for it.</p>
<p>We have iterated for thousands of years to reach a stink-free world. From the invention of soap and toothpaste to the Yankee Doodle Candle Co. and Febreze — our soaps, candles, and sprays now give us a way to make food waste and industrial garbage smell like mountain raindrops and sugar cookies.</p>
<p><img src="https://i.imgur.com/ee9M6tO.jpg" alt="Mmmm! Pumpkin spice!" /></p>
<p>And yet with each innovation, we find a new way to stink.</p>
<p>Like our battle between antibiotics and bacteria, we have launched an endless arms race between ourselves and our environment. Now we’re moving beyond the era of physical products.</p>
<p>With our advancement, we have brought stink along with us — just as we always have. We created the information age.</p>
<p>And we created information stink.</p>
<p><strong>Should I drink this?</strong></p>
<p>Garbage comes cloaked in a wonderful variety of smells. As a new father, a door opened for me into an undiscovered country of stink. Previously, I had only heard rumors of this world from the few parents who survived it. Rumors always accompanied by a thousand-yard stare.</p>
<p>Just so, there are many types of stinky information. Teenagers in central Europe write up fake news articles for social media clicks. There is always one more weird trick that doctors don’t want you to know.</p>
<p>Today, in this article, we’re going past all that. We’re diving into the very seams of our new information era to learn about the stinks that we Morlocks are creating in our very own products. I’m talking about code smell.</p>
<p>Kent Beck and Martin Fowler define code smell as “a surface indication that usually corresponds to a deeper problem in the system.”</p>
<p>Woof.</p>
<p>A simpler version is that smelly code causes you to say “that doesn’t seem right” when you glance at it. Code that has begun to smell resembles milk on the cusp of spoiling. It looks like it might be okay, but it seems to be “off” just a bit.</p>
<p><img src="https://i.imgur.com/sIPybpt.jpg" alt="That’s… awfully foamy" /></p>
<p>And — just like with smelly milk — if you want to be sure you’ll be at work the next day, you may not want to settle for smelly code. So are you ready to come to grips with your code smell?</p>
<p><strong>Learning to smell</strong></p>
<p>Acceptance is the first step to killing code stink. I know your code stinks. Maybe not all of your code, but certainly some of your code. Like I said, it’s a fact of nature — animals create stink, and as coders we are just techno-animals. Technanimals?</p>
<p>You have to accept that your code isn’t always going to smell like roses. Especially your first draft. Your first draft is never going to be your best.</p>
<p><img src="https://i.imgur.com/e1hY2bu.jpg" alt="Writing on the notebook" /></p>
<p>That’s right, your “draft.” You need to start treating coding the way we treat other endeavors. You need to plan to iterate from the beginning.</p>
<p>You have probably spent your entire education since kindergarten learning about outlines, first drafts, rewrites, editing, peer editing, and the other steps of writing. Do you want to forget it all and treat coding like a stream-of-consciousness exercise?</p>
<p>Don’t. Code like you would write an argument: with a clearly planned conclusion in mind, an outline of the logical steps needed to get there, and a series of drafts. Call it “refactoring” if you want. Rubbing your own nose in your code will teach you to make it less smelly in the first place.</p>
<p>Like all smells, you’ll get better at detecting code smells once you’re sensitized to them. You will find it worthwhile to learn the most common smells and how to identify them. There are many useful articles about specific code smells and how to treat them.</p>
<p>Technology can also help save you from smells. Do you have deodorant? Your IDE may not have a plug-in deodorizer today. But it could! Static code analysis and linting tools give your code a shower to help keep it from getting too smelly.</p>
<p><img src="https://i.imgur.com/wkql4T4.png" alt="Different perfume bottles" /></p>
<p>If you’re not already habitually unit testing, this is a good reason to start. Writing unit tests forces you to go back over your code to figure out where and what to test. This is a much harder task if you’re holding your nose at the same time. Reviewing code for testing provides you with both an opportunity and an incentive for better (and less smelly) coding.</p>
<p><strong>Whoever smelt it…</strong></p>
<p>Let’s face it. Other people are going to notice your stink long before you do. It’s basically the first rule of society. Humans first started coalescing into groups for the opportunity to mock other humans. It’s an archaeological fact™️. My wife is an archaeologist, and I am 100% sure she face-palmed upon reading that.</p>
<p>The best way to find and fix the stinky spots in your code is to review it with other people. Peer code review has a lot of benefits. The first benefit is that you get to aggravate your co-workers. You’ll immediately find out how poorly written your first effort was by the groans of dismay wafting across the office after you click “submit pull request.”</p>
<p><img src="https://i.imgur.com/A9uD51D.jpg" alt="Two people working together" /></p>
<p>Another great way to reduce stink is to review other people’s code. Take delight in pointing out their failings and flaws! Then quietly realize that you make the same mistakes all the time. The back-and-forth of a good peer review system will help you become a better developer faster than just about anything else.</p>
<p>But what if you don’t have co-workers or friends and spend your days writing code alone in a dark basement? Well, dear friendless freelancer, there is no better time to start participating in open source.</p>
<h2 id="conclusion">Conclusion</h2>
<p>Nobody wants to stink. And you don’t have to. Coding stink is like all others: with a little hygiene it can be managed.</p>
<p><img src="https://i.imgur.com/ljwZOmY.jpg" alt="Shower" /></p>
<p>It’s time to examine your coding process. Is it iterative? Do you seek feedback from others? Are you using free tools to check your code for “grammatical” mistakes? Are you testing?</p>
<p>It’s also time to learn about the common code smells and how to avoid them. A good coding process is like a good writing process, with lots of drafts and editing. So, too, is coding skill like writing skill: there are rhetorical devices that are known to be effective, and fallacies that are known to fail.</p>
<p>You don’t have to discover them all on your own. Read up on known code smells and refactoring techniques.</p>
<p>Finally, keep practicing to hone your skills. Do side projects and open source to get even more and better feedback.</p>
<p>Your nose will thank you.</p>yashumittalHumans stink. It’s nothing to be ashamed of: it is the inevitable consequence of our animal nature.
https://i.imgur.com/1xud0CU.jpg
How to Grow Your Business With Giveaways and Viral Contests2018-02-23T08:06:25+00:002018-02-23T08:06:25+00:00https://blog.codecarrot.net/how-to-grow-your-business-with-giveaways-and-viral-contests<p>Growing a business can feel like a bit of a marathon. In some cases, it takes months to bring a business up to speed.</p>
<p>But does it have to take <em>that</em> long? Maybe not.</p>
<p>A well executed, but simple giveaway can help you grow your business quickly and for relatively low cost.</p>
<p>In this post, we’ll take a look at how to use giveaways and contests to help achieve rapid growth for your business.</p>
<h2 id="the-proof-is-in-the-numbers">The Proof Is in the Numbers</h2>
<p>A quick Google search shows that there are plenty of different examples of businesses that have been able to grow their e-mail list, social media accounts, and sales with a quick giveaway.</p>
<p>There are many more businesses that have achieved the same success with a giveaway. But what’s in the secret sauce that makes them so tremendously successful? How do they really do it?
Let’s take a closer look at how to run a successful giveaway and viral contest.</p>
<p><strong>Note: There are specific legalities surrounding giveaways and contests. It’s important to speak to a professional that can help you determine what type of rules and regulations are in place with your local and state laws.</strong></p>
<hr />
<h3 id="3-foundational-must-haves-for-a-successful-giveaway">3 Foundational Must Haves for a Successful Giveaway</h3>
<p><img src="https://i.imgur.com/kxl6lVR.png" alt="3 Foundational Must Haves for a Successful Giveaway" /></p>
<p>Before running your giveaway, it’s important to organize yourself and begin to put together some goals for the giveaway. Are you looking to generate excitement about a new product, or are you looking to win more sales? Are you trying to grow your e-mail marketing list, or your social accounts? What about both?</p>
<p>Here’s a formula that we’ve put together that will help you get started.</p>
<p><strong>1. Have well defined goals</strong></p>
<p>Figure out what key performance indicator you’re going to focus on, and do everything to achieve that goal.</p>
<p>For instance, if you know that you already have a <a href="/how-to-build-a-massive-following-on-instagram">large and engaged Instagram following</a>, why not try and use that to leverage the growth of your email list? Or, try and expand your Instagram following to your other social media accounts?</p>
<p><strong>2. Have an exciting prize</strong></p>
<p>Are you going to be giving away a new product? An entire collection? Money? It’s important to determine what the actual prize will be well before you begin.</p>
<p>Need some creative inspiration for what to give away? Here are some good examples to get you started:</p>
<ul>
<li>A limited edition product</li>
<li>An entire product collection</li>
<li>Product(s) from influencers in your market</li>
<li>Gift cards</li>
<li>Travel</li>
<li>A once in a lifetime opportunity</li>
</ul>
<p><strong>3. Use partnerships with celebrities and influencers</strong></p>
<p>Chances are in building your business, you’ve come across some influencers in your market. These influencers can be individuals, or businesses that have a large clout when it comes to traffic and engagement.</p>
<p>Consider working with an influencer in your space to help give your giveaway some extra “oomph” when it needs it. When we gave away a t-shirt business, we teamed up with some of our favorite influencers, and it helped take the giveaway to the next level!</p>
<h2 id="putting-the-pieces-together-and-launching-your-giveaway">Putting the Pieces Together and Launching Your Giveaway</h2>
<p><img src="https://i.imgur.com/2O6h7JT.png" alt="Putting the Pieces Together and Launching Your Giveaway" /></p>
<p>Now that we’ve defined the goals of your giveaway and have the basic understandings of how they work, it’s time to start putting it all together and launching it.</p>
<p><strong>Use a Tool to Create the Giveaway</strong></p>
<p>There are plenty of ways to actually create a giveaway. You can simply throw together a landing page and have people share it, and pick a winner at random. But, that can be quite a bit of a headache if you have no coding experience.</p>
<p>That’s why I suggest using a tool to create the giveaway. There are plenty available depending on the type of giveaway you’re looking to run, but I’ve found the most powerful to be a tool called Gleam.</p>
<p>Here’s an example of what it looks like:</p>
<p><img src="https://i.imgur.com/Yn0eLmd.png?1" alt="Use a Tool to Create the Giveaway" /></p>
<p>Alternatively, try something like Rafflecopter or Promosimple that also have been shown to be incredibly powerful. It’s entirely up to you which you end up using!</p>
<p><strong>Notify All Parties Involved</strong></p>
<p>While this may seem like a no-brainer, it’s often forgotten when everything begins to come together. If your prize consists of another product from an influencer, be sure to let them know when you plan on launching the giveaway to ensure that they help promote it too.</p>
<p>Don’t forget to actually email them, text them, tweet at them, or whatever means of communication you need to use in order to actually let them know when the giveaway is live!</p>
<p><strong>Let Your Current Customers Know</strong></p>
<p>If you already have a few customers, let them know about the giveaway and contest too! Chances are, if they’ve purchased a product from you in the past – they’ll be thrilled to hear about getting a new product for free!
Use your favourite email marketing tool to send an email to your existing customers to inform them about the giveaway.</p>
<p><strong>Encourage Virality</strong></p>
<p>Adding a viral loop baked right into the giveaway can be essential toward the success of your giveaway. If you’re able to make an entry method include sharing the giveaway with friends and family to earn entries, you’re golden.</p>
<p>Most tools (including the ones we covered above) do have this functionality built into them, so take advantage of that!</p>
<p><strong>Give Updates Throughout</strong></p>
<p>While your giveaway is in full swing, be sure to update contestants throughout the length of the contest and remind them to complete certain actions to earn additional entries.
Depending on your giveaway, you might be giving away products throughout the duration of the contest too – so be sure to keep anyone updated on those prizes as well!</p>
<p>Here’s an example of Beardbrand doing that using Gleam:</p>
<p><img src="https://i.imgur.com/Zcc9tyc.png" alt="Give Updates Throughout" /></p>
<p><strong>Shine a Spotlight on the Winner</strong></p>
<p>When your giveaway is finally over, be sure to shine a spotlight on the winner! You spent a lot of time working on this, and the winner (most likely) spent a lot of time promoting the giveaway for you.</p>
<p>Depending on what product is is that you’re giving away, you can even have the winner share a picture of them with the prize.</p>
<p>A company called Dream Giveaway does this incredibly well, by having a dedicated page to show off past winners!</p>
<p>This can help create social proof for your business, as well as be an enticing way to get more entries into your future giveaways.</p>
<h2 id="conclusion">Conclusion</h2>
<p>Now that we’ve taken a look at how to grow your business with giveaways and viral contests, what are you waiting for? Try running a giveaway now!</p>
<p>Have any other ideas on how to run a giveaway or contest? Let us know in the comments below.</p>yashumittalGrowing a business can feel like a bit of a marathon. In some cases, it takes months to bring a business up to speed.
https://i.imgur.com/8sdtsd4.png
What is the difference between dependencies and devdependencies?2018-02-20T11:24:39+00:002018-02-20T11:24:39+00:00https://blog.codecarrot.net/what-is-the-difference-between-dependencies-and-devdependencies<h2 id="what-is-the-difference-between-save-and-save-dev">What is the difference between save and save-dev?</h2>
<p>When using NPM, the first thing to do is an <code class="highlighter-rouge">npm init</code>, which will set up a <code class="highlighter-rouge">package.json</code> file for us based off our answers to its survey. This <code class="highlighter-rouge">package.json</code> describes our module, and in it we can see a list of all installed dependencies and devDependencies that we have installed and added to our project.</p>
<p>The difference between these two, is that devDependencies are modules which are only required during development, while dependencies are modules which are also required at runtime.</p>
<p>To save a dependency as a devDependency on installation we need to do an <code class="highlighter-rouge">npm install --save-dev</code>, instead of just an <code class="highlighter-rouge">npm install --save.</code> A nice shorthand for installing a devDependency that I like to use is <code class="highlighter-rouge">npm i -D</code>. The shorthand for saving a regular dependency is <code class="highlighter-rouge">-S</code> instead of <code class="highlighter-rouge">-D</code>.</p>
<p>Some good examples of dependencies which would be required at runtime include <em>React, Redux, Express,</em> and <em>Axios.</em></p>
<p>Some good examples of when to install devDependencies would be <em>Nodemon, Babel, ESLint,</em> and testing frameworks like <em>Chai, Mocha, Enzyme, etc…</em></p>yashumittalWhat is the difference between save and save-dev?
https://cdn.codecarrot.net/images/dependencies-devdependencies.jpg
Is GraphQL The End Of REST APIs?2018-02-15T18:15:45+00:002018-02-15T18:15:45+00:00https://blog.codecarrot.net/is-graphql-the-end-of-rest-style-apis<h2 id="is-graphql-the-end-of-rest-style-apis">Is GraphQL The End of REST Style APIs?</h2>
<p>The world of APIs is one of innovation and constant iteration. The technologies that once drove the largest and best solutions across the web have been supplanted by new, more innovative solutions.</p>
<p>That is why it’s surprising, then, that many developers, have clung to what they consider the bastions of web API development. Such a bastion is the REST architecture. To some developers, REST is an ageing and incomplete proposition that does not meet many of the new development qualifications required by the unique challenges faced by modern development groups.</p>
<p>Today, we’re going to look at a technology that is poised to replace, or at the very least, drastically change the way APIs are designed and presented — <strong>GraphQL</strong>. We’ll discuss a little bit of history, what issues REST suffers from, and what GraphQL does differently.</p>
<iframe src="https://www.facebook.com/plugins/video.php?href=https%3A%2F%2Fwww.facebook.com%2Fcodecarrotinc%2Fvideos%2F405418836636470%2F&show_text=0&width=560" width="100%" height="315" style="border:none;overflow:hidden" scrolling="no" frameborder="0" allowtransparency="true" allowfullscreen="true"></iframe>
<h3 id="defining-rest-and-its-limitations">Defining REST and its Limitations</h3>
<p>REST or Representational State Transfer, is an API design architecture developed to extend and, in many cases, replace older architectural standards. Objects in REST are defined as addressable <strong>URIs</strong>, and are typically interacted with using the built-in verbs of <strong>HTTP</strong> — specifically, GET, PUT, DELETE, POST, etc. In REST, HATEOAS a.k.a (Hypermedia As The Engine Of Application State) is an architecture constraint in which the client interacts with hypermedia links, rather than through a specific interface.</p>
<p>With REST, the core concept is that everything is a <strong>resource</strong>. While REST was a great solution when it was first proposed, there are some pretty significant issues that the architecture suffers from.</p>
<h2 id="here-are-some-issues-lundberg-sees-with-rest">Here are some issues Lundberg sees with REST:</h2>
<h3 id="round-trip-and-repeat-trip-times">Round Trip and Repeat Trip Times</h3>
<p>REST’s defining feature is the ability to reference <strong>resources</strong> — the problem is when those resources are complicated and <strong>relational</strong> in a more complex organization known as a <em>graph</em>. Fetching these complicated graphs requires round trips between the client and server, and in some cases, <strong>repeated trips</strong> for network conditions and application types.
What this ultimately results in is a system where <strong>the more useful it is, the slower it is</strong>. In other words, as more relational data is presented, the system chokes on itself.</p>
<h3 id="overunder-fetching">Over/Under Fetching</h3>
<p>Due to the nature of REST and the systems which often use this architecture, REST APIs often result in over/under fetching. <strong>Over fetching</strong> is when more data is fetched than required, whereas <strong>under fetching</strong> is the opposite, when not enough data is delivered upon fetching.</p>
<p>When first crafting a resource URI, everything is fine — the data that is necessary for functionality is delivered, and all is well. As the API grows in complexity, and the resources thus grow in complexity as well, this becomes problematic.</p>
<p>Applications that don’t need every field or tag still receive it all as part of the URI. Solutions to fix this, such as versioning, result in duplicate code and “spaghettification” of the code base. Going further, specifically limiting data to a low-content URI that is then extensible results in more complexity and resultant under fetching in poorly formed queries.</p>
<h3 id="weak-typing-and-poor-metadata">Weak Typing and Poor Metadata</h3>
<p>REST APIs often unfortunately suffer from <strong>poor typing</strong>. While this issue is argued by many API providers and commentators (often with the caveat that HTTP itself contains a typing system), the fielding system solutions offered simply do not match the vast range and scope of data available to the API.</p>
<p>Specifically, this is an argument in favor of <strong>strong typing</strong> rather than weak typing. While there are solutions that offer typing, the delineation between weak and strong is the issue here, not an argument defused by simply stating “well there <em>is</em> typing”. The strength and quality of typing <em>does</em> matter.</p>
<p>This is more a matter of age and mobility rather than an intrinsic problem, of course, and can be rectified using several solutions (of which GraphQL is one).</p>
<h3 id="improper-architecture-usage">Improper Architecture Usage</h3>
<p>REST suffers from the fact that it’s often used for something it wasn’t really designed for, and as a result, it often must be heavily modified. That’s not to say that REST doesn’t have its place — it’s only to say that it may not be the best solution for serving client applications.</p>
<p>As Facebook says in its own <a href="https://facebook.github.io/react/blog/2015/05/01/graphql-introduction.html">documentation</a>:</p>
<blockquote>
“REST is intended for long-lived network-based applications that span multiple organizations” according to its inventor. This is not a requirement for APIs that serve a client app built within the same organization.
</blockquote>
<p>All of this is to say that GraphQL is functionally the end of REST — but not in the way that terminology implies. Until now, REST has been seen as the foundational architecture of modern APIs, and in a way, the last bastion of classic API design.</p>
<p>The argument here is not made to fully sever REST from our architectural lexicon, but instead to acknowledge that there are several significant issues that are not properly and fully rectified by the solutions often proffered by its proponents.</p>
<p>Therefore, the answer to the question of this piece — is GraphQL The End of REST Style APIs? — is quite simple. Yes, using GraphQL is the end of REST style APIs as we know it — specifically through the extension of base functionality and a reconsideration of data relations and functions.</p>
<h2 id="4-things-graphql-does-better-than-rest">4 Things GraphQL Does Better than REST</h2>
<p>Now that we’ve seen the issues with REST, how, exactly, does GraphQL solve them?</p>
<h3 id="rest-has-many-roundtrips--graphql-has-few">REST Has Many Roundtrips – GraphQL Has Few</h3>
<p>The biggest benefit of GraphQL over REST is the simple fact that GraphQL has <strong>fewer roundtrips</strong> than REST does, and more efficient ones at that. GraphQL unifies data that would otherwise exist in multiple endpoints (or even worse, ad hoc endpoints), and creates packages.</p>
<p>By packaging data, the data delivery is made more efficient, and decreases the amount of resources required for roundtrip calls. This also fundamentally restructures the relationship between client and server, placing more efficiency and control in the hands of GraphQL clients.</p>
<h3 id="rest-has-poor-type-systems--graphql-has-a-sophisticated-one">REST Has Poor Type Systems – GraphQL Has a Sophisticated One</h3>
<p>While REST can have a <strong>type system</strong> through implementations of HTTP, REST itself does not have a very sophisticated typing system. Even in good implementations, you often end up with variants of type settings — for example, <em>clientdatamobile</em> and <em>clientdatadesktop</em> — to fit REST standard calls.</p>
<p>GraphQL solves this with a very sophisticated typing system, allowing for more specific and powerful queries.</p>
<h3 id="rest-has-poor-discoverability--graphql-has-native-support">REST Has Poor Discoverability – GraphQL Has Native Support</h3>
<p>Discoverability is not native to REST, and requires specific and methodical implementations of HATEOAS, Swagger, and other such solutions in order to be fully discoverable. The key there is “fully discoverable” — yes, REST has HATEOAS as a “native” discovery system, but it lacks some important elements of effective <strong>discoverability</strong> — namely known document structure, server response constraint structures, and an independence from standard, restrictive error mechanisms in HTTP.</p>
<p>While this and many other points of negative consideration towards REST is often answered with “but you can add that functionality!”, the fact that it lacks it by default only adds to the complexity we’re trying to move away from.</p>
<p>Because GraphQL is based on <strong>relational data</strong> and, when operating on a properly formed schema, is self describing, GraphQL is by design natively discoverable. Discoverability is incredibly important, both in terms of allowing for extensible third-party functionality and interactions and for on-boarding developers and users with an easy to understand, easy to explore system of functions.</p>
<h3 id="rest-is-thin-clientfat-server--graphql-is-fat-clientfat-server">REST Is Thin Client/Fat Server – GraphQL is Fat Client/Fat Server</h3>
<p>In REST design, the relationship between client and server is well-defined, but <strong>unbalanced</strong>. REST uses a very <strong>thin client</strong>, depending on processing from the server and the endpoints that have been defined for it. Since the bulk of the processing and control is placed firmly on the <strong>server</strong>, this strips power from the client, and also stresses server side resources. Until now that has been fine, but as devices grow in processing power and ability, this client/server relationship may need rethinking.</p>
<p>GraphQL, however, is different. By offloading specification of expected data format to the client and structuring data around that call on the server side, we have a Fat Client/Fat Server (or even a Thin Client/Thin Server depending on approach) in which both power and control are level across the relationship.</p>
<p>This is very powerful when one considers that the data type being requested will be used for specific purposes as regulated and requested by the Client itself — it makes sense, then, that moving from a Thin/Fat relationship to a Fat/Fat or Thin/Thin relationship would improve this functionality on the Client side while freeing up Server resources. Of course, this assumes that the client is capable of handling this burden.</p>
<h3 id="the-end-of-the-status-quo">The End Of The Status Quo</h3>
<p>There’s a tendency in the tech space for providers and developers of new technologies to proclaim the end of an era with each solution. While it’s common to discussion in the field, the fact is that there are very few complete paradigm shifts that signal an irrevocable end to existing technologies.</p>
<p>Innovation depends on prior technologies to create new functionality. Therefore, when a new solution is designed, it’s not replacing the solution, but rather iterating. The same is true here. While GraphQL may not be the complete demise of REST, it is the end of the <strong>status quo</strong>. While there are a great many solutions to the issues raised here, they all depend on further integrations and modifications. GraphQL is essentially an overhaul, and one which improves the base level functionality of the API itself.</p>
<h2 id="conclusion">Conclusion</h2>
<p>What we have here is a basic value proposition. GraphQL does what it does well, but the question of integration lies directly on what kind of data you’re processing, and what issues your API is creating. For simple APIs, REST works just fine, but as data gets more complex and the needs of the data providers climbs, so too will the need for more complex and powerful systems.</p>
<p>Adopting GraphQL as an adjunct or extension of the REST ideology, while removing REST from the intellectual space of “too big to not use”, will directly result in more powerful APIs with easier discoverability and greater manageability of the data they handle.</p>yashumittalIs GraphQL The End of REST Style APIs?
https://cdn.codecarrot.net/images/is-graphql-the-end-of-rest-style-apis.png
Object Storage vs. Block Storage2018-02-08T21:22:00+00:002018-02-08T21:22:00+00:00https://blog.codecarrot.net/object-storage-vs-block-storage-services<p><strong>Introduction</strong></p>
<p>Flexible and scalable data storage is a baseline requirement for most applications and services being developed with modern techniques and tools. Whether storing large or small amounts of images, videos, or blobs of text, application developers need a solution for the storage and retrieval of user-generated content, logs, backups, and so on.</p>
<p>With today’s complex deployments, containers, and ephemeral infrastructure, the days of simply saving files to disk on a single server are gone. Cloud providers have developed services to fill the storage needs of modern application deployments, and they mostly fit into two categories: object storage, and block storage.
Let’s take a look at both, and discuss the general advantages, disadvantages, and use cases for each.</p>
<h2 id="what-is-block-storage">What is Block Storage</h2>
<p>Block storage services are relatively simple and familiar. They provide a traditional block storage device — like a hard drive — over the network. Cloud providers often have products that can provision a block storage device of any size and attach it to your virtual machine.</p>
<p>From there, you would treat it like a normal disk. You could format it with a filesystem and store files on it, combine multiple devices into a RAID array, or configure a database to write directly to the block device, avoiding filesystem overhead entirely. Additionally, network-attached block storage devices often have some unique advantages over normal hard drives:</p>
<ul>
<li>You can easily take live snapshots of the entire device for backup purposes</li>
<li>Block storage devices can be resized to accommodate growing needs</li>
<li>You can easily detach and move block storage devices between machines</li>
</ul>
<p>This is a very flexible setup that can be useful for most any kind of application. Let’s summarize some advantages and disadvantages of the technology.</p>
<p><strong>Some advantages of block storage are:</strong></p>
<ul>
<li>Block storage is a familiar paradigm. People and software understand and support files and filesystems almost universally</li>
<li>Block devices are well supported. Every programming language can easily read and write files</li>
<li>Filesystem permissions and access controls are familiar and well-understood</li>
<li>Block storage devices provide low latency IO, so they are suitable for use by databases.</li>
</ul>
<p><strong>The disadvantages of block storage are:</strong></p>
<ul>
<li>Storage is tied to one server at a time</li>
<li>Blocks and filesystems have limited metadata about the blobs of information they’re storing (creation date, owner, size). Any additional information about what you’re storing will have to be handled at the application and database level, which is additional complexity for a developer to worry about</li>
<li>You need to pay for all the block storage space you’ve allocated, even if you’re not using it</li>
<li>You can only access block storage through a running server</li>
<li>Block storage needs more hands-on work and setup vs object storage (filesystem choices, permissions, versioning, backups, etc.)</li>
</ul>
<p>Because of its fast IO characteristics, block storage services are well suited for storing data in traditional databases. Additionally, many legacy applications that require normal filesystem storage will need to use a block storage device.</p>
<p>If your cloud provider doesn’t offer a block storage service you can run your own using <a href="https://www.openstack.org/software/releases/ocata/components/cinder">OpenStack Cinder</a>, <a href="http://ceph.com/">Ceph</a>, or the built-in iSCSI service available on many NAS devices.</p>
<h2 id="what-is-object-storage">What is Object Storage</h2>
<p>In the modern world of cloud computing, object storage is the storage and retrieval of unstructured blobs of data and metadata using an HTTP API. Instead of breaking files down into blocks to store it on disk using a filesystem, we deal with whole objects stored over the network. These objects could be an image file, logs, HTML files, or any self-contained blob of bytes. They are <em>unstructured</em> because there is no specific schema or format they need to follow.</p>
<p>Object storage took off because it greatly simplified the developer experience. Because the API consists of standard HTTP requests, libraries were quickly developed for most programming languages. Saving a blob of data became as easy as an HTTP PUT request to the object store. Retrieving the file and metadata is a normal GET request. Further, most object storage services can also serve the files publicly to your users, removing the need to maintain a web server to host static assets.</p>
<p>On top of that, object storage services charge only for the storage space you use (some also charge per HTTP request, and for transfer bandwidth). This is a boon for small developers, who can get world-class storage and hosting of assets at costs that scale with use.</p>
<p>Object storage isn’t the right solution for every situation though. Let’s look at a summary of benefits and disadvantages.</p>
<p><strong>Some advantages of object storage are:</strong></p>
<ul>
<li>A simple HTTP API, with clients available for all major operating systems and programming languages</li>
<li>A cost structure that means you only pay for what you use</li>
<li>Built-in public serving of static assets means one less server for you to run yourself</li>
<li>Some object stores offer built-in CDN integration, which cache your assets around the globe to make downloads and page loads faster for your users</li>
<li>Optional versioning means you can retrieve old versions of objects to recover from accidental overwrites of data</li>
<li>Object storage services can easily scale from modest needs to really intense use-cases without the developer having to launch more resources or rearchitect to handle the load</li>
<li>Using an object storage service means you don’t have to maintain hard drives and RAID arrays, as that’s handled by the service provider</li>
<li>Being able to store chunks of metadata alongside your data blob can further simplify your application architecture</li>
</ul>
<p><strong>Some disadvantages of object storage are:</strong></p>
<ul>
<li>You can’t use object storage services to back a traditional database, due to the high latency of such services</li>
<li>Object storage doesn’t allow you to alter just a piece of a data blob, you must read and write an entire object at once. This has some performance implications. For instance, on a filesystem, you can easily append a single line to the end of a log file. On an object storage system, you’d need to retrieve the object, add the new line, and write the entire object back. This makes object storage less ideal for data that changes very frequently</li>
<li>Operating systems can’t easily mount an object store like a normal disk. There are some clients and adapters to help with this, but in general, using and browsing an object store is not as simple as flipping through directories in a file browser</li>
</ul>
<p>Because of these properties, object storage is useful for hosting static assets, saving user-generated content such as images and movies, storing backup files, and storing logs, for example.</p>
<p>There are some self-hosted object storage solutions, though you will give up some of the benefits of a hosted solution (such as not having to worry about hard drives and scaling issues). You could try <a href="https://www.minio.io/">Minio</a>, a popular object storage server written in the Go language, or <a href="http://ceph.com/">Ceph</a>, or <a href="https://www.openstack.org/software/releases/ocata/components/swift">OpenStack Swift</a>.</p>
<h2 id="conclusion">Conclusion</h2>
<p>Choosing a storage solution can be a complex decision for developers. In this article we discussed the advantages and disadvantages of both block and object storage services. It’s likely that any sufficiently complex application will need both types of storage to cover all its needs.</p>yashumittalIntroduction
https://cdn.codecarrot.net/images/object-storage-block-storage.png
HTML 5 - Is it br, br/, or br /?2018-02-08T15:26:00+00:002018-02-08T15:26:00+00:00https://blog.codecarrot.net/html-5-is-it-br-br-br<p>HTML 4.01 was supposed to “allow” single-tags to just be <code class="highlighter-rouge"><img></code> and <code class="highlighter-rouge"><br></code>. Then XHTML came along with <code class="highlighter-rouge"><img /></code> and <code class="highlighter-rouge"><br /></code>.</p>
<p>If you are not sure which one is correct or which one should I use? Then you are at the right place for you.</p>
<p>Simply <code class="highlighter-rouge"><br></code> is sufficient.</p>
<p>The other forms are there for compatibility with XHTML; to make it possible to write the same code as XHTML, and have it also work as HTML.</p>
<p>Some systems that generate HTML may be based on XML generators, and thus do not have the ability to output just a bare <code class="highlighter-rouge"><br></code> tag; if you’re using such a system, it’s fine to use <code class="highlighter-rouge"><br/></code>, it’s just not necessary if you don’t need to do it.</p>
<p>Very few people actually use XHTML, however. You need to serve your content as <code class="highlighter-rouge">application/xhtml+xml</code> for it to be interpreted as XHTML, and that will not work in old versions of IE - it will also mean that any small error you make will prevent your page from being displayed in browsers that do support XHTML. So, most of what looks like XHTML on the web is actually being served, and interpreted, as HTML.</p>
<p>Some elements, however, are forbidden from containing any content at all. These are known as void elements. In HTML, the syntax cannot be used for void elements. For such elements, the end tag must be omitted because the element is automatically closed by the parser. Such elements include, among others, br, hr, link and meta.</p>
<p><strong>HTML Example:</strong></p>
<div class="language-html highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="nt"><link</span> <span class="na">type=</span><span class="s">"text/css"</span> <span class="na">rel=</span><span class="s">"stylesheet"</span> <span class="na">href=</span><span class="s">"style.css"</span><span class="nt">></span>
</code></pre></div></div>
<p>In XHTML, the XML syntactic requirements dictate that this must be made explicit using either an explicit end tag, as above, or the empty element syntax. This is achieved by inserting a slash at the end of the start tag immediately before the right angle bracket.</p>
<p><strong>Example:</strong></p>
<div class="language-html highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="nt"><link</span> <span class="na">type=</span><span class="s">"text/css"</span> <span class="na">href=</span><span class="s">"style.css"</span><span class="nt">/></span>
</code></pre></div></div>
<p>Authors may optionally choose to use this same syntax for void elements in the HTML syntax as well. Some authors also choose to include whitespace before the slash, however this is not necessary. (Using whitespace in that fashion is a convention inherited from the compatibility guidelines in XHTML 1.0, Appendix C.)</p>
<p>XML doesn’t allow leaving tags open, so it makes <code class="highlighter-rouge"><br></code> a bit worse than the other two. The other two are roughly equivalent with the second preferred for compatibility with older browsers.</p>
<p>Actually, space before <code class="highlighter-rouge">/</code> is preferred for compatibility sake, but I think it only makes sense for tags that have attributes. So I’d say either <code class="highlighter-rouge"><br/></code> or <code class="highlighter-rouge"><br /></code>, whichever pleases your aesthetics.</p>
<p>To sum it up: all three are valid with the first one being a bit less “portable”.</p>
<p>Start tags consist of the following parts, in exactly the following order:</p>
<ol>
<li>A “<” character.</li>
<li>The element’s tag name.</li>
<li>Optionally, one or more attributes, each of which must be preceded by one or more space characters.</li>
<li>Optionally, one or more space characters.</li>
<li><strong>Optionally, a “/” character, which may be present only if the element is a void element.</strong></li>
<li>A “>” character.</li>
</ol>yashumittalHTML 4.01 was supposed to “allow” single-tags to just be <img> and <br>. Then XHTML came along with <img /> and <br />.
https://cdn.codecarrot.net/images/html-5-is-it-br-br-br.png
How to merge specific files from another branch?2018-02-03T17:53:33+00:002018-02-03T17:53:33+00:00https://blog.codecarrot.net/how-to-merge-specific-files-from-another-branch<h2 id="problem-statement">Problem statement</h2>
<p>Part of your team is hard at work developing a new feature in another branch. They’ve been working on the branch for several days now, and they’ve been committing changes every hour or so. Something comes up, and you need to add <em>some</em> of the code from that branch back into your mainline development branch. (For this example, we’ll assume mainline development occurs in the <code class="highlighter-rouge">master</code> branch.) You’re not ready to merge the entire feature branch into <code class="highlighter-rouge">master</code> just yet. The code you need to grab is isolated to a handful of files, and those files don’t yet exist in the <code class="highlighter-rouge">master</code>branch.</p>
<h2 id="buckets-o-fail">Buckets o’ fail</h2>
<p>This seems like it should be a simple enough task, so we start rummaging through our Git toolbox looking for just the right instrument.</p>
<p><strong>Idea, the first.</strong> Isn’t this exactly what <code class="highlighter-rouge">git cherry-pick</code> is made for? Not so fast. The team has made numerous commits to the files in question.<code class="highlighter-rouge">git cherry-pick</code> wants to merge a commit - not a file - from one branch into another branch. We don’t want to have to track down all the commits related to these files. We just want to grab these files in their current state in the feature branch and drop them into the <code class="highlighter-rouge">master</code> branch. We <em>could</em>hunt down the <em>last</em> commit to each of these files and feed that information to <code class="highlighter-rouge">git cherry-pick</code>, but that still seems like more work than ought to be necessary.</p>
<p><strong>Idea, the second.</strong> How ‘bout <code class="highlighter-rouge">git merge --interactive</code>? Sorry. That’s not actually a thing. You’re thinking of <code class="highlighter-rouge">git add --interactive</code> (which won’t work for our purposes either). Nice try though.</p>
<p><strong>Idea, the third.</strong> Maybe we can just merge the whole branch using <code class="highlighter-rouge">--squash</code>, keep the files we want, and throw away the rest. Um, yeah, that <em>would</em> work. Eventually. But we want to be done with this task in ten seconds, not ten <em>minutes</em>.</p>
<p><strong>Idea, the fourth.</strong> When in doubt, pull out the brute force approach? Surely we can just check out the feature branch, copy the files we need to a directory outside the repo, checkout the <code class="highlighter-rouge">master</code> branch, and then paste the files back in place. Ouch! Yeah. Maybe, but I think we might have our Git license revoked if we resort to such a hack.</p>
<h2 id="the-simplest-thing-that-could-possibly-work">The simplest thing that could possibly work</h2>
<p>As it turns out, we’re trying too hard. Our good friend <code class="highlighter-rouge">git checkout</code> is the right tool for the job.</p>
<div class="highlighter-rouge"><div class="highlight"><pre class="highlight"><code>git checkout source_branch <paths>...
</code></pre></div></div>
<p>We can simply give git checkout the name of the feature branch [1] and the paths to the specific files that we want to add to our master branch.</p>
<div class="highlighter-rouge"><div class="highlight"><pre class="highlight"><code>$ git branch
* master
twitter_integration
$ git checkout twitter_integration app/models/avatar.rb db/migrate/20090223104419_create_avatars.rb test/unit/models/avatar_test.rb test/functional/models/avatar_test.rb
$ git status
# On branch master
# Changes to be committed:
# (use "git reset HEAD <file>..." to unstage)
#
# new file: app/models/avatar.rb
# new file: db/migrate/20090223104419_create_avatars.rb
# new file: test/functional/models/avatar_test.rb
# new file: test/unit/models/avatar_test.rb
#
$ git commit -m "'Merge' avatar code from 'twitter_integration' branch"
[master]: created 4d3e37b: "'Merge' avatar code from 'twitter_integration' branch"
4 files changed, 72 insertions(+), 0 deletions(-)
create mode 100644 app/models/avatar.rb
create mode 100644 db/migrate/20090223104419_create_avatars.rb
create mode 100644 test/functional/models/avatar_test.rb
create mode 100644 test/unit/models/avatar_test.rb
</code></pre></div></div>
<p><strong>Pro Tip:</strong> <code class="highlighter-rouge">git checkout</code> actually accepts any tree-ish here. So you’re not limited to grabbing code from the current tip of a branch; if needed, you can also check out files using a tag or the SHA for a past commit.</p>yashumittalProblem statement
https://cdn.codecarrot.net/images/todd-diemer-181900.jpg
React.createClass versus extends React.Component2018-02-02T08:49:24+00:002018-02-02T08:49:24+00:00https://blog.codecarrot.net/react-create-class-versus-extends-react-component<p>Two ways to do the same thing. Almost. React traditionally provided the <code class="highlighter-rouge">React.createClass</code> method to create component classes, and released a small syntax sugar update to allow for better use with ES6 modules by <code class="highlighter-rouge">extends React.Component</code>, which extends the <code class="highlighter-rouge">Component</code> class instead of calling <code class="highlighter-rouge">createClass</code>.</p>
<p>These differences are subtle in places, but have quite a few interesting differences worth exploring, which will allow you to make the best decision for which is best for you.</p>
<h2 id="syntax-differences">Syntax differences</h2>
<p>First, let’s explore the syntax differences by looking at two code examples and annotating them.</p>
<h3 id="reactcreateclass">React.createClass</h3>
<p>Here we have a <code class="highlighter-rouge">const</code> with a React class assigned, with the important <code class="highlighter-rouge">render</code> function following on to complete a typical base component definition.</p>
<div class="language-jsx highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="k">import</span> <span class="nx">React</span> <span class="k">from</span> <span class="dl">'</span><span class="s1">react</span><span class="dl">'</span><span class="p">;</span>
<span class="kd">const</span> <span class="nx">Contacts</span> <span class="o">=</span> <span class="nx">React</span><span class="p">.</span><span class="nx">createClass</span><span class="p">({</span>
<span class="nx">render</span><span class="p">()</span> <span class="p">{</span>
<span class="k">return</span> <span class="p">(</span>
<span class="p"><</span><span class="nt">div</span><span class="p">></</span><span class="nt">div</span><span class="p">></span>
<span class="p">);</span>
<span class="p">}</span>
<span class="p">});</span>
<span class="k">export</span> <span class="k">default</span> <span class="nx">Contacts</span><span class="p">;</span>
</code></pre></div></div>
<h3 id="reactcomponent">React.Component</h3>
<p>Let’s take the above <code class="highlighter-rouge">React.createClass</code> definition and convert it to use an ES6 class.</p>
<div class="language-jsx highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="k">import</span> <span class="nx">React</span> <span class="k">from</span> <span class="dl">'</span><span class="s1">react</span><span class="dl">'</span><span class="p">;</span>
<span class="kd">class</span> <span class="nx">Contacts</span> <span class="kd">extends</span> <span class="nx">React</span><span class="p">.</span><span class="nx">Component</span> <span class="p">{</span>
<span class="kd">constructor</span><span class="p">(</span><span class="nx">props</span><span class="p">)</span> <span class="p">{</span>
<span class="k">super</span><span class="p">(</span><span class="nx">props</span><span class="p">);</span>
<span class="p">}</span>
<span class="nx">render</span><span class="p">()</span> <span class="p">{</span>
<span class="k">return</span> <span class="p">(</span>
<span class="p"><</span><span class="nt">div</span><span class="p">></</span><span class="nt">div</span><span class="p">></span>
<span class="p">);</span>
<span class="p">}</span>
<span class="p">}</span>
<span class="k">export</span> <span class="k">default</span> <span class="nx">Contacts</span><span class="p">;</span>
</code></pre></div></div>
<p>From a JavaScript perspective we’re now using ES6 classes, typically this would be used with something like Babel to compile the ES6 to ES5 to work in other browsers. With this change, we introduce the <code class="highlighter-rouge">constructor</code>, where we need to call <code class="highlighter-rouge">super()</code> to pass the props to <code class="highlighter-rouge">React.Component</code>.</p>
<p>For the React changes, we now create a <code class="highlighter-rouge">class</code> called “Contacts” and <code class="highlighter-rouge">extend</code> from <code class="highlighter-rouge">React.Component</code> instead of accessing <code class="highlighter-rouge">React.createClass</code> directly, which uses less React boilerplate and more JavaScript. This is an important change to note further changes this syntax swap brings.</p>
<h2 id="proptypes-and-getdefaultprops">propTypes and getDefaultProps</h2>
<p>There are important changes in how we use and declare default props, their types and setting initial states, let’s take a look.</p>
<h3 id="reactcreateclass-1">React.createClass</h3>
<p>In the <code class="highlighter-rouge">React.createClass</code> version, the <code class="highlighter-rouge">propTypes</code> property is an Object in which we can declare the type for each prop. The <code class="highlighter-rouge">getDefaultProps</code> property is a function that returns an Object to create initial props.</p>
<div class="language-jsx highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="k">import</span> <span class="nx">React</span> <span class="k">from</span> <span class="dl">'</span><span class="s1">react</span><span class="dl">'</span><span class="p">;</span>
<span class="kd">const</span> <span class="nx">Contacts</span> <span class="o">=</span> <span class="nx">React</span><span class="p">.</span><span class="nx">createClass</span><span class="p">({</span>
<span class="na">propTypes</span><span class="p">:</span> <span class="p">{</span>
<span class="p">},</span>
<span class="nx">getDefaultProps</span><span class="p">()</span> <span class="p">{</span>
<span class="k">return</span> <span class="p">{</span>
<span class="p">};</span>
<span class="p">},</span>
<span class="nx">render</span><span class="p">()</span> <span class="p">{</span>
<span class="k">return</span> <span class="p">(</span>
<span class="p"><</span><span class="nt">div</span><span class="p">></</span><span class="nt">div</span><span class="p">></span>
<span class="p">);</span>
<span class="p">}</span>
<span class="p">});</span>
<span class="k">export</span> <span class="k">default</span> <span class="nx">Contacts</span><span class="p">;</span>
</code></pre></div></div>
<h3 id="reactcomponent-1">React.Component</h3>
<p>This uses <code class="highlighter-rouge">propTypes</code> as a property on the actual <code class="highlighter-rouge">Contacts</code> class instead of a property as part of the <code class="highlighter-rouge">createClass</code> definition Object. I think it’s nicer syntax to create class properties so it’s much clearer what are React APIs versus your own on the definition Object.</p>
<p>The <code class="highlighter-rouge">getDefaultProps</code> has now changed to just an Object property on the class called <code class="highlighter-rouge">defaultProps</code>, as it’s no longer a “get” function, it’s just an Object. I like this syntax as it avoids more React boilerplate, just plain JavaScript.</p>
<div class="language-jsx highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="k">import</span> <span class="nx">React</span> <span class="k">from</span> <span class="dl">'</span><span class="s1">react</span><span class="dl">'</span><span class="p">;</span>
<span class="kd">class</span> <span class="nx">Contacts</span> <span class="kd">extends</span> <span class="nx">React</span><span class="p">.</span><span class="nx">Component</span> <span class="p">{</span>
<span class="kd">constructor</span><span class="p">(</span><span class="nx">props</span><span class="p">)</span> <span class="p">{</span>
<span class="k">super</span><span class="p">(</span><span class="nx">props</span><span class="p">);</span>
<span class="p">}</span>
<span class="nx">render</span><span class="p">()</span> <span class="p">{</span>
<span class="k">return</span> <span class="p">(</span>
<span class="p"><</span><span class="nt">div</span><span class="p">></</span><span class="nt">div</span><span class="p">></span>
<span class="p">);</span>
<span class="p">}</span>
<span class="p">}</span>
<span class="nx">Contacts</span><span class="p">.</span><span class="nx">propTypes</span> <span class="o">=</span> <span class="p">{</span>
<span class="p">};</span>
<span class="nx">Contacts</span><span class="p">.</span><span class="nx">defaultProps</span> <span class="o">=</span> <span class="p">{</span>
<span class="p">};</span>
<span class="k">export</span> <span class="k">default</span> <span class="nx">Contacts</span><span class="p">;</span>
</code></pre></div></div>
<h2 id="state-differences">State differences</h2>
<p>State is an interesting change, now we’re using constructors the implementation of initial states changes.</p>
<h3 id="reactcreateclass-2">React.createClass</h3>
<p>We have a <code class="highlighter-rouge">getInitialState</code> function, which simply returns an Object of initial states.</p>
<div class="language-jsx highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="k">import</span> <span class="nx">React</span> <span class="k">from</span> <span class="dl">'</span><span class="s1">react</span><span class="dl">'</span><span class="p">;</span>
<span class="kd">const</span> <span class="nx">Contacts</span> <span class="o">=</span> <span class="nx">React</span><span class="p">.</span><span class="nx">createClass</span><span class="p">({</span>
<span class="nx">getInitialState</span> <span class="p">()</span> <span class="p">{</span>
<span class="k">return</span> <span class="p">{</span>
<span class="p">};</span>
<span class="p">},</span>
<span class="nx">render</span><span class="p">()</span> <span class="p">{</span>
<span class="k">return</span> <span class="p">(</span>
<span class="p"><</span><span class="nt">div</span><span class="p">></</span><span class="nt">div</span><span class="p">></span>
<span class="p">);</span>
<span class="p">}</span>
<span class="p">});</span>
<span class="k">export</span> <span class="k">default</span> <span class="nx">Contacts</span><span class="p">;</span>
</code></pre></div></div>
<h3 id="reactcomponent-2">React.Component</h3>
<p>The <code class="highlighter-rouge">getInitialState</code> function is deceased, and now we declare all state as a simple initialisation property in the <code class="highlighter-rouge">constructor</code>, which I think is much more JavaScript-like and less “API” driven.</p>
<div class="language-jsx highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="k">import</span> <span class="nx">React</span> <span class="k">from</span> <span class="dl">'</span><span class="s1">react</span><span class="dl">'</span><span class="p">;</span>
<span class="kd">class</span> <span class="nx">Contacts</span> <span class="kd">extends</span> <span class="nx">React</span><span class="p">.</span><span class="nx">Component</span> <span class="p">{</span>
<span class="kd">constructor</span><span class="p">(</span><span class="nx">props</span><span class="p">)</span> <span class="p">{</span>
<span class="k">super</span><span class="p">(</span><span class="nx">props</span><span class="p">);</span>
<span class="k">this</span><span class="p">.</span><span class="nx">state</span> <span class="o">=</span> <span class="p">{</span>
<span class="p">};</span>
<span class="p">}</span>
<span class="nx">render</span><span class="p">()</span> <span class="p">{</span>
<span class="k">return</span> <span class="p">(</span>
<span class="p"><</span><span class="nt">div</span><span class="p">></</span><span class="nt">div</span><span class="p">></span>
<span class="p">);</span>
<span class="p">}</span>
<span class="p">}</span>
<span class="k">export</span> <span class="k">default</span> <span class="nx">Contacts</span><span class="p">;</span>
</code></pre></div></div>
<h2 id="this-differences">“this” differences</h2>
<p>Using <code class="highlighter-rouge">React.createClass</code> will automatically bind <code class="highlighter-rouge">this</code> values correctly for us, but changes when using ES6 classes affect this.</p>
<h3 id="reactcreateclass-3">React.createClass</h3>
<p>Note the <code class="highlighter-rouge">onClick</code> declaration with <code class="highlighter-rouge">this.handleClick</code> bound. When this method gets called React will apply the right execution context to <code class="highlighter-rouge">handleClick</code>.</p>
<div class="language-jsx highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="k">import</span> <span class="nx">React</span> <span class="k">from</span> <span class="dl">'</span><span class="s1">react</span><span class="dl">'</span><span class="p">;</span>
<span class="kd">const</span> <span class="nx">Contacts</span> <span class="o">=</span> <span class="nx">React</span><span class="p">.</span><span class="nx">createClass</span><span class="p">({</span>
<span class="nx">handleClick</span><span class="p">()</span> <span class="p">{</span>
<span class="nx">console</span><span class="p">.</span><span class="nx">log</span><span class="p">(</span><span class="k">this</span><span class="p">);</span> <span class="c1">// React Component instance</span>
<span class="p">},</span>
<span class="nx">render</span><span class="p">()</span> <span class="p">{</span>
<span class="k">return</span> <span class="p">(</span>
<span class="p"><</span><span class="nt">div</span> <span class="na">onClick</span><span class="p">=</span><span class="si">{</span><span class="k">this</span><span class="p">.</span><span class="nx">handleClick</span><span class="si">}</span><span class="p">></</span><span class="nt">div</span><span class="p">></span>
<span class="p">);</span>
<span class="p">}</span>
<span class="p">});</span>
<span class="k">export</span> <span class="k">default</span> <span class="nx">Contacts</span><span class="p">;</span>
</code></pre></div></div>
<h3 id="reactcomponent-3">React.Component</h3>
<p>With ES6 classes this is slightly different, properties of the class do not automatically bind to the React class instance.</p>
<div class="language-jsx highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="k">import</span> <span class="nx">React</span> <span class="k">from</span> <span class="dl">'</span><span class="s1">react</span><span class="dl">'</span><span class="p">;</span>
<span class="kd">class</span> <span class="nx">Contacts</span> <span class="kd">extends</span> <span class="nx">React</span><span class="p">.</span><span class="nx">Component</span> <span class="p">{</span>
<span class="kd">constructor</span><span class="p">(</span><span class="nx">props</span><span class="p">)</span> <span class="p">{</span>
<span class="k">super</span><span class="p">(</span><span class="nx">props</span><span class="p">);</span>
<span class="p">}</span>
<span class="nx">handleClick</span><span class="p">()</span> <span class="p">{</span>
<span class="nx">console</span><span class="p">.</span><span class="nx">log</span><span class="p">(</span><span class="k">this</span><span class="p">);</span> <span class="c1">// null</span>
<span class="p">}</span>
<span class="nx">render</span><span class="p">()</span> <span class="p">{</span>
<span class="k">return</span> <span class="p">(</span>
<span class="p"><</span><span class="nt">div</span> <span class="na">onClick</span><span class="p">=</span><span class="si">{</span><span class="k">this</span><span class="p">.</span><span class="nx">handleClick</span><span class="si">}</span><span class="p">></</span><span class="nt">div</span><span class="p">></span>
<span class="p">);</span>
<span class="p">}</span>
<span class="p">}</span>
<span class="k">export</span> <span class="k">default</span> <span class="nx">Contacts</span><span class="p">;</span>
</code></pre></div></div>
<p>There are a few ways we could bind the right context, here’s how we could bind inline:</p>
<div class="language-jsx highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="k">import</span> <span class="nx">React</span> <span class="k">from</span> <span class="dl">'</span><span class="s1">react</span><span class="dl">'</span><span class="p">;</span>
<span class="kd">class</span> <span class="nx">Contacts</span> <span class="kd">extends</span> <span class="nx">React</span><span class="p">.</span><span class="nx">Component</span> <span class="p">{</span>
<span class="kd">constructor</span><span class="p">(</span><span class="nx">props</span><span class="p">)</span> <span class="p">{</span>
<span class="k">super</span><span class="p">(</span><span class="nx">props</span><span class="p">);</span>
<span class="p">}</span>
<span class="nx">handleClick</span><span class="p">()</span> <span class="p">{</span>
<span class="nx">console</span><span class="p">.</span><span class="nx">log</span><span class="p">(</span><span class="k">this</span><span class="p">);</span> <span class="c1">// React Component instance</span>
<span class="p">}</span>
<span class="nx">render</span><span class="p">()</span> <span class="p">{</span>
<span class="k">return</span> <span class="p">(</span>
<span class="p"><</span><span class="nt">div</span> <span class="na">onClick</span><span class="p">=</span><span class="si">{</span><span class="k">this</span><span class="p">.</span><span class="nx">handleClick</span><span class="p">.</span><span class="nx">bind</span><span class="p">(</span><span class="k">this</span><span class="p">)</span><span class="si">}</span><span class="p">></</span><span class="nt">div</span><span class="p">></span>
<span class="p">);</span>
<span class="p">}</span>
<span class="p">}</span>
<span class="k">export</span> <span class="k">default</span> <span class="nx">Contacts</span><span class="p">;</span>
</code></pre></div></div>
<p>Alternatively we could change the context of <code class="highlighter-rouge">this.handleClick</code> inside the <code class="highlighter-rouge">constructor</code> to avoid inline repetition, which may be a better approach if moving to this syntax to avoid touching JSX at all:</p>
<div class="language-jsx highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="k">import</span> <span class="nx">React</span> <span class="k">from</span> <span class="dl">'</span><span class="s1">react</span><span class="dl">'</span><span class="p">;</span>
<span class="kd">class</span> <span class="nx">Contacts</span> <span class="kd">extends</span> <span class="nx">React</span><span class="p">.</span><span class="nx">Component</span> <span class="p">{</span>
<span class="kd">constructor</span><span class="p">(</span><span class="nx">props</span><span class="p">)</span> <span class="p">{</span>
<span class="k">super</span><span class="p">(</span><span class="nx">props</span><span class="p">);</span>
<span class="k">this</span><span class="p">.</span><span class="nx">handleClick</span> <span class="o">=</span> <span class="k">this</span><span class="p">.</span><span class="nx">handleClick</span><span class="p">.</span><span class="nx">bind</span><span class="p">(</span><span class="k">this</span><span class="p">);</span>
<span class="p">}</span>
<span class="nx">handleClick</span><span class="p">()</span> <span class="p">{</span>
<span class="nx">console</span><span class="p">.</span><span class="nx">log</span><span class="p">(</span><span class="k">this</span><span class="p">);</span> <span class="c1">// React Component instance</span>
<span class="p">}</span>
<span class="nx">render</span><span class="p">()</span> <span class="p">{</span>
<span class="k">return</span> <span class="p">(</span>
<span class="p"><</span><span class="nt">div</span> <span class="na">onClick</span><span class="p">=</span><span class="si">{</span><span class="k">this</span><span class="p">.</span><span class="nx">handleClick</span><span class="si">}</span><span class="p">></</span><span class="nt">div</span><span class="p">></span>
<span class="p">);</span>
<span class="p">}</span>
<span class="p">}</span>
<span class="k">export</span> <span class="k">default</span> <span class="nx">Contacts</span><span class="p">;</span>
</code></pre></div></div>
<h2 id="mixins">Mixins</h2>
<p>React mixins are no longer supported when using React components written in ES6.</p>
<h3 id="reactcreateclass-4">React.createClass</h3>
<p>With <code class="highlighter-rouge">React.createClass</code> we can add mixins to components using a <code class="highlighter-rouge">mixins</code> property which takes an Array of available mixins. These then extend the component class.</p>
<div class="language-jsx highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="k">import</span> <span class="nx">React</span> <span class="k">from</span> <span class="dl">'</span><span class="s1">react</span><span class="dl">'</span><span class="p">;</span>
<span class="kd">var</span> <span class="nx">SomeMixin</span> <span class="o">=</span> <span class="p">{</span>
<span class="nx">doSomething</span><span class="p">()</span> <span class="p">{</span>
<span class="p">}</span>
<span class="p">};</span>
<span class="kd">const</span> <span class="nx">Contacts</span> <span class="o">=</span> <span class="nx">React</span><span class="p">.</span><span class="nx">createClass</span><span class="p">({</span>
<span class="na">mixins</span><span class="p">:</span> <span class="p">[</span><span class="nx">SomeMixin</span><span class="p">],</span>
<span class="nx">handleClick</span><span class="p">()</span> <span class="p">{</span>
<span class="k">this</span><span class="p">.</span><span class="nx">doSomething</span><span class="p">();</span> <span class="c1">// use mixin</span>
<span class="p">},</span>
<span class="nx">render</span><span class="p">()</span> <span class="p">{</span>
<span class="k">return</span> <span class="p">(</span>
<span class="p"><</span><span class="nt">div</span> <span class="na">onClick</span><span class="p">=</span><span class="si">{</span><span class="k">this</span><span class="p">.</span><span class="nx">handleClick</span><span class="si">}</span><span class="p">></</span><span class="nt">div</span><span class="p">></span>
<span class="p">);</span>
<span class="p">}</span>
<span class="p">});</span>
<span class="k">export</span> <span class="k">default</span> <span class="nx">Contacts</span><span class="p">;</span>
</code></pre></div></div>
<h3 id="reactcomponent-4">React.Component</h3>
<p>Mixins aren’t supported in ES6 classes.</p>
<h2 id="recommendations">Recommendations</h2>
<p>Facebook does suggest the future removal of <code class="highlighter-rouge">React.createClass</code> completely in favour of ES6 classes - (<a href="//facebook.github.io/react/blog/2015/03/10/react-v0.13.html">source</a>). For now, use what makes sense, they’re both just syntax with different semantics that do the same thing - they’re both classes!</p>yashumittalTwo ways to do the same thing. Almost. React traditionally provided the React.createClass method to create component classes, and released a small syntax sugar update to allow for better use with ES6 modules by extends React.Component, which extends the Component class instead of calling createClass.
https://cdn.codecarrot.net/images/es6-class-components-header.png
How to Conduct A Content Audit2018-02-01T09:38:59+00:002018-02-01T09:38:59+00:00https://blog.codecarrot.net/how-to-conduct-a-content-audit<p>If you’re working on any kind of redesign project involving a large amount of content, such as that of a website, intranet or mobile site, one of the first tasks you’ll need to perform is a <strong>content audit</strong>.</p>
<p>I say <em>need</em>, not <em>want</em>—a content audit isn’t something you’re necessarily going to <em>want</em> to tackle. It’s one of those un-sexy, tedious jobs that hardly anyone talks about. But you can’t undertake a redesign of a content-heavy site without it.</p>
<h2 id="what-is-a-content-audit">What is a Content Audit</h2>
<p>A content audit is the activity of checking all of the content on a website, and compiling it into a big list. There are three main types of audits you can perform:</p>
<ul>
<li><strong>Full content inventory:</strong> A complete listing of <em>every</em> content item on the site. This may include all pages as well as all assets (such as downloadable files and videos).</li>
<li><strong>Partial content inventory:</strong> A listing of a <em>subset</em> of the site’s content. A partial inventory may include, for example, the top few levels of a hierarchical site or the past six months of articles. All sections of the site will be covered.</li>
<li><strong>Content sample:</strong> A less detailed collection of example content from the site.</li>
</ul>
<h2 id="what-is-a-content-audit-used-for">What is a Content Audit Used For</h2>
<p>The main purpose of a content audit is to produce a listing of the site’s content, usually in a big spreadsheet.</p>
<p>This list of content will come in handy at various stages of the project. If you’re re-doing the information architecture, you’ll return to it again and again to remind yourself of the details of each page; you can also use it to talk to authors about managing and rewriting their content; and if you’re going to be moving to a new content management system, you’ll use it to keep note of what you started with, and where you’re up to.</p>
<p>That said, having a comprehensive list of content isn’t the only benefit of this process. Just by taking the audit you’ll get a much better understanding of the content. You may find things you didn’t know existed, spot duplication and identify all kinds of relationships in the content. It can also serve as a precursor to a more comprehensive content analysis, but that’s a topic for another post!</p>
<h2 id="what-does-a-content-audit-include">What Does a Content Audit Include</h2>
<p>I always record a content audit in a spreadsheet, mainly because spreadsheets are so flexible. They are also great at holding a large amount of information in a fairly manageable way. Plus they’re easy to share with other people.</p>
<p>I recommend collecting the following information for every page:</p>
<ul>
<li><strong>Navigation title:</strong> The name of the main navigation link to the content (e.g. the link title in the main navigation)</li>
<li><strong>Page name:</strong> The displayed page title</li>
<li><strong>URL:</strong> You may want to display the URL or just link from the page name</li>
<li><strong>Comments:</strong> Notes and things for you to remember</li>
<li><strong>Content hierarchy:</strong> Some way of showing the basic relationship of the content items</li>
</ul>
<p>You may also like to add information about:</p>
<ul>
<li><strong>Content Type:</strong> Is this a basic page, publication, news story, article, technique, FAQ, or something else?</li>
<li><strong>Basic content description:</strong> A brief reminder about what’s on the page</li>
<li><strong>Topic, tags or category:</strong> Meta data for products, articles, news, blog posts</li>
<li><strong>Author:</strong> Who wrote this content?</li>
<li><strong>Owner:</strong> Who is responsible for the content?</li>
<li><strong>Date last updated:</strong> When was the content last updated?</li>
<li><strong>Attached files:</strong> How many files are attached, and what type of files are they?</li>
<li><strong>Related:</strong> What information is linked from sidebars or <em>Related Links</em> boxes on this page?</li>
<li><strong>Availability:</strong> Is the content available to desktop, mobile and/or app users? Is the content syndicated to other sites?</li>
<li><strong>A numbering system:</strong> An index to help you when referring to each content item.</li>
</ul>
<p>You may need to collect different information for each type of content. For example, you may want to list topics or categories for news content; and only list downloadable files in a publications area.
The most important thing to know about a content audit is there really is no right or wrong way to do it—it’s a tool for you to use throughout your project, so create your content audit in a way that will help <em>you</em>. And don’t be afraid to adapt it after you start—each client and project is different, so each audit will be different.</p>
<h2 id="where-to-begin">Where to Begin</h2>
<p>Getting started is easy! Here’s how I go about it.</p>
<ol>
<li>List the main pages or sections of the site in the first column of your spreadsheet (right alongside your index). Here’s an example of content audit spreadsheet for a site that may look familiar:</li>
</ol>
<p><img src="https://i.imgur.com/Rldkt8U.jpg" alt="Spreadsheet data" /></p>
<ol>
<li>Start your content audit by creating a list of the top-level items—this will often match the primary navigation.</li>
<li>Choose one page to start with and dive into it, capturing the information you’ve decided upon for that page.</li>
<li>If that page has sub-pages, make a list of each of them, and repeat the process for each of these in turn.</li>
</ol>
<p><img src="https://i.imgur.com/8d2qMZc.jpg" alt="Spreadsheet data" /></p>
<ol>
<li>Dive into any list of sub-pages, and complete that section before moving on.</li>
<li>
<p>Then just keep going, until you’ve explored and written down everything you need to. That’s really all there is to it.
<img src="https://i.imgur.com/zqrzGzL.jpg" alt="Spreadsheet data" /></p>
</li>
<li>Capturing the content of a site in a spreadsheet will help you make informed design decisions.</li>
</ol>
<p>Auditing your content it this way—writing down details of the current page, then listing the sub-pages, then exploring a page—builds out your list in a way that allows you to come back and explore each section one-by-one.</p>
<p>If you’re auditing a big site, it can be very easy to get lost—it’s important to take this process step-by-step, and to finish one section before starting another.</p>
<h2 id="tips">Tips</h2>
<ul>
<li>If your site is run from a CMS, you should be able to get access to a list of all the pages from the site. If it’s a good CMS, and the content is already fairly well structured, you may even be able to have the CMS generate a good quality starter audit for you. If the CMS can’t do it, a tool like the Content Analysis Tool may help.</li>
<li>Don’t capture information you are unlikely to need or use. If you’re unsure whether you need information for a specific page, write it down for a handful of pages, to get a feel for whether it will be useful. You can always come back and fill it in for other pages at a later stage.</li>
<li>It can sometimes be difficult to determine how a site is structured. In fact, often the process of figuring out what the main sections of a site are can be a challenge. Don’t worry too much about getting the relationships right and showing how pages are connected at the beginning. Just focus on getting pages written down into the spreadsheet—as you get through the audit, you may find a better way of organising the information.</li>
<li>Don’t expect the content audit to be fast. Big sites can take days and days to audit. I use this fact as an excuse to buy new music, then sit down and plough through it!</li>
<li>Don’t try to take shortcuts, skip sections or skim through without really looking. It’s important that you understand all of the content before you try to work with it later.</li>
<li>If you’re working on a brand new site, a content audit can still be useful. Instead of starting with the current site, make a list of all of the resources you’ll be using—printed procedure manuals, fact sheets, videos, paper forms and other documents that will influence the site.</li>
</ul>
<h2 id="it-all-starts-with-content">It All Starts with Content</h2>
<p>Whether you decide to create a comprehensive list of every item, or just a sample selection, a content audit is a crucial first step in the path to understanding any content-heavy website. While the process may sound tedious (and, granted, often is!), undertaking this process will provide you with the insight and context you need to make informed design decisions.</p>
<p>Creating a content audit doesn’t require years of experience, but it does require patience, persistence, curiosity, and attention to detail—all good traits of a UX Designer!</p>yashumittalIf you’re working on any kind of redesign project involving a large amount of content, such as that of a website, intranet or mobile site, one of the first tasks you’ll need to perform is a content audit.
https://i.imgur.com/RSTQzib.png
Comparison of Automated Code Review Tools - Codebeat, Codacy and Codeclimate2018-01-31T11:28:34+00:002018-01-31T11:28:34+00:00https://blog.codecarrot.net/comparison-automated-code-review-tools-codebeat-codacy-codeclimate<p>Code review makes your code stronger, reduces the risk of overlooking major bugs and supports the culture of feedback. The process constitutes an inherent part of best practices in web development, so skipping it in your projects might be a big mistake. Luckily, it can be easily and effectively conducted thanks to numerous automated code review tools that are available on the market. Don’t get overwhelmed by the number of providers! With our in-depth analysis you’ll find a solution to fit your needs.</p>
<h2 id="code-review-at-codecarrot">Code review at CodeCarrot</h2>
<p>At CodeCarrot, <a href="/a-quick-guide-to-peer-code-review-and-why-you-should-do-it">Code review is a crucial element in product development</a> and it strongly supports the Test-Driven Development (TDD) process to offer the best practices available in developing Rails, CSS and JavaScript code. It helps us make the project better, faster, and more secure through making the code bulletproof. It is also an opportunity for people, especially newbies, to learn good code quickly.</p>
<p>Our developers used to test the correctness of our code with CodeClimate. However, with increasing needs and expectations we decided to seek a better alternative that would have more advanced features. Our Dev team conducted an in-depth research and that’s how we found Codeacy & CodeBeat, a tool nearly tailored for our business. However, we are aware that your dev team might require different features from the code review provider. Therefore, we share the results of our research, so that you can pick the solution which is right for you and save time on doing your own research.</p>
<h2 id="codebeat"><a href="https://codebeat.co/">Codebeat</a></h2>
<p>Codebeat is a dynamically growing tool that covers major technologies and programming languages. It has evolved substantially within the last few months and it’s worth noting that the team is open for feedback and implementation of new features suggested by their users. However, there are still some things missing. The tool does not allow performing any security checks (perhaps a “simple” integration with Brakeman would do the job). It also does not support any open-source tools or linters (in fact, we are still using Hound) and does not support analysing CSS/SCSS.</p>
<p><strong>Pros:</strong></p>
<ul>
<li>support for most of the languages we use (Ruby, JS, Swift, Objective-C),</li>
<li><a href="https://hub.codebeat.co/docs/metrics-customization">metrics customization</a>,</li>
<li>measuring tools with own algorithms nicely described in the docs (not just a bunch of open-source projects combined together),</li>
<li>very good support from their team,</li>
<li>small but well-documented API, which facilitates management e.g. it provides accesses to users working on selected projects (via teams),</li>
<li>unique quick wins tab,</li>
<li><code class="highlighter-rouge">codeclimate-test-reporter</code> gem that integrates Codebeat with Simplecov coverage reports,</li>
<li>customer suggestions considered and implemented in the product,</li>
<li>It is a dynamically growing tool,</li>
<li>support for Kotlin and Elixir (beta).</li>
</ul>
<p><strong>Cons:</strong></p>
<ul>
<li>still missing some things in the documentation (e.g. explanation of code duplication detection <a href="https://hub.codebeat.co/docs/code-duplication-demystified">here</a>),</li>
<li>no possible security issues check,</li>
<li>no CSS/SCSS analysis.</li>
</ul>
<p><strong>Possible issues:</strong></p>
<ul>
<li>I don’t see an option to list all issues found (with the option to search by category) - there’s only the option to check every single file or a “Quick Wins” tab,</li>
<li>performance is sometimes surprisingly poor.</li>
</ul>
<h2 id="codacy"><a href="https://www.codacy.com/">Codacy</a></h2>
<p>Codacy has an awesome UI, lots of features and it’s very flexible thanks to dozens of options. There is also a tool (in beta) which allows you to define your own patterns and implement it to be checked automatically. Frankly, it wasn’t easy to find disadvantages of this tool or any clients’ complaints. However, there is still some area for improvement and potential to growth for Codacy.</p>
<p><strong>Pros:</strong></p>
<ul>
<li>used by big players like Paypal or Adobe,</li>
<li>great and intuitive UI,</li>
<li>the possibility to define issue-based goals to improve the codebase,</li>
<li>checking lots of security issues (like assigning strange values to private APIs which may lead to unexpected app behaviour),</li>
<li>a nice feature of browsing commits and monitoring related issues,</li>
<li>docker analysis,</li>
<li>huge flexibility thanks to disabling/enabling patterns or whole packages and even ignoring certain patterns in selected files,</li>
<li>time to fix estimation for each issue,</li>
<li>small company but growing fast, delivering fresh features frequently,</li>
<li>well-described issues with examples right below each case (no need to browse the documentation to find out why the issue actually occurred).</li>
</ul>
<p><strong>Cons:</strong></p>
<ul>
<li>Incomplete documentation in some parts (some images are hard to read and the amount of information is insufficient sometimes),</li>
<li>unintuitive one-page charts to track code quality changes over time (it’s a new feature, maybe not fully implemented yet),</li>
<li>no <code class="highlighter-rouge">hotspots</code> or <code class="highlighter-rouge">quick wins</code>,</li>
<li>no issues searching, only a few dropdown filters.</li>
</ul>
<p><strong>Possible issues:</strong></p>
<ul>
<li>we don’t know how the support works there,</li>
<li>we also don’t know how flexible are they in terms of implementing clients’ suggestions into their product.</li>
</ul>
<h2 id="codeclimate"><a href="https://codeclimate.com/">CodeClimate</a></h2>
<p>CodeClimate is a well-developed and very stable solution with a great number of features. It has many advantages over its competitors and many big players recommend it as the best option. However, it lacked some crucial functionalities that we required for the CodeCarrot code review process, so we switched to an alternative solution.</p>
<p><strong>Pros:</strong></p>
<ul>
<li>a great number of supported languages, technologies and frameworks,</li>
<li>used by the biggest players, including Pivotal, New Relic for enterprise and Rails, jQuery for open-source,</li>
<li>very stable,</li>
<li>nice new UI,</li>
<li>well-maintained test coverage feature gem,</li>
<li><a href="https://codeclimate.com/browser-extension">browser extensions</a>,</li>
<li>trends charts,</li>
<li>test coverage out of the box,</li>
<li>hotspots - a <code class="highlighter-rouge">quick wins</code> list.</li>
</ul>
<p><strong>Cons:</strong></p>
<ul>
<li>seemingly an integrated bunch of open-source projects,</li>
<li>pricing - it seems to be the most expensive tool in this comparison,</li>
<li>still unpredictable API (in beta),</li>
<li>no support for Objective-C,</li>
<li>no distinct types for total issues number,</li>
<li>no detailed description of the issue, only a header with source code,</li>
<li>no issue searching/filtering, just a paginated list with all of them,</li>
</ul>
<p><strong>Possible issues:</strong></p>
<ul>
<li>no interest from the Code Climate team to extend the tool the way customer may suggest.</li>
</ul>
<h2 id="code-review-tools-comparison-summary">Code Review Tools Comparison Summary</h2>
<h3 id="supported-languages-and-technologies">Supported languages and technologies:</h3>
<p><strong><a href="https://codeclimate.com/">CodeClimate</a>:</strong> Ruby/Rails, JavaScript, Python, PHP, Swift, SCSS/CSS, Go, CoffeeScript, Apex, Ember, ESLint, Haskell, Haxe, RubyMotion, Vim Script</p>
<p><strong><a href="http://codebeat.co/">Codebeat</a>:</strong> Ruby, Javascript, Python, Java, Swift, Go, Typescript, Objective-C, Kotlin, Elixir</p>
<p><strong><a href="https://www.codacy.com/">Codacy</a>:</strong> Ruby, JavaScript, Python, PHP, Java, Swift, CSS, TypeScript, CoffeeScript, Scala, C/C++, Dockerfile, SASS, Shell Script</p>
<h3 id="measuring-tools">Measuring tools</h3>
<p><strong><a href="https://codeclimate.com/">CodeClimate</a>:</strong> many existing, open-source tools like Rubocop, Brakeman, CSS/SCSS Lint, ESLint, Flog etc. <a href="https://docs.codeclimate.com/docs/">full list here</a></p>
<p><strong><a href="http://codebeat.co/">Codebeat</a>:</strong> their own algorithms and implementation written from scratch <a href="https://hub.codebeat.co/docs/how-does-it-work">see how it works</a></p>
<p><strong><a href="https://www.codacy.com/">Codacy</a>:</strong> many existing, open-source tools like Rubocop, Brakeman, CSS/SCSS Lint, ESLint, Flog etc. <a href="https://support.codacy.com/hc/en-us/articles/213632009-Engines">full list here</a></p>
<h3 id="pricing">Pricing</h3>
<p><strong><a href="https://codeclimate.com/">CodeClimate</a></strong>: $16,67/user/month (when billed yearly - otherwise 20$)</p>
<p><strong><a href="http://codebeat.co/">Codebeat</a></strong>: $20/user/month, but you can probably negotiate</p>
<p><strong><a href="https://www.codacy.com/">Codacy</a></strong>: $15/user/month</p>
<h3 id="documentation">Documentation</h3>
<p><strong><a href="https://codeclimate.com/">CodeClimate</a></strong>: very good and comprehensive</p>
<p><strong><a href="http://codebeat.co/">Codebeat</a></strong>: still some things missing</p>
<p><strong><a href="https://www.codacy.com/">Codacy</a></strong>: not bad, not too much text and some images are not clickable so the readability is limited</p>
<h2 id="api">API</h2>
<p><strong><a href="https://codeclimate.com/">CodeClimate</a></strong>: yes, still in beta version</p>
<p><strong><a href="http://codebeat.co/">Codebeat</a></strong>: yes, simple but usable</p>
<p><strong><a href="https://www.codacy.com/">Codacy</a></strong>: yes, not described perfectly in their docs</p>
<table>
<thead>
<tr>
<th><strong>Features</strong></th>
<th><strong><a href="https://codeclimate.com/">CodeClimate</a></strong></th>
<th><strong><a href="http://codebeat.co/">Codebeat</a></strong></th>
<th><strong><a href="https://www.codacy.com/">Codacy</a></strong></th>
</tr>
</thead>
<tbody>
<tr>
<td><strong>Coverage report</strong></td>
<td>yes, <a href="https://github.com/codeclimate/ruby-test-reporter">link</a></td>
<td>yes, <a href="https://hub.codebeat.co/docs/test-coverage-reports">link</a></td>
<td>yes, <a href="https://github.com/codacy/ruby-codacy-coverage">link</a></td>
</tr>
<tr>
<td><strong>Security analysis</strong></td>
<td>yes</td>
<td>no</td>
<td>yes</td>
</tr>
<tr>
<td><strong>Team per project</strong></td>
<td>yes</td>
<td>yes</td>
<td>yes</td>
</tr>
<tr>
<td><strong>Github PR integratio</strong>n</td>
<td>yes</td>
<td>yes</td>
<td>yes</td>
</tr>
<tr>
<td><strong>Slack integration</strong></td>
<td>yes</td>
<td>yes</td>
<td>yes</td>
</tr>
<tr>
<td><strong>Jira integration</strong></td>
<td>yes</td>
<td>no</td>
<td>yes</td>
</tr>
<tr>
<td><strong>total no. of integrations</strong></td>
<td>13</td>
<td>6</td>
<td>10</td>
</tr>
</tbody>
</table>
<h2 id="wrap-up">Wrap up</h2>
<p>After a deeper look at all the tools described above, Codebeat seems to be a comparable tool to CodeClimate or Codacy. In case of these three solutions, pros seem to overweigh the cons and a particular feature might clinch the final choice, which would stem from individual needs. Just like it did in case of <a href="//www.codecarrot.net/">CodeCarrot</a>.</p>
<p><em>Which is your prefered code review tool, let us know in the comment section.</em></p>yashumittalCode review makes your code stronger, reduces the risk of overlooking major bugs and supports the culture of feedback. The process constitutes an inherent part of best practices in web development, so skipping it in your projects might be a big mistake. Luckily, it can be easily and effectively conducted thanks to numerous automated code review tools that are available on the market. Don’t get overwhelmed by the number of providers! With our in-depth analysis you’ll find a solution to fit your needs.
https://cdn.codecarrot.net/images/StockSnap_H2SNXCYG1T.jpg
Markdown Emoji Markup2018-01-30T08:06:25+00:002018-01-30T08:06:25+00:00https://blog.codecarrot.net/markdown-emoji-markup<p>Complete list of github markdown emoji markup</p>
<h2 id="people">People</h2>
<table>
<thead>
<tr>
<th>:bowtie: <code class="highlighter-rouge">:bowtie:</code></th>
<th>:smile: <code class="highlighter-rouge">:smile:</code></th>
<th>:laughing: <code class="highlighter-rouge">:laughing:</code></th>
</tr>
</thead>
<tbody>
<tr>
<td>:blush: <code class="highlighter-rouge">:blush:</code></td>
<td>:smiley: <code class="highlighter-rouge">:smiley:</code></td>
<td>:relaxed: <code class="highlighter-rouge">:relaxed:</code></td>
</tr>
<tr>
<td>:smirk: <code class="highlighter-rouge">:smirk:</code></td>
<td>:heart_eyes: <code class="highlighter-rouge">:heart_eyes:</code></td>
<td>:kissing_heart: <code class="highlighter-rouge">:kissing_heart:</code></td>
</tr>
<tr>
<td>:kissing_closed_eyes: <code class="highlighter-rouge">:kissing_closed_eyes:</code></td>
<td>:flushed: <code class="highlighter-rouge">:flushed:</code></td>
<td>:relieved: <code class="highlighter-rouge">:relieved:</code></td>
</tr>
<tr>
<td>:satisfied: <code class="highlighter-rouge">:satisfied:</code></td>
<td>:grin: <code class="highlighter-rouge">:grin:</code></td>
<td>:wink: <code class="highlighter-rouge">:wink:</code></td>
</tr>
<tr>
<td>:stuck_out_tongue_winking_eye: <code class="highlighter-rouge">:stuck_out_tongue_winking_eye:</code></td>
<td>:stuck_out_tongue_closed_eyes: <code class="highlighter-rouge">:stuck_out_tongue_closed_eyes:</code></td>
<td>:grinning: <code class="highlighter-rouge">:grinning:</code></td>
</tr>
<tr>
<td>:kissing: <code class="highlighter-rouge">:kissing:</code></td>
<td>:kissing_smiling_eyes: <code class="highlighter-rouge">:kissing_smiling_eyes:</code></td>
<td>:stuck_out_tongue: <code class="highlighter-rouge">:stuck_out_tongue:</code></td>
</tr>
<tr>
<td>:sleeping: <code class="highlighter-rouge">:sleeping:</code></td>
<td>:worried: <code class="highlighter-rouge">:worried:</code></td>
<td>:frowning: <code class="highlighter-rouge">:frowning:</code></td>
</tr>
<tr>
<td>:anguished: <code class="highlighter-rouge">:anguished:</code></td>
<td>:open_mouth: <code class="highlighter-rouge">:open_mouth:</code></td>
<td>:grimacing: <code class="highlighter-rouge">:grimacing:</code></td>
</tr>
<tr>
<td>:confused: <code class="highlighter-rouge">:confused:</code></td>
<td>:hushed: <code class="highlighter-rouge">:hushed:</code></td>
<td>:expressionless: <code class="highlighter-rouge">:expressionless:</code></td>
</tr>
<tr>
<td>:unamused: <code class="highlighter-rouge">:unamused:</code></td>
<td>:sweat_smile: <code class="highlighter-rouge">:sweat_smile:</code></td>
<td>:sweat: <code class="highlighter-rouge">:sweat:</code></td>
</tr>
<tr>
<td>:disappointed_relieved: <code class="highlighter-rouge">:disappointed_relieved:</code></td>
<td>:weary: <code class="highlighter-rouge">:weary:</code></td>
<td>:pensive: <code class="highlighter-rouge">:pensive:</code></td>
</tr>
<tr>
<td>:disappointed: <code class="highlighter-rouge">:disappointed:</code></td>
<td>:confounded: <code class="highlighter-rouge">:confounded:</code></td>
<td>:fearful: <code class="highlighter-rouge">:fearful:</code></td>
</tr>
<tr>
<td>:cold_sweat: <code class="highlighter-rouge">:cold_sweat:</code></td>
<td>:persevere: <code class="highlighter-rouge">:persevere:</code></td>
<td>:cry: <code class="highlighter-rouge">:cry:</code></td>
</tr>
<tr>
<td>:sob: <code class="highlighter-rouge">:sob:</code></td>
<td>:joy: <code class="highlighter-rouge">:joy:</code></td>
<td>:astonished: <code class="highlighter-rouge">:astonished:</code></td>
</tr>
<tr>
<td>:scream: <code class="highlighter-rouge">:scream:</code></td>
<td>:neckbeard: <code class="highlighter-rouge">:neckbeard:</code></td>
<td>:tired_face: <code class="highlighter-rouge">:tired_face:</code></td>
</tr>
<tr>
<td>:angry: <code class="highlighter-rouge">:angry:</code></td>
<td>:rage: <code class="highlighter-rouge">:rage:</code></td>
<td>:triumph: <code class="highlighter-rouge">:triumph:</code></td>
</tr>
<tr>
<td>:sleepy: <code class="highlighter-rouge">:sleepy:</code></td>
<td>:yum: <code class="highlighter-rouge">:yum:</code></td>
<td>:mask: <code class="highlighter-rouge">:mask:</code></td>
</tr>
<tr>
<td>:sunglasses: <code class="highlighter-rouge">:sunglasses:</code></td>
<td>:dizzy_face: <code class="highlighter-rouge">:dizzy_face:</code></td>
<td>:imp: <code class="highlighter-rouge">:imp:</code></td>
</tr>
<tr>
<td>:smiling_imp: <code class="highlighter-rouge">:smiling_imp:</code></td>
<td>:neutral_face: <code class="highlighter-rouge">:neutral_face:</code></td>
<td>:no_mouth: <code class="highlighter-rouge">:no_mouth:</code></td>
</tr>
<tr>
<td>:innocent: <code class="highlighter-rouge">:innocent:</code></td>
<td>:alien: <code class="highlighter-rouge">:alien:</code></td>
<td>:yellow_heart: <code class="highlighter-rouge">:yellow_heart:</code></td>
</tr>
<tr>
<td>:blue_heart: <code class="highlighter-rouge">:blue_heart:</code></td>
<td>:purple_heart: <code class="highlighter-rouge">:purple_heart:</code></td>
<td>:heart: <code class="highlighter-rouge">:heart:</code></td>
</tr>
<tr>
<td>:green_heart: <code class="highlighter-rouge">:green_heart:</code></td>
<td>:broken_heart: <code class="highlighter-rouge">:broken_heart:</code></td>
<td>:heartbeat: <code class="highlighter-rouge">:heartbeat:</code></td>
</tr>
<tr>
<td>:heartpulse: <code class="highlighter-rouge">:heartpulse:</code></td>
<td>:two_hearts: <code class="highlighter-rouge">:two_hearts:</code></td>
<td>:revolving_hearts: <code class="highlighter-rouge">:revolving_hearts:</code></td>
</tr>
<tr>
<td>:cupid: <code class="highlighter-rouge">:cupid:</code></td>
<td>:sparkling_heart: <code class="highlighter-rouge">:sparkling_heart:</code></td>
<td>:sparkles: <code class="highlighter-rouge">:sparkles:</code></td>
</tr>
<tr>
<td>:star: <code class="highlighter-rouge">:star:</code></td>
<td>:star2: <code class="highlighter-rouge">:star2:</code></td>
<td>:dizzy: <code class="highlighter-rouge">:dizzy:</code></td>
</tr>
<tr>
<td>:boom: <code class="highlighter-rouge">:boom:</code></td>
<td>:collision: <code class="highlighter-rouge">:collision:</code></td>
<td>:anger: <code class="highlighter-rouge">:anger:</code></td>
</tr>
<tr>
<td>:exclamation: <code class="highlighter-rouge">:exclamation:</code></td>
<td>:question: <code class="highlighter-rouge">:question:</code></td>
<td>:grey_exclamation: <code class="highlighter-rouge">:grey_exclamation:</code></td>
</tr>
<tr>
<td>:grey_question: <code class="highlighter-rouge">:grey_question:</code></td>
<td>:zzz: <code class="highlighter-rouge">:zzz:</code></td>
<td>:dash: <code class="highlighter-rouge">:dash:</code></td>
</tr>
<tr>
<td>:sweat_drops: <code class="highlighter-rouge">:sweat_drops:</code></td>
<td>:notes: <code class="highlighter-rouge">:notes:</code></td>
<td>:musical_note: <code class="highlighter-rouge">:musical_note:</code></td>
</tr>
<tr>
<td>:fire: <code class="highlighter-rouge">:fire:</code></td>
<td>:hankey: <code class="highlighter-rouge">:hankey:</code></td>
<td>:poop: <code class="highlighter-rouge">:poop:</code></td>
</tr>
<tr>
<td>:shit: <code class="highlighter-rouge">:shit:</code></td>
<td>:+1: <code class="highlighter-rouge">:+1:</code></td>
<td>:thumbsup: <code class="highlighter-rouge">:thumbsup:</code></td>
</tr>
<tr>
<td>:-1: <code class="highlighter-rouge">:-1:</code></td>
<td>:thumbsdown: <code class="highlighter-rouge">:thumbsdown:</code></td>
<td>:ok_hand: <code class="highlighter-rouge">:ok_hand:</code></td>
</tr>
<tr>
<td>:punch: <code class="highlighter-rouge">:punch:</code></td>
<td>:facepunch: <code class="highlighter-rouge">:facepunch:</code></td>
<td>:fist: <code class="highlighter-rouge">:fist:</code></td>
</tr>
<tr>
<td>:v: <code class="highlighter-rouge">:v:</code></td>
<td>:wave: <code class="highlighter-rouge">:wave:</code></td>
<td>:hand: <code class="highlighter-rouge">:hand:</code></td>
</tr>
<tr>
<td>:raised_hand: <code class="highlighter-rouge">:raised_hand:</code></td>
<td>:open_hands: <code class="highlighter-rouge">:open_hands:</code></td>
<td>:point_up: <code class="highlighter-rouge">:point_up:</code></td>
</tr>
<tr>
<td>:point_down: <code class="highlighter-rouge">:point_down:</code></td>
<td>:point_left: <code class="highlighter-rouge">:point_left:</code></td>
<td>:point_right: <code class="highlighter-rouge">:point_right:</code></td>
</tr>
<tr>
<td>:raised_hands: <code class="highlighter-rouge">:raised_hands:</code></td>
<td>:pray: <code class="highlighter-rouge">:pray:</code></td>
<td>:point_up_2: <code class="highlighter-rouge">:point_up_2:</code></td>
</tr>
<tr>
<td>:clap: <code class="highlighter-rouge">:clap:</code></td>
<td>:muscle: <code class="highlighter-rouge">:muscle:</code></td>
<td>:metal: <code class="highlighter-rouge">:metal:</code></td>
</tr>
<tr>
<td>:fu: <code class="highlighter-rouge">:fu:</code></td>
<td>:walking: <code class="highlighter-rouge">:walking:</code></td>
<td>:runner: <code class="highlighter-rouge">:runner:</code></td>
</tr>
<tr>
<td>:running: <code class="highlighter-rouge">:running:</code></td>
<td>:couple: <code class="highlighter-rouge">:couple:</code></td>
<td>:family: <code class="highlighter-rouge">:family:</code></td>
</tr>
<tr>
<td>:two_men_holding_hands: <code class="highlighter-rouge">:two_men_holding_hands:</code></td>
<td>:two_women_holding_hands: <code class="highlighter-rouge">:two_women_holding_hands:</code></td>
<td>:dancer: <code class="highlighter-rouge">:dancer:</code></td>
</tr>
<tr>
<td>:dancers: <code class="highlighter-rouge">:dancers:</code></td>
<td>:ok_woman: <code class="highlighter-rouge">:ok_woman:</code></td>
<td>:no_good: <code class="highlighter-rouge">:no_good:</code></td>
</tr>
<tr>
<td>:information_desk_person: <code class="highlighter-rouge">:information_desk_person:</code></td>
<td>:raising_hand: <code class="highlighter-rouge">:raising_hand:</code></td>
<td>:bride_with_veil: <code class="highlighter-rouge">:bride_with_veil:</code></td>
</tr>
<tr>
<td>:person_with_pouting_face: <code class="highlighter-rouge">:person_with_pouting_face:</code></td>
<td>:person_frowning: <code class="highlighter-rouge">:person_frowning:</code></td>
<td>:bow: <code class="highlighter-rouge">:bow:</code></td>
</tr>
<tr>
<td>:couplekiss: <code class="highlighter-rouge">:couplekiss:</code></td>
<td>:couple_with_heart: <code class="highlighter-rouge">:couple_with_heart:</code></td>
<td>:massage: <code class="highlighter-rouge">:massage:</code></td>
</tr>
<tr>
<td>:haircut: <code class="highlighter-rouge">:haircut:</code></td>
<td>:nail_care: <code class="highlighter-rouge">:nail_care:</code></td>
<td>:boy: <code class="highlighter-rouge">:boy:</code></td>
</tr>
<tr>
<td>:girl: <code class="highlighter-rouge">:girl:</code></td>
<td>:woman: <code class="highlighter-rouge">:woman:</code></td>
<td>:man: <code class="highlighter-rouge">:man:</code></td>
</tr>
<tr>
<td>:baby: <code class="highlighter-rouge">:baby:</code></td>
<td>:older_woman: <code class="highlighter-rouge">:older_woman:</code></td>
<td>:older_man: <code class="highlighter-rouge">:older_man:</code></td>
</tr>
<tr>
<td>:person_with_blond_hair: <code class="highlighter-rouge">:person_with_blond_hair:</code></td>
<td>:man_with_gua_pi_mao: <code class="highlighter-rouge">:man_with_gua_pi_mao:</code></td>
<td>:man_with_turban: <code class="highlighter-rouge">:man_with_turban:</code></td>
</tr>
<tr>
<td>:construction_worker: <code class="highlighter-rouge">:construction_worker:</code></td>
<td>:cop: <code class="highlighter-rouge">:cop:</code></td>
<td>:angel: <code class="highlighter-rouge">:angel:</code></td>
</tr>
<tr>
<td>:princess: <code class="highlighter-rouge">:princess:</code></td>
<td>:smiley_cat: <code class="highlighter-rouge">:smiley_cat:</code></td>
<td>:smile_cat: <code class="highlighter-rouge">:smile_cat:</code></td>
</tr>
<tr>
<td>:heart_eyes_cat: <code class="highlighter-rouge">:heart_eyes_cat:</code></td>
<td>:kissing_cat: <code class="highlighter-rouge">:kissing_cat:</code></td>
<td>:smirk_cat: <code class="highlighter-rouge">:smirk_cat:</code></td>
</tr>
<tr>
<td>:scream_cat: <code class="highlighter-rouge">:scream_cat:</code></td>
<td>:crying_cat_face: <code class="highlighter-rouge">:crying_cat_face:</code></td>
<td>:joy_cat: <code class="highlighter-rouge">:joy_cat:</code></td>
</tr>
<tr>
<td>:pouting_cat: <code class="highlighter-rouge">:pouting_cat:</code></td>
<td>:japanese_ogre: <code class="highlighter-rouge">:japanese_ogre:</code></td>
<td>:japanese_goblin: <code class="highlighter-rouge">:japanese_goblin:</code></td>
</tr>
<tr>
<td>:see_no_evil: <code class="highlighter-rouge">:see_no_evil:</code></td>
<td>:hear_no_evil: <code class="highlighter-rouge">:hear_no_evil:</code></td>
<td>:speak_no_evil: <code class="highlighter-rouge">:speak_no_evil:</code></td>
</tr>
<tr>
<td>:guardsman: <code class="highlighter-rouge">:guardsman:</code></td>
<td>:skull: <code class="highlighter-rouge">:skull:</code></td>
<td>:feet: <code class="highlighter-rouge">:feet:</code></td>
</tr>
<tr>
<td>:lips: <code class="highlighter-rouge">:lips:</code></td>
<td>:kiss: <code class="highlighter-rouge">:kiss:</code></td>
<td>:droplet: <code class="highlighter-rouge">:droplet:</code></td>
</tr>
<tr>
<td>:ear: <code class="highlighter-rouge">:ear:</code></td>
<td>:eyes: <code class="highlighter-rouge">:eyes:</code></td>
<td>:nose: <code class="highlighter-rouge">:nose:</code></td>
</tr>
<tr>
<td>:tongue: <code class="highlighter-rouge">:tongue:</code></td>
<td>:love_letter: <code class="highlighter-rouge">:love_letter:</code></td>
<td>:bust_in_silhouette: <code class="highlighter-rouge">:bust_in_silhouette:</code></td>
</tr>
<tr>
<td>:busts_in_silhouette: <code class="highlighter-rouge">:busts_in_silhouette:</code></td>
<td>:speech_balloon: <code class="highlighter-rouge">:speech_balloon:</code></td>
<td>:thought_balloon: <code class="highlighter-rouge">:thought_balloon:</code></td>
</tr>
<tr>
<td>:feelsgood: <code class="highlighter-rouge">:feelsgood:</code></td>
<td>:finnadie: <code class="highlighter-rouge">:finnadie:</code></td>
<td>:goberserk: <code class="highlighter-rouge">:goberserk:</code></td>
</tr>
<tr>
<td>:godmode: <code class="highlighter-rouge">:godmode:</code></td>
<td>:hurtrealbad: <code class="highlighter-rouge">:hurtrealbad:</code></td>
<td>:rage1: <code class="highlighter-rouge">:rage1:</code></td>
</tr>
<tr>
<td>:rage2: <code class="highlighter-rouge">:rage2:</code></td>
<td>:rage3: <code class="highlighter-rouge">:rage3:</code></td>
<td>:rage4: <code class="highlighter-rouge">:rage4:</code></td>
</tr>
<tr>
<td>:suspect: <code class="highlighter-rouge">:suspect:</code></td>
<td>:trollface: <code class="highlighter-rouge">:trollface:</code></td>
<td> </td>
</tr>
</tbody>
</table>
<h2 id="nature">Nature</h2>
<table>
<thead>
<tr>
<th>:sunny: <code class="highlighter-rouge">:sunny:</code></th>
<th>:umbrella: <code class="highlighter-rouge">:umbrella:</code></th>
<th>:cloud: <code class="highlighter-rouge">:cloud:</code></th>
</tr>
</thead>
<tbody>
<tr>
<td>:snowflake: <code class="highlighter-rouge">:snowflake:</code></td>
<td>:snowman: <code class="highlighter-rouge">:snowman:</code></td>
<td>:zap: <code class="highlighter-rouge">:zap:</code></td>
</tr>
<tr>
<td>:cyclone: <code class="highlighter-rouge">:cyclone:</code></td>
<td>:foggy: <code class="highlighter-rouge">:foggy:</code></td>
<td>:ocean: <code class="highlighter-rouge">:ocean:</code></td>
</tr>
<tr>
<td>:cat: <code class="highlighter-rouge">:cat:</code></td>
<td>:dog: <code class="highlighter-rouge">:dog:</code></td>
<td>:mouse: <code class="highlighter-rouge">:mouse:</code></td>
</tr>
<tr>
<td>:hamster: <code class="highlighter-rouge">:hamster:</code></td>
<td>:rabbit: <code class="highlighter-rouge">:rabbit:</code></td>
<td>:wolf: <code class="highlighter-rouge">:wolf:</code></td>
</tr>
<tr>
<td>:frog: <code class="highlighter-rouge">:frog:</code></td>
<td>:tiger: <code class="highlighter-rouge">:tiger:</code></td>
<td>:koala: <code class="highlighter-rouge">:koala:</code></td>
</tr>
<tr>
<td>:bear: <code class="highlighter-rouge">:bear:</code></td>
<td>:pig: <code class="highlighter-rouge">:pig:</code></td>
<td>:pig_nose: <code class="highlighter-rouge">:pig_nose:</code></td>
</tr>
<tr>
<td>:cow: <code class="highlighter-rouge">:cow:</code></td>
<td>:boar: <code class="highlighter-rouge">:boar:</code></td>
<td>:monkey_face: <code class="highlighter-rouge">:monkey_face:</code></td>
</tr>
<tr>
<td>:monkey: <code class="highlighter-rouge">:monkey:</code></td>
<td>:horse: <code class="highlighter-rouge">:horse:</code></td>
<td>:racehorse: <code class="highlighter-rouge">:racehorse:</code></td>
</tr>
<tr>
<td>:camel: <code class="highlighter-rouge">:camel:</code></td>
<td>:sheep: <code class="highlighter-rouge">:sheep:</code></td>
<td>:elephant: <code class="highlighter-rouge">:elephant:</code></td>
</tr>
<tr>
<td>:panda_face: <code class="highlighter-rouge">:panda_face:</code></td>
<td>:snake: <code class="highlighter-rouge">:snake:</code></td>
<td>:bird: <code class="highlighter-rouge">:bird:</code></td>
</tr>
<tr>
<td>:baby_chick: <code class="highlighter-rouge">:baby_chick:</code></td>
<td>:hatched_chick: <code class="highlighter-rouge">:hatched_chick:</code></td>
<td>:hatching_chick: <code class="highlighter-rouge">:hatching_chick:</code></td>
</tr>
<tr>
<td>:chicken: <code class="highlighter-rouge">:chicken:</code></td>
<td>:penguin: <code class="highlighter-rouge">:penguin:</code></td>
<td>:turtle: <code class="highlighter-rouge">:turtle:</code></td>
</tr>
<tr>
<td>:bug: <code class="highlighter-rouge">:bug:</code></td>
<td>:honeybee: <code class="highlighter-rouge">:honeybee:</code></td>
<td>:ant: <code class="highlighter-rouge">:ant:</code></td>
</tr>
<tr>
<td>:beetle: <code class="highlighter-rouge">:beetle:</code></td>
<td>:snail: <code class="highlighter-rouge">:snail:</code></td>
<td>:octopus: <code class="highlighter-rouge">:octopus:</code></td>
</tr>
<tr>
<td>:tropical_fish: <code class="highlighter-rouge">:tropical_fish:</code></td>
<td>:fish: <code class="highlighter-rouge">:fish:</code></td>
<td>:whale: <code class="highlighter-rouge">:whale:</code></td>
</tr>
<tr>
<td>:whale2: <code class="highlighter-rouge">:whale2:</code></td>
<td>:dolphin: <code class="highlighter-rouge">:dolphin:</code></td>
<td>:cow2: <code class="highlighter-rouge">:cow2:</code></td>
</tr>
<tr>
<td>:ram: <code class="highlighter-rouge">:ram:</code></td>
<td>:rat: <code class="highlighter-rouge">:rat:</code></td>
<td>:water_buffalo: <code class="highlighter-rouge">:water_buffalo:</code></td>
</tr>
<tr>
<td>:tiger2: <code class="highlighter-rouge">:tiger2:</code></td>
<td>:rabbit2: <code class="highlighter-rouge">:rabbit2:</code></td>
<td>:dragon: <code class="highlighter-rouge">:dragon:</code></td>
</tr>
<tr>
<td>:goat: <code class="highlighter-rouge">:goat:</code></td>
<td>:rooster: <code class="highlighter-rouge">:rooster:</code></td>
<td>:dog2: <code class="highlighter-rouge">:dog2:</code></td>
</tr>
<tr>
<td>:pig2: <code class="highlighter-rouge">:pig2:</code></td>
<td>:mouse2: <code class="highlighter-rouge">:mouse2:</code></td>
<td>:ox: <code class="highlighter-rouge">:ox:</code></td>
</tr>
<tr>
<td>:dragon_face: <code class="highlighter-rouge">:dragon_face:</code></td>
<td>:blowfish: <code class="highlighter-rouge">:blowfish:</code></td>
<td>:crocodile: <code class="highlighter-rouge">:crocodile:</code></td>
</tr>
<tr>
<td>:dromedary_camel: <code class="highlighter-rouge">:dromedary_camel:</code></td>
<td>:leopard: <code class="highlighter-rouge">:leopard:</code></td>
<td>:cat2: <code class="highlighter-rouge">:cat2:</code></td>
</tr>
<tr>
<td>:poodle: <code class="highlighter-rouge">:poodle:</code></td>
<td>:paw_prints: <code class="highlighter-rouge">:paw_prints:</code></td>
<td>:bouquet: <code class="highlighter-rouge">:bouquet:</code></td>
</tr>
<tr>
<td>:cherry_blossom: <code class="highlighter-rouge">:cherry_blossom:</code></td>
<td>:tulip: <code class="highlighter-rouge">:tulip:</code></td>
<td>:four_leaf_clover: <code class="highlighter-rouge">:four_leaf_clover:</code></td>
</tr>
<tr>
<td>:rose: <code class="highlighter-rouge">:rose:</code></td>
<td>:sunflower: <code class="highlighter-rouge">:sunflower:</code></td>
<td>:hibiscus: <code class="highlighter-rouge">:hibiscus:</code></td>
</tr>
<tr>
<td>:maple_leaf: <code class="highlighter-rouge">:maple_leaf:</code></td>
<td>:leaves: <code class="highlighter-rouge">:leaves:</code></td>
<td>:fallen_leaf: <code class="highlighter-rouge">:fallen_leaf:</code></td>
</tr>
<tr>
<td>:herb: <code class="highlighter-rouge">:herb:</code></td>
<td>:mushroom: <code class="highlighter-rouge">:mushroom:</code></td>
<td>:cactus: <code class="highlighter-rouge">:cactus:</code></td>
</tr>
<tr>
<td>:palm_tree: <code class="highlighter-rouge">:palm_tree:</code></td>
<td>:evergreen_tree: <code class="highlighter-rouge">:evergreen_tree:</code></td>
<td>:deciduous_tree: <code class="highlighter-rouge">:deciduous_tree:</code></td>
</tr>
<tr>
<td>:chestnut: <code class="highlighter-rouge">:chestnut:</code></td>
<td>:seedling: <code class="highlighter-rouge">:seedling:</code></td>
<td>:blossom: <code class="highlighter-rouge">:blossom:</code></td>
</tr>
<tr>
<td>:ear_of_rice: <code class="highlighter-rouge">:ear_of_rice:</code></td>
<td>:shell: <code class="highlighter-rouge">:shell:</code></td>
<td>:globe_with_meridians: <code class="highlighter-rouge">:globe_with_meridians:</code></td>
</tr>
<tr>
<td>:sun_with_face: <code class="highlighter-rouge">:sun_with_face:</code></td>
<td>:full_moon_with_face: <code class="highlighter-rouge">:full_moon_with_face:</code></td>
<td>:new_moon_with_face: <code class="highlighter-rouge">:new_moon_with_face:</code></td>
</tr>
<tr>
<td>:new_moon: <code class="highlighter-rouge">:new_moon:</code></td>
<td>:waxing_crescent_moon: <code class="highlighter-rouge">:waxing_crescent_moon:</code></td>
<td>:first_quarter_moon: <code class="highlighter-rouge">:first_quarter_moon:</code></td>
</tr>
<tr>
<td>:waxing_gibbous_moon: <code class="highlighter-rouge">:waxing_gibbous_moon:</code></td>
<td>:full_moon: <code class="highlighter-rouge">:full_moon:</code></td>
<td>:waning_gibbous_moon: <code class="highlighter-rouge">:waning_gibbous_moon:</code></td>
</tr>
<tr>
<td>:last_quarter_moon: <code class="highlighter-rouge">:last_quarter_moon:</code></td>
<td>:waning_crescent_moon: <code class="highlighter-rouge">:waning_crescent_moon:</code></td>
<td>:last_quarter_moon_with_face: <code class="highlighter-rouge">:last_quarter_moon_with_face:</code></td>
</tr>
<tr>
<td>:first_quarter_moon_with_face: <code class="highlighter-rouge">:first_quarter_moon_with_face:</code></td>
<td>:moon: <code class="highlighter-rouge">:moon:</code></td>
<td>:earth_africa: <code class="highlighter-rouge">:earth_africa:</code></td>
</tr>
<tr>
<td>:earth_americas: <code class="highlighter-rouge">:earth_americas:</code></td>
<td>:earth_asia: <code class="highlighter-rouge">:earth_asia:</code></td>
<td>:volcano: <code class="highlighter-rouge">:volcano:</code></td>
</tr>
<tr>
<td>:milky_way: <code class="highlighter-rouge">:milky_way:</code></td>
<td>:partly_sunny: <code class="highlighter-rouge">:partly_sunny:</code></td>
<td>:octocat: <code class="highlighter-rouge">:octocat:</code></td>
</tr>
<tr>
<td>:squirrel: <code class="highlighter-rouge">:squirrel:</code></td>
<td> </td>
<td> </td>
</tr>
</tbody>
</table>
<h2 id="objects">Objects</h2>
<table>
<thead>
<tr>
<th>:bamboo: <code class="highlighter-rouge">:bamboo:</code></th>
<th>:gift_heart: <code class="highlighter-rouge">:gift_heart:</code></th>
<th>:dolls: <code class="highlighter-rouge">:dolls:</code></th>
</tr>
</thead>
<tbody>
<tr>
<td>:school_satchel: <code class="highlighter-rouge">:school_satchel:</code></td>
<td>:mortar_board: <code class="highlighter-rouge">:mortar_board:</code></td>
<td>:flags: <code class="highlighter-rouge">:flags:</code></td>
</tr>
<tr>
<td>:fireworks: <code class="highlighter-rouge">:fireworks:</code></td>
<td>:sparkler: <code class="highlighter-rouge">:sparkler:</code></td>
<td>:wind_chime: <code class="highlighter-rouge">:wind_chime:</code></td>
</tr>
<tr>
<td>:rice_scene: <code class="highlighter-rouge">:rice_scene:</code></td>
<td>:jack_o_lantern: <code class="highlighter-rouge">:jack_o_lantern:</code></td>
<td>:ghost: <code class="highlighter-rouge">:ghost:</code></td>
</tr>
<tr>
<td>:santa: <code class="highlighter-rouge">:santa:</code></td>
<td>:christmas_tree: <code class="highlighter-rouge">:christmas_tree:</code></td>
<td>:gift: <code class="highlighter-rouge">:gift:</code></td>
</tr>
<tr>
<td>:bell: <code class="highlighter-rouge">:bell:</code></td>
<td>:no_bell: <code class="highlighter-rouge">:no_bell:</code></td>
<td>:tanabata_tree: <code class="highlighter-rouge">:tanabata_tree:</code></td>
</tr>
<tr>
<td>:tada: <code class="highlighter-rouge">:tada:</code></td>
<td>:confetti_ball: <code class="highlighter-rouge">:confetti_ball:</code></td>
<td>:balloon: <code class="highlighter-rouge">:balloon:</code></td>
</tr>
<tr>
<td>:crystal_ball: <code class="highlighter-rouge">:crystal_ball:</code></td>
<td>:cd: <code class="highlighter-rouge">:cd:</code></td>
<td>:dvd: <code class="highlighter-rouge">:dvd:</code></td>
</tr>
<tr>
<td>:floppy_disk: <code class="highlighter-rouge">:floppy_disk:</code></td>
<td>:camera: <code class="highlighter-rouge">:camera:</code></td>
<td>:video_camera: <code class="highlighter-rouge">:video_camera:</code></td>
</tr>
<tr>
<td>:movie_camera: <code class="highlighter-rouge">:movie_camera:</code></td>
<td>:computer: <code class="highlighter-rouge">:computer:</code></td>
<td>:tv: <code class="highlighter-rouge">:tv:</code></td>
</tr>
<tr>
<td>:iphone: <code class="highlighter-rouge">:iphone:</code></td>
<td>:phone: <code class="highlighter-rouge">:phone:</code></td>
<td>:telephone: <code class="highlighter-rouge">:telephone:</code></td>
</tr>
<tr>
<td>:telephone_receiver: <code class="highlighter-rouge">:telephone_receiver:</code></td>
<td>:pager: <code class="highlighter-rouge">:pager:</code></td>
<td>:fax: <code class="highlighter-rouge">:fax:</code></td>
</tr>
<tr>
<td>:minidisc: <code class="highlighter-rouge">:minidisc:</code></td>
<td>:vhs: <code class="highlighter-rouge">:vhs:</code></td>
<td>:sound: <code class="highlighter-rouge">:sound:</code></td>
</tr>
<tr>
<td>:speaker: <code class="highlighter-rouge">:speaker:</code></td>
<td>:mute: <code class="highlighter-rouge">:mute:</code></td>
<td>:loudspeaker: <code class="highlighter-rouge">:loudspeaker:</code></td>
</tr>
<tr>
<td>:mega: <code class="highlighter-rouge">:mega:</code></td>
<td>:hourglass: <code class="highlighter-rouge">:hourglass:</code></td>
<td>:hourglass_flowing_sand: <code class="highlighter-rouge">:hourglass_flowing_sand:</code></td>
</tr>
<tr>
<td>:alarm_clock: <code class="highlighter-rouge">:alarm_clock:</code></td>
<td>:watch: <code class="highlighter-rouge">:watch:</code></td>
<td>:radio: <code class="highlighter-rouge">:radio:</code></td>
</tr>
<tr>
<td>:satellite: <code class="highlighter-rouge">:satellite:</code></td>
<td>:loop: <code class="highlighter-rouge">:loop:</code></td>
<td>:mag: <code class="highlighter-rouge">:mag:</code></td>
</tr>
<tr>
<td>:mag_right: <code class="highlighter-rouge">:mag_right:</code></td>
<td>:unlock: <code class="highlighter-rouge">:unlock:</code></td>
<td>:lock: <code class="highlighter-rouge">:lock:</code></td>
</tr>
<tr>
<td>:lock_with_ink_pen: <code class="highlighter-rouge">:lock_with_ink_pen:</code></td>
<td>:closed_lock_with_key: <code class="highlighter-rouge">:closed_lock_with_key:</code></td>
<td>:key: <code class="highlighter-rouge">:key:</code></td>
</tr>
<tr>
<td>:bulb: <code class="highlighter-rouge">:bulb:</code></td>
<td>:flashlight: <code class="highlighter-rouge">:flashlight:</code></td>
<td>:high_brightness: <code class="highlighter-rouge">:high_brightness:</code></td>
</tr>
<tr>
<td>:low_brightness: <code class="highlighter-rouge">:low_brightness:</code></td>
<td>:electric_plug: <code class="highlighter-rouge">:electric_plug:</code></td>
<td>:battery: <code class="highlighter-rouge">:battery:</code></td>
</tr>
<tr>
<td>:calling: <code class="highlighter-rouge">:calling:</code></td>
<td>:email: <code class="highlighter-rouge">:email:</code></td>
<td>:mailbox: <code class="highlighter-rouge">:mailbox:</code></td>
</tr>
<tr>
<td>:postbox: <code class="highlighter-rouge">:postbox:</code></td>
<td>:bath: <code class="highlighter-rouge">:bath:</code></td>
<td>:bathtub: <code class="highlighter-rouge">:bathtub:</code></td>
</tr>
<tr>
<td>:shower: <code class="highlighter-rouge">:shower:</code></td>
<td>:toilet: <code class="highlighter-rouge">:toilet:</code></td>
<td>:wrench: <code class="highlighter-rouge">:wrench:</code></td>
</tr>
<tr>
<td>:nut_and_bolt: <code class="highlighter-rouge">:nut_and_bolt:</code></td>
<td>:hammer: <code class="highlighter-rouge">:hammer:</code></td>
<td>:seat: <code class="highlighter-rouge">:seat:</code></td>
</tr>
<tr>
<td>:moneybag: <code class="highlighter-rouge">:moneybag:</code></td>
<td>:yen: <code class="highlighter-rouge">:yen:</code></td>
<td>:dollar: <code class="highlighter-rouge">:dollar:</code></td>
</tr>
<tr>
<td>:pound: <code class="highlighter-rouge">:pound:</code></td>
<td>:euro: <code class="highlighter-rouge">:euro:</code></td>
<td>:credit_card: <code class="highlighter-rouge">:credit_card:</code></td>
</tr>
<tr>
<td>:money_with_wings: <code class="highlighter-rouge">:money_with_wings:</code></td>
<td>:e-mail: <code class="highlighter-rouge">:e-mail:</code></td>
<td>:inbox_tray: <code class="highlighter-rouge">:inbox_tray:</code></td>
</tr>
<tr>
<td>:outbox_tray: <code class="highlighter-rouge">:outbox_tray:</code></td>
<td>:envelope: <code class="highlighter-rouge">:envelope:</code></td>
<td>:incoming_envelope: <code class="highlighter-rouge">:incoming_envelope:</code></td>
</tr>
<tr>
<td>:postal_horn: <code class="highlighter-rouge">:postal_horn:</code></td>
<td>:mailbox_closed: <code class="highlighter-rouge">:mailbox_closed:</code></td>
<td>:mailbox_with_mail: <code class="highlighter-rouge">:mailbox_with_mail:</code></td>
</tr>
<tr>
<td>:mailbox_with_no_mail: <code class="highlighter-rouge">:mailbox_with_no_mail:</code></td>
<td>:door: <code class="highlighter-rouge">:door:</code></td>
<td>:smoking: <code class="highlighter-rouge">:smoking:</code></td>
</tr>
<tr>
<td>:bomb: <code class="highlighter-rouge">:bomb:</code></td>
<td>:gun: <code class="highlighter-rouge">:gun:</code></td>
<td>:hocho: <code class="highlighter-rouge">:hocho:</code></td>
</tr>
<tr>
<td>:pill: <code class="highlighter-rouge">:pill:</code></td>
<td>:syringe: <code class="highlighter-rouge">:syringe:</code></td>
<td>:page_facing_up: <code class="highlighter-rouge">:page_facing_up:</code></td>
</tr>
<tr>
<td>:page_with_curl: <code class="highlighter-rouge">:page_with_curl:</code></td>
<td>:bookmark_tabs: <code class="highlighter-rouge">:bookmark_tabs:</code></td>
<td>:bar_chart: <code class="highlighter-rouge">:bar_chart:</code></td>
</tr>
<tr>
<td>:chart_with_upwards_trend: <code class="highlighter-rouge">:chart_with_upwards_trend:</code></td>
<td>:chart_with_downwards_trend: <code class="highlighter-rouge">:chart_with_downwards_trend:</code></td>
<td>:scroll: <code class="highlighter-rouge">:scroll:</code></td>
</tr>
<tr>
<td>:clipboard: <code class="highlighter-rouge">:clipboard:</code></td>
<td>:calendar: <code class="highlighter-rouge">:calendar:</code></td>
<td>:date: <code class="highlighter-rouge">:date:</code></td>
</tr>
<tr>
<td>:card_index: <code class="highlighter-rouge">:card_index:</code></td>
<td>:file_folder: <code class="highlighter-rouge">:file_folder:</code></td>
<td>:open_file_folder: <code class="highlighter-rouge">:open_file_folder:</code></td>
</tr>
<tr>
<td>:scissors: <code class="highlighter-rouge">:scissors:</code></td>
<td>:pushpin: <code class="highlighter-rouge">:pushpin:</code></td>
<td>:paperclip: <code class="highlighter-rouge">:paperclip:</code></td>
</tr>
<tr>
<td>:black_nib: <code class="highlighter-rouge">:black_nib:</code></td>
<td>:pencil2: <code class="highlighter-rouge">:pencil2:</code></td>
<td>:straight_ruler: <code class="highlighter-rouge">:straight_ruler:</code></td>
</tr>
<tr>
<td>:triangular_ruler: <code class="highlighter-rouge">:triangular_ruler:</code></td>
<td>:closed_book: <code class="highlighter-rouge">:closed_book:</code></td>
<td>:green_book: <code class="highlighter-rouge">:green_book:</code></td>
</tr>
<tr>
<td>:blue_book: <code class="highlighter-rouge">:blue_book:</code></td>
<td>:orange_book: <code class="highlighter-rouge">:orange_book:</code></td>
<td>:notebook: <code class="highlighter-rouge">:notebook:</code></td>
</tr>
<tr>
<td>:notebook_with_decorative_cover: <code class="highlighter-rouge">:notebook_with_decorative_cover:</code></td>
<td>:ledger: <code class="highlighter-rouge">:ledger:</code></td>
<td>:books: <code class="highlighter-rouge">:books:</code></td>
</tr>
<tr>
<td>:bookmark: <code class="highlighter-rouge">:bookmark:</code></td>
<td>:name_badge: <code class="highlighter-rouge">:name_badge:</code></td>
<td>:microscope: <code class="highlighter-rouge">:microscope:</code></td>
</tr>
<tr>
<td>:telescope: <code class="highlighter-rouge">:telescope:</code></td>
<td>:newspaper: <code class="highlighter-rouge">:newspaper:</code></td>
<td>:football: <code class="highlighter-rouge">:football:</code></td>
</tr>
<tr>
<td>:basketball: <code class="highlighter-rouge">:basketball:</code></td>
<td>:soccer: <code class="highlighter-rouge">:soccer:</code></td>
<td>:baseball: <code class="highlighter-rouge">:baseball:</code></td>
</tr>
<tr>
<td>:tennis: <code class="highlighter-rouge">:tennis:</code></td>
<td>:8ball: <code class="highlighter-rouge">:8ball:</code></td>
<td>:rugby_football: <code class="highlighter-rouge">:rugby_football:</code></td>
</tr>
<tr>
<td>:bowling: <code class="highlighter-rouge">:bowling:</code></td>
<td>:golf: <code class="highlighter-rouge">:golf:</code></td>
<td>:mountain_bicyclist: <code class="highlighter-rouge">:mountain_bicyclist:</code></td>
</tr>
<tr>
<td>:bicyclist: <code class="highlighter-rouge">:bicyclist:</code></td>
<td>:horse_racing: <code class="highlighter-rouge">:horse_racing:</code></td>
<td>:snowboarder: <code class="highlighter-rouge">:snowboarder:</code></td>
</tr>
<tr>
<td>:swimmer: <code class="highlighter-rouge">:swimmer:</code></td>
<td>:surfer: <code class="highlighter-rouge">:surfer:</code></td>
<td>:ski: <code class="highlighter-rouge">:ski:</code></td>
</tr>
<tr>
<td>:spades: <code class="highlighter-rouge">:spades:</code></td>
<td>:hearts: <code class="highlighter-rouge">:hearts:</code></td>
<td>:clubs: <code class="highlighter-rouge">:clubs:</code></td>
</tr>
<tr>
<td>:diamonds: <code class="highlighter-rouge">:diamonds:</code></td>
<td>:gem: <code class="highlighter-rouge">:gem:</code></td>
<td>:ring: <code class="highlighter-rouge">:ring:</code></td>
</tr>
<tr>
<td>:trophy: <code class="highlighter-rouge">:trophy:</code></td>
<td>:musical_score: <code class="highlighter-rouge">:musical_score:</code></td>
<td>:musical_keyboard: <code class="highlighter-rouge">:musical_keyboard:</code></td>
</tr>
<tr>
<td>:violin: <code class="highlighter-rouge">:violin:</code></td>
<td>:space_invader: <code class="highlighter-rouge">:space_invader:</code></td>
<td>:video_game: <code class="highlighter-rouge">:video_game:</code></td>
</tr>
<tr>
<td>:black_joker: <code class="highlighter-rouge">:black_joker:</code></td>
<td>:flower_playing_cards: <code class="highlighter-rouge">:flower_playing_cards:</code></td>
<td>:game_die: <code class="highlighter-rouge">:game_die:</code></td>
</tr>
<tr>
<td>:dart: <code class="highlighter-rouge">:dart:</code></td>
<td>:mahjong: <code class="highlighter-rouge">:mahjong:</code></td>
<td>:clapper: <code class="highlighter-rouge">:clapper:</code></td>
</tr>
<tr>
<td>:memo: <code class="highlighter-rouge">:memo:</code></td>
<td>:pencil: <code class="highlighter-rouge">:pencil:</code></td>
<td>:book: <code class="highlighter-rouge">:book:</code></td>
</tr>
<tr>
<td>:art: <code class="highlighter-rouge">:art:</code></td>
<td>:microphone: <code class="highlighter-rouge">:microphone:</code></td>
<td>:headphones: <code class="highlighter-rouge">:headphones:</code></td>
</tr>
<tr>
<td>:trumpet: <code class="highlighter-rouge">:trumpet:</code></td>
<td>:saxophone: <code class="highlighter-rouge">:saxophone:</code></td>
<td>:guitar: <code class="highlighter-rouge">:guitar:</code></td>
</tr>
<tr>
<td>:shoe: <code class="highlighter-rouge">:shoe:</code></td>
<td>:sandal: <code class="highlighter-rouge">:sandal:</code></td>
<td>:high_heel: <code class="highlighter-rouge">:high_heel:</code></td>
</tr>
<tr>
<td>:lipstick: <code class="highlighter-rouge">:lipstick:</code></td>
<td>:boot: <code class="highlighter-rouge">:boot:</code></td>
<td>:shirt: <code class="highlighter-rouge">:shirt:</code></td>
</tr>
<tr>
<td>:tshirt: <code class="highlighter-rouge">:tshirt:</code></td>
<td>:necktie: <code class="highlighter-rouge">:necktie:</code></td>
<td>:womans_clothes: <code class="highlighter-rouge">:womans_clothes:</code></td>
</tr>
<tr>
<td>:dress: <code class="highlighter-rouge">:dress:</code></td>
<td>:running_shirt_with_sash: <code class="highlighter-rouge">:running_shirt_with_sash:</code></td>
<td>:jeans: <code class="highlighter-rouge">:jeans:</code></td>
</tr>
<tr>
<td>:kimono: <code class="highlighter-rouge">:kimono:</code></td>
<td>:bikini: <code class="highlighter-rouge">:bikini:</code></td>
<td>:ribbon: <code class="highlighter-rouge">:ribbon:</code></td>
</tr>
<tr>
<td>:tophat: <code class="highlighter-rouge">:tophat:</code></td>
<td>:crown: <code class="highlighter-rouge">:crown:</code></td>
<td>:womans_hat: <code class="highlighter-rouge">:womans_hat:</code></td>
</tr>
<tr>
<td>:mans_shoe: <code class="highlighter-rouge">:mans_shoe:</code></td>
<td>:closed_umbrella: <code class="highlighter-rouge">:closed_umbrella:</code></td>
<td>:briefcase: <code class="highlighter-rouge">:briefcase:</code></td>
</tr>
<tr>
<td>:handbag: <code class="highlighter-rouge">:handbag:</code></td>
<td>:pouch: <code class="highlighter-rouge">:pouch:</code></td>
<td>:purse: <code class="highlighter-rouge">:purse:</code></td>
</tr>
<tr>
<td>:eyeglasses: <code class="highlighter-rouge">:eyeglasses:</code></td>
<td>:fishing_pole_and_fish: <code class="highlighter-rouge">:fishing_pole_and_fish:</code></td>
<td>:coffee: <code class="highlighter-rouge">:coffee:</code></td>
</tr>
<tr>
<td>:tea: <code class="highlighter-rouge">:tea:</code></td>
<td>:sake: <code class="highlighter-rouge">:sake:</code></td>
<td>:baby_bottle: <code class="highlighter-rouge">:baby_bottle:</code></td>
</tr>
<tr>
<td>:beer: <code class="highlighter-rouge">:beer:</code></td>
<td>:beers: <code class="highlighter-rouge">:beers:</code></td>
<td>:cocktail: <code class="highlighter-rouge">:cocktail:</code></td>
</tr>
<tr>
<td>:tropical_drink: <code class="highlighter-rouge">:tropical_drink:</code></td>
<td>:wine_glass: <code class="highlighter-rouge">:wine_glass:</code></td>
<td>:fork_and_knife: <code class="highlighter-rouge">:fork_and_knife:</code></td>
</tr>
<tr>
<td>:pizza: <code class="highlighter-rouge">:pizza:</code></td>
<td>:hamburger: <code class="highlighter-rouge">:hamburger:</code></td>
<td>:fries: <code class="highlighter-rouge">:fries:</code></td>
</tr>
<tr>
<td>:poultry_leg: <code class="highlighter-rouge">:poultry_leg:</code></td>
<td>:meat_on_bone: <code class="highlighter-rouge">:meat_on_bone:</code></td>
<td>:spaghetti: <code class="highlighter-rouge">:spaghetti:</code></td>
</tr>
<tr>
<td>:curry: <code class="highlighter-rouge">:curry:</code></td>
<td>:fried_shrimp: <code class="highlighter-rouge">:fried_shrimp:</code></td>
<td>:bento: <code class="highlighter-rouge">:bento:</code></td>
</tr>
<tr>
<td>:sushi: <code class="highlighter-rouge">:sushi:</code></td>
<td>:fish_cake: <code class="highlighter-rouge">:fish_cake:</code></td>
<td>:rice_ball: <code class="highlighter-rouge">:rice_ball:</code></td>
</tr>
<tr>
<td>:rice_cracker: <code class="highlighter-rouge">:rice_cracker:</code></td>
<td>:rice: <code class="highlighter-rouge">:rice:</code></td>
<td>:ramen: <code class="highlighter-rouge">:ramen:</code></td>
</tr>
<tr>
<td>:stew: <code class="highlighter-rouge">:stew:</code></td>
<td>:oden: <code class="highlighter-rouge">:oden:</code></td>
<td>:dango: <code class="highlighter-rouge">:dango:</code></td>
</tr>
<tr>
<td>:egg: <code class="highlighter-rouge">:egg:</code></td>
<td>:bread: <code class="highlighter-rouge">:bread:</code></td>
<td>:doughnut: <code class="highlighter-rouge">:doughnut:</code></td>
</tr>
<tr>
<td>:custard: <code class="highlighter-rouge">:custard:</code></td>
<td>:icecream: <code class="highlighter-rouge">:icecream:</code></td>
<td>:ice_cream: <code class="highlighter-rouge">:ice_cream:</code></td>
</tr>
<tr>
<td>:shaved_ice: <code class="highlighter-rouge">:shaved_ice:</code></td>
<td>:birthday: <code class="highlighter-rouge">:birthday:</code></td>
<td>:cake: <code class="highlighter-rouge">:cake:</code></td>
</tr>
<tr>
<td>:cookie: <code class="highlighter-rouge">:cookie:</code></td>
<td>:chocolate_bar: <code class="highlighter-rouge">:chocolate_bar:</code></td>
<td>:candy: <code class="highlighter-rouge">:candy:</code></td>
</tr>
<tr>
<td>:lollipop: <code class="highlighter-rouge">:lollipop:</code></td>
<td>:honey_pot: <code class="highlighter-rouge">:honey_pot:</code></td>
<td>:apple: <code class="highlighter-rouge">:apple:</code></td>
</tr>
<tr>
<td>:green_apple: <code class="highlighter-rouge">:green_apple:</code></td>
<td>:tangerine: <code class="highlighter-rouge">:tangerine:</code></td>
<td>:lemon: <code class="highlighter-rouge">:lemon:</code></td>
</tr>
<tr>
<td>:cherries: <code class="highlighter-rouge">:cherries:</code></td>
<td>:grapes: <code class="highlighter-rouge">:grapes:</code></td>
<td>:watermelon: <code class="highlighter-rouge">:watermelon:</code></td>
</tr>
<tr>
<td>:strawberry: <code class="highlighter-rouge">:strawberry:</code></td>
<td>:peach: <code class="highlighter-rouge">:peach:</code></td>
<td>:melon: <code class="highlighter-rouge">:melon:</code></td>
</tr>
<tr>
<td>:banana: <code class="highlighter-rouge">:banana:</code></td>
<td>:pear: <code class="highlighter-rouge">:pear:</code></td>
<td>:pineapple: <code class="highlighter-rouge">:pineapple:</code></td>
</tr>
<tr>
<td>:sweet_potato: <code class="highlighter-rouge">:sweet_potato:</code></td>
<td>:eggplant: <code class="highlighter-rouge">:eggplant:</code></td>
<td>:tomato: <code class="highlighter-rouge">:tomato:</code></td>
</tr>
<tr>
<td>:corn: <code class="highlighter-rouge">:corn:</code></td>
<td> </td>
<td> </td>
</tr>
</tbody>
</table>
<h2 id="places">Places</h2>
<table>
<thead>
<tr>
<th>:house: <code class="highlighter-rouge">:house:</code></th>
<th>:house_with_garden: <code class="highlighter-rouge">:house_with_garden:</code></th>
<th>:school: <code class="highlighter-rouge">:school:</code></th>
</tr>
</thead>
<tbody>
<tr>
<td>:office: <code class="highlighter-rouge">:office:</code></td>
<td>:post_office: <code class="highlighter-rouge">:post_office:</code></td>
<td>:hospital: <code class="highlighter-rouge">:hospital:</code></td>
</tr>
<tr>
<td>:bank: <code class="highlighter-rouge">:bank:</code></td>
<td>:convenience_store: <code class="highlighter-rouge">:convenience_store:</code></td>
<td>:love_hotel: <code class="highlighter-rouge">:love_hotel:</code></td>
</tr>
<tr>
<td>:hotel: <code class="highlighter-rouge">:hotel:</code></td>
<td>:wedding: <code class="highlighter-rouge">:wedding:</code></td>
<td>:church: <code class="highlighter-rouge">:church:</code></td>
</tr>
<tr>
<td>:department_store: <code class="highlighter-rouge">:department_store:</code></td>
<td>:european_post_office: <code class="highlighter-rouge">:european_post_office:</code></td>
<td>:city_sunrise: <code class="highlighter-rouge">:city_sunrise:</code></td>
</tr>
<tr>
<td>:city_sunset: <code class="highlighter-rouge">:city_sunset:</code></td>
<td>:japanese_castle: <code class="highlighter-rouge">:japanese_castle:</code></td>
<td>:european_castle: <code class="highlighter-rouge">:european_castle:</code></td>
</tr>
<tr>
<td>:tent: <code class="highlighter-rouge">:tent:</code></td>
<td>:factory: <code class="highlighter-rouge">:factory:</code></td>
<td>:tokyo_tower: <code class="highlighter-rouge">:tokyo_tower:</code></td>
</tr>
<tr>
<td>:japan: <code class="highlighter-rouge">:japan:</code></td>
<td>:mount_fuji: <code class="highlighter-rouge">:mount_fuji:</code></td>
<td>:sunrise_over_mountains: <code class="highlighter-rouge">:sunrise_over_mountains:</code></td>
</tr>
<tr>
<td>:sunrise: <code class="highlighter-rouge">:sunrise:</code></td>
<td>:stars: <code class="highlighter-rouge">:stars:</code></td>
<td>:statue_of_liberty: <code class="highlighter-rouge">:statue_of_liberty:</code></td>
</tr>
<tr>
<td>:bridge_at_night: <code class="highlighter-rouge">:bridge_at_night:</code></td>
<td>:carousel_horse: <code class="highlighter-rouge">:carousel_horse:</code></td>
<td>:rainbow: <code class="highlighter-rouge">:rainbow:</code></td>
</tr>
<tr>
<td>:ferris_wheel: <code class="highlighter-rouge">:ferris_wheel:</code></td>
<td>:fountain: <code class="highlighter-rouge">:fountain:</code></td>
<td>:roller_coaster: <code class="highlighter-rouge">:roller_coaster:</code></td>
</tr>
<tr>
<td>:ship: <code class="highlighter-rouge">:ship:</code></td>
<td>:speedboat: <code class="highlighter-rouge">:speedboat:</code></td>
<td>:boat: <code class="highlighter-rouge">:boat:</code></td>
</tr>
<tr>
<td>:sailboat: <code class="highlighter-rouge">:sailboat:</code></td>
<td>:rowboat: <code class="highlighter-rouge">:rowboat:</code></td>
<td>:anchor: <code class="highlighter-rouge">:anchor:</code></td>
</tr>
<tr>
<td>:rocket: <code class="highlighter-rouge">:rocket:</code></td>
<td>:airplane: <code class="highlighter-rouge">:airplane:</code></td>
<td>:helicopter: <code class="highlighter-rouge">:helicopter:</code></td>
</tr>
<tr>
<td>:steam_locomotive: <code class="highlighter-rouge">:steam_locomotive:</code></td>
<td>:tram: <code class="highlighter-rouge">:tram:</code></td>
<td>:mountain_railway: <code class="highlighter-rouge">:mountain_railway:</code></td>
</tr>
<tr>
<td>:bike: <code class="highlighter-rouge">:bike:</code></td>
<td>:aerial_tramway: <code class="highlighter-rouge">:aerial_tramway:</code></td>
<td>:suspension_railway: <code class="highlighter-rouge">:suspension_railway:</code></td>
</tr>
<tr>
<td>:mountain_cableway: <code class="highlighter-rouge">:mountain_cableway:</code></td>
<td>:tractor: <code class="highlighter-rouge">:tractor:</code></td>
<td>:blue_car: <code class="highlighter-rouge">:blue_car:</code></td>
</tr>
<tr>
<td>:oncoming_automobile: <code class="highlighter-rouge">:oncoming_automobile:</code></td>
<td>:car: <code class="highlighter-rouge">:car:</code></td>
<td>:red_car: <code class="highlighter-rouge">:red_car:</code></td>
</tr>
<tr>
<td>:taxi: <code class="highlighter-rouge">:taxi:</code></td>
<td>:oncoming_taxi: <code class="highlighter-rouge">:oncoming_taxi:</code></td>
<td>:articulated_lorry: <code class="highlighter-rouge">:articulated_lorry:</code></td>
</tr>
<tr>
<td>:bus: <code class="highlighter-rouge">:bus:</code></td>
<td>:oncoming_bus: <code class="highlighter-rouge">:oncoming_bus:</code></td>
<td>:rotating_light: <code class="highlighter-rouge">:rotating_light:</code></td>
</tr>
<tr>
<td>:police_car: <code class="highlighter-rouge">:police_car:</code></td>
<td>:oncoming_police_car: <code class="highlighter-rouge">:oncoming_police_car:</code></td>
<td>:fire_engine: <code class="highlighter-rouge">:fire_engine:</code></td>
</tr>
<tr>
<td>:ambulance: <code class="highlighter-rouge">:ambulance:</code></td>
<td>:minibus: <code class="highlighter-rouge">:minibus:</code></td>
<td>:truck: <code class="highlighter-rouge">:truck:</code></td>
</tr>
<tr>
<td>:train: <code class="highlighter-rouge">:train:</code></td>
<td>:station: <code class="highlighter-rouge">:station:</code></td>
<td>:train2: <code class="highlighter-rouge">:train2:</code></td>
</tr>
<tr>
<td>:bullettrain_front: <code class="highlighter-rouge">:bullettrain_front:</code></td>
<td>:bullettrain_side: <code class="highlighter-rouge">:bullettrain_side:</code></td>
<td>:light_rail: <code class="highlighter-rouge">:light_rail:</code></td>
</tr>
<tr>
<td>:monorail: <code class="highlighter-rouge">:monorail:</code></td>
<td>:railway_car: <code class="highlighter-rouge">:railway_car:</code></td>
<td>:trolleybus: <code class="highlighter-rouge">:trolleybus:</code></td>
</tr>
<tr>
<td>:ticket: <code class="highlighter-rouge">:ticket:</code></td>
<td>:fuelpump: <code class="highlighter-rouge">:fuelpump:</code></td>
<td>:vertical_traffic_light: <code class="highlighter-rouge">:vertical_traffic_light:</code></td>
</tr>
<tr>
<td>:traffic_light: <code class="highlighter-rouge">:traffic_light:</code></td>
<td>:warning: <code class="highlighter-rouge">:warning:</code></td>
<td>:construction: <code class="highlighter-rouge">:construction:</code></td>
</tr>
<tr>
<td>:beginner: <code class="highlighter-rouge">:beginner:</code></td>
<td>:atm: <code class="highlighter-rouge">:atm:</code></td>
<td>:slot_machine: <code class="highlighter-rouge">:slot_machine:</code></td>
</tr>
<tr>
<td>:busstop: <code class="highlighter-rouge">:busstop:</code></td>
<td>:barber: <code class="highlighter-rouge">:barber:</code></td>
<td>:hotsprings: <code class="highlighter-rouge">:hotsprings:</code></td>
</tr>
<tr>
<td>:checkered_flag: <code class="highlighter-rouge">:checkered_flag:</code></td>
<td>:crossed_flags: <code class="highlighter-rouge">:crossed_flags:</code></td>
<td>:izakaya_lantern: <code class="highlighter-rouge">:izakaya_lantern:</code></td>
</tr>
<tr>
<td>:moyai: <code class="highlighter-rouge">:moyai:</code></td>
<td>:circus_tent: <code class="highlighter-rouge">:circus_tent:</code></td>
<td>:performing_arts: <code class="highlighter-rouge">:performing_arts:</code></td>
</tr>
<tr>
<td>:round_pushpin: <code class="highlighter-rouge">:round_pushpin:</code></td>
<td>:triangular_flag_on_post: <code class="highlighter-rouge">:triangular_flag_on_post:</code></td>
<td>:jp: <code class="highlighter-rouge">:jp:</code></td>
</tr>
<tr>
<td>:kr: <code class="highlighter-rouge">:kr:</code></td>
<td>:cn: <code class="highlighter-rouge">:cn:</code></td>
<td>:us: <code class="highlighter-rouge">:us:</code></td>
</tr>
<tr>
<td>:fr: <code class="highlighter-rouge">:fr:</code></td>
<td>:es: <code class="highlighter-rouge">:es:</code></td>
<td>:it: <code class="highlighter-rouge">:it:</code></td>
</tr>
<tr>
<td>:ru: <code class="highlighter-rouge">:ru:</code></td>
<td>:gb: <code class="highlighter-rouge">:gb:</code></td>
<td>:uk: <code class="highlighter-rouge">:uk:</code></td>
</tr>
<tr>
<td>:de: <code class="highlighter-rouge">:de:</code></td>
<td> </td>
<td> </td>
</tr>
</tbody>
</table>
<h2 id="symbols">Symbols</h2>
<table>
<thead>
<tr>
<th>:one: <code class="highlighter-rouge">:one:</code></th>
<th>:two: <code class="highlighter-rouge">:two:</code></th>
<th>:three: <code class="highlighter-rouge">:three:</code></th>
</tr>
</thead>
<tbody>
<tr>
<td>:four: <code class="highlighter-rouge">:four:</code></td>
<td>:five: <code class="highlighter-rouge">:five:</code></td>
<td>:six: <code class="highlighter-rouge">:six:</code></td>
</tr>
<tr>
<td>:seven: <code class="highlighter-rouge">:seven:</code></td>
<td>:eight: <code class="highlighter-rouge">:eight:</code></td>
<td>:nine: <code class="highlighter-rouge">:nine:</code></td>
</tr>
<tr>
<td>:keycap_ten: <code class="highlighter-rouge">:keycap_ten:</code></td>
<td>:1234: <code class="highlighter-rouge">:1234:</code></td>
<td>:zero: <code class="highlighter-rouge">:zero:</code></td>
</tr>
<tr>
<td>:hash: <code class="highlighter-rouge">:hash:</code></td>
<td>:symbols: <code class="highlighter-rouge">:symbols:</code></td>
<td>:arrow_backward: <code class="highlighter-rouge">:arrow_backward:</code></td>
</tr>
<tr>
<td>:arrow_down: <code class="highlighter-rouge">:arrow_down:</code></td>
<td>:arrow_forward: <code class="highlighter-rouge">:arrow_forward:</code></td>
<td>:arrow_left: <code class="highlighter-rouge">:arrow_left:</code></td>
</tr>
<tr>
<td>:capital_abcd: <code class="highlighter-rouge">:capital_abcd:</code></td>
<td>:abcd: <code class="highlighter-rouge">:abcd:</code></td>
<td>:abc: <code class="highlighter-rouge">:abc:</code></td>
</tr>
<tr>
<td>:arrow_lower_left: <code class="highlighter-rouge">:arrow_lower_left:</code></td>
<td>:arrow_lower_right: <code class="highlighter-rouge">:arrow_lower_right:</code></td>
<td>:arrow_right: <code class="highlighter-rouge">:arrow_right:</code></td>
</tr>
<tr>
<td>:arrow_up: <code class="highlighter-rouge">:arrow_up:</code></td>
<td>:arrow_upper_left: <code class="highlighter-rouge">:arrow_upper_left:</code></td>
<td>:arrow_upper_right: <code class="highlighter-rouge">:arrow_upper_right:</code></td>
</tr>
<tr>
<td>:arrow_double_down: <code class="highlighter-rouge">:arrow_double_down:</code></td>
<td>:arrow_double_up: <code class="highlighter-rouge">:arrow_double_up:</code></td>
<td>:arrow_down_small: <code class="highlighter-rouge">:arrow_down_small:</code></td>
</tr>
<tr>
<td>:arrow_heading_down: <code class="highlighter-rouge">:arrow_heading_down:</code></td>
<td>:arrow_heading_up: <code class="highlighter-rouge">:arrow_heading_up:</code></td>
<td>:leftwards_arrow_with_hook: <code class="highlighter-rouge">:leftwards_arrow_with_hook:</code></td>
</tr>
<tr>
<td>:arrow_right_hook: <code class="highlighter-rouge">:arrow_right_hook:</code></td>
<td>:left_right_arrow: <code class="highlighter-rouge">:left_right_arrow:</code></td>
<td>:arrow_up_down: <code class="highlighter-rouge">:arrow_up_down:</code></td>
</tr>
<tr>
<td>:arrow_up_small: <code class="highlighter-rouge">:arrow_up_small:</code></td>
<td>:arrows_clockwise: <code class="highlighter-rouge">:arrows_clockwise:</code></td>
<td>:arrows_counterclockwise: <code class="highlighter-rouge">:arrows_counterclockwise:</code></td>
</tr>
<tr>
<td>:rewind: <code class="highlighter-rouge">:rewind:</code></td>
<td>:fast_forward: <code class="highlighter-rouge">:fast_forward:</code></td>
<td>:information_source: <code class="highlighter-rouge">:information_source:</code></td>
</tr>
<tr>
<td>:ok: <code class="highlighter-rouge">:ok:</code></td>
<td>:twisted_rightwards_arrows: <code class="highlighter-rouge">:twisted_rightwards_arrows:</code></td>
<td>:repeat: <code class="highlighter-rouge">:repeat:</code></td>
</tr>
<tr>
<td>:repeat_one: <code class="highlighter-rouge">:repeat_one:</code></td>
<td>:new: <code class="highlighter-rouge">:new:</code></td>
<td>:top: <code class="highlighter-rouge">:top:</code></td>
</tr>
<tr>
<td>:up: <code class="highlighter-rouge">:up:</code></td>
<td>:cool: <code class="highlighter-rouge">:cool:</code></td>
<td>:free: <code class="highlighter-rouge">:free:</code></td>
</tr>
<tr>
<td>:ng: <code class="highlighter-rouge">:ng:</code></td>
<td>:cinema: <code class="highlighter-rouge">:cinema:</code></td>
<td>:koko: <code class="highlighter-rouge">:koko:</code></td>
</tr>
<tr>
<td>:signal_strength: <code class="highlighter-rouge">:signal_strength:</code></td>
<td>:u5272: <code class="highlighter-rouge">:u5272:</code></td>
<td>:u5408: <code class="highlighter-rouge">:u5408:</code></td>
</tr>
<tr>
<td>:u55b6: <code class="highlighter-rouge">:u55b6:</code></td>
<td>:u6307: <code class="highlighter-rouge">:u6307:</code></td>
<td>:u6708: <code class="highlighter-rouge">:u6708:</code></td>
</tr>
<tr>
<td>:u6709: <code class="highlighter-rouge">:u6709:</code></td>
<td>:u6e80: <code class="highlighter-rouge">:u6e80:</code></td>
<td>:u7121: <code class="highlighter-rouge">:u7121:</code></td>
</tr>
<tr>
<td>:u7533: <code class="highlighter-rouge">:u7533:</code></td>
<td>:u7a7a: <code class="highlighter-rouge">:u7a7a:</code></td>
<td>:u7981: <code class="highlighter-rouge">:u7981:</code></td>
</tr>
<tr>
<td>:sa: <code class="highlighter-rouge">:sa:</code></td>
<td>:restroom: <code class="highlighter-rouge">:restroom:</code></td>
<td>:mens: <code class="highlighter-rouge">:mens:</code></td>
</tr>
<tr>
<td>:womens: <code class="highlighter-rouge">:womens:</code></td>
<td>:baby_symbol: <code class="highlighter-rouge">:baby_symbol:</code></td>
<td>:no_smoking: <code class="highlighter-rouge">:no_smoking:</code></td>
</tr>
<tr>
<td>:parking: <code class="highlighter-rouge">:parking:</code></td>
<td>:wheelchair: <code class="highlighter-rouge">:wheelchair:</code></td>
<td>:metro: <code class="highlighter-rouge">:metro:</code></td>
</tr>
<tr>
<td>:baggage_claim: <code class="highlighter-rouge">:baggage_claim:</code></td>
<td>:accept: <code class="highlighter-rouge">:accept:</code></td>
<td>:wc: <code class="highlighter-rouge">:wc:</code></td>
</tr>
<tr>
<td>:potable_water: <code class="highlighter-rouge">:potable_water:</code></td>
<td>:put_litter_in_its_place: <code class="highlighter-rouge">:put_litter_in_its_place:</code></td>
<td>:secret: <code class="highlighter-rouge">:secret:</code></td>
</tr>
<tr>
<td>:congratulations: <code class="highlighter-rouge">:congratulations:</code></td>
<td>:m: <code class="highlighter-rouge">:m:</code></td>
<td>:passport_control: <code class="highlighter-rouge">:passport_control:</code></td>
</tr>
<tr>
<td>:left_luggage: <code class="highlighter-rouge">:left_luggage:</code></td>
<td>:customs: <code class="highlighter-rouge">:customs:</code></td>
<td>:ideograph_advantage: <code class="highlighter-rouge">:ideograph_advantage:</code></td>
</tr>
<tr>
<td>:cl: <code class="highlighter-rouge">:cl:</code></td>
<td>:sos: <code class="highlighter-rouge">:sos:</code></td>
<td>:id: <code class="highlighter-rouge">:id:</code></td>
</tr>
<tr>
<td>:no_entry_sign: <code class="highlighter-rouge">:no_entry_sign:</code></td>
<td>:underage: <code class="highlighter-rouge">:underage:</code></td>
<td>:no_mobile_phones: <code class="highlighter-rouge">:no_mobile_phones:</code></td>
</tr>
<tr>
<td>:do_not_litter: <code class="highlighter-rouge">:do_not_litter:</code></td>
<td>:non-potable_water: <code class="highlighter-rouge">:non-potable_water:</code></td>
<td>:no_bicycles: <code class="highlighter-rouge">:no_bicycles:</code></td>
</tr>
<tr>
<td>:no_pedestrians: <code class="highlighter-rouge">:no_pedestrians:</code></td>
<td>:children_crossing: <code class="highlighter-rouge">:children_crossing:</code></td>
<td>:no_entry: <code class="highlighter-rouge">:no_entry:</code></td>
</tr>
<tr>
<td>:eight_spoked_asterisk: <code class="highlighter-rouge">:eight_spoked_asterisk:</code></td>
<td>:eight_pointed_black_star: <code class="highlighter-rouge">:eight_pointed_black_star:</code></td>
<td>:heart_decoration: <code class="highlighter-rouge">:heart_decoration:</code></td>
</tr>
<tr>
<td>:vs: <code class="highlighter-rouge">:vs:</code></td>
<td>:vibration_mode: <code class="highlighter-rouge">:vibration_mode:</code></td>
<td>:mobile_phone_off: <code class="highlighter-rouge">:mobile_phone_off:</code></td>
</tr>
<tr>
<td>:chart: <code class="highlighter-rouge">:chart:</code></td>
<td>:currency_exchange: <code class="highlighter-rouge">:currency_exchange:</code></td>
<td>:aries: <code class="highlighter-rouge">:aries:</code></td>
</tr>
<tr>
<td>:taurus: <code class="highlighter-rouge">:taurus:</code></td>
<td>:gemini: <code class="highlighter-rouge">:gemini:</code></td>
<td>:cancer: <code class="highlighter-rouge">:cancer:</code></td>
</tr>
<tr>
<td>:leo: <code class="highlighter-rouge">:leo:</code></td>
<td>:virgo: <code class="highlighter-rouge">:virgo:</code></td>
<td>:libra: <code class="highlighter-rouge">:libra:</code></td>
</tr>
<tr>
<td>:scorpius: <code class="highlighter-rouge">:scorpius:</code></td>
<td>:sagittarius: <code class="highlighter-rouge">:sagittarius:</code></td>
<td>:capricorn: <code class="highlighter-rouge">:capricorn:</code></td>
</tr>
<tr>
<td>:aquarius: <code class="highlighter-rouge">:aquarius:</code></td>
<td>:pisces: <code class="highlighter-rouge">:pisces:</code></td>
<td>:ophiuchus: <code class="highlighter-rouge">:ophiuchus:</code></td>
</tr>
<tr>
<td>:six_pointed_star: <code class="highlighter-rouge">:six_pointed_star:</code></td>
<td>:negative_squared_cross_mark: <code class="highlighter-rouge">:negative_squared_cross_mark:</code></td>
<td>:a: <code class="highlighter-rouge">:a:</code></td>
</tr>
<tr>
<td>:b: <code class="highlighter-rouge">:b:</code></td>
<td>:ab: <code class="highlighter-rouge">:ab:</code></td>
<td>:o2: <code class="highlighter-rouge">:o2:</code></td>
</tr>
<tr>
<td>:diamond_shape_with_a_dot_inside: <code class="highlighter-rouge">:diamond_shape_with_a_dot_inside:</code></td>
<td>:recycle: <code class="highlighter-rouge">:recycle:</code></td>
<td>:end: <code class="highlighter-rouge">:end:</code></td>
</tr>
<tr>
<td>:on: <code class="highlighter-rouge">:on:</code></td>
<td>:soon: <code class="highlighter-rouge">:soon:</code></td>
<td>:clock1: <code class="highlighter-rouge">:clock1:</code></td>
</tr>
<tr>
<td>:clock130: <code class="highlighter-rouge">:clock130:</code></td>
<td>:clock10: <code class="highlighter-rouge">:clock10:</code></td>
<td>:clock1030: <code class="highlighter-rouge">:clock1030:</code></td>
</tr>
<tr>
<td>:clock11: <code class="highlighter-rouge">:clock11:</code></td>
<td>:clock1130: <code class="highlighter-rouge">:clock1130:</code></td>
<td>:clock12: <code class="highlighter-rouge">:clock12:</code></td>
</tr>
<tr>
<td>:clock1230: <code class="highlighter-rouge">:clock1230:</code></td>
<td>:clock2: <code class="highlighter-rouge">:clock2:</code></td>
<td>:clock230: <code class="highlighter-rouge">:clock230:</code></td>
</tr>
<tr>
<td>:clock3: <code class="highlighter-rouge">:clock3:</code></td>
<td>:clock330: <code class="highlighter-rouge">:clock330:</code></td>
<td>:clock4: <code class="highlighter-rouge">:clock4:</code></td>
</tr>
<tr>
<td>:clock430: <code class="highlighter-rouge">:clock430:</code></td>
<td>:clock5: <code class="highlighter-rouge">:clock5:</code></td>
<td>:clock530: <code class="highlighter-rouge">:clock530:</code></td>
</tr>
<tr>
<td>:clock6: <code class="highlighter-rouge">:clock6:</code></td>
<td>:clock630: <code class="highlighter-rouge">:clock630:</code></td>
<td>:clock7: <code class="highlighter-rouge">:clock7:</code></td>
</tr>
<tr>
<td>:clock730: <code class="highlighter-rouge">:clock730:</code></td>
<td>:clock8: <code class="highlighter-rouge">:clock8:</code></td>
<td>:clock830: <code class="highlighter-rouge">:clock830:</code></td>
</tr>
<tr>
<td>:clock9: <code class="highlighter-rouge">:clock9:</code></td>
<td>:clock930: <code class="highlighter-rouge">:clock930:</code></td>
<td>:heavy_dollar_sign: <code class="highlighter-rouge">:heavy_dollar_sign:</code></td>
</tr>
<tr>
<td>:copyright: <code class="highlighter-rouge">:copyright:</code></td>
<td>:registered: <code class="highlighter-rouge">:registered:</code></td>
<td>:tm: <code class="highlighter-rouge">:tm:</code></td>
</tr>
<tr>
<td>:x: <code class="highlighter-rouge">:x:</code></td>
<td>:heavy_exclamation_mark: <code class="highlighter-rouge">:heavy_exclamation_mark:</code></td>
<td>:bangbang: <code class="highlighter-rouge">:bangbang:</code></td>
</tr>
<tr>
<td>:interrobang: <code class="highlighter-rouge">:interrobang:</code></td>
<td>:o: <code class="highlighter-rouge">:o:</code></td>
<td>:heavy_multiplication_x: <code class="highlighter-rouge">:heavy_multiplication_x:</code></td>
</tr>
<tr>
<td>:heavy_plus_sign: <code class="highlighter-rouge">:heavy_plus_sign:</code></td>
<td>:heavy_minus_sign: <code class="highlighter-rouge">:heavy_minus_sign:</code></td>
<td>:heavy_division_sign: <code class="highlighter-rouge">:heavy_division_sign:</code></td>
</tr>
<tr>
<td>:white_flower: <code class="highlighter-rouge">:white_flower:</code></td>
<td>:100: <code class="highlighter-rouge">:100:</code></td>
<td>:heavy_check_mark: <code class="highlighter-rouge">:heavy_check_mark:</code></td>
</tr>
<tr>
<td>:ballot_box_with_check: <code class="highlighter-rouge">:ballot_box_with_check:</code></td>
<td>:radio_button: <code class="highlighter-rouge">:radio_button:</code></td>
<td>:link: <code class="highlighter-rouge">:link:</code></td>
</tr>
<tr>
<td>:curly_loop: <code class="highlighter-rouge">:curly_loop:</code></td>
<td>:wavy_dash: <code class="highlighter-rouge">:wavy_dash:</code></td>
<td>:part_alternation_mark: <code class="highlighter-rouge">:part_alternation_mark:</code></td>
</tr>
<tr>
<td>:trident: <code class="highlighter-rouge">:trident:</code></td>
<td>:black_square: <code class="highlighter-rouge">:black_square:</code></td>
<td>:white_square: <code class="highlighter-rouge">:white_square:</code></td>
</tr>
<tr>
<td>:white_check_mark: <code class="highlighter-rouge">:white_check_mark:</code></td>
<td>:black_square_button: <code class="highlighter-rouge">:black_square_button:</code></td>
<td>:white_square_button: <code class="highlighter-rouge">:white_square_button:</code></td>
</tr>
<tr>
<td>:black_circle: <code class="highlighter-rouge">:black_circle:</code></td>
<td>:white_circle: <code class="highlighter-rouge">:white_circle:</code></td>
<td>:red_circle: <code class="highlighter-rouge">:red_circle:</code></td>
</tr>
<tr>
<td>:large_blue_circle: <code class="highlighter-rouge">:large_blue_circle:</code></td>
<td>:large_blue_diamond: <code class="highlighter-rouge">:large_blue_diamond:</code></td>
<td>:large_orange_diamond: <code class="highlighter-rouge">:large_orange_diamond:</code></td>
</tr>
<tr>
<td>:small_blue_diamond: <code class="highlighter-rouge">:small_blue_diamond:</code></td>
<td>:small_orange_diamond: <code class="highlighter-rouge">:small_orange_diamond:</code></td>
<td>:small_red_triangle: <code class="highlighter-rouge">:small_red_triangle:</code></td>
</tr>
<tr>
<td>:small_red_triangle_down: <code class="highlighter-rouge">:small_red_triangle_down:</code></td>
<td>:shipit: <code class="highlighter-rouge">:shipit:</code></td>
<td> </td>
</tr>
</tbody>
</table>yashumittalComplete list of github markdown emoji markup
https://i.imgur.com/YFGekxT.png
How to Deal With Responsive Web Projects?2018-01-28T06:30:00+00:002018-01-28T06:30:00+00:00https://blog.codecarrot.net/how-to-deal-with-responsive-web-projects<p>Great web projects don’t succeed through good design or development chops alone—they also need communication and collaboration, brainstorming or exchanging ideas between designers and developers.</p>
<p>Usually designers and developers work in a silos culture, with very little communication between the team. Once the designs is complete, designers would digitally hand off the files to the developers to integrate the designs without any form of communication.</p>
<p>Is there a way to minimize the problems? Is it possible to <em>bridge the desginer and developer gap on responsive web projects</em> and provide maximal value to the clients?</p>
<hr />
<p>Here at <a href="https://www.codecarrot.net/">CodeCarrot</a>, both designer-developer teams work together to deliver amazing results. They resolved potential pitfalls early, delivered their projects on time, and iterated quickly. This kind of coordination isn’t just good for projects—a communicative, collaborative team is also a happier team. There are fewer misunderstandings and less tension if tasks aren’t going as planned.</p>
<p>Design-development collaboration becomes particularly critical in responsive web design (RWD) projects. Teams now have to account for a wide array of devices. Fixed, “pixel perfect” design must be exchanged for fluid ratios and proportions. And image assets need optimization for various device sizes and resolutions.</p>
<p>Here are a few techniques I’ve found helpful in overcoming these hurdles.</p>
<h2 id="1-focus-on-the-extreme-viewport-sizes-first">1. Focus on the “extreme” viewport sizes first</h2>
<p><img src="https://i.imgur.com/qykhsJy.png" alt="When in doubt, base your viewport range on common web experiences: the iPhone and an expanded desktop browser" /></p>
<p><em>When in doubt, base your viewport range on common web experiences: the iPhone and an expanded desktop browser.</em></p>
<p>Involve developer early in the process, having their insight on how the structure of pages might lead to the evolution of a different design.</p>
<p>Most design start static: you pick a viewport width and height, and sketch or mock up accordingly.</p>
<p><strong>But begs a few questions:</strong> What dimensions do you prioritize with the dev team? What high-fidelity deliverables should you hand off first? Which devices should you consider first for technical constraints?</p>
<p>I almost always recommend starting with your user base’s “extremes”—the smallest and largest common device sizes. If your application only works on desktop, then you don’t have to work on viewport smaller than 1000px. When in doubt, I’d suggest the following for web users:</p>
<ul>
<li>320px</li>
<li>576px</li>
<li>768px</li>
<li>992px</li>
<li>1200px</li>
</ul>
<p><strong>Note:</strong> Your audience may differ, so check your analytics to determine your “extremes.”</p>
<p>Tackling the small viewport size early forces you to make hard choices about the most important features in your design. The large viewport brings in the opposite considerations: How much content is too much? Are text columns getting too wide, lowering readability?</p>
<p>Should select elements get extra white space, and if so, how much to avoid feeling disjointed? Finally, addressing the smallest and largest viewports usually requires that you consider at least a couple input methods—the smallest viewports are often touch-based, while the largest use the mouse and keyboard.</p>
<blockquote>
Start designing for the smallest to the largest device sizes.
</blockquote>
<p>Perhaps most importantly, when you tackle the extremes, you’re tackling 2 sizes at once, not trying to fully flesh out just 1 viewport and retrofit the rest later. That delay alone could trigger clashes between designers and developers down the road.</p>
<h2 id="2-discuss-content-layout-between-breakpoints">2. Discuss content layout between breakpoints</h2>
<p>Designer giving so much of design attention to static wireframes, it’s important to remember that responsive web design is inherently fluid. Which means that a lot of your web audience will experience the design in its “in-between” states.</p>
<p>So almost every design has to consider the layout adjustments necessary between the spec’d sizes. For example, when the screen size decreases, text content may shrink and images drop into a single column.</p>
<iframe src="https://www.facebook.com/plugins/video.php?href=https%3A%2F%2Fwww.facebook.com%2Fcodecarrotinc%2Fvideos%2F405803683264652%2F&show_text=0&width=560" width="100%" height="298" style="border:none;overflow:hidden" scrolling="no" frameborder="0" allowtransparency="true" allowfullscreen="true"></iframe>
<p>Avoid making assumptions about what those adjustments can or should be with your development team. Be proactive, and meet with your developers before they get too deep in their work.</p>
<p>For especially complex layout changes, it’s a smart idea to create another wireframe or sketch to illustrate. Where specificity is less important, a brief discussion or an email describing the transitions can suffice.</p>
<h2 id="3-have-an-image-asset-strategy-early">3. Have an image asset strategy early</h2>
<p><img src="https://i.imgur.com/BsMyUIT.png" alt="Many responsive images require multiple assets." /></p>
<p><em>Many responsive images require multiple assets.</em></p>
<p>Image formats and sizes often create stumbling blocks between designers and developers. You might use PNGs, JPGs, icon fonts, or SVGs for smaller elements and icons. There’s no one right answer: everything depends on the content and resources available. But it’s important to agree on one format and stick with it. Also, you’ll likely develop patterns for common image sizes as your web project progresses.</p>
<p>Yet for modern responsive design, that’s just the starting point. You’ll need at least 2 assets for raster formats <em>(JPGs)</em>: 1 for normal displays and a second for high-resolution ones. Advanced responsive image techniques call for more assets for different viewport sizes.</p>
<p>Avoid leaving decisions on responsive image formats to the end of a project. At the bare minimum, have a strategy for display density. Read up on <a href="/responsive-images-with-srcset-display">srcset</a> to ensure good cross-browser support. If it feels overwhelming, start small. Just altering a few image elements with the <code class="highlighter-rouge">srcset</code> attribute is a good first step.</p>
<h2 id="4-think-atomic-modular-design">4. Think atomic, modular design</h2>
<p>My RWD workflow is influenced by Brad Frost’s thoughts on <a href="https://www.youtube.com/watch?v=kxxOwYIhgUk">Atomic Web Design</a> and Jonathan Snook’s <a href="https://smacss.com/">SMACSS</a>. Both frameworks rely on small, reusable components as the basis for strong web architecture.</p>
<p>So for developer handoffs, I like to concentrate on small and reusable components first, because they generally present the same UX and visuals across different devices. That consistency can be easier to digest for the development team. Plus, small components tend to be more reusable across application. So if you design an effective solution, it’s that much easier to re-apply it later on.</p>
<blockquote>
Smaller components is reusable across application and it's easier to re-apply it later on.
</blockquote>
<p>Imagine you’re designing a signup page with a headline, large graphic, and form. Depending on the device, these elements may shift around or change in size.</p>
<p>Early on, focus on the smaller details of the signup form with the dev team. How does it look? What kind of validation do you need? How might the form change for touch input versus mouse and keyboard?</p>
<h2 id="5-bring-in-developers-for-visual-and-ux-feedback">5. Bring in developers for visual and UX feedback</h2>
<p>Some designers shield developers from product meetings, usability sessions, and other opportunities for feedback. There’s a kickoff, a handoff, and little else. That’s a mistake.</p>
<p>Remember that experienced developers have a ton of applicable knowledge. They might also have intimate knowledge of the product if they’ve worked with it for awhile.</p>
<p>Front-end developers’ and designers’ skills often overlap. More and more designers write their own code. Developers are boning up on rapid prototyping, wireframing, and aesthetic design. RWD has only exacerbated this trend. A developer can bring strong design insights even without a “designer” title.</p>
<p>Granted, separate roles and responsibilities remain valuable. But small steps toward inclusion can significantly improve the final product. So for your next usability test, bring in a developer to discuss the outcome. Or if you’re running a design brainstorm, maybe invite a few devs.</p>
<h2 id="collaboration-matters">Collaboration matters</h2>
<p>All these techniques need planning and buy-in. With so much attention focused on launching products and hitting deadlines, that can be hard. But good designer-developer relations can bring a lot to any web project—particularly responsive ones. A small investment at the start can have an exponential payoff for your team.</p>yashumittalGreat web projects don’t succeed through good design or development chops alone—they also need communication and collaboration, brainstorming or exchanging ideas between designers and developers.
https://i.imgur.com/Mt7sGsm.jpg
How to Avoid Confusion with Git Branches2018-01-27T17:24:33+00:002018-01-27T17:24:33+00:00https://blog.codecarrot.net/how-to-avoid-confusion-with-git-branches<h2 id="this-time-git">This time Git!</h2>
<p>It’s a great tool for sure but sometimes I feel quite confused when I see the way how it works.</p>
<p><img src="https://cdn.codecarrot.net/images/X9zNSkM.gif" alt="Git merge" /></p>
<p>This time I wanted to check out to the remote branch called release but every time I tried to do it, git just returned following error:</p>
<div class="highlighter-rouge"><div class="highlight"><pre class="highlight"><code>error: pathspec 'release' did not match any file(s) known to git.
</code></pre></div></div>
<h3 id="solution">Solution</h3>
<p>The reason for the error described above was a file added to the repository and using the same <strong>RELEASE</strong> name - file included all the necessary commands to execute after deploying the next release.</p>
<p>How to solve the problem?</p>
<p>There are two possible ways:</p>
<ul>
<li>rename the file to avoid conflicts with the branch’s name</li>
<li>use more precise way to checkout to the remote branch:
<div class="highlighter-rouge"><div class="highlight"><pre class="highlight"><code>git checkout -b release origin/release
</code></pre></div> </div>
</li>
</ul>
<p>You’d need to run <code class="highlighter-rouge">git checkout --track origin/test</code> (which is the same thing as running <code class="highlighter-rouge">git checkout -b test origin/test</code>)</p>
<p>Simple, isn’t it?</p>
<hr />
<p>TIL, or Today I Learned, is where our developers share the best tech stuff they found every day. You can find smart solutions for some issues, useful advice and anything which will make your developer life easier.</p>yashumittalThis time Git!
https://cdn.codecarrot.net/images/jack-cain-336725.jpg
The Lazy Developer’s Guide to Life Without the Mouse, Cursor and Useless Keys2018-01-26T15:01:45+00:002018-01-26T15:01:45+00:00https://blog.codecarrot.net/lazy-developer-guide<p>Dare I broach the topic of the Vim vs Emacs holy war? I’ve tried both editors, but ultimately Vim stole my heart and, in doing so, turned my life into hell. It’s such a pleasure to use; nothing else compares to it. Suddenly, I hate typing with any application that doesn’t use the HJKL keys to move the cursor, and I find myself becoming frustrated whenever I need to use the mouse! So what changes can I implement to ease my pain and make my life easier, you ask?</p>
<h2 id="code-editor">Code editor</h2>
<p><strong>If you use Vim</strong></p>
<p>The Vim editor was designed for lazy people like myself. No unnecessary movement, everything right under my fingertips. It has quite a steep learning curve, but there are many resources that can help. I recommend going through vimtutor (just type <code class="highlighter-rouge">vimtutor</code> in your terminal) and <a href="//www.viemu.com/a_vi_vim_graphical_cheat_sheet_tutorial.html">getting yourself one of these printable cheatsheets</a>. The cheatsheets are divided into separate weeks, so the amount of information won’t overwhelm you.</p>
<p><strong>If you don’t use Vim</strong></p>
<p>If you don’t want to dive head-first into Vim, or you simply don’t want to lose your current plugins, you can install a plugin for your favorite text editor. I’ve used Vintageous for Sublime Text and vim-mode for Atom and they both work reasonably well (although with some minor differences). There’s also EVIL (Extensible VI Layer) Mode for Emacs.</p>
<h2 id="terminal">Terminal</h2>
<p><strong>Tmux</strong></p>
<p>Tmux is definitely one of my favorite tools. Although it has pretty advanced capabilities, I just use it as a kind of window manager for the terminal. It lets you create multiple panes, and then to split them up however you want. Basic Tmux shortcuts are (C is the prefix key - by default it’s Ctrl):</p>
<ul>
<li><code class="highlighter-rouge">C-b c</code> - create a new pane</li>
<li><code class="highlighter-rouge">C-b number</code> - go to pane with a given number</li>
<li><code class="highlighter-rouge">C-b “</code> - split pane horizontally</li>
<li><code class="highlighter-rouge">C-b %</code> - split pane vertically</li>
<li><code class="highlighter-rouge">C-b [</code> - enter copy mode (like visual mode in Vim)</li>
</ul>
<p>For comfort, I’ve rebound some shortcuts to mimic Vim’s behaviour:</p>
<p>This allows you to navigate split panes using <code class="highlighter-rouge">C-h/j/k/l</code> keys and to toggle between them with <code class="highlighter-rouge">C-\</code>.</p>
<p><strong>Shell, IRB and other prompts</strong></p>
<p>I was surprised how easy it is to use Vim key bindings in all terminal apps. Just put <code class="highlighter-rouge">set editing-mode vi</code> in ~/.inputrc and <code class="highlighter-rouge">bindkey -v</code> in ~/.zshrc if you’re using Zsh, and you’re good to go!</p>
<h2 id="desktop">Desktop</h2>
<p><strong>Window management</strong></p>
<p>I guess we all have cmd+tab etched into our muscle memory. On most operating systems, cmd+tab will bring up the most recently used application, cmd+tab+tab will bring up the second most recently used application and so on. This is fine when I’m just switching from editor to browser and back, but if I have a quick message to reply to - the order gets changed and I can either remember that I’m out of my usual flow and press cmd+tab twice the next two times I want to switch windows OR I can accidentally change the order again, perhaps a couple of times, until I get it right. The latter being more likely, and a lot messier.
There’s also a way to switch between desktops, but I can never be sure what application I’ll end up in if I have more than one on a single screen. Using one app per desktop is not a viable solution for me since I’m so in love with autoreloading the app when my code changes. When I switched from Ubuntu to OSX I really missed the ability to move between applications with a single shortcut. Here’s how it worked: you have multiple apps in your “dock”, you press the windows key with a number and the graphical environment brings you to the corresponding app. A similar thing can be achieved in OSX by using BetterTouchTool:</p>
<table>
<thead>
<tr>
<th>Shortcut</th>
<th>Assiged Action</th>
<th>Enabled</th>
</tr>
</thead>
<tbody>
<tr>
<td>Command + 1</td>
<td>Launch Google Chrome.app</td>
<td>:white_check_mark:</td>
</tr>
<tr>
<td>Command + 2</td>
<td>Launch Terminal.app</td>
<td>:white_check_mark:</td>
</tr>
<tr>
<td>Command + 3</td>
<td>Launch Slack.app</td>
<td>:white_check_mark:</td>
</tr>
<tr>
<td>Command + 4</td>
<td>Launch iTunes.app</td>
<td>:white_check_mark:</td>
</tr>
<tr>
<td>Command + 5</td>
<td>Launch Mail.app</td>
<td>:white_check_mark:</td>
</tr>
</tbody>
</table>
<h2 id="web-browser">Web Browser</h2>
<p><strong>Tabs and pages</strong></p>
<p>Discovering the <a href="//chrome.google.com/webstore/detail/vimium/dbepggeogbaibhgnhhndojpepiihcmeb?hl=en">Vimium</a> plugin for Chrome was another lifesaver. It allows tab and page navigation using only the keyboard. My favorite feature is highlighting all links on a page with a convenient shortcut. Just press the F key and the screen turns into this:</p>
<p><img src="https://cdn.codecarrot.net/images/1447933857-1447933855-image01.png" alt="Google homepage shortcuts keys appering on the screen" /></p>
<p>For a better Firefox experience - try <a href="//5digits.org/pentadactyl/">Pentadactyl</a>. If you’re a Safari user there’s <a href="//github.com/guyht/vimari">Vimari</a>.</p>
<h2 id="web-apps">Web apps</h2>
<p>Many of the best web applications come with their own shortcuts. Just press <code class="highlighter-rouge">?</code> in GMail, Toggl, Facebook or Twitter. Although not all of them are Vim-like, I think the developers still deserve a huge round of applause for taking good care of us and our tired wrists.</p>
<h2 id="conclusion">Conclusion</h2>
<p>Figuring out your perfect setup is a long journey, but it’s a fun one and I recommend you start right away. I can’t wait to see what new helpful tools I’ll discover this week! How about you? Let me know about your favorite keyboard-fu techniques. Oh, and don’t forget to stretch your hands before you type!</p>yashumittalDare I broach the topic of the Vim vs Emacs holy war? I’ve tried both editors, but ultimately Vim stole my heart and, in doing so, turned my life into hell. It’s such a pleasure to use; nothing else compares to it. Suddenly, I hate typing with any application that doesn’t use the HJKL keys to move the cursor, and I find myself becoming frustrated whenever I need to use the mouse! So what changes can I implement to ease my pain and make my life easier, you ask?
https://cdn.codecarrot.net/images/1447935893-lazy.jpg
Tap into the Power of Coding2018-01-15T08:47:40+00:002018-01-15T08:47:40+00:00https://blog.codecarrot.net/tap-into-the-power-of-coding<p>From its inception, code has been an unparalleled force and powerful tool. Technology has changed the world, and code now fuels it. Today, it’s used in more ways than you could possibly imagine, it powers the web you surf and the apps you rely on day-to-day, but it’s also used in unexpected ways. Did you know that, for example, coding – in particular in Python – is considered an essential skill for astronomers? Or that there is an entire movement of artists collaborating with Google to <a href="//devart.withgoogle.com/">make art with code</a>? Technology is now even being used to clean up the ocean.</p>
<p>Coding is constantly evolving and adapting, pushing the frontier of where and how it can be used, and bringing with it limitless opportunities. Look forward into the future and – like the smartphone, the tablet, and the self-driving car – technology will find new purpose in our lives and we’ll use code in ways we haven’t even imagined yet.</p>
<p>But, what’s most exciting is that the opportunity to tap into the power of coding is open to everyone with a computer and the internet. If you’re willing to challenge yourself to embrace a new skill, there’s nothing standing in your way of learning to code and starting a career in tech.</p>
<p><em>So if you do learn to code, how can you use those new skills?</em></p>
<h2 id="create--build">Create & build</h2>
<p>Once you’re able to code, there’s nothing stopping you from bringing your web and app ideas to life. Whether that means building something to support your existing business or creating something entirely new.</p>
<p>On the other hand, there are other opportunities that come with adding coding to your skillset. If you go down the path of coding for a career, as a developer you can take on the role of supporting others with their needs and ideas. You’d be hard pressed to find a company these days that doesn’t need developers. But beyond that, there are limitless career opportunities for you to explore.</p>
<h2 id="freelance">Freelance</h2>
<p>As a freelance developer you can control which projects you take on and the clients you work for, diversifying your work and constantly finding new ways to use code to meet your client’s needs.</p>
<h2 id="level-up">Level up</h2>
<p>Even within your existing job, coding skills can help you grow within your role or even change positions within your company.</p>
<p>But maybe you’re drawn to working in a traditional industry. The good news is that there’s equal demand for developers in those sectors, too. Do a quick job search, and you’ll find developer positions in healthcare, accountancy, finance, marketing, publishing, PR and law (to name a few). Every company or organization, big or small, needs a web and mobile presence, and that makes developers a necessity.</p>
<h2 id="join-a-startup">Join a startup</h2>
<p>Then of course there’s the startup phenomenon. With the tech revolution comes the constant need for developers to be part of teams banding together to bring big and new ideas to life. If you are interested in startups, it’s worth noting that startup eco-systems are not just in Silicon Valley anymore. They’re now thriving across the world, from Stockholm to Beijing, from New York to Berlin. Check out the top 10 startup ecosystems according to VentureBeat.</p>
<h2 id="combine-your-passions">Combine your passions</h2>
<p>As a developer, you can be part of something unexpected and great. Why not combine coding with an existing passion?</p>
<p>Hopefully, these examples illustrate that regardless of what you do now or where your interests lie, there are limitless opportunities out there for you. Whichever career path you choose to take, you can use coding as a positive vehicle for change in your life. Make 2018 the year you explore new opportunities, embrace new skills and tap into the power of coding.</p>yashumittalFrom its inception, code has been an unparalleled force and powerful tool. Technology has changed the world, and code now fuels it. Today, it’s used in more ways than you could possibly imagine, it powers the web you surf and the apps you rely on day-to-day, but it’s also used in unexpected ways. Did you know that, for example, coding – in particular in Python – is considered an essential skill for astronomers? Or that there is an entire movement of artists collaborating with Google to make art with code? Technology is now even being used to clean up the ocean.
https://cdn.codecarrot.net/images/Tap-into-power-of-coding.jpg
CodingWisdom - When You Want to Quit2018-01-12T08:47:40+00:002018-01-12T08:47:40+00:00https://blog.codecarrot.net/codingwisdom-what-to-do-when-you-want-to-quit<p>Learning to code means understanding technology in a new way. You’ll master new tools and languages, establish different ways of thinking, and become responsive and adaptive to problem-solving. The skills you learn will open up new career opportunities and shape your future. Take a moment to appreciate how empowering that is. Wherever you are in your learning experience, the outcome is going to be rewarding and worthwhile. <strong>But is it going to be easy?</strong></p>
<p><strong>No.</strong></p>
<p>Learning to code is challenging and at times incredibly frustrating. In fact, at times it’ll seem easier to just quit. Nobody understands that better than our students. That’s why we asked a selection of them who are now professional developers – and were once in your shoes – to share their advice for how to get past it.</p>
<h2 id="be-patient">Be Patient</h2>
<blockquote>
“Internalizing and understanding code doesn’t happen overnight. I’ve found it really important to continually come back, refresh and reiterate the work you do.”
</blockquote>
<p>Programming is an in-demand and versatile skill, but it doesn’t come easily. To retain your skills, you need to be applying and improving them. Practice makes perfect. You’ll make things and break things, but will learn valuable lessons from both.</p>
<h2 id="take-a-break">Take a Break</h2>
<blockquote>
“Don’t lose hope. If something is frustrating you, walk away for a bit. I was having a hard time figuring out some JavaScript code out and I thought of the solution while relaxing in my hammock! Also, don’t think you need to know everything before applying to jobs. I am still learning A LOT while on the job.”
</blockquote>
<p>Every expert was once a beginner and that especially applies to programming. No one is “born to code.” It’s a skill everyone can learn, we believe anyone can be a developer. When you find yourself frustrated and overwhelmed while learning, remind yourself that everyone in the industry has been there, you’re not alone.</p>
<h2 id="be-disciplined">Be Disciplined</h2>
<blockquote>
“Motivation is fleeting, discipline is more reliable. Some days you’re not really in the mood to get things done and that’s ok, but try to program at least an hour or two if you can.”
</blockquote>
<p>Self-motivation has its limits, that’s okay. But remind yourself that every minute you spend learning will take you closer to your goal. Find a balance between contributing in small increments and longer periods throughout your week.</p>
<h2 id="dont-give-up">Don’t Give Up</h2>
<blockquote>
“There will be at least one moment where you will feel completely frustrated, and want to quit. But remember, don’t give up! Use the problems you experience as stepping stones to becoming a better developer.”
</blockquote>
<p>You will feel frustrated at times and want to quit. But dig into your determination and don’t give up. It won’t come easy, but with each challenge you overcome, there will be the reward of a new accomplishment and a strengthen skills.</p>
<p>It takes patience, discipline, and determination to learn to code, but remember, you’re up to the challenge and it’ll be worth it.</p>yashumittalLearning to code means understanding technology in a new way. You’ll master new tools and languages, establish different ways of thinking, and become responsive and adaptive to problem-solving. The skills you learn will open up new career opportunities and shape your future. Take a moment to appreciate how empowering that is. Wherever you are in your learning experience, the outcome is going to be rewarding and worthwhile. But is it going to be easy?
https://cdn.codecarrot.net/images/1049.jpeg
The Top 6 Programming Languages to Learn This Year2018-01-11T12:17:20+00:002018-01-11T12:17:20+00:00https://blog.codecarrot.net/the-top-6-programming-languages-to-learn-this-year<p>If you’re reading this, you’ve either decided to learn to code this year as a complete beginner or maybe you’re already a programmer and want to expand your skill set. Either way, you’re likely familiar with <a href="/tap-into-the-power-of-coding">the reasons</a> why learning to code is a worthwhile commitment and use of your time. But, you may also be wondering: Are there certain programming languages I should learn this year?</p>
<p>Here are the top 5 programming languages the <a href="//www.codecarrot.net/">CodeCarrot team</a> recommends for 2018, alongside the most compelling reasons why you should learn them.</p>
<h2 id="1-javascript">1. JavaScript</h2>
<p>JavaScript is an essential programming language to learn because it’s everywhere and in everything. What’s particularly great about JavaScript is that it works on both the client and server side so you can build offline apps, desktop apps, native apps, and even run it on IoT (Internet of Things) devices. It’s the universal programming language of the web and will continue to be, so if you’re unsure what to learn this year, you can’t go wrong with learning JavaScript.</p>
<p><strong>Bonus Tip:</strong> If you already know JavaScript, check out TypeScript next, which is an enhanced version of JavsScript that provides static typing, classes, and interfaces.</p>
<h2 id="2-python">2. Python</h2>
<p>Python has always been a popular programming language to learn as it’s incredibly beginner friendly. It isn’t verbose, and you’ll be able to build your coding skills quickly. In fact, we recently asked a selection of expert developers to share which programming language they recommended for a complete beginner and <a href="/whats-the-best-programming-language-for-a-beginner-to-learn-right-now">Python came out on top</a>. It’s also a great language to learn due to the ever-growing demand for it in the job market. Whatsmore, Python will be even more relevant to learn this year as it’s also the most popular language for machine learning, which is becoming increasingly important.</p>
<h2 id="3-c">3. C#</h2>
<p>Even though it was first released in 2000, C# has evolved at a steady pace and is still considered one of the most modern and popular programming languages used today. It’s easy to code and used in all types of software development. From writing web applications that run on most web servers, to mobile applications that run on practically any mobile device, and even in 3D games. In fact, C# will be a particularly valuable to learn this year as it’s used in Unity, which is the game engine that powers AR (Augmented Reality) and VR (Virtual Reality) experiences.</p>
<p>Another bonus to learning C# is that it can help prepare you to learn other languages. For example, C# and Java not only have similar syntax, they also share conceptual, architectural, and runtime similarities. So once you’ve grasped the fundamentals of C#, you ‘ll find yourself able to apply your understanding to other languages as well.</p>
<h2 id="4-go">4. Go</h2>
<p>The Go programming language is simple, powerful, and rapidly rising in popularity. The story of Go started with a team at Google writing a “wishlist” of goals they’d like to see in their ideal programming language. They wanted it to compile fast, the resulting programs to execute fast, to make it easy to write programs that support concurrency, and it to support garbage collection (the automatic freeing of unused memory, so they didn’t have to explicitly free memory in their code). The outcome was Go, and once you’ve started programming with it this year, you’ll see for yourself how well it meets all of their expectations. (We would recommend that you start learning Go once you’re comfortable with another language as you’ll find it easier to pick up if you’ve got some basic programming foundations.)</p>
<h2 id="5-android-with-kotlin">5. Android with Kotlin</h2>
<p>Compared to the other languages we’ve mentioned, Kotlin is relatively recent and only appeared back in 2011 as an open source project by JetBrains. Since then, Kotlin has grown to become a drop-in replacement for Java, giving Java developers the opportunity to upgrade to a more expressive language. JetBrains focused on efficiency when creating their new language, and you’ll experience the benefits of that early on when coding in Kotlin. In 2017, Google announced Kotlin was officially a supported language on the Android platform – which created a surge in popularity – and they’re working hard to get it on more platforms, making now the perfect time to invest in learning this rapidly growing language.</p>
<h2 id="6-ruby">6. Ruby</h2>
<p><a href="/pros-cons-ruby-on-rails">Ruby is a dynamic, reflective, object-oriented, general-purpose programming language</a>. According to its creator, Ruby was influenced by Perl, Smalltalk, Eiffel, Ada, and Lisp. It supports multiple programming paradigms, including functional, object-oriented, and imperative. It also has a dynamic type system and automatic memory management.</p>
<p>Matsumoto has said that Ruby is designed for programmer productivity and fun, following the principles of good user interface design. At a Google Tech Talk in 2008 Matsumoto further stated, <em>“I hope to see Ruby help every programmer in the world to be productive, and to enjoy programming, and to be happy. That is the primary purpose of Ruby language.”</em> He stresses that systems design needs to emphasize human, rather than computer, needs.</p>yashumittalIf you’re reading this, you’ve either decided to learn to code this year as a complete beginner or maybe you’re already a programmer and want to expand your skill set. Either way, you’re likely familiar with the reasons why learning to code is a worthwhile commitment and use of your time. But, you may also be wondering: Are there certain programming languages I should learn this year?
https://cdn.codecarrot.net/images/top-6-lang-of-2018.png
11 Organic Social Media Marketing Tactics to Increase Your Reach Online2018-01-11T09:30:00+00:002018-01-11T09:30:00+00:00https://blog.codecarrot.net/11-organic-social-media-marketing-tactics-to-increase-your-reach-online<p>There’s a world of difference (and difficulty) between using social media as a consumer versus harnessing it for your business.</p>
<p>Some people can post a picture of their kids to Facebook and see 100 Likes overnight. But small businesses with growing audiences might have a harder time trying to get the same results organically.</p>
<p>If you want to realize the long-term potential of social media, you can’t just focus only on promoting your products. You also need to incorporate tactics and types of content that create organic (unpaid) engagement.</p>
<p>Focusing on organic engagement as a pillar of your social media marketing:</p>
<ul>
<li><strong>Extends your organic reach</strong>, which you can then pay to amplify.</li>
<li><strong>Lowers the costs</strong> if you choose to pay to promote your posts.</li>
<li><strong>Establishes social proof by the numbers</strong> (total follower count and likes/shares on individual posts)</li>
<li><strong>Potentially turns your fans’ friends into followers</strong> if they see that someone they trust has engaged with your post.</li>
</ul>
<blockquote>
Social Media Marketing today might be 'pay to play', but organic engagement still matters. A lot.
</blockquote>
<p>Achieving this kind of real engagement, however, involves a mix of strategy and creativity. So, here are some tactics you should consider trying.</p>
<h2 id="1-unleash-a-thunderclap">1. Unleash a Thunderclap</h2>
<p>What if, instead of generating a consistent stream of likes and shares, you saved them all to go out at the same time—a strategic BOOM that could be heard all around the internet, all at once?</p>
<p>That’s the thinking behind Thunderclap, a platform that lets you collect Twitter, Facebook and Tumblr shares—the “digital voices” of your supporters—so that you can strategically let them loose at a time of your choosing in the future.</p>
<p><img src="https://i.imgur.com/PTZp7WI.jpg" alt="Thunderclap" /></p>
<p>Thunderclaps are great for social causes and product launches, and are best when used in tandem with membership sites like Patreon or crowdfunding sites like Kickstarter, to leverage the support you have there.</p>
<p>Keep in mind though, if you’re on the free plan, you’ll need to reach your supporter goal (a minimum of 100 supporters) or your Thunderclap won’t get shared.</p>
<h2 id="2-use-emojis-in-your-social-copy-to-boost-engagement-">2. Use Emojis in Your Social Copy to Boost Engagement 🚀</h2>
<p>Emojis have become an accepted part of our online vocabulary, and are a good way to spice up your social copy.</p>
<p>Larry Kim, Founder of Wordstream suggests using emojis in your social media posts to reliably boost organic engagement and lower the costs if you choose to pay to amplify them.</p>
<p>Used appropriately, emojis don’t just humanize your brand but also help you capture more attention by conveying the general emotion and ideas around a post even before a person has had a chance to read it.</p>
<p>In simpler terms, sprinkling an emoji into your social copy can earn you more eyeballs, attention, and reach ( In emojis: 😜 = 👀 + ⏳ + 🚀).</p>
<h2 id="3-pin-your-best-performing-posts-to-the-top-of-your-profile">3. Pin Your Best Performing Posts to the Top of Your Profile</h2>
<p>Any time you engage with others through a social profile, you’re not just building your online presence. There’s also a chance that those people you engage with might quickly check out your social profile feed and click through to your site or content.</p>
<p>Be sure you’re using all the features at your disposal so your profile communicates what you want and funnels clicks where you want:</p>
<ul>
<li>Update your cover photo to something eye-catching like a product image or a banner to promote a sale.</li>
<li>Include links back to your site in your bio or profile.</li>
<li>Strategically feature or “pin” a post at the top of your feed.</li>
</ul>
<p>While you might be inclined to pin a post about one of your products or promote a sale, also consider pinning posts that did particularly well so they can continue to show off your engaged audience plus generate retweets, likes and shares for you instead of simply getting buried.</p>
<p>This example from HubSpot shows what one tweet do become if you highlight it for a couple of weeks.</p>
<p><img src="https://i.imgur.com/oeUSRTi.jpg" alt="twitter pinned post hubspot" /></p>
<h2 id="4-be-active-on-the-right-hashtags">4. Be Active on the Right #Hashtags</h2>
<p>The hashtag has organized a big part of the social web according to conversations, making it easy to join in on discussions and events by posting under the ones that are relevant to your brand.</p>
<p>A social media monitoring tool like Hootsuite can help you find, like, retweet and reply to posts under several hashtags. Use Hashtagify to find other hashtags related to the one you’re trying to target, such as these food-related hashtags below.</p>
<p><img src="https://i.imgur.com/a34Jurs.jpg" alt="how to find popular hashtags" /></p>
<p>Be careful not to treat hashtags the same on every channel. According to data from Buffer, hashtags affect engagement differently depending on the social network:</p>
<ul>
<li><strong>Twitter posts</strong> with one hashtag generate 21% more engagements than tweets with three or more.</li>
<li><strong>Instagram posts</strong>, on the other hand, see the most engagement when using 11+ hashtags.</li>
<li><strong>Facebook posts</strong> do better without hashtags.</li>
</ul>
<p>If you know of a high-profile event coming up, you can prepare in advance to make sure you’re ready to get in on the action. The more targeted, the better. If you’re a fashion brand, for example, consider live-tweeting or covering high profile events and commenting on what celebrities are wearing.</p>
<p>Most events are accompanied by hashtags that you can hop on. But the key to hijacking a hashtag is not to hijack it at all. Instead, you should aim to contribute to the conversation in a meaningful, natural way.</p>
<h2 id="5-align-your-social-media-post-with-a-trending-topic">5. Align Your Social Media Post With a Trending Topic</h2>
<p>You can also reach new people with your social content by aligning your posts with trends that are relevant right now. If you pay attention to hashtags and news cycles, you can likely find an opportunity to add your voice to a conversation or parody what’s happening in the world.</p>
<p>Take this tweet from Pizza Pops, for example, that capitalizes on the hype and conversations around the Pokemon Go craze.</p>
<p><img src="https://i.imgur.com/ReXPuMg.jpg" alt="Pizza Pops" /></p>
<h2 id="6-tap-into-the-virality-of-memes">6. Tap into the Virality of Memes</h2>
<p>Memes have taken over social media. And I’m not just talking about the kind of meme you see below.</p>
<p>While these are some of the most common examples of memes, memes are a much larger phenomenon.</p>
<blockquote>
Memes are cultural behaviors that spread from person to person through imitation. That gives them an innate virality that businesses can use.
</blockquote>
<p>They don’t necessarily need to make sense at first—after all, they catch on through repetition. However, memes are only as effective as they are <strong>culturally relevant, easy to replicate and properly timed</strong>.</p>
<p>“Planking”, for example—the cultural phenomenon where people would take photos of themselves lying horizontally in random places—probably wouldn’t resonate as well with people today. Look out for memes that are trending right now and find ways to adopt them into your social strategy that relate to your brand.</p>
<p>You can find and make basic image memes using Meme Generator. Just be sure they’re memes your audience is familiar with, as memes function kind of like inside jokes where the uninitiated won’t get as much value from them.</p>
<h2 id="7-post-quotes-as-images">7. Post Quotes as Images</h2>
<p>A picture is worth a thousand words. But what if you layer words on top of your pictures?</p>
<p>You don’t need to do the math to know you’re doubling down on engagement by communicating with your audience through both language and imagery.</p>
<p>That’s where adding quotes on top of social images can be part of an effective strategy.</p>
<p><img src="https://i.imgur.com/D9V5Bnt.jpg" alt="word porn" /></p>
<p>When you quote well-known words, you also borrow some of their speaker’s credibility by associating yourself with them. So look for quotes that come from the people your audience adores and loves, and use Pablo by Buffer or Canva to bring them to life easily through drag-and-drop design.</p>
<p>Some good places to look for quotes include:</p>
<ul>
<li>Good Reads</li>
<li>Brainy Quote</li>
<li>Pinterest</li>
</ul>
<h2 id="8-tag-a-friend-who">8. “Tag a friend who…”</h2>
<p>Have you ever seen a post on Facebook and engaged with it after thinking “This is just like me” or “I know someone like that”?</p>
<p>That’s because it speaks to you as an individual while at the same time being relatable to many.</p>
<p>If your audience can see themselves in the things you post, it’s only natural they’ll be more inclined to consume and engage with them.</p>
<p>“Tag a friend who…” is a type of social media post you might’ve seen on Facebook or Instagram. Done right, these posts provoke others to tag their friends.</p>
<p>Consider using this strategy to encourage your audience to:</p>
<ul>
<li><strong>Highlight someone in a positive light:</strong> “Tag a friend you couldn’t live without”.</li>
<li><strong>Invite someone to take a challenge:</strong> “Tag 3 friends to take the ice bucket challenge”.</li>
<li><strong>Poke fun at a friend:</strong> “Tag a friend who snores really loudly”.</li>
</ul>
<p>Not only does this contribute comments to your posts, but each comment that includes a tagged friend will all but guarantee that they, too, at least visit your post.</p>
<p><img src="https://i.imgur.com/iRapNIU.jpg" alt="shape magazine" /></p>
<h2 id="9-run-a-contestgiveaway">9. Run a Contest/Giveaway</h2>
<p><a href="/how-to-grow-your-business-with-giveaways-and-viral-contests">Contests and giveaways</a> tend to produce significant engagement because they ask your audience to do relatively little for the opportunity to reap some reward.</p>
<p>The more compelling your prize, the more hoops people will jump through for the chance to come out on top.</p>
<p>You can run your contest directly on social media, or facilitate it with a tool like Gleam.io (which lets you do quite a bit with just the free version).</p>
<p>Try to establish what’s called a “viral loop”—ask every participant to refer a friend or take an action that has the potential to bring in new entrants.</p>
<h2 id="10-create-quizzes-and-other-interactive-content">10. Create Quizzes and Other Interactive Content</h2>
<p>In school, the idea of a quiz might’ve gotten groans from all around. But thanks to Buzzfeed, quizzes have made a strong comeback.</p>
<p>These pieces of interactive content work really well on social media—that is, if they can <strong>provoke quiz-takers to show off their results publicly</strong>.</p>
<p>To do that, you need to create a quiz that tells people something about themselves or how much they know, so they’re compelled to share it to reflect themselves.</p>
<p>If you want to try building your own, I suggest Playbuzz: a free and easy-to-use tool for creating interactive content, like this Which “Orange Is the New Black” Character Are You? quiz
pride designz quiz</p>
<p><img src="https://i.imgur.com/V1que1e.jpg" alt="Play Quiz" /></p>
<h2 id="11-give-the-gift-of-gifs">11. Give the Gift of GIFs</h2>
<p>A form of media that’s somewhere between a picture and a video, GIFs can be found everywhere thanks to their versatility.</p>
<p>Here are the best ways I’ve found to discover or create GIFs based on your unique needs:</p>
<ul>
<li>Source existing GIFs or create new ones on GIPHY (you can also customize them with captions)</li>
<li>Turn existing videos into GIFs and compress them for sharing.</li>
<li>Use Twitter’s built-in GIF function to add an animated GIF to your Tweets.</li>
<li>Use Boomerang to shoot your own video-GIFs on your phone that will play as a video loop on Instagram (like a Vine video).</li>
<li>Use AZ Screen Recorder to record your mobile device’s screen and turn the video into a GIF.</li>
</ul>
<p><strong>Incorporate GIFs into your social media strategy and give your audience a reason to smile.</strong></p>
<p><img src="https://i.imgur.com/ba8ytvE.gif" alt="Pug Dog Smiling" /></p>
<h2 id="social-media-marketing-needs-a-creative-touch">Social Media Marketing Needs a Creative Touch</h2>
<p>Effective social media marketing should involve curating content, scheduling product-related posts, and automating what you can.</p>
<p>But bringing out the best in social media marketing is about more than broadcasting your brand—it’s about understanding, engaging and reacting to your audience and the world they live in.</p>
<p>Because when so many brands use social media as a soapbox to pitch their products, it pays to be one of the ones building a real connection with their audience and adding a bit of joy to their day-to-day lives.</p>yashumittalThere’s a world of difference (and difficulty) between using social media as a consumer versus harnessing it for your business.
https://i.imgur.com/hKSLvLh.jpg
Networking Can Help Your Small Business Grow2018-01-11T09:00:00+00:002018-01-11T09:00:00+00:00https://blog.codecarrot.net/networking-can-help-your-small-business-grow<p>Is your small business taking advantage of networking? Networking is an amazing way to grow your business by leaps and bounds. Your business could be high on social media – keeping in touch with your clients and prospects online – but that’s not what we are talking about. Real connections mean much more than virtual ones.</p>
<h2 id="what-is-networking">What is Networking</h2>
<p><img src="https://i.imgur.com/ltSqISX.gif" alt="Touhcing Bahubali" /></p>
<p>Networking means staying connected in a business network with people who belong to similar or related industry, skill or business backgrounds.</p>
<p>The primary reason any business needs networking is to get referrals but another benefit of networking could also be a well-connected group of individuals with excellent skills from different backgrounds. A networking group could consist of individuals from different walks of life. Your network can prove to be a fertile ground to bounce off new ideas and gain more insights.</p>
<h2 id="staying-connected">Staying Connected</h2>
<p>Connections can make all the difference to your small business. Staying connected with the key players in your industry can open doors of opportunity for your business. If you are wondering how to manage networking to help your small business grow, we have outlined a few key points that you could consider.</p>
<h2 id="who-to-connect-with">Who to Connect With</h2>
<p>Connecting with everyone is not important, what you should focus on is connecting with the right people who can actually help your business grow. Research, observe and ask for recommendations to make the right kind of contacts.</p>
<h2 id="keep-in-touch">Keep in Touch</h2>
<p>Maintain a healthy relationship with members of your network. Keep in touch with them socially even if you do not require help from them or the other-way-around. Use and apply the information that you have gained by making connections for the betterment of your business.</p>
<h2 id="requesting-favors">Requesting Favors</h2>
<p>Seeking favours from anyone requires etiquette. You just cannot show up and say ‘do this for me’. If you really expect someone to help, you should know how to ask. Before you ask for something be willing to give. You must earn some brownie points in your network and prove yourself worthy before you ask for help. In this way you make sure are received well in the network.</p>
<h2 id="keep-abreast">Keep Abreast</h2>
<p>Stay updated about the trends of your industry, which will help you contribute valuable inputs to your network.</p>
<p>An ideal network is a balanced mix of mentors and like-minded businessmen who are willing to help each other. This group of people should be able to trust and support each other. You must know members of your network well enough to be comfortable in contacting and consulting your network for any business related advice or any other guidance required.</p>
<h2 id="avoid-controversy">Avoid Controversy</h2>
<p>Do not act sly. Promoting your product is good but do not use cheap tactics to push the members of your network into buying your product. If the members of your network sense your underlying intention, they will turn against you.</p>
<p>Stay away from any controversial or sensitive issues in your network, do not comment on anything that you are not sure about, so you do not end up hurting anyone or causing any damage to any relationships.</p>
<p>A well-connected and powerful network will not only get you referrals but also improve your business as well as your interpersonal skills. There is nothing more encouraging and motivating than a group of people who are willing to always help you and your business succeed.</p>
<p>Want to <a href="https://www.codecarrot.net/">make your small business online</a> with a website.</p>yashumittalIs your small business taking advantage of networking? Networking is an amazing way to grow your business by leaps and bounds. Your business could be high on social media – keeping in touch with your clients and prospects online – but that’s not what we are talking about. Real connections mean much more than virtual ones.
https://i.imgur.com/GUGR1xI.jpg
The 4Cs - A Code Review Mnemonic2018-01-07T22:38:09+00:002018-01-07T22:38:09+00:00https://blog.codecarrot.net/the-4cs-a-code-review-mnemonic<p>I’ve never been much into buying jewelry. However, even I knew that there was one particular purchase that would warrant careful thought and consideration: the diamond engagement ring for my future-fiancee. The diamond industry is more than happy to accommodate the ignorant, but sincere, purchaser. I quickly learned that, to be an informed diamond shopper, I needed to pay attention to “The 4Cs”—cut, color, clarity, and carat-weight; four properties by which I could evaluate these sparkly carbon crystals. I only used them once, and haven’t needed to evaluate diamond quality in over a decade, but for some reason I still remember those catchy “4Cs.”</p>
<p>Here at <a href="//www.codecarrot.net">CodeCarrot</a>, we spend an awful lot of time evaluating code quality. Good developers love to write good code, so naturally they discuss and debate what makes code good. Like evaluating a diamond, the thorough evaluation of code requires the consideration of multiple attributes. But unlike diamonds, there’s no industry association spending the big bucks to help developers remember which attributes to consider.</p>
<p>While the coding community does have a considerable amount of scholarship and industry experience to draw from, it is rarely distilled into pithy mnemonics like the “4Cs”. Of course, you can’t say in a jingle everything that should be said on a topic, but we sure do get a lot of mileage out of the short-hand names we use. When discussing code quality and design, acronyms like DRY, KISS, and YAGNI are used so often that they don’t just speed up our communication, they also influence the evaluations themselves. We come to expect to hear the terse “Keep it DRY” during code review, and from that we learn to factor out unnecessary duplication before we even write it (or at least before we submit it for review).</p>
<p>The popular code-quality mnemonics tend to address particular patterns or principles, but I can’t think of any that capture the kind of big-picture checklist of attributes that I actually use when evaluating code quality. The overarching properties of good code are: Correctness, Completeness, Conciseness, and Clarity.</p>
<p><img src="https://cdn.codecarrot.net/images/4cs-a-code-review-mnemonic.png" alt="4Cs" /></p>
<p>Since Creativity didn’t make the list, I call these the 4Cs of Code Review. It’s easy (and sometimes appropriate) to narrowly focus on one single aspect of code quality, but I prefer to use attributes that encourage the broadest possible evaluation. Therefore, I make sure that the attributes cover the super-categories of design (Form and Function) and of communication (Objective and Subjective).</p>
<p>To begin, I’ll explain the importance of the super-categories and how I use each one.</p>
<h2 id="both-function-and-form">Both Function and Form</h2>
<p>A comprehensive evaluation of code-quality needs to take into consideration both the form and the function of the code. Most developers find it pretty natural to focus on the code’s function: What does this code do? How does it behave? This is taking the computer’s perspective on things, and because the computer has the authoritative interpretation of exactly how that code will function, that’s a pretty important perspective to consider. But it’s not the only one.</p>
<p>Some developers are less inclined to evaluate the code’s form, that is, not only what the code says, but how the code says it. Perhaps because they’ve worked in an environment that didn’t appreciate how form and function are related in software; they were only ever evaluated based on the code’s immediate function. Whatever the reason, I find that developers sometimes need to be told that considering a code’s form is not only allowed, but required.</p>
<p>Form matters because code is meant to be read by other developers. So, we have to take the human perspective on things, as well as the computer’s. What does the code look like? How does it read? What does it imply? What is it similar to? How do I feel about it? In code, form and function are so intimately intertwined that it’s difficult to imagine good code that doesn’t excel in both aspects.</p>
<h2 id="both-objective-and-subjective">Both Objective and Subjective</h2>
<p>While evaluating code, we make both objective and subjective judgments. Objective things can be measured or proven: How fast will this run? Do the tests pass? How many lines of code are in this method? There’s a whole fascinating world of software metrics and static analysis techniques out there. Eventually, however, all of the objective data about your code still boils down to subjective opinion. Are 30 lines too many, or is 300ms too slow?</p>
<p>The subjective analysis depends on our past experiences with code, and on how we perceive the code: Is the code’s intent obvious? Is it clever and elegant, or esoteric and complex? In some ways, the subjective elements are harder to evaluate; or at least harder to agree on. Yet, they are even more important to the art of software engineering than the objective elements, because they are the reason the software is still written by humans. After all, software engineering is as much about the engineer as it is about the code. The things that can be measured objectively are one step away from automation, but the many things that can’t be measured still matter. The subjective value-judgments which shape the code will remain crucial as long as humans are the programmers.</p>
<p>Now that we’ve defined the categories in which code is evaluated, we can consider the 4Cs themselves; Correctness, Completeness, Conciseness, and Clarity. Each virtue describes a different aspect of good code, and understanding them individually is essential to evaluating code and to achieving them in your own code.</p>
<h2 id="correctness">Correctness</h2>
<p>Before diving into the fuzzier aspects of code evaluation, let’s get the cold, hard facts out of the way. At the end of the day, good code must be correct in the mathematical, verifiable, defect-free, bugless sense. It must always Do The Right Thing. If this is difficult to confirm, it’s usually because the code is unclear, or because the intended function of the code is not well-understood; which means you might need to clarify your specification.</p>
<p>Evaluating correctness is easier said than done. It requires a certain suspicious attitude and a critical eye. This doesn’t come naturally—it must be learned, practiced, and honed.</p>
<p>It’s easy to identify and ask questions to which you don’t know the answers. However the best way I know to learn to evaluate correctness, is asking lots of questions; especially questions to which you think you already know the answers. Doing this takes a healthy amount of self-suspicion, but that is exactly what’s necessary. After all, if you knew the code was correct, you’d be done already. By at least behaving as if you don’t know if the code is correct, or better even, don’t know much at all, you maximize your chances to notice when something is not correct. Looking back over the code, while treating it like suspect work, gives you eyes to see the errors you might otherwise miss.</p>
<p>It helps to have a bag full of “dumb” questions to evaluate correctness. Here are some I use:</p>
<ul>
<li>What exactly does this code do?</li>
<li>Does that agree with the author’s intent, as represented by code comments, commit messages, or other external documentation?</li>
<li>Is what the author intends self-consistent?</li>
<li>Does this code actually satisfy the specification?</li>
<li>Will the tests pass?</li>
<li>How will the code break? Will it fail gracefully or catastrophically?</li>
<li>Can this code be misused to produce an unexpected or invalid result?</li>
<li>Can this code be abused to do something nefarious?</li>
<li>How will the code behave in all the different contexts where it may run? (e.g. server-side, client-side, backgrounded)</li>
</ul>
<h2 id="completeness">Completeness</h2>
<p>Completeness certainly relates to correctness, so you might be tempted to treat completeness as just another component of correctness. Perhaps that’s true in some formal sense, but in the practical evaluation of code quality, completeness deserves its own consideration. Particularly because completeness is not always so straightforward as the black-and-white correctness.</p>
<p>To evaluate if code is complete, we must first identify its intended scope. We must decide, not only if the code correctly does what it does, but also if it accomplishes everything it needs to accomplish. In practice, it’s common to find code that is correct as far as it goes, yet fails to accomplish some portion of what it should. Often, this is simply the author’s failure to imagine the breadth of conditions under which the code may be used. Occasionally, scope is debatable. We may legitimately decide that some “edge” conditions are just not worth handling. For example, we may discover that our multi-tenant web app doesn’t handle cookies correctly when run from a hostname with no top-level domain (e.g. “localhost” instead of “localhost.test”). We don’t like to call these “bugs,” so we call them “limitations,” document them, and live with them.</p>
<p>Sometimes, even when it’s indisputable that our software should correctly handle some “edge” case, it’s not altogether clear whose responsibility that is. The author of the code under evaluation may believe that his code should be able to depend on invariant preconditions that aren’t actually being enforced. For example, an email notifier may assume that form validation has already rejected any email address that would cause a SMTP syntax error. In these cases, once there’s agreement about scope, and you’ve documented the decision, figuring out how to close the completeness gap is usually straightforward.</p>
<p>Incidentally, evaluating completeness can be more difficult for developers who are used to relying more mechanically on TDD. It’s impossible to write tests that exercise non-trivial code in all possible variations. Choosing representative examples in tests is part art. You still have to evaluate the code’s completeness with respect to its scope, not merely with respect to the tested cases.</p>
<p>These are some sample questions to help evaluate completeness:</p>
<ul>
<li>Does the code narrowly satisfy a specification which is itself incomplete?</li>
<li>What cases aren’t handled? (e.g. look for conditionals with no elses)</li>
<li>What is the code assuming? And should it? (e.g. that time always moves forward? that the entire list of users will fit in RAM?)</li>
<li>What environmental changes might cause a reasonable assumption to become unreasonable? (e.g. assuming a timely response from a webservice that might go out of business)</li>
</ul>
<h2 id="conciseness">Conciseness</h2>
<p>Concise code economically communicates the essential function, and is often clearer than less concise code. But, just as some consider completeness merely part of correctness, some consider conciseness as merely a prerequisite to clarity. In reality, clarity and conciseness have both a complementary and competitive relationship. Unclear code is often wordy and repetitive, but overly-verbose code can still be quite clear, despite its length. That doesn’t make it okay. Brevity is a virtue. At the same time, there’s a point where objectively more concise code becomes subjectively less clear. You should strive to find this elusive balance. Don’t sacrifice clarity on the altar of conciseness.</p>
<p>These sample questions can help you evaluate conciseness:</p>
<ul>
<li>Is there anything here that can be omitted without reducing any of the other 3 C’s?</li>
<li>Does the code give the appropriate emphasis, dwelling only on the most important things while breezing over the trivial details?</li>
<li>Are there idiomatic expressions that are appropriate short-hands for any of this code?</li>
<li>Are the lengths of variable/method/class names justified by their importance?</li>
</ul>
<h2 id="clarity">Clarity</h2>
<p>All code is communication, and all good code is clear communication. Good code clearly communicates its function and intent. Clarity in code has more in common with good old fashioned literary composition than most developers realize. A novel, a magazine article, and a feature branch all are meant to be read and understood; they all string together ideas and concepts to tell a story. They all reuse patterns, derive meaning from context, and imply relationships to their greater environments.</p>
<p>Clarity comes from the top-down (logical sequencing, coherent units of thoughts, familiar structures), as well as from the bottom-up (consistent use of punctuation, choosing meaningful names, precise use of the language’s grammar and syntax).</p>
<p>Writing clear code requires knowing your audience and accommodating your reader. It doesn’t always mean assuming a reader who is completely unaware of the advanced concepts and idioms of your language—that would be like always writing childrens’ books. Neither does it mean always using the most sophisticated expression of thought that you can come up with—that would be like always writing academic papers. Writing with the needs of a representative reader in mind results in clearer code.</p>
<p>Writing clear code is much more difficult than most developers realize, but evaluating code-clarity is easier than most developers realize. If you’re reviewing code in some professional capacity and you’ve put in a reasonable effort to understand it, but you are still lost, or even a little unsure, have the confidence to conclude that it’s not you—it’s the code. Sure, there’s the possibility that you’re just dumb, but I’ve trained an awful lot of developers and read an awful lot of code, and I can confidently say that the odds are pretty good that the code is more obtuse than you are. This even holds true if you are less experienced than the code’s author. Writing clear code doesn’t correlate with programming experience as strongly as you might expect. Trust your gut—if you think it could be clearer, it probably should be.</p>
<p>Here are a few sample questions to help evaluate clarity:</p>
<ul>
<li>Does this code do what I thought it did at first glance? If not, why not?</li>
<li>How long did it take me to really understand this code?</li>
<li>What’s this going to look like to a casual reader? After two beers? To me in 6 months?</li>
<li>Does the code really do what it seems to do?</li>
<li>Does the code contain any pointless innovation, something different from a more common approach, without good reason?</li>
<li>Does this code inspire confidence? (e.g. with adept use of interfaces and libraries)</li>
<li>Or does it create doubt? (e.g. with unnecessary double-checking)</li>
<li>Do the names chosen have any misleading connotations? (e.g. singular vs. plural variable names, method names that could ambiguously be a noun or a verb)</li>
<li>Are the names as precise as they should be?</li>
<li>Does the code have an even tone? (e.g. consistently assuming or not assuming familiarity with certain constructs)</li>
</ul>
<h2 id="conclusion">Conclusion</h2>
<p>So, what help is a long essay when you’re expected to give your teammate’s code some meaningful review? Remember this: a thorough code review means asking lots of questions. You’ll answer most yourself and some you’ll have to ask the author. Follow where the questions lead, and if you get stuck, just return to the 4Cs:</p>
<ul>
<li>Is it Correct?</li>
<li>Is it Complete?</li>
<li>Is it Concise?</li>
<li>Is it Clear?</li>
</ul>
<p>If you’re developing a web or mobile app and need help answering these questions, <a href="//www.codecarrot.net">CodeCarrot</a> might be able to help.</p>yashumittalI’ve never been much into buying jewelry. However, even I knew that there was one particular purchase that would warrant careful thought and consideration: the diamond engagement ring for my future-fiancee. The diamond industry is more than happy to accommodate the ignorant, but sincere, purchaser. I quickly learned that, to be an informed diamond shopper, I needed to pay attention to “The 4Cs”—cut, color, clarity, and carat-weight; four properties by which I could evaluate these sparkly carbon crystals. I only used them once, and haven’t needed to evaluate diamond quality in over a decade, but for some reason I still remember those catchy “4Cs.”
https://cdn.codecarrot.net/images/taras-shypka-424924.jpg
Your Roadmap to Creating Killer Blog Post Ideas2018-01-07T19:00:00+00:002018-01-07T19:00:00+00:00https://blog.codecarrot.net/your-roadmap-to-creating-killer-blog-post-ideas<p>Ideas are taking over.</p>
<p>They’re changing our world. Redefining who we are. Creating new opportunities.</p>
<p>Blogging itself started as an idea. An idea that evolved into a revolution. An idea that’s become so powerful that governments fear it.</p>
<p>No wonder the blogosphere has become a highly competitive place – where <em>most</em> blogs happen to be invisible.</p>
<p>Today, if you want your blog to stand out from the crowd, you need to be more than a blogger. You need to be an <em>idea</em> blogger.</p>
<h2 id="why-great-thinkers-make-great-bloggers">Why Great Thinkers Make Great Bloggers</h2>
<p>Blogging is a thinking game – where the one with the most profound thoughts wins.</p>
<p>All great bloggers are great thinkers first. Whether it’s <strong>Brian Clark</strong>, <strong>Darren Rowse</strong> or <strong>Leo Babauta</strong> – they know <em>how</em> to think, plan and execute.</p>
<p>People are done with average ‘me-too’ blogs. But sadly, most bloggers don’t get this.</p>
<p>The ones who do, end up attracting all the attention. Not because they’re anything special, but because they have the guts to think solutions. Think answers. Think ideas.</p>
<p>See, your thoughts are unique to yourself. They differentiate you from others. They have an identity of their own.</p>
<p>Your thoughts make you. Why not leverage them?</p>
<p>This world needs bloggers that lead by thought. Writers that create die hard fans out of readers. Dreamers that take charge of their dreams.</p>
<p>Becoming a thought leader allows you to:</p>
<ol>
<li>Build a personal brand</li>
<li>Create your own tribe</li>
<li>Get better word of mouth</li>
</ol>
<p>Gone are the days when blogging used to be “journaling” – now it’s more about “authoring”. Taking your readers through a whole new journey. And giving them the <em>royal</em> treatment.</p>
<p>Joshua Fields Millburn and Ryan Nicodemus call themselves The Minimalists. They write essays on minimalism with one simple mission: help people live a meaningful life with less stuff.</p>
<p>With over 100,000 monthly readers and growing, they know what they’re doing.</p>
<p>These guys successfully committed themselves to helping others think minimalistically. Which wouldn’t be possible if they weren’t great thinkers themselves.</p>
<p>Thought leadership isn’t about competition. Nope. It means creating new markets, new spaces.</p>
<p>And the key to influential blogging is to become a thought leader. After all, it’s what separates the men from the boys.</p>
<h2 id="beating-bloggers-block-like-a-pro">Beating Blogger’s Block Like a Pro</h2>
<p>Every blogger fears the dreaded blank screen. Not getting post ideas when you want them can be frustrating. It’s like having a “blackout” during an exam.</p>
<p>The blogger’s block is what we call it. A common speed bump experienced on the road to blogging.</p>
<p>Now, the problem isn’t that bloggers can’t come up with fine ideas. They <em>definitely</em> can. The real problem is that they’re too lazy to get creative.</p>
<p>Yes, you can easily find bloggable topics with some research. But is it worth it?</p>
<p>Writing what everyone else is writing, won’t take your blog to the next level or position you as an authority. Nor will it get you raving fans.</p>
<p>Understand that there’s a difference between finding topics and discovering <em>ideas.</em></p>
<p>Ideas come from creativity. And creativity comes from trusting your instincts.</p>
<p>Finding creative blog post ideas means:</p>
<ul>
<li>Looking at things from a different perspective</li>
<li>Bringing something fresh to the table and making it work</li>
<li>Creating unique concepts that are anything but typical</li>
<li>Experimenting with various ideas that inspire you</li>
</ul>
<p>Defeating the blogger’s block starts with your mindset. You have to let your imagination go wild and prepare to explore untouched horizons.</p>
<p>That’s how you get ideas worth talking about. That’s how you…</p>
<h2 id="become-an-idea-blogger">Become an Idea Blogger</h2>
<blockquote>
“The point is not to show up on a list, the point is to start a conversation that spreads, to share ideas and to chronicle your thinking. That’s the work of an author.” — Seth Godin
</blockquote>
<p>Conversations are all around us.</p>
<p>We’re constantly conversing with others. Giving opinions. Sharing thoughts. Discussing theories.</p>
<p>Why? Because we love to <em>let it out.</em></p>
<p>A successful blogger knows the importance of conversing. He aims at being the starting point of conversations.</p>
<p><img src="https://i.imgur.com/TMXs5jP.jpg" alt="Conversation at the Starting point" /></p>
<p>However, these conversations don’t happen just like that. They’re well planned, and are designed to spread.</p>
<p>What makes them work is they’re born out of ideas. Ideas that make a difference. Ideas that change lives. Ideas that <em>you</em> can come up with.</p>
<p>For a moment, imagine…</p>
<ul>
<li>What if every thought you chronicle gets people talking?</li>
<li>What if every blog post you write creates a buzz?</li>
<li>What if every idea you share gets you more readers?</li>
</ul>
<p>It’s not easy, but it’s possible. Idea blogging <em>makes</em> it possible.</p>
<p>As an idea blogger you are in better control of your readers. They listen to you and believe in you. They know you’re the real deal, which in turn earns you their trust.</p>
<p>But wait, what if your ideas get stolen?</p>
<p>That’s exactly what you want to happen. You <em>want</em> your readers to steal your ideas. Get inspired by them. Make them their own. And live them.</p>
<p>Unlike others, an idea blogger does not fear the theft of his ideas. He lets them spread, conquer and bring in more exposure to his blog.</p>
<p>However, there’s only one catch.</p>
<p>You can’t fake idea blogging. Sorry. Because your readers <em>will</em> figure it out. They’ll know if your ideas are truly remarkable, or a cheap imitation.</p>
<p>In the world of blogging, originality is <em>serious</em> business. And it won’t come to you unless you…</p>
<h2 id="get-absolute-clarity">Get Absolute Clarity</h2>
<p>Ever seen a grizzly bear catch fish?</p>
<p>When fishing, it tends to avoid the deep side of the river. And instead chooses to go for shallow, clear waters where the fish are easy to spot. Yes, grizzlies are smart.</p>
<p>Catching good bloggable ideas is like catching fish – bear style. You need clarity to spot them, or else they slip away.</p>
<p>Look, you <em>already</em> know how to produce the right ideas. But you won’t be able to do so unless you work on your cluttered/confused state of mind.</p>
<p>Clarity gives direction to your thoughts, and helps you:</p>
<ul>
<li>See the big picture, while focusing on the details</li>
<li>Think without the baggage</li>
<li>Channel your passion creatively</li>
<li>Form a fertile breeding ground for ideas</li>
</ul>
<p>The question that arises here is, what gives you this clarity?</p>
<p>The question that arises here is, what gives you this clarity?
It’s the very <em>first</em> step you take – which could be something as simple as noting down your thoughts, or brainstorming with your blogger friend. Basically <em>anything</em> that gets your thinking engine started.</p>
<p>Each step you take brings you closer to perfecting the art of thinking clearly. And recognizing original post ideas becomes much more easier.</p>
<p>As an idea blogger you have to be a doer. The more you act on your hunches and intuitions, the more clarity you’ll achieve.</p>
<p>However, identifying an idea is only the beginning. Yep, you also have to get clear <em>about</em> the idea itself. You need to learn what makes it tick in order to shape it the right way.</p>
<p>And that happens only when you know how to…</p>
<h2 id="connect-the-dots">Connect the Dots</h2>
<p>An idea is only an idea, until you connect the dots. That’s when you get to experience its depth. That’s when it becomes a living, breathing entity.</p>
<p>Remember playing the ‘Connect the Dots’ puzzle as a kid? Where you had to join the dots to reveal the picture?</p>
<p>It’s something like that.</p>
<p>The blog posts you write have to be well-defined. And for that, you should <em>know</em> your ideas well enough.</p>
<p>Initially, post ideas happen to be vague. They become clearer only when you mould them into content. Content that’s worth writing, reading, sharing and discussing.</p>
<p>Shaping your idea is just a matter of connecting the little dots that make it up.</p>
<h2 id="seeking-inspiration-and-finding-it">Seeking Inspiration and Finding It</h2>
<p>Some of the best bloggers are artists in the truest sense of the word.</p>
<p>They’re good at painting with their words. Adding color to their blogging canvas. And telling a story with their “art”.</p>
<p>They do what artists do best: creating masterpieces.</p>
<p>I’m not referring to a special breed of bloggers here. These are everyday people producing remarkable ideas time after time after time. They’re the ones who are taking blogging to the next level.</p>
<p>And the good thing is, <em>you</em> can be one of them.</p>
<p>Potential ideas are right there. Ready to be discovered, sculpted and crafted into blog posts. You only need the inspiration to find them.</p>
<p>There are five simple rules to seeking inspiration:</p>
<ol>
<li><strong>Don’t limit your reach –</strong> Inspiration can come from different directions. It could touch you in any form. So don’t put a cap on it. Explore as many sources as possible, because limiting your reach is limiting your creativity.</li>
<li><strong>Know what you want –</strong> Be clear about the kind of ideas you want. And know where you’re going, as seeking inspiration begins with clarity. Work with a steady plan so that you don’t miss out on any potential opportunities.</li>
<li><strong>Look within yourself –</strong> Sometimes ideas appear through unknown inspirations, which is why tapping into your inner self is as crucial as looking outside. A whole new world lies within you, don’t ignore it.</li>
<li><strong>Avoid making assumptions –</strong> Assuming can kill your ideas before they’re born. Stop jumping to conclusions. Be open-minded and let each of your inspirations develop. Give them time to grow.</li>
<li><strong>Be alert –</strong> Anything can inspire you at anytime, anywhere. So be awake, alert and self-aware. Period.</li>
</ol>
<p>Finding inspiration is not difficult, as long as you regularly…</p>
<h2 id="observe-analyze-learn">Observe, Analyze, Learn</h2>
<p>Let’s face it – generating sensible ideas can be daunting.</p>
<p>Why? Because it’s hard to think out of the box when you’re following the crowd.</p>
<p>Tapping into your creative genius requires you to ‘go beyond’- and look where no one’s looking. It requires you to harness the power of <em>observation.</em></p>
<p>An idea blogger knows what “being present” means. He’s constantly observing, analyzing and learning. That’s how he gets ideas that are so different.</p>
<p>When you skillfully observe…</p>
<p>…you notice what others miss
…you find inspiration in unknown places
…you stumble upon real facts
…and ideas “just appear” out of nowhere</p>
<p>Most people lack the patience to observe. They’re either too occupied or too busy. This is where <em>you</em> come in. You take out the time to observe, get ideas and share them with your readers.</p>
<p>Trust me, it’s no rocket science. Everything happening around you can teach you something. Something you can blog about. Something your readers want.</p>
<p>There are three basic areas you can focus on when observing – people, systems and events.</p>
<p>Let’s look into each one of them:</p>
<ol>
<li><strong>People</strong></li>
</ol>
<p>Yes, you can learn a great deal from people. Because they’re unique. And each one of them has a story to tell.</p>
<p>You obviously aren’t psychic to read minds. But you can still read into people by observing/analyzing their:</p>
<ul>
<li>Successes and failures</li>
<li>Habits and behaviors</li>
<li>Ethics and principles</li>
<li>Styles and techniques</li>
<li>Methods and ideologies</li>
<li>And much, much more</li>
</ul>
<p>These people can be anybody. They could be a celebrity, an expert or your next door neighbor. The point is to learn from them – and share your analysis with your readers.</p>
<ol>
<li><strong>Systems</strong></li>
</ol>
<p>The societies we live in are systems. The companies we work for are systems. The countries we belong to are governed by systems.</p>
<p>Systems are everywhere, and ever-changing. They improve as we move forward. They grow as we grow. And they come in all shapes and sizes.</p>
<p>Can you get ideas by analyzing systems in your industry?</p>
<p>The answer is yes. You can start by looking into:</p>
<ul>
<li>What systems are working and why</li>
<li>How the existing systems can be improved and refined</li>
<li>How new, effective systems can be created out of the older ones</li>
</ul>
<ol>
<li><strong>Events</strong></li>
</ol>
<p>Events can teach us a lot. Observing an event could give you ideas that can be translated into blog posts.</p>
<p>For instance, let’s say you run a tech blog. And one fine morning you come across the news that Microsoft has acquired Skype for $8.5 billion. Besides the obvious ‘news’ factor, could this event help you come up with a useful post idea? Heck yeah!</p>
<p>Regardless of your niche, you should have some notable events happening around you. Small or big, keep track of them and <em>dive</em> in with your magnifying glass.</p>
<p>Effectively learning from your chosen event requires you to:</p>
<ul>
<li>Observe it from an analytical point of view and look for details</li>
<li>Ask yourself questions, get curious and delve deeper</li>
<li>Simplify what you learn and throw in some of your own insight</li>
</ul>
<p>Doing this ‘mind-jogging’ exercise can give you not one, but <em>many</em> ideas to blog about.</p>
<p>Observation can be a powerful tool in the right hands. So besides focusing on the above three areas, see to it that you also…</p>
<h2 id="study-every-line-you-read">Study Every Line You Read</h2>
<p>A true-blue blogger reads a lot. He follows other blogs, devours books and regularly discovers content via social media. In short, he reads anything interesting that comes his way.</p>
<p>Don’t get me wrong – reading is great. In fact, it’s a habit that all bloggers should cultivate. But if you want ideas, you should try to <em>study</em> every line you read. You can’t simply scan through content and expect “eureka” moments.</p>
<p>You have to keep your eyes open for ideas. And actually study what you’re reading.</p>
<p><img src="https://i.imgur.com/syhUBso.jpg" alt="Reading the book" /></p>
<p>Anything profound that you read can help you get creative. Right from a thought provoking book to an informative article.</p>
<p>However, we’re <em>so</em> habituated to reading without thinking that we miss out on obvious ideas.</p>
<blockquote>
“Reading without thinking is nothing, for a book is less important for what it says than for what it makes you think.”
</blockquote>
<p>When looking for ideas while reading, choose the ones that you’re confident you can write on. The idea has to be relevant to your blog’s audience and easy to put on paper.</p>
<p>Ask yourself if you can write on it using at least one of the following:</p>
<ol>
<li><strong>Your Insight –</strong> Do you understand the idea better than others? Will you able to bring in more clarity to it? Do you have an opinion to share? Can you offer some kind of insight to your readers?</li>
<li><strong>Your Experience –</strong> Have you practically applied the idea yourself? Have you seen someone else do it? Do you have any results to share, or a story to tell? Can you vouch for it from personal experience?</li>
<li><strong>Your Research –</strong> Can you back the idea with research? Or add more meaning to it? Will you be able to elaborate on it with reference examples or factual data?</li>
</ol>
<p>The moment you start reading with alertness, ideas strike you from everywhere. However, reading isn’t the only way to get your creativity kicking – you can even…</p>
<h2 id="learn-while-you-watch">Learn While You Watch</h2>
<p>There’s something about learning by watching. Something that can’t be explained in words, but can only be experienced.</p>
<p>A lot of what you know today is because of what you watched, deciphered and absorbed in the past. Both consciously and subconsciously.</p>
<p>When you take control of this process, you’re able to:</p>
<ul>
<li>Churn out refreshing blog post ideas whenever you want</li>
<li>Rethink your concepts to understand what works and what doesn’t</li>
<li>See from a different, more unique angle</li>
<li>Give a new lease of life to your creativity</li>
</ul>
<p>What’s the secret to taking this control?</p>
<p>The secret is there is no secret. Since you’ve <em>been</em> doing it all along, what you need is a proper direction to focus your ‘watch & learn’ adventures. A direction called <em>video.</em></p>
<p>It’s not a secret how the Internet is becoming more and more video friendly. For a regular web user, this might mean a non-stop dose of entertainment. However, for bloggers it’s yet another way to hunt down cool ideas.</p>
<p>And no, I’m not referring to random videos featuring cute cats but videos that make you think. Videos that teach you something worth knowing. And give you a reason to be creative.</p>
<p>Yes, finding inspiration through a video can be frustrating. But what if I told you there’s an easier way?</p>
<p>Informative videos are usually centered around a <em>core</em> message. What you need to do is:</p>
<ol>
<li>Identify this core message as clearly as possible</li>
<li>Connect to it and understand what the video is trying to convey</li>
<li>Extract your own ideas out of it without losing your originality</li>
</ol>
<p>It doesn’t matter if the video is directly related to your blog’s subject or not. Because you’re not copying ideas – but seeking inspiration.</p>
<p>For instance, let’s say you run a fitness blog, and come across this TED Talk video of Tony Robbins where he talks about “why we do what we do”.</p>
<p>Could you possibly grab some motivational ideas from it? And customize them for your fitness audience?</p>
<p>Of course you can!</p>
<p>As long as you focus on getting inspired, you <em>will</em> find a way to discover ideas that are unique.</p>
<h2 id="pulling-ideas-out-of-thin-air">Pulling Ideas Out of Thin Air</h2>
<p>Picture this: A magician comes on stage, and pulls out a dove from his sleeve. The audience cheers and applauds as he pulls a few more out of nowhere. And you’re sitting there awestruck wondering how he did it.</p>
<p>The dove magic trick is a classic that’s been successfully used by magicians for decades.</p>
<p>However, what many don’t realize is the amount of work that goes into it. The magician dedicates a ton of time training, feeding and taking care of the doves to make the illusion look real. That’s how he’s able to do it so flawlessly.</p>
<p>Similarly, it’s possible to pull original ideas out of thin air. And believe me, there’s no magic in it. But then again, it doesn’t happen in a snap. It takes work.</p>
<p>For starters, you have to have options. Lots of them.</p>
<p>Why?</p>
<p>Because not every idea you have is gonna be a winner. Most of them will prove to be duds. So you need to keep coming up with an idea after an idea, until you strike gold.</p>
<p>In the words of Dr. Linus Pauling:</p>
<blockquote>
“The way to get good ideas is to get lots of ideas, and throw the bad ones away”.
</blockquote>
<p>Mastering the art of pulling ideas out of thin air takes time and practice. It means getting better at being persistent with ideas – <em>without</em> judging them.</p>
<p>Ultimately it doesn’t matter how many ideas you generate, but how disciplined you become at generating them. And for that you will have to…</p>
<h2 id="find-quality-time-to-think">Find Quality Time to Think</h2>
<blockquote>
“Thinking is hard work, which is why you don’t see many people doing it.” – Sue Grafton
</blockquote>
<p>Grafton’s right – thinking <em>is</em> hard work. But it’s also the ladder that leads you to ideas.</p>
<p>One of the most common mistakes bloggers make is: writing without having something to write about. I mean, c’mon – if you have no idea what to put on paper, how far can you possibly go?</p>
<p>Writing becomes less tedious and more fun when you actually <em>have</em> an idea. And to get that idea, you need to think. Yes, thinking is more necessary than you <em>think.</em></p>
<p><img src="https://i.imgur.com/YlMKauk.jpg" alt="Thinking what to write" /></p>
<p>Some of the best minds spend a fair amount of time doing nothing but thinking. So laying there, staring at the ceiling (or the sky) and pondering deep is not all that bad.</p>
<p>You might ask, “Aren’t we constantly thinking anyway?” – yes we are. But that’s not the point I’m trying to make. What I’m referring to is ‘constructive thinking’ or ‘thinking with a purpose’ where you:</p>
<ul>
<li>Specifically set aside time to think and reflect</li>
<li>Think freely without any preconceived notions</li>
<li>Focus your thoughts in the right direction</li>
<li>Have an end-result or goal in mind beforehand</li>
</ul>
<p>The time that you put into ‘dedicated thinking’ usually leads to multiple ideas. Some vague, some vivid and some downright awesome.</p>
<p>When you become a thinker you start enjoying the whole idea creation process.</p>
<p>But make sure you note down the ideas you get, so that you can separate the chaff from the wheat later on. Even better, go ahead and…</p>
<h2 id="create-a-wish-list">Create a Wish List</h2>
<p>Some of the most common advice given to bloggers is to “maintain an idea diary”, where ideas can be stored or recorded.</p>
<p>It’s a fine piece of advice, but for a moment let’s change an idea diary to a <em>wish list.</em></p>
<p>No, no, this has nothing to do with the ‘law of attraction’. What I’m asking you to do is create a list of ideas you <em>wish</em> to see in the blogosphere. Ideas that should be covered but nobody’s doing it or is at least doing it well.</p>
<p>You may not be the only one wishing for such content. Your readers could be looking for the same solutions or answers that you are.</p>
<p>Why not tap into your <em>own</em> wishes when searching for ideas? Makes sense, right?</p>
<p>Your wishes are desires that can be a source of inspiration. They could help you tap into your inner self, and uncover valuable ideas.</p>
<p>Creating a wish list isn’t hard, as long as you are able to:</p>
<p><strong>a) Keep track of relevant</strong> <strong><em>thoughts</em></strong></p>
<p>Make a note of any strong, relevant thoughts that come to you. So that later on you’re able to identify those wishes that can be turned into bloggable ideas.</p>
<p><strong>b) Stay aware of related</strong> <strong><em>wants</em></strong></p>
<p>Bloggers with a loyal audience usually get ‘post requests’ from readers asking them to cover certain topics. Being a reader yourself, stay aware of any such wants arising in your own mind when browsing through other related blogs.</p>
<p><strong>c) Understand</strong> <strong><em>problems</em></strong> <strong>within your niche</strong></p>
<p>Regardless of your blog’s topic, you’ll come across problems specific to your niche from time to time. When you recognize these problems and understand them better, you’re <em>pushed</em> to look for ideas to solve them.</p>
<p>Having said that, if you <em>really</em> want to become proficient at getting creative ideas then…</p>
<h2 id="be-eternally-curious">Be Eternally Curious</h2>
<p>Curiosity is what drives us. If you’re not curious, you’re not exploring. And if you’re not exploring, you’re not discovering.</p>
<p>If you want to discover fascinating blogging ideas, then dig deeper. Have the attitude of a learner, of someone who isn’t afraid to ask questions.</p>
<p>Look at kids, they have this insatiable appetite for knowledge. With their endless curiosity, there’s <em>nothing</em> too boring for them. They’re not afraid to ask questions that sometimes even baffle us adults. And they hardly take ‘no’ for an answer.</p>
<p>Being an idea blogger, you have to become a learner with a childlike curiosity. Because there’s a certain power in asking ‘Why?’. It can lead to ideas you could not have imagined before.</p>
<p>So how do you bring out the curious child in you?</p>
<ul>
<li><strong>Get super excited:</strong> You can’t drag yourself into being curious. The solution? Get mega excited and enthusiastic about what lies on the <em>other</em> side.</li>
<li><strong>Wonder and pursue:</strong> Every single time you hit a mental roadblock, you’re forced to wonder how to get past it. However, when you’re searching for ideas you don’t just wonder – you wonder <em>and</em> pursue answers.</li>
<li><strong>Know there is a way:</strong> Where there’s a will, there’s an idea. You might not see the way to it yet, but it’s out there somewhere. When you believe this with conviction, you naturally get curious enough to look for ideas and find them.</li>
<li><strong>Learn to unlearn:</strong> There is so much to learn out there – <em>so much</em>. However, it can’t be done with a closed mind. You have to learn to unlearn in order to relearn.</li>
<li><strong>Venture into the unknown:</strong> The uncertainty of the unknown can be crippling. But it can also be an opportunity for growth. So make it an habit to venture out into the unknown as it improves your curiosity level.</li>
</ul>
<h2 id="maximizing-your-chances">Maximizing Your Chances</h2>
<p>By now it should be clear that you need a consistent flow of ideas to make your blog successful. Not any ideas, but ideas that compel your readers to take action.</p>
<p>We’ve already seen where and how you can seek inspiration. We also learned how to come up with kick-ass ideas from scratch. So, what next? Do you stop here?</p>
<p>Nope. Certainly not.</p>
<p>As an idea blogger, you:</p>
<ul>
<li>Bring out the full potential of your creativity</li>
<li>Keep doing the unconventional</li>
<li>Train yourself at the thinking game</li>
<li>Increase your chances of finding worthy ideas</li>
</ul>
<p>Most bloggers do little to go beyond the traditional. Having no clear direction, they’re stuck up with the same rehashed topics.</p>
<p>However, when you’re idea blogging, things are different. You get to push limits. And do whatever it takes to improve your odds of creating winning content.</p>
<p>You learn how to…</p>
<h2 id="do-more-experience-more">Do More, Experience More</h2>
<p>Steve Jobs, a visionary and a creative genius, knew exactly what it takes to find breakthrough ideas. That’s how he transformed Apple and turned it into one of the most powerful tech companies in the world.</p>
<p>Here’s something he said that we bloggers can connect with:</p>
<blockquote>
“A lot of people in our industry haven’t had very diverse experiences. So they don’t have enough dots to connect, and they end up with very linear solutions without a broad perspective on the problem. The broader one’s understanding of the human experience, the better design we will have.”
</blockquote>
<p>Ring any bells? Yes, the Apple founder is specifically talking in terms of <em>experiences</em> when it comes to creating better design.</p>
<p>But his words also apply to creating better blog posts. Because in the end, blogging involves learning from experiences and sharing them with your readers. The more diverse these experiences are, the better it is.</p>
<p>Designing great blog content starts with finding better ideas. And these ideas come from your experiences. Like Jobs said, you have to have “enough dots to connect” to find new concepts.</p>
<p>Experiencing more does not mean you go and spend your day playing video games (unless you’re blogging about gaming of course). Your experiences should not only be diverse, but also meaningful.</p>
<p>And that only happens when you’re constantly doing and experiencing things relevant to your blog’s subject. Things that you haven’t thought about doing before.</p>
<p>So if you’re a tech blogger, you spend more time playing with the latest technology. If your blog’s subject is cooking, you try unique recipes or formulate your own. And so on.</p>
<p>Everywhereist isn’t your typical travel blog. What makes it stand out is that it’s built on the many unique experiences Geraldine has when traveling.</p>
<p>She’s always writing stories that her audience finds interesting. And it’s only because she isn’t afraid to experience something new.</p>
<p>The point I’m trying to make here is, even you can have your own share of learning experiences and end up with more ideas than you can handle. Your blog could be in the most obscure niche and still have the best content.</p>
<p>Experiencing more can be exciting and fun as long as you…</p>
<h2 id="crush-your-comfort-zone">Crush Your Comfort Zone</h2>
<p>Having different experiences may leave you with a number of ideas to play with. But the prerequisite to going through these varied experiences is that you accept change.</p>
<p>That’s right – change is where all it starts.</p>
<p>However, most of us happen to reject change. Why? Because uncertainty makes us uncomfortable. It makes us cling on to our comfort zone, rather than try something new.</p>
<p>Your comfort zone may be safe, but it invariably puts you in the ‘slow zone’. It halts your growth, cripples your creativity and limits your ideas. In short, it’s bad.</p>
<p><img src="https://i.imgur.com/JnkYIKf.jpg" alt="Where the magic happens" /></p>
<p>If you want to live experiences that lead to a great ideas, you have no choice but to break out of your comfort area. More like <em>crush</em> it.</p>
<p>Creating remarkable blogging ideas takes guts. You can’t idly sit there, do nothing and wait for that ‘Aha!’ moment.</p>
<p>Go out there and make change happen. Don’t just push the envelope, put it through the paper shredder!</p>
<p>Here’s how…</p>
<ul>
<li><strong>Take the road less traveled:</strong> Be brave enough to tread untrodden paths. Paths that seem scary at first, but turn out to be amazing experiences. Because going down the road that everyone else is taking will only lead you to crowded ideas.</li>
<li><strong>Kill your catastrophic fantasies:</strong> Get real and say no to creating catastrophic fantasies in your mind. What will happen and what you <em>think</em> will happen are two completely different things. Don’t exaggerate your fears. Stop being negative and start doing positive.</li>
<li><strong>Jump without looking down:</strong> Let thrilling experiences become a part of your blogging life. Take your leaps without looking down. Become a daredevil, an adventurer who likes facing challenges at every step.</li>
<li><strong>Replace fear with fun:</strong> Give fear a toss and let fun take its place. Enjoy doing the unusual and put your discomfort aside. The moment you embrace change without pain, you evolve. And jump to the other side of your fear – opening doors to unique ideas.</li>
<li><strong>Get familiar with the unfamiliar:</strong> Spend more time knowing the unfamiliar. Explore the unexplored side of your niche. Teach yourself what needs to be learned to find blogging ideas that ignite and change conversations.</li>
</ul>
<p>Remember, the only reason why people don’t want to move out of their comfort zone is to avoid failure. And the way to deal with failure is to…</p>
<h2 id="turn-experiences-into-experiments">Turn Experiences into Experiments</h2>
<p>There, I just gave you the secret formula to not fail again.</p>
<p>The thing is, when you treat new experiences as experiments, you don’t fail – you get <em>feedback</em>. This feedback can then be used to come up with unique blog post ideas, and to improve future experiments.</p>
<p>It also makes risk taking easy because you’re no longer worried about the result. What you care about is the conclusion.</p>
<p>And the anticipation of ‘not knowing what lies ahead’ makes each experiment so much more exciting. You literally go from “What if it doesn’t happen?” to “Let’s see what happens!”… which, if you ask me, is huge.</p>
<p>So let go of your inhibitions and become a “mad scientist” blogger. Go crazy with your experiments. Create innovative ideas. And give your readers the content they deserve.</p>yashumittalIdeas are taking over.
https://i.imgur.com/UIRDakc.jpg
Should I use Grid or Flexbox?2018-01-07T09:42:00+00:002018-01-07T09:42:00+00:00https://blog.codecarrot.net/should-i-use-grid-or-flexbox<p>the differences between Flexbox and CSS Grid Layout. Right now, we can only use CSS Grid Layout by enabling browser flags, however once Grid ships there will be many layout tasks where we could argue for the use of Grid or Flexbox as the solution. Here are some thoughts.</p>
<h2 id="major-layouts-vs-ui-elements">Major layouts vs. UI elements</h2>
<p>When people first encounter CSS Grid Layout, they tend to think of Grid as being the controller of the major page layout, providing a framework for headers and sidebars, main content and footers.</p>
<iframe src="https://www.facebook.com/plugins/video.php?href=https%3A%2F%2Fwww.facebook.com%2Fcodecarrotinc%2Fvideos%2F405444293300591%2F&show_text=0&width=560" width="100%" height="350" style="border:none;overflow:hidden" scrolling="no" frameborder="0" allowtransparency="true" allowfullscreen="true"></iframe>
<p>You can see this use case in this example. Only the direct children become a Grid Item and so by declaring a Grid on my wrapper the header, panel, content and footer all become Grid Items and can be placed onto that Grid. Any elements inside those main containers can then be laid out by whichever method makes sense.</p>
<p>Flexbox is not so well suited to creating these types of layouts. It is certainly possible to create a simple layout like the one above using Flexbox. However once flex items wrap, each row (or column if working with flex-direction: column), becomes a flex container itself. Space distribution happens across that row or column, you lose the ability to line things up with items in rows above.</p>
<p>Here we find the biggest difference between Grid and Flexbox. Flexbox is essentially for laying out items in a single dimension – in a row OR a column. Grid is for layout of items in two dimensions – rows AND columns.</p>
<h2 id="one-dimensional-vs-two-dimensional">One dimensional vs. Two dimensional</h2>
<p>Here is the most simple example of one versus two dimensional layout.</p>
<iframe src="https://www.facebook.com/plugins/video.php?href=https%3A%2F%2Fwww.facebook.com%2Fcodecarrotinc%2Fvideos%2F405442316634122%2F&show_text=0&width=560" width="100%" height="350" style="border:none;overflow:hidden" scrolling="no" frameborder="0" allowtransparency="true" allowfullscreen="true"></iframe>
<p>In the top layout I am using Flexbox to display a set of “cards”. The container has flex-wrap set to wrap and so the flex items wrap onto two lines, I have set flex-grow to 1, flex-shrink to 1 and flex-basis to 200 pixels. So my ideal box width is 200 pixels, but items are able to grow larger and shrink smaller.</p>
<p>If my viewport is at a small enough width to display three boxes on row one, two boxes then wrap below. As flex-grow is set to 1, this means that the space leftover after the flex-basis value has been removed is shared equally between those boxes. Row one has three boxes, which are narrower than the boxes on row two where there are only two boxes.</p>
<p>This is how flexbox works. However, most of the flexbox problems I am asked about are due to developers trying to make flexbox do layout in two dimensions. This is where you need Grid Layout.</p>
<p>In the Grid version we define our grid on the wrapper element, the Grid Items then just drop into the Grid Cells already defined. So an item can line up with other items in the row but also in the column. If we want one of our items to stretch over two column or rows tracks we would need to target that item in some way.</p>
<h2 id="working-from-the-content-out-vs-working-from-the-grid-definition-in">Working from the content out vs. working from the Grid definition in</h2>
<p>What we see in the above example is how when we use Grid Layout we declare our grid and the content of any grid item then has to adapt to fit the shape of the area it is placed in.</p>
<p>If you have a bunch of items, don’t need them to line up with any other elements, but just want them displayed evenly and flexibly, you want flexbox. The most basic of examples demonstrates the behaviour of items getting an equal amount of space between them using justify-content: space-between.</p>
<p><img src="chrome_2018-01-06_15-25-18.png" alt="Working from the content out vs. working from the Grid definition in" /></p>
<p>Grid implements the space distribution and alignment properties that are part of the Box Alignment Module, so there are possibilities to play with the alignment and spacing of grid items to some degree, but the fact remains that due to the two dimensional approach of grid, you can’t make one row of the grid behave differently to the one above. Instead you’ll need to change the properties on the individual grid items. Making them span more cells, or use different alignment values.</p>
<p>So there is your choice. Do you want to let your content control the way it is displayed, on a row by row or column by column basis? That’s flexbox.</p>
<p>Or, do you want to define a grid, and either allow items to be auto-placed into the cells defined by that grid, or control their positioning using line-based positioning or grid template areas. That’s grid.</p>yashumittalthe differences between Flexbox and CSS Grid Layout. Right now, we can only use CSS Grid Layout by enabling browser flags, however once Grid ships there will be many layout tasks where we could argue for the use of Grid or Flexbox as the solution. Here are some thoughts.
https://cdn.codecarrot.net/images/one-dimensional-vs-two-dimensional.png
React Native Can Slash Your Mobile Development Costs by 30 Percent2018-01-06T22:38:09+00:002018-01-06T22:38:09+00:00https://blog.codecarrot.net/react-native-can-slash-your-mobile-development-costs-by-30-percent<p><a href="/9-great-apps-written-with-react-native">React Native is becoming extremely popular in mobile development among small companies and well-established enterprises</a>. We’ve also seen a big interest in React Native coming from our clients, so we decided to conduct a small study to see what’s behind the framework’s success.</p>
<h2 id="increasing-interest-in-react-native">Increasing Interest in React Native</h2>
<p>React Native has gained popularity at a quick pace. The number of queries on Google Search about React Native has doubled over the last six months.</p>
<p><img src="https://cdn.codecarrot.net/images/image2-1.png" alt="image2-1.png" /></p>
<p>There is also a rising demand for React Native developers. Using Indeed, we verified trends concerning jobs in mobile development. It turned out that there is an increasing number of React Native skill requirements in job postings, whereas the trend for Android developers is slowly declining.</p>
<p><img src="https://cdn.codecarrot.net/images/image3-2.png" alt="image3-2.png" /></p>
<p><img src="https://cdn.codecarrot.net/images/image1-8.png" alt="image1-8.png" /></p>
<p>Finally, we’ve noticed that clients interested in mobile development are more responsive to information about React Native. Our Business Development Team has recently sent outreach messages targeted at clients interested in mobile app development, and this time, they included information about development in React Native. The response rate, in comparison to messages without React Native has tripled!</p>
<h2 id="6-reasons-why-react-native-has-gained-on-popularity">6 Reasons Why React Native Has Gained on Popularity</h2>
<p><strong>1. You can save on development time for mobile apps.</strong></p>
<p><a href="/why-you-should-consider-react-native-for-your-mobile-app">React Native enables you to transfer the codebase or its part between different mobile platforms</a>. Once you write an app for iOS devices, you can compile it onto Android in a short period of time (and vice versa). The amount of code you can share between platforms will depend on native modules you want to use. However, we’ve noticed that in our latest React Native project, the development took us 33% less time than it would have taken, if we had been developing for iOS and Android natively.</p>
<p><strong>2. There are additional savings when having a React web app and a React native mobile app.</strong></p>
<p>Most companies need both a website and a mobile app. React code for Web relies on features available in Web browsers and React Native code is based on the features available on a given mobile platform. However, you can still reuse large chunks of the code between the mobile and web apps. The future is also bright and we might be able to copy even more code from React to React Native and vice versa.</p>
<p><strong>3. Teams are smaller.</strong></p>
<p>At the moment, you will still need native developers to develop a React Native app – they need to be able to create custom modules that expose a native feature to Javascript and consult configuration, setup, and other specifications. Depending on the number of native modules, their input will differ, but the total number of developers required in the React Native project will be smaller. It was well explained in the talk by <strong>Tal Kol during ReactNext 2016</strong>. For a product owner or a project manager, it means a smaller team to manage and lower costs. It also allows more flexibility in building the team and mixing seniority, because you do not need a separate expert for each platform.</p>
<div data-type="youtube" data-video-id="abSNo2P9mMM"></div>
<p><strong>4. Facebook supports it.</strong></p>
<p>React Native is an open-source framework, yet, there is a big player behind it who controls its quality. Facebook puts a lot of resources to ensure React Native’s reliability and also to guarantee a constant development of the platform. The company leverages React Native in their own applications, and it’s been here with us for 4 years, so we can expect that Facebook won’t kill it unexpectedly.</p>
<p><strong>5. Skype, AirBnB and Instagram already use it for their mobile apps.</strong></p>
<p><a href="/9-great-apps-written-with-react-native">Many well-known brands have embraced React Native in mobile app development</a>. It provides a social proof for other companies that the framework is reliable and can be used in various types of applications.</p>
<p><strong>6. React Native apps can be as fast as native apps.</strong></p>
<p>Most apps are not pure React Native apps, because they have some parts written in native. If we encounter some performance issues with React Native, we can transfer some code to a native module, and the performance is no longer an issue. We should always use the tools for the tasks that they are good at. React Native is great for UI, and whenever we need some advanced features in the app, we can still use a native module for that.</p>
<p>The data that we’ve collected clearly shows that React Native has gained momentum and it doesn’t seem to slow down. It might be due to the size of the very active JS community that picked up <a href="/4-kinds-of-applications-to-build-with-react-native">React Native quickly or to its promise to facilitate building apps more efficiently</a>, which has proved to be right in many projects. Developers and app founders have noticed RN benefits, and we can see more and more companies jumping on the bandwagon and developing mobile apps with Facebook’s framework.</p>
<p>If you want to discuss the potential benefits of using React Native in your project, give us a shout at <a href="mailto:contact@codecarrot.net">contact@codecarrot.net</a>.</p>yashumittalReact Native is becoming extremely popular in mobile development among small companies and well-established enterprises. We’ve also seen a big interest in React Native coming from our clients, so we decided to conduct a small study to see what’s behind the framework’s success.
https://cdn.codecarrot.net/images/pexels-photo-58625.jpeg
Ruby on Rails Invoicing Solutions Comparison2018-01-06T19:58:35+00:002018-01-06T19:58:35+00:00https://blog.codecarrot.net/ruby-on-rails-invoicing-solutions-comparison<p>Invoicing is one of the most important and most complex parts of almost every application that allows its users to perform payments. All the numbers, taxes, fields, rules, and equations can give a developer quite a headache. Fortunately, many solutions for invoicing exist and, even more fortunately, many of them are available in Rails. Let’s take a look at some of the ways we can implement invoicing in our Ruby on Rails app.</p>
<p>To present every solution as objectively as possible, I’ll use the same set of criteria for all of them (usually by giving from one to five points in each category):</p>
<ul>
<li><strong>Ease of use:</strong> how easy it is to use and implement the solution</li>
<li><strong>Maintenance:</strong> if the solution still maintained by its creators (based on the date of the last commit)</li>
<li><strong>Comprehensiveness:</strong> how complex and universal the solution is</li>
<li><strong>Usability:</strong> how many useful functions it offers</li>
</ul>
<p>For the solutions available on GitHub, I’ll also take a look at two other important things:</p>
<ul>
<li><strong>Stars:</strong> how popular it is based on Github stars (let’s assume for the sake of this review that 250 stars is a very good result)
<ul>
<li>200-250 stars = 5 points</li>
<li>150-199 stars = 4 points</li>
<li>100-149 stars = 3 points</li>
<li>50-99 stars = 2 points</li>
<li>0 - 49 stars = 1 point.</li>
</ul>
</li>
<li><strong>Open issues:</strong> how many issues (bugs or missing functionalities) have been reported and have not yet been resolved (the bigger the number the worse)
<ul>
<li>0-1 issue = 5 points</li>
<li>2-4 issues = 4 points</li>
<li>5-7 issues = 3 points</li>
<li>8-9 issues = 2 points</li>
<li>10 issues and more = 1 point.</li>
</ul>
</li>
</ul>
<h2 id="code-mancersinvoicing">code-mancers/invoicing</h2>
<p><a href="//github.com/code-mancers/invoicing">Github</a></p>
<p>The gem named “invoicing” will probably be the first thing you will encounter when searching for invoicing solutions for your Rails service. It offers a wide range of functionalities. Here are only some of them (taken from the official documentation):</p>
<ul>
<li>representing customer and supplier accounts, as well as multi-party billing relationships;</li>
<li>automatically rounding currency values to the customary precision for that currency, e.g. based on the smallest coin in circulation;</li>
<li>supporting any number of different currencies simultaneously;</li>
<li>rendering invoices, account statements etc. into a fully customisable HTML document;</li>
<li>providing default Value Added Tax (VAT) implementation and the ability to plug in your own tax logic;</li>
<li>summarising account balances, sales statements, etc. under chosen conditions (e.g. data from one quarter, or payments due at a particular date).</li>
</ul>
<p>Sounds good, doesn’t it? Let’s add very easy installation and initialisation, many useful features and well-written guides, and we may end up with the perfect solution at the very beginning of our little investigation. Unfortunately, things start to get a bit disappointing when you check the date of the last commit and see “3 years ago”. What a shame!</p>
<table>
<thead>
<tr>
<th>Description</th>
<th>Rating</th>
</tr>
</thead>
<tbody>
<tr>
<td>Ease of use</td>
<td>4</td>
</tr>
<tr>
<td>Maintenance</td>
<td>1</td>
</tr>
<tr>
<td>Comprehensiveness</td>
<td>4</td>
</tr>
<tr>
<td>Usability</td>
<td>3</td>
</tr>
<tr>
<td>Stars</td>
<td>197</td>
</tr>
<tr>
<td>Open issues</td>
<td>6</td>
</tr>
<tr>
<td><strong>Total</strong></td>
<td><strong>3</strong></td>
</tr>
</tbody>
</table>
<h2 id="siwappsiwapp">siwapp/siwapp</h2>
<p><a href="//github.com/siwapp/siwapp">Github</a></p>
<p>This piece of code isn’t a gem. Instead, it’s an out-of-the-box solution for invoice management based on Rails. It’s described as “an open source web application meant to help manage and create invoices in a simple, straightforward way”. It is still maintained (the last commits are three months old) and offers a basic range of useful functionalities, e.g. drafting, printing, as well as managing customers and products. It also comes with a nice plain layout and seems to be very easy to use. Even if you don’t need a separate solution, you can still find some inspiration in siwapp on how to improve your own approach to invoicing in your app.</p>
<table>
<thead>
<tr>
<th>Description</th>
<th>Rating</th>
</tr>
</thead>
<tbody>
<tr>
<td>Ease of use</td>
<td>5</td>
</tr>
<tr>
<td>Maintenance</td>
<td>4</td>
</tr>
<tr>
<td>Comprehensiveness</td>
<td>3</td>
</tr>
<tr>
<td>Usability</td>
<td>4</td>
</tr>
<tr>
<td>Stars</td>
<td>106</td>
</tr>
<tr>
<td>Open issues</td>
<td>9</td>
</tr>
<tr>
<td><strong>Total</strong></td>
<td><strong>3.5</strong></td>
</tr>
</tbody>
</table>
<h2 id="ianmurraysactive_invoices">ianmurrays/active_invoices</h2>
<p><a href="//github.com/ianmurrays/active_invoices">Github</a></p>
<p>Another out-of-the-box solution for invoicing created in Rails is called <em>active_invoices</em>. Its name comes from the gem it’s based on, called <em>active_admin</em>, which provides a basic administration panel. The author describes it as a “very simple invoicing application”, and these words are the most accurate review it could receive. But simplicity doesn’t always come hand in hand with usefulness. Especially that it hasn’t been maintained since the end of 2012 (maybe the end of the world that year was real in some cases after all).</p>
<table>
<tbody>
<tr>
<td>Ease of use</td>
<td>4</td>
</tr>
<tr>
<td>Maintenance</td>
<td>0</td>
</tr>
<tr>
<td>Comprehensiveness</td>
<td>2</td>
</tr>
<tr>
<td>Usability</td>
<td>2</td>
</tr>
<tr>
<td>Stars</td>
<td>150</td>
</tr>
<tr>
<td>Open issues</td>
<td>1</td>
</tr>
<tr>
<td><strong>Total</strong></td>
<td><strong>2.5</strong></td>
</tr>
</tbody>
</table>
<h2 id="external-api">External API</h2>
<p>When none of the out-of-the-box solutions to our invoicing problem fit our needs, it’s good to consider some other options. There are plenty of tools and applications meant to help with creating and managing invoices, many of them offering their own APIs. This usually offers us more possibilities and functionalities, but, on the other hand, implementing a complete solution is much more time consuming. It’s definitely sensible to consider such an option if we need a complex solution, or we just want to have everything under absolute control. In exchange for higher implementation costs, you will receive a custom high-quality solution adjusted to your needs.</p>
<p>Here are some online invoicing and accounting providers who offer nice and rich APIs:</p>
<ul>
<li>Xero</li>
<li>Freshbooks</li>
<li>Zoho</li>
</ul>
<p>If you want to learn more and see some real-life examples, check out our article about <a href="/how-to-use-xero-api-for-invoicing-in-ruby-on-rails">How to use Xero API for invoicing in Ruby on Rails</a>.</p>
<table>
<tbody>
<tr>
<td>Ease of use</td>
<td>2</td>
</tr>
<tr>
<td>Maintenance</td>
<td>5</td>
</tr>
<tr>
<td>Comprehensiveness</td>
<td>5</td>
</tr>
<tr>
<td>Usability</td>
<td>5</td>
</tr>
<tr>
<td><strong>Total</strong></td>
<td>4</td>
</tr>
</tbody>
</table>
<h2 id="custom-implementation">Custom implementation</h2>
<p>In case not a single one of the presented solutions fit your needs (or maybe they offer too many functionalities you don’t need), you can still have a tailor-made invoicing system for your app. It’s time-consuming as well, but it’s definitely worth giving a try – especially if you don’t need complex calculations and features, only simple invoice generation based on users’ orders. In our article “<a href="/how-to-do-basic-invoicing-for-your-ruby-on-rails-application">How to do basic invoicing for your Ruby on Rails application</a>”, you can have a look at one possible approach to this topic, which uses the gem “invoicing” mentioned at the beginning of this analysis.</p>
<table>
<tbody>
<tr>
<td>Ease of use</td>
<td>3</td>
</tr>
<tr>
<td>Maintenance</td>
<td>5</td>
</tr>
<tr>
<td>Comprehensiveness</td>
<td>4</td>
</tr>
<tr>
<td>Usability</td>
<td>4</td>
</tr>
<tr>
<td><strong>Total</strong></td>
<td>4</td>
</tr>
</tbody>
</table>
<h2 id="summary">Summary</h2>
<p>To cut a long story short, Ruby on Rails offers many solutions to many needs, and invoicing is not an exception. Even if certain popular gems are no longer maintained, you can still have exactly what you need by using external APIs for invoicing tools or just by having your own custom implementation. The Polish application inFakt is a very complex and useful tool for invoicing and accounting (it is an online accounting office), and it’s based on Ruby on Rails. There is no better proof that the sky is the limit with the help of your imagination and experienced developers.</p>yashumittalInvoicing is one of the most important and most complex parts of almost every application that allows its users to perform payments. All the numbers, taxes, fields, rules, and equations can give a developer quite a headache. Fortunately, many solutions for invoicing exist and, even more fortunately, many of them are available in Rails. Let’s take a look at some of the ways we can implement invoicing in our Ruby on Rails app.
https://cdn.codecarrot.net/images/money-money-380438-edited.jpeg
Why React Is Taking Over Front-End Development?2018-01-06T15:59:00+00:002018-01-06T15:59:00+00:00https://blog.codecarrot.net/why-react-is-taking-over-front-end-development<p><img src="https://cdn.codecarrot.net/images/1_3IUcek7o2S5aJnFAgtP5Gg.png" alt="React popularity graph" /></p>
<p><em>The focus of this article is about React’s popularity and not how it compares to other frameworks or libraries</em></p>
<p>Here are a few reasons why React has become so popular so quickly:</p>
<ul>
<li>Working with the DOM API is hard. React basically gives developers the ability to work with a virtual browser that is more friendly than the real browser. React’s virtual browser acts like an agent between the developer and the real browser.</li>
<li>React enables developers to declaratively describe their User Interfaces and model the state of those interfaces. This means instead of coming up with steps to describe transactions on interfaces, developers just describe the interfaces in terms of a final state (like a function). When transactions happen to that state, React takes care of updating the User Interfaces based on that.</li>
<li>React is just JavaScript, there is a very small API to learn, just a few functions and how to use them. After that, your JavaScript skills are what make you a better React developer. There are no barriers to entry. A JavaScript developer can become a productive React developer in a few hours.</li>
</ul>
<p>But there’s a lot more to it than just that. Let’s attempt to cover all the reasons behind React’s rising popularity. One reason is its Virtual DOM (React’s reconciliation algorithm). We’ll work through an example to show the actual practical value of having such an algorithm at your command.</p>
<p>React’s official definition states that it’s a <em>JavaScript library for building User Interfaces</em>. It’s important to understand the two different parts of this definition:</p>
<ol>
<li>React is a <em>JavaScript library</em>. It’s not a framework. It’s not a complete solution and we’ll often need to use more libraries with React to form any solution. React does not assume anything about the other parts in any full solution. It focuses on just one thing, and on doing that thing very well.</li>
<li>The thing that React does really well is the second part of the definition: <em>building User Interfaces</em>. A User Interface is anything we put in front of users to have them interact with a machine. User Interfaces are everywhere, from the simple buttons on a microwave to the dashboard of a space shuttle. If the device we’re trying to interface can understand JavaScript, we can use React to describe a User Interface for it.</li>
</ol>
<p>Since Web browsers understand JavaScript, we can use React to describe Web User Interfaces. I like to use the word <em>describe</em> here because that’s what <em>we</em> basically do with React, we just tell it what we want and React will build the actual User Interfaces, on our behalf, in the Web browser. Without React or similar libraries, we would need to manually build User Interfaces with native Web APIs and JavaScript.</p>
<p>When you hear the statement that “React is declarative,” this is exactly what it means, we describe User Interfaces with React and tell it what we want (not how to do it). React will take care of the “how” and translate our declarative descriptions (which we write in the React language) to actual User Interfaces in the browser. React shares this simple declarative power with HTML itself, but with React, we get to be declarative for HTML interfaces that represent dynamic data, not just static data.</p>
<p>React has three main design concepts that drive its popularity:</p>
<h2 id="1-the-use-of-reusable-composable-and-stateful-components">1. The use of reusable, composable, and stateful components</h2>
<p>In React, we describe User Interfaces using components. You can think of components as simple functions (in any programming language). We call functions with some input and they give us some output. We can reuse functions as needed and compose bigger functions from smaller ones.</p>
<p>Components are exactly the same; we call their input “properties” and “state”, and a component output is a description of a User Interface (which is similar to HTML for browsers). We can reuse a single component in multiple User Interfaces, and components can contain other components.</p>
<p>Unlike pure functions however, a full React component can have a private state to hold data that may change over time.</p>
<h2 id="2-the-nature-of-reactive-updates">2. The nature of reactive updates</h2>
<p>React’s name is the simple explanation for this concept. When the state of a component (the input) changes, the User Interface it represents (the output) changes as well. This change in the description of the User Interface has to be reflected in the device we’re working with.</p>
<p>In a browser, we need to regenerate the HTML views in the Document Object Model (DOM). With React, we do not need to worry about <em>how</em> to reflect these changes, or even manage <em>when</em> to take changes to the browser; React will simply <em>react</em> to the state changes and automatically update the DOM when needed.</p>
<h2 id="3-the-virtual-representation-of-views-in-memory">3 . The virtual representation of views in memory</h2>
<p>With React, we write HTML using JavaScript. We rely on the power of JavaScript to generate HTML that depends on some data, rather than enhancing HTML to make it work with that data. Enhancing HTML is what other JavaScript frameworks usually do. For example, Angular extends HTML with features like loops, conditionals, and others.</p>
<p>When we receive just the data from the server (in the background, with AJAX), we need something more than HTML to work with that data. It’s either using an enhanced HTML, or using the power of JavaScript itself to generate the HTML. Both approaches have advantages and disadvantages. React embraces the latter one, with the argument that the advantages are stronger than the disadvantages.</p>
<p>In fact, there is one major advantage that can make the case for this approach by itself; using JavaScript to render HTML makes it easy for React to keep a virtual representation of HTML in memory (which is commonly known as <em>The Virtual DOM</em>). React uses the Virtual DOM to render an HTML tree virtually first, and then, every time a state changes and we get a new HTML tree that needs to be taken to the browser’s DOM, instead of writing the whole new tree React will only write the difference between the new tree and the previous tree (since React has both trees in memory). This process is known as <em>Tree Reconciliation</em>, and I think, it is the best thing that has happened in Web Development since AJAX!</p>
<p>In the following example, we’ll focus on this last concept and see a simple practical example of the tree reconciliation process and the big difference it makes. We’ll write the same HTML example twice, first using native Web APIs and vanilla JavaScript, and then we’ll see how to describe the same HTML tree with React.</p>
<p>To purely focus on this last concept, we will not be using components, and we will mock a state change operation using a JavaScript timer. We are also not going to use JSX, although using JSX will make for a much simpler code. I use JSX all the time when I write React, but working with React API directly in this example will hopefully make you understand this concept much better.</p>
<h2 id="reacts-reconciliation-algorithm-example">React’s reconciliation algorithm example</h2>
<p>To follow along with this example, you need a browser and a code editor. You can actually use an online coding playground, but I’ll use local files and test them directly in a browser (we don’t need a web server):</p>
<p>We’ll start this example from scratch. Create a new directory, and launch your favorite editor there:</p>
<div class="highlighter-rouge"><div class="highlight"><pre class="highlight"><code>mkdir react-demo
cd react-demo
atom .
</code></pre></div></div>
<p>Create an <code class="highlighter-rouge">index.html</code> file in that directory, and put a standard HTML template in there. Include in that template a <code class="highlighter-rouge">script.js</code> file and put a <code class="highlighter-rouge">console.log</code> statement in that script to test that the include works:</p>
<div class="language-html highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="cp"><!DOCTYPE html></span>
<span class="nt"><html></span>
<span class="nt"><head></span>
<span class="nt"><meta</span> <span class="na">charset=</span><span class="s">"utf-8"</span><span class="nt">></span>
<span class="nt"><title></span>React Demo<span class="nt"></title></span>
<span class="nt"></head></span>
<span class="nt"><body></span>
<span class="nt"><script </span><span class="na">src=</span><span class="s">"script.js"</span><span class="nt">></script></span>
<span class="nt"></body></span>
<span class="nt"></html></span>
</code></pre></div></div>
<p>Open the <code class="highlighter-rouge">index.html</code> file in your browser and make sure you can see the empty template without problems, and that you can see in the Console dev-tools tab the <code class="highlighter-rouge">console.log</code> test message that you put in <code class="highlighter-rouge">script.js</code>:</p>
<div class="highlighter-rouge"><div class="highlight"><pre class="highlight"><code>open index.html # On Mac
explorer index.html # On Windows
</code></pre></div></div>
<p>Now, let’s bring in the React library itself, which we can include from the <a href="//facebook.github.io/react/docs/installation.html">Reactjs website</a>. Copy both the <code class="highlighter-rouge">react</code> and <code class="highlighter-rouge">react-dom</code> scripts, and include them in <code class="highlighter-rouge">index.html</code>:</p>
<div class="language-html highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="nt"><script </span><span class="na">src=</span><span class="s">"https://unpkg.com/react@15/dist/react.js"</span><span class="nt">></script></span> <span class="nt"><script </span><span class="na">src=</span><span class="s">"https://unpkg.com/react-dom@15/dist/react-dom.js"</span><span class="nt">></script></span>
</code></pre></div></div>
<p>We’re including two different scripts here for an important reason: The <code class="highlighter-rouge">React</code> library itself can be used without a browser. To use React with a browser, we need the <code class="highlighter-rouge">ReactDOM</code> library.</p>
<p>When we refresh the browser now, we should see both <code class="highlighter-rouge">React</code> and <code class="highlighter-rouge">ReactDOM</code> available on the global scope:</p>
<p><img src="https://cdn.codecarrot.net/images/1_g5-fvPYO0bTelGckK9RWzA.png" alt="Image captured in Chrome" /></p>
<p><em>Image captured in Chrome</em></p>
<p>With this simple setup, we can now access both <code class="highlighter-rouge">React</code> and <code class="highlighter-rouge">ReactDOM</code> APIs, and of course, we also have access to the native Web APIs and JavaScript which we are going to use first.</p>
<p>To insert HTML dynamically in the browser we can simply use pure JavaScript and the DOM Web API itself. Let’s create a <code class="highlighter-rouge">div</code> element to host our JavaScript HTML content and give it the id <code class="highlighter-rouge">"js"</code>. In the body element of <code class="highlighter-rouge">index.html</code>, right before the <code class="highlighter-rouge">script</code> tag, add:</p>
<div class="language-html highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="nt"><div</span> <span class="na">id=</span><span class="s">"js"</span><span class="nt">></div></span>
</code></pre></div></div>
<p>Now in <code class="highlighter-rouge">script.js</code>, let’s grab this new <code class="highlighter-rouge">div</code> element by its id and put it in a constant. Let’s name this constant <code class="highlighter-rouge">jsContainer</code>. We can use <code class="highlighter-rouge">document.getElementById</code> to grab the <code class="highlighter-rouge">div</code> from HTML:</p>
<div class="language-js highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="kd">const</span> <span class="nx">jsContainer</span> <span class="o">=</span> <span class="nb">document</span><span class="p">.</span><span class="nx">getElementById</span><span class="p">(</span><span class="dl">"</span><span class="s2">js</span><span class="dl">"</span><span class="p">);</span>
</code></pre></div></div>
<p>To control the content of this <code class="highlighter-rouge">div</code>, we can use the <code class="highlighter-rouge">innerHTML</code> setter call on the <code class="highlighter-rouge">div</code> element directly. We can use this call to supply any HTML template that we want inserted in the DOM. Let’s insert a <code class="highlighter-rouge">div</code> element with a class of “demo” and the string “Hello JS” as its content:</p>
<div class="language-js highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="nx">jsContainer</span><span class="p">.</span><span class="nx">innerHTML</span> <span class="o">=</span> <span class="s2">`
<div class="demo">
Hello JS
</div>
`</span><span class="p">;</span>
</code></pre></div></div>
<p>Make sure this works in the browser. You should see the “Hello JS” line on the screen now.</p>
<p>This demo div is our User Interface so far. It’s a very simple one. We just output a text for the user to see.</p>
<p>Both <code class="highlighter-rouge">document.getElementById</code> and <code class="highlighter-rouge">element.innerHTML</code> are actually part of the native DOM Web API. We are communicating with the browser directly here using the supported APIs of the Web platform. When we write React code, however, we use the React API instead, and we let React communicate with the browser using the DOM Web API.</p>
<p>React acts like our <em>agent</em> for the browser, and we <em>mostly</em> need to communicate with just React, our agent, and not the browser itself. I say mostly because there are cases where we still need to communicate with the browser, but those are rare.</p>
<p>To create the exact same User Interface that we have so far but with React API this time, let’s create another <code class="highlighter-rouge">div</code> element and give it an id of <code class="highlighter-rouge">"react"</code>. In <code class="highlighter-rouge">index.html</code>, right under the <code class="highlighter-rouge">div#js</code> element, add:</p>
<div class="language-html highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="nt"><div</span> <span class="na">id=</span><span class="s">"react"</span><span class="nt">></div></span>
</code></pre></div></div>
<p>Now, in <code class="highlighter-rouge">script.js</code>, create a new container constant for the new <code class="highlighter-rouge">div</code>:</p>
<div class="language-js highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="kd">const</span> <span class="nx">reactContainer</span> <span class="o">=</span> <span class="nb">document</span><span class="p">.</span><span class="nx">getElementById</span><span class="p">(</span><span class="dl">"</span><span class="s2">react</span><span class="dl">"</span><span class="p">);</span>
</code></pre></div></div>
<p>This container will be the only call we make to the native web API. ReactDOM needs this container to know where to host our application in the DOM.</p>
<p>With the react container identified, we can now use the ReactDOM library to <code class="highlighter-rouge">render</code> React’s version of the HTML template to this container:</p>
<div class="language-js highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="nx">ReactDOM</span><span class="p">.</span><span class="nx">render</span><span class="p">(</span>
<span class="cm">/* TODO: React's version of the HTML template */</span><span class="p">,</span>
<span class="nx">reactContainer</span>
<span class="p">)</span>
</code></pre></div></div>
<p>What we’re going to do next is your first milestone in truly understanding the React library. Remember when I told you that with React we write HTML using JavaScript? This is exactly what we are going to do next.</p>
<p>To write our simple HTML User Interface, we are going to use JavaScript calls to React API, and by the end of the example you’ll have a better picture about the reason for doing so.</p>
<p>Instead of working with strings (as we did in the native JavaScript example above), in React, we work with <em>objects</em>. Any HTML string will be represented as an object using a <code class="highlighter-rouge">React.createElement</code> call (which is the core function in the React API).</p>
<p>Here’s the equivalent HTML User Interface we have so far with React:</p>
<div class="language-js highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="nx">ReactDOM</span><span class="p">.</span><span class="nx">render</span><span class="p">(</span>
<span class="nx">React</span><span class="p">.</span><span class="nx">createElement</span><span class="p">(</span>
<span class="dl">"</span><span class="s2">div</span><span class="dl">"</span><span class="p">,</span>
<span class="p">{</span> <span class="na">className</span><span class="p">:</span> <span class="dl">"</span><span class="s2">demo</span><span class="dl">"</span> <span class="p">},</span>
<span class="dl">"</span><span class="s2">Hello React</span><span class="dl">"</span>
<span class="p">),</span>
<span class="nx">reactContainer</span>
<span class="p">);</span>
</code></pre></div></div>
<p><code class="highlighter-rouge">React.createElement</code> has many arguments:</p>
<ul>
<li>The first argument is the HTML tag, which is <code class="highlighter-rouge">div</code> in our example.</li>
<li>The second argument is an object that represents any attributes we want this tag to have. To match the native JS example we used <code class="highlighter-rouge">{ className: "demo" }</code> which translates to <code class="highlighter-rouge">class="demo"</code>. Note how we used <code class="highlighter-rouge">className</code> instead of <code class="highlighter-rouge">class</code> in the attributes because with React it’s all JavaScript that matches the Web API, not HTML itself.</li>
<li>The third argument is the content of the element. We’ve put a “Hello React” string in there.</li>
</ul>
<p>We can test this now. The browser should render both “Hello JS” and “Hello React”. Let’s style the demo divs as a box, using this CSS, just so that we can visually split the screen. In <code class="highlighter-rouge">index.html</code>:</p>
<div class="language-html highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="nt"><style </span><span class="na">media=</span><span class="s">"screen"</span><span class="nt">></span>
<span class="nc">.demo</span> <span class="p">{</span>
<span class="nl">border</span><span class="p">:</span> <span class="m">1px</span> <span class="nb">solid</span> <span class="m">#ccc</span><span class="p">;</span>
<span class="nl">margin</span><span class="p">:</span> <span class="m">1em</span><span class="p">;</span>
<span class="nl">padding</span><span class="p">:</span> <span class="m">1em</span><span class="p">;</span>
<span class="p">}</span>
<span class="nt"></style></span>
</code></pre></div></div>
<p><img src="https://cdn.codecarrot.net/images/1_TwcqWtECXp6OA0mowRcvEA.png" alt="Image captured in Chrome" /></p>
<p><em>Image captured in Chrome</em></p>
<p>We now have two nodes, one being controlled with the DOM Web API directly, and another being controlled with the React API (which in turn uses the DOM Web API). The only major difference between the ways we are building these two nodes in the browser is that in the JS version we used a string to represent the content, while in the React version we used pure JavaScript calls and represented the content with an object instead of a string.</p>
<p>No matter how complicated the HTML User Interface is going to get, when using React, every HTML element will be represented with a JavaScript object using a <code class="highlighter-rouge">React.createElement</code> call.</p>
<p>Let’s now add some more features to our simple User Interface. Let’s add a text box to read input from the user.</p>
<p>To nest elements in our HTML template, it’s straight forward in the JS version because it’s just HTML. For example, to make the demo <code class="highlighter-rouge">div</code> render an <code class="highlighter-rouge"><input /></code> element, we simply add it to the content:</p>
<div class="language-js highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="nx">jsContainer</span><span class="p">.</span><span class="nx">innerHTML</span> <span class="o">=</span> <span class="s2">`
<div class="demo">
Hello JS
<input />
</div>
`</span><span class="p">;</span>
</code></pre></div></div>
<p>We can do the same with React by adding more arguments after the 3rd argument for <code class="highlighter-rouge">React.createElement</code>. To match what we did in the native JS example, we can add a 4th argument that is another <code class="highlighter-rouge">React.createElement</code> call that renders an <code class="highlighter-rouge">input</code> element (remember, every HTML element is an object):</p>
<div class="language-js highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="nx">ReactDOM</span><span class="p">.</span><span class="nx">render</span><span class="p">(</span>
<span class="nx">React</span><span class="p">.</span><span class="nx">createElement</span><span class="p">(</span>
<span class="dl">"</span><span class="s2">div</span><span class="dl">"</span><span class="p">,</span>
<span class="p">{</span> <span class="na">className</span><span class="p">:</span> <span class="dl">"</span><span class="s2">demo</span><span class="dl">"</span> <span class="p">},</span>
<span class="dl">"</span><span class="s2">Hello React</span><span class="dl">"</span><span class="p">,</span>
<span class="nx">React</span><span class="p">.</span><span class="nx">createElement</span><span class="p">(</span><span class="dl">"</span><span class="s2">input</span><span class="dl">"</span><span class="p">)</span>
<span class="p">),</span>
<span class="nx">reactContainer</span>
<span class="p">);</span>
</code></pre></div></div>
<p><em>At this point, if you’re questioning what we’re doing and thinking “this is complicating a simple process”, you are totally right! But there is a very good reason for what we’re doing. Keep reading.</em></p>
<p>Let’s also render a timestamp in both versions. In the JS version, let’s put the timestamp in a paragraph element. We can use a call to new Date() to display a simple timestamp:</p>
<div class="language-js highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="nx">jsContainer</span><span class="p">.</span><span class="nx">innerHTML</span> <span class="o">=</span> <span class="s2">`
<div class="demo">
Hello JS
<input />
<p></span><span class="p">${</span><span class="k">new</span> <span class="nb">Date</span><span class="p">()}</span><span class="s2"></p>
</div>
`</span><span class="p">;</span>
</code></pre></div></div>
<p>To do the same in React, we add a 5th argument to the top-level <code class="highlighter-rouge">div</code> element. This new 5th argument is another <code class="highlighter-rouge">React.createElement</code> call, this time using a <code class="highlighter-rouge">p</code> tag, with no attributes, and the <code class="highlighter-rouge">new Date()</code> string for content:</p>
<div class="language-js highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="nx">ReactDOM</span><span class="p">.</span><span class="nx">render</span><span class="p">(</span>
<span class="nx">React</span><span class="p">.</span><span class="nx">createElement</span><span class="p">(</span>
<span class="dl">"</span><span class="s2">div</span><span class="dl">"</span><span class="p">,</span>
<span class="p">{</span> <span class="na">className</span><span class="p">:</span> <span class="dl">"</span><span class="s2">demo</span><span class="dl">"</span> <span class="p">},</span>
<span class="dl">"</span><span class="s2">Hello React</span><span class="dl">"</span><span class="p">,</span>
<span class="nx">React</span><span class="p">.</span><span class="nx">createElement</span><span class="p">(</span><span class="dl">"</span><span class="s2">input</span><span class="dl">"</span><span class="p">),</span>
<span class="nx">React</span><span class="p">.</span><span class="nx">createElement</span><span class="p">(</span>
<span class="dl">"</span><span class="s2">p</span><span class="dl">"</span><span class="p">,</span>
<span class="kc">null</span><span class="p">,</span>
<span class="k">new</span> <span class="nb">Date</span><span class="p">().</span><span class="nx">toString</span><span class="p">()</span>
<span class="p">)</span>
<span class="p">),</span>
<span class="nx">reactContainer</span>
<span class="p">);</span>
</code></pre></div></div>
<p>Both JS and React versions are still rendering the exact same HTML in the browser.</p>
<p><img src="https://cdn.codecarrot.net/images/1_fLaNHWXUJh4ICEvMXByvwg.png" alt="Image captured in Chrome" /></p>
<p><em>Image captured in Chrome</em></p>
<p>As you can see, so far, using React is actually a lot harder than the simple and familiar native way. What is it that React does so well that’s worth giving up the familiar HTML and having to learn a new API to write what can be simply written in HTML? The answer is not about rendering the first HTML view, it’s about what we need to do to update any existing view in the DOM.</p>
<p>So, let’s do an update operation on the DOM we have so far. Let’s simply make the timestamp tick every second.</p>
<p>We can easily repeat a JavaScript function call in a browser using the <code class="highlighter-rouge">setInterval</code> Web timer API. So, let’s put all of our DOM manipulations for both JS and React versions in a function, call it <code class="highlighter-rouge">render</code>, and use it in a <code class="highlighter-rouge">setInterval</code> call to make it repeat every second.</p>
<p>Here’s the full final code in <code class="highlighter-rouge">script.js</code>:</p>
<div class="language-js highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="kd">const</span> <span class="nx">jsContainer</span> <span class="o">=</span> <span class="nb">document</span><span class="p">.</span><span class="nx">getElementById</span><span class="p">(</span><span class="dl">"</span><span class="s2">js</span><span class="dl">"</span><span class="p">);</span>
<span class="kd">const</span> <span class="nx">reactContainer</span> <span class="o">=</span> <span class="nb">document</span><span class="p">.</span><span class="nx">getElementById</span><span class="p">(</span><span class="dl">"</span><span class="s2">react</span><span class="dl">"</span><span class="p">);</span>
<span class="kd">const</span> <span class="nx">render</span> <span class="o">=</span> <span class="p">()</span> <span class="o">=></span> <span class="p">{</span>
<span class="nx">jsContainer</span><span class="p">.</span><span class="nx">innerHTML</span> <span class="o">=</span> <span class="s2">`
<div class="demo">
Hello JS
<input />
<p></span><span class="p">${</span><span class="k">new</span> <span class="nb">Date</span><span class="p">()}</span><span class="s2"></p>
</div>
`</span><span class="p">;</span>
<span class="nx">ReactDOM</span><span class="p">.</span><span class="nx">render</span><span class="p">(</span>
<span class="nx">React</span><span class="p">.</span><span class="nx">createElement</span><span class="p">(</span>
<span class="dl">"</span><span class="s2">div</span><span class="dl">"</span><span class="p">,</span>
<span class="p">{</span> <span class="na">className</span><span class="p">:</span> <span class="dl">"</span><span class="s2">demo</span><span class="dl">"</span> <span class="p">},</span>
<span class="dl">"</span><span class="s2">Hello React </span><span class="dl">"</span><span class="p">,</span>
<span class="nx">React</span><span class="p">.</span><span class="nx">createElement</span><span class="p">(</span><span class="dl">"</span><span class="s2">input</span><span class="dl">"</span><span class="p">),</span>
<span class="nx">React</span><span class="p">.</span><span class="nx">createElement</span><span class="p">(</span>
<span class="dl">"</span><span class="s2">p</span><span class="dl">"</span><span class="p">,</span>
<span class="kc">null</span><span class="p">,</span>
<span class="k">new</span> <span class="nb">Date</span><span class="p">().</span><span class="nx">toString</span><span class="p">()</span>
<span class="p">)</span>
<span class="p">),</span>
<span class="nx">reactContainer</span>
<span class="p">);</span>
<span class="p">}</span>
<span class="nx">setInterval</span><span class="p">(</span><span class="nx">render</span><span class="p">,</span> <span class="mi">1000</span><span class="p">);</span>
</code></pre></div></div>
<p>When we refresh the browser now, the timestamp string should be ticking every second in both versions. We are now updating our User Interface in the DOM.</p>
<p><em>This is the moment when React will potentially blow your mind.</em> If you try to type something in the text box of the JS version, you won’t be able to. This is very much expected because we’re basically throwing away the whole DOM node on every tick and regenerating it. However, if you try to type something in the text box that’s rendered with React, you can certainly do so!</p>
<p>Although the whole React rendering code is within our ticking timer, React is changing only the timestamp paragraph and not the whole DOM node. This is why the text input box was not regenerated and we were able to type in it.</p>
<p>You can see the different ways we’re updating the DOM visually if you inspect the two DOM nodes in a Chrome dev tools elements panel. The Chrome div tools highlights any HTML elements that get updated. You’ll see how we are regenerating the whole “js” div on every tick, while React is smartly only regenerating the paragraph with the timestamp string.</p>
<p><img src="https://cdn.codecarrot.net/images/1_9RGpVv6Mwjl6LApR7vsYqA.gif" alt="Image captured in Chrome" /></p>
<p><em>Image captured in Chrome</em></p>
<p>React has a smart <em>diffing</em> algorithm that it uses to only regenerate in its DOM node what actually <em>needs</em> to be regenerated while it keeps everything else as is. This diffing process is possible because of React’s virtual DOM and the fact that we have a representation of our User Interface in memory (because we wrote in JavaScript).</p>
<p>Using the virtual DOM, React keeps the last DOM version in memory and when it has a new DOM version to take to the browser, that new DOM version will also be in memory, so React can compute the difference between the new and the old versions (in our case, the difference is the timestamp paragraph).</p>
<p>React will then instruct the browser to update only the computed diff and not the whole DOM node. No matter how many times we regenerate our interface, React will take to the browser only the new “partial” updates.</p>
<p>Not only is this method a lot more efficient, but it also removes a big layer of complexity for the way we <em>think</em> about updating User Interfaces. Having React do all the computations about whether we should update the DOM or not enables us to focus on thinking about our data (state) and the way to describe a User Interface for it.</p>
<p>We then manage the updates on our data as needed without worrying about the steps needed to reflect these updates on the actual User Interface in the browser (because we know React will do exactly that and it will do that in an efficient way!)</p>yashumittal
https://cdn.codecarrot.net/images/1_3IUcek7o2S5aJnFAgtP5Gg.png
Understanding React Native flexbox layout2018-01-06T09:28:49+00:002018-01-06T09:28:49+00:00https://blog.codecarrot.net/understanding-react-native-flexbox-layout<p><em>Working with flexbox layout can be tricky, especially in React Native. But there is nothing to scare. It’s easy to understand, just take a closer look not just on how it works but on why it works this way.</em></p>
<p><a href="https://reactjs.flock.com/"><img src="https://cdn.codecarrot.net/images/join-our-react-js-native-flock-channel.png" alt="Join our React Js/Native Flock Channel" /></a></p>
<h2 id="flexbox-layout-concept">Flexbox layout concept</h2>
<p>In a generalized sense, the main concept of flexbox layout — creating parent element adding to it</p>
<div class="language-css highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="nc">.container</span> <span class="p">{</span>
<span class="nl">display</span><span class="p">:</span> <span class="n">flex</span><span class="p">;</span>
<span class="p">}</span>
</code></pre></div></div>
<p>and nesting child elements in it, which ones we want to position.
After this actions, parent container became <em>Flex container</em> element, and child elements automatically became <em>Flex items.</em></p>
<p>Let’s leave aside Flex items and take a closer look at <em>Flex container.</em></p>
<p>By default <em>Flex container</em> aligns all children elements horizontally, because of CSS flex-direction property with initial value ‘row’. Also, flex-direction property establishes the direction of the <strong>Main Axis</strong> in <em>Flex container</em>.</p>
<p><img src="https://cdn.codecarrot.net/images/1_ZL0jCAKXRb3cqQjgbipI7w.jpeg" alt="Left image {flex-direction: row}, Right image {flex-direction: column}" /></p>
<p><em>Left image {flex-direction: row}, Right image {flex-direction: column}</em></p>
<p>Left image {flex-direction: row}, Right image {flex-direction: column}
This means that <strong><em>Flex container</em></strong> <strong>children always follows parent container Main Axis direction</strong> and by changing flex-direction property we are changing Main Axis direction and ipso facto changing child elements alignment direction.</p>
<hr />
<h2 id="react-native-layout-differences">React Native layout differences</h2>
<p><em>React Native uses limited Flexbox layout properties and values. But it’s fairly enough to meet all your requirements.</em></p>
<p>First and the main difference I should start with — is that all container elements in React Native are <em>Flex containers</em> by default. There is no need writing extra code or adding different properties, just take it and use it.</p>
<p>But remember one rule: If the element has a parent container, child element can be positioned with <em>Flex item</em> property — ‘align-self’ inside parent container still being <em>Flex container</em>, behaving and accepting <em>Flex container</em> properties.</p>
<p>Here is the example (all purple squares are nested in <em>Flex container</em> parent):</p>
<p><img src="https://cdn.codecarrot.net/images/1_2MSQQHPGKwq2BK9R4Ztoig.png" alt="Applying ‘align-self: flex-end’ property to Flex container (last purple box) which contains another elements" /></p>
<p>Applying ‘align-self: flex-end’ property to <em>Flex container (last purple box) which contains another elements.</em></p>
<p>The second one difference is how do we use property <strong>flex</strong>.</p>
<p><strong>Flex</strong> property will define for <em>Flex container</em> how it should manage space along the Main Axis or how it should share space among several <em>Flex containers</em>.</p>
<p>So if we will skip this declaration, container will just expand to its content width and will stop where it is, but if we will set:</p>
<div class="language-js highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="nx">flex</span><span class="p">:</span> <span class="mi">1</span><span class="p">;</span>
</code></pre></div></div>
<p>the container will expand full available width along Main Axis of its parent.</p>
<p><em>Hint: to prevent expanding full width after declaring flex: 1, use maxWidth/maxHeight property.</em></p>
<p>Some examples (parent has vertical Main Axis):</p>
<p><img src="https://cdn.codecarrot.net/images/1_eEHusoYiqXAlWOCnOwlcCA.jpeg" alt="Left image {flex: 1}, Right image — no flex declaration" /></p>
<p><em>Left image {flex: 1}, Right image — no flex declaration</em></p>
<p>As I mentioned before, flex property with different numeric values could be used for specifying grow factor for <em>Flex containers,</em> and actually replaces ‘flex-grow’ property. For example, here I set:</p>
<div class="language-js highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="nx">first</span><span class="p">:</span> <span class="p">{</span>
<span class="nl">flex</span><span class="p">:</span> <span class="mi">3</span>
<span class="p">},</span>
<span class="nx">last</span><span class="p">:</span> <span class="p">{</span>
<span class="nl">flex</span><span class="p">:</span> <span class="mi">2</span>
<span class="p">}</span>
</code></pre></div></div>
<p>for this the following elements (all purple squares are nested in <em>Flex container</em> parent):</p>
<p><img src="https://cdn.codecarrot.net/images/1_4BYBxaLqikY2iqaiMxXl6Q.png" alt="First: {flex: 3}, Last: {flex: 2}" /></p>
<p><em>First: {flex: 3}, Last: {flex: 2}</em></p>
<p>And in conclusion, I want to add some GIF’s I made to show how <strong>align-items</strong>and <strong>justify-content</strong> property works:</p>
<p><strong>Justify-content</strong> property will <strong><em>always</em></strong> align content along <strong>Main Axis</strong>.
Here you can see animated property justify-content with following values:
flex-start, flex-end, center, space-around, space-between;
(all purple squares are nested in <em>Flex container</em> parent):</p>
<p><img src="https://cdn.codecarrot.net/images/1_VYfuWaybfh93RkYuCly-mg.gif" alt="Justify-content: flex-start, flex-end, center, space-around, space-between" /></p>
<p><em>Justify-content: flex-start, flex-end, center, space-around, space-between</em></p>
<p><strong>Align-items</strong> property will <strong><em>always</em></strong> align content along <strong>Cross Axis</strong>.
Here you can see animated property align-items with following values:
flex-start, flex-end, center;
(all purple squares are nested in <em>Flex container</em> parent):</p>
<p><img src="https://cdn.codecarrot.net/images/1_oh4pZR2laHaizGkEo2TQpA.gif" alt="Align-items: flex-start, flex-end, center;" /></p>
<p><em>Align-items: flex-start, flex-end, center;</em></p>
<h2 id="conclusion">Conclusion</h2>
<p>Flexboxes are easy to understand and pleasurable to maintain. The facebook team made them as comfortable as it possible, cutting off all unnecessaries that we can focus on productive development and step into a bright future.</p>yashumittalWorking with flexbox layout can be tricky, especially in React Native. But there is nothing to scare. It’s easy to understand, just take a closer look not just on how it works but on why it works this way.
https://cdn.codecarrot.net/images/1_2MSQQHPGKwq2BK9R4Ztoig.png
How to better organize your React applications?2018-01-06T08:59:50+00:002018-01-06T08:59:50+00:00https://blog.codecarrot.net/how-to-better-organize-your-react-applications<p>I’ve been working on very large web applications for the past few months, starting from ground zero and, with a dozen other developers, making them scale up to now be used by millions of people. And sometimes, if you didn’t start with a good architecture, it can become difficult to keep your code organized.</p>
<p><strong>Note:</strong> I use Redux files in all the examples of this article. If you don’t know what Redux is, you can have a look to the documentation here.</p>
<p><strong>Note2:</strong> All examples are based on ReactJS, but you can use exactly the same structure for a React-Native application.</p>
<h2 id="what-are-the-challenges-when-you-build-an-application">What are the challenges when you build an application?</h2>
<p>This has happened or will happen to pretty much all developers over the course of their career:</p>
<ul>
<li>You build an application for a client with a team of a few developers, everything works very well all together.</li>
<li>Your client requires new features, fine, you add them.</li>
<li>Your client asks you to remove some features and add new ones, it starts to get complicated, you didn’t think about that, but you make it work even though it’s not perfect.</li>
<li>Your client now wants you to change another feature, remove some others and add another one that wasn’t expected. At that point, you grab the scotch tape and start patching some code. You are not really proud of it but it works.</li>
<li>6 months later, after some other iterations, the code of the application gets really complicated to read and understand, everything looks like some Italian spaghetti pasta.</li>
</ul>
<p>Until the day your client decides to create a new version of the application, with some fresh new code and features. In some cases, you end-up keeping complicated legacy code that lives with the new code, and this becomes even harder to maintain. And all of this happened because your app wasn’t properly designed from the beginning.</p>
<hr />
<p>When I started to learn React, I found a few very good articles explaining how to create Todo lists or very simple games. Those articles were very useful to understand the basics of React, but I quickly got to a point where I wasn’t able to find much about how I could use React to build actual applications, something with a few dozens pages and hundreds of components.</p>
<p>After some research, I learned that every React boilerplate project on Github results to similar structures, they organize all the files by type. This might look familiar to you:</p>
<div class="highlighter-rouge"><div class="highlight"><pre class="highlight"><code>/src
/actions
/notifications.js
/components
/Header
/Footer
/Notifications
/index.js
/containers
/Home
/Login
/Notifications
/index.js
/images
/logo.png
/reducers
/login.js
/notifications.js
/styles
/app.scss
/header.scss
/home.scss
/footer.scss
/notifications.scss
/utils
index.js
</code></pre></div></div>
<p>This architecture might be okay to build your website or application, but I believe that it is not the best architecture.</p>
<p>When you organize your files by type, as your application grows, it often becomes difficult to maintain. By the time you realize this, it’s too late and you will have to invest a lot of time and money to change everything, or to support what you have for the next few years.</p>
<p>The good thing with React is that you can structure your application in any way you like. You are not forced to follow a certain folder structure, React is simply a javascript library.</p>
<h2 id="what-could-be-a-better-approach-to-organize-your-application">What could be a better approach to organize your application?</h2>
<p>For a couple of years I worked for a financial institution which used Ember as their main javascript framework to build all their new web applications. One interesting thing about Ember is the ability to structure your project by features, instead of by type. And this changes everything.</p>
<p>Pods in Ember are great but still limited, and I wanted something much more flexible. After a few experiments, trying to find what would be the best structure, I got to a point where I decided to group all related features together, and nest them as needed. This is what I use now:</p>
<div class="highlighter-rouge"><div class="highlight"><pre class="highlight"><code>/src
/components
/Button
/Notifications
/components
/ButtonDismiss
/images
/locales
/specs
/index.js
/styles.scss
/index.js
/styles.scss
/scenes
/Home
/components
/ButtonLike
/services
/processData
/index.js
/styles.scss
/Sign
/components
/FormField
/scenes
/Login
/Register
/locales
/specs
/index.js
/styles.scss
/services
/api
/geolocation
/session
/actions.js
/index.js
/reducer.js
/users
/actions.js
/api.js
/reducer.js
index.js
store.js
</code></pre></div></div>
<p>Each component, scene or service (a feature) has everything it needs to work on its own, such as its own styles, images, translations, set of actions as well as unit or integration tests. You can see a feature like an independent piece of code you will use in your app (a bit like node modules).</p>
<p>To work properly, they should follow these rules:</p>
<ul>
<li>A component can define nested components or services. It cannot use or define scenes.</li>
<li>A scene can define nested components, scenes or services.</li>
<li>A service can define nested services. It cannot use or define components or scenes.</li>
<li>Nested features can only use from its parent.</li>
</ul>
<p><strong>Note:</strong> <em>By parent feature, I mean a parent, grandparent, great-grandparent etc… You cannot use a feature that is a “cousin”, this is not allowed. You will need to move it to a parent to use it.</em></p>
<p>Let’s break this down.</p>
<h3 id="components">Components</h3>
<p>You all already know what a component is, but one important thing in this organization is the ability to nest a component into another component.</p>
<p>Components defined at the root level of your project, in the components folder, are global and can be used anywhere in your application. But if you decide to define a new component inside another component (nesting), this new component can only be used its direct parent.</p>
<p><strong>Why would you want to do that?</strong></p>
<p>When you develop a large application, it happens quite often that you need to create a component that you definitively know you won’t reuse anywhere else, but you need it. If you add it at the root level of your components folder, it will get lost with hundreds of components. Sure, you could categorize them, but when it’s time to do some clean-up, you won’t remember what they are all for or if they are still being used somewhere.</p>
<p>Although, if you define at the root level only the main components of your application, such as buttons, form fields, thumbnails, but also more complicated one like listComments, formComposer with their own children components, it gets much easier to find what you need.</p>
<p>Example:</p>
<div class="highlighter-rouge"><div class="highlight"><pre class="highlight"><code>/src
/components
/Button
/index.js
/Notifications
/components
/ButtonDismiss
/index.js
/actions.js
/index.js
/reducer.js
</code></pre></div></div>
<ul>
<li><em>Button</em> can be used anywhere in your application.</li>
<li><em>Notifications</em> can also be used anywhere. This component defines a component <em>ButtonDismiss</em>. You cannot use <em>ButtonDismiss</em> anywhere else than in the <em>Notifications</em> component.</li>
<li><em>ButtonDismiss</em> uses <em>Button</em> internally, this is authorized because <em>Button</em> is defined at the root level of components.</li>
</ul>
<h3 id="scenes">Scenes</h3>
<p>A scene is a page of your application. You can see a scene just like any component, but I like to separate them into their own folder.</p>
<p>If you use <a href="//github.com/reactjs/react-router">React-Router</a> or <a href="//github.com/aksonov/react-native-router-flux">React Native Router</a>, you can import all your scenes in your main index.js file and setup your routes.</p>
<p>With the same principle components can be nested, you can also nest a scene into a scene, and also define components or services into a scene. You have to remember that if you decide to define something into a scene, you can only use it within the scene folder itself.</p>
<p>Example:</p>
<div class="highlighter-rouge"><div class="highlight"><pre class="highlight"><code>/src
/scenes
/Home
/components
/ButtonShare
/index.js
/index.js
/Sign
/components
/ButtonHelp
/index.js
/scenes
/Login
/components
/Form
/index.js
/ButtonFacebookLogin
/index.js
/index.js
/Register
/index.js
/index.js
</code></pre></div></div>
<ul>
<li><em>Home</em> has a component <em>ButtonShare</em>, it can only be used by the Home scene.</li>
<li><em>Sign</em> has a component <em>ButtonHelp</em>. This component can be used by <em>Login</em> or <em>Register</em> scenes, or by any components defined in those scenes.</li>
<li><em>Form component</em> uses <em>ButtonHelp</em> internally, this is authorized because <em>ButtonHelp</em> is defined by a parent.</li>
<li>The <em>Register</em> scene cannot use any of the components defined in <em>Login</em>, but it can use the <em>ButtonHelp</em>.</li>
</ul>
<h3 id="services">Services</h3>
<p>Not everything can be a component, and you will need to create independent modules that can be used by your components or scenes.</p>
<p>You can see a service like a self-contained module where you will define the core business logic of your application. This can eventually be shared between several scenes or even applications, such as a web and native version of you app.</p>
<div class="highlighter-rouge"><div class="highlight"><pre class="highlight"><code>/src
/services
/api
/services
/handleError
/index.js
/index.js
/geolocation
/session
/actions.js
/index.js
/reducer.js
</code></pre></div></div>
<p>I recommend you to create services to manage all api requests. You can see them as a bridge/an adapter between the server API and the view layer (scenes and components) of your application. It can take care of network calls your app will make, get and post content, and transform payloads as needed before being sent or saved in the store of your app (such as Redux). The scenes and components will only dispatch actions, read the store and update themselves based on the new changes.</p>
<hr />
<h2 id="wrapping-up">Wrapping up</h2>
<p>I’ve been working with this architecture for the past few months on a personal project built with React-Native, and I can tell you this saved me a lot of time. It’s much more simpler to have all related entities grouped together, it makes things easier to work with.</p>
<p>This architecture is one of many other ways to organize your project, that’s the way I like it now and I hope this will help you improve yours!</p>yashumittalI’ve been working on very large web applications for the past few months, starting from ground zero and, with a dozen other developers, making them scale up to now be used by millions of people. And sometimes, if you didn’t start with a good architecture, it can become difficult to keep your code organized.
https://cdn.codecarrot.net/images/samuel-zeller-360588.jpg
How to Choose a Server - Mini Guide2018-01-05T18:21:00+00:002018-01-05T18:21:00+00:00https://blog.codecarrot.net/how-to-choose-a-server-mini-guide<p>There are plenty of places where you can host your Rails application online. Each of them has its advantages and disadvantages and very often you will need to strike a balance between configurability and maintenance costs. How do you choose the best solution then?</p>
<h2 id="solutions-tested-by-codecarrot">Solutions tested by <a href="//www.codecarrot.net">CodeCarrot</a></h2>
<h3 id="heroku-will-always-do-the-trick">Heroku will always do the trick</h3>
<p>One of the most popular ways of hosting an app is Heroku. Heroku is a ready-to-use Cloud Application Platform, which makes deployments and hosting very easy. It’s a convention over configuration, where you can easily configure all of your infrastructure with simple entries in one file. <strong>Maintaining database, scheduled recurrent tasks and secret tokens for your application can be edited using Web interface</strong>. This is definitely the best option overall, which saves you a lot of complicated devops work and enables quick deployment. However, it’s difficult to configure it for some very specific use cases and it’s relatively expensive too.</p>
<h3 id="amazon-the-famous">Amazon the Famous</h3>
<p>Amazon Web Services is probably the most recognized Platform as a Service solution currently available. It offers you a wealth of options to quickly scale your application and configure it for every use case you need. <strong>It also provides a range of support solutions, such as backups, monitoring and logs</strong>. However, these machines demand full configuration from the very start of installing the operating system – through a http server and so on. It’s the most reliable solution for medium and large applications, but demands a lot of devops work.</p>
<h3 id="the-cheapest-doesnt-always-mean-the-best">The cheapest doesn’t always mean the best</h3>
<p>Of course, you can just buy a standalone server from any provider you want, e.g. Hetzner. This is definitely the cheapest option, but it demands devops work and a lot of expertise in choosing servers. <strong>Compared to cloud solutions, such as AWS, it’s not so easy to scale your servers up when you are an owner of a physical machine</strong>. If you have devops already and need to balance your expenses, this might be a good option for small applications.</p>
<p>Summing up, when choosing a server, it’s crucial to take into consideration <strong>both positive and negative aspects of each solution</strong>. This will help you avoid any unexpected situations that may result in delays in your projects.</p>yashumittalThere are plenty of places where you can host your Rails application online. Each of them has its advantages and disadvantages and very often you will need to strike a balance between configurability and maintenance costs. How do you choose the best solution then?
https://cdn.codecarrot.net/images/16329138786_3606758016_o-666507-edited.jpg
The Art of Writing Awesome Emails That Customers Love2018-01-05T14:28:10+00:002018-01-05T14:28:10+00:00https://blog.codecarrot.net/the-art-of-writing-awesome-emails-that-customers-love<iframe src="https://www.facebook.com/plugins/video.php?href=https%3A%2F%2Fwww.facebook.com%2Fcodecarrotinc%2Fvideos%2F405433009968386%2F&show_text=0&width=560" width="100%" height="315" style="border:none;overflow:hidden" scrolling="no" frameborder="0" allowtransparency="true" allowfullscreen="true"></iframe>
<p>Instead of sending thousands of email, it is better to send one awesome email that customers might love.</p>
<p>But before we dive in the art of writing awesome email, lets see who is actually fit in, to send email to customers.</p>
<h2 id="quality-customer-support-role">Quality Customer Support Role</h2>
<p>It is a prerequisite for any candidate who interviews for a customer support role, and it is a quality that can make or break your career in any customer-facing role.</p>
<p>If you have been in the support game long enough, you’ll know there’s a world of difference between talking to customers over chat or phone and talking to them through email.</p>
<p>Unlike other channels, when you exchange emails with your customers, all they see from you is a wall of text. Not to mention, the longer wait. Sometimes, they even end up talking to different people in the same thread.</p>
<p>For all of these reasons and so many more, it’s much harder for you to show customers that you want to help them over email… hard to prove that you’re, in fact, a real live human being who cares.
Some people are naturally good at doing this; they are exceptionally polite and clear with their emails. They leave no room for misinterpretation, whether it comes to their tone or if it has something to do with passing detailed instructions.</p>
<p>If you aren’t there yet, fret not. You can either learn these things on the job, by accumulating bits of wisdom over several years…</p>
<p>….Or you can jumpstart the learning curve by pooling your knowledge with ours to divine the art of writing emails that customers love.</p>
<h2 id="highlight-the-key-parts-and-keep-it-short">Highlight the key parts and keep it short</h2>
<p>Don’t dither. Respect the customer’s time and make your email as short as it can be. If you can use a screenshot to illustrate your point, do it.</p>
<p>Make it as easy as possible for your customer to get the point of the email. Don’t go for pages in the interest of building a rapport.</p>
<p>Be concise and precise; highlight the key parts so that a quick skim is all that your customer needs to know what you’re talking about.</p>
<p>A notification that the finance team is reviewing his refund request? Highlight the word ‘review’ and the time by which he can expect a response.</p>
<h2 id="say-thanks-and-mean-it">Say thanks and mean it</h2>
<p>Most support emails begin with ‘Thank you for writing to us with your query’, a sentiment that I’m sure the support rep does mean but I’ve always thought it to be an incomplete and improperly expressed sentiment. What better expresses it is something like, ‘Thank you for using our app’ or ‘Thank you for sticking around and not giving up on us’.</p>
<p>Thanking them for “submitting” their idea or writing to you is just incomplete and insincere, in comparison. Personalising your thank you sentence goes a long way in showing your customers that you are a real, live human being who actually cares as opposed to a soulless automaton just going through the motions.</p>
<h2 id="avoid-information-globs">Avoid information globs</h2>
<p>If your email reads like an essay instead of a paragraph, weep a little, discard the draft and schedule a call with the customer. If your screencast goes on for over 8 minutes, weep a little, discard your video and schedule a call with the customer. If your solution has more than ten points, weep a little, discard the, you get the point.</p>
<p>If your email looks like an information glob, set up a call with the customer and walk him through the whole process via a screen share/screen grab.</p>
<p>If you can access his screen through some remote access app and do it for him, better. Make life easier for the customer, not harder.</p>
<h2 id="dejargonize-your-emails">Dejargonize your emails</h2>
<p>No one likes a Jargon Jane or a Buzzword Barry. The lesser the jargon in your email, the better. The problem with most support emails is that the rep usually assumes that everyone who uses the product know as much as they do. And that’s how jargon/buzzword packed emails are born.
However, I would also not recommend that you swing to the other extreme and make your email very very basic, as though you were addressing someone whose only knowledge of the Internet is secondhand.</p>
<p>Read between the lines of the email and try to get a good sense of whether the person sounds knowledgeable or unsure. Google them if you’re still not sure about their level of expertise. And don’t forget to talk like a normal human being; as Buffer shows us with every email, a combination of casual language and cheer is the key to a customer’s heart.</p>
<h2 id="avoid-emoji-overload">Avoid emoji overload</h2>
<p>While emojis and GIFs help break the ice and liven things up, they can also be seriously detrimental to your user experience.</p>
<p>The use of emojis or excited GIFs when you’re turning down a feature request or intimating something serious just makes you seem unprofessional and juvenile.</p>
<p>Our advice? Check to make sure if the situation is appropriate before unleashing your favorite corgi GIF.</p>
<h2 id="steer-clear-of-courtesies">Steer clear of courtesies</h2>
<p>While you have nothing but goodness in your heart when you’re typing out the phrase ‘my sincere apologies’, unfortunately, the sentiment not only does not help you express your ardent apologies but it actively works against them. We also wouldn’t recommend ‘looking forward to hearing from you again’. It’s no reflection on you or your product but no one wants to hear that. Just imagine your doctor telling you that.</p>
<p>So, before you shoot out your email, take a quick minute to run through the email and make sure your courtesies are appropriate.</p>
<h2 id="in-search-of-perfection">In Search of Perfection</h2>
<p>And while we’re on the subject of run throughs, as much as we’d like to pretend we’re attentive and thorough every second of every work day, we’re not. There are days when no amount of coffee will help you out of your grogginess, days when you aren’t at your 100% best and it manifests in your work as typos, grammatical errors and factual errors.</p>
<p>Nothing major but tiny things like spelling “receive” as “recieve” or not correcting your computer when it tries to get you into the AutoCorrect Hall of Fame. Or forgetting to attach the document after promising to send it over; thus necessitating the awkward situation where you have to follow up your original email almost immediately with a second email with the attachment thus making you seem like the world’s most awkward klutz.</p>
<p>The above situations might not seem like a big deal but they matter in the scheme of things.</p>
<p>It’s the little things that matter when it comes to user experience.</p>
<p>One lousy interaction is all that it takes to jar the customer out of the sugar-spun fantasia that you’ve worked so hard to create.</p>
<p>So, the next time you think you’re not running with guns loaded and ready to go, take a gander at this list before you hit “Send”:</p>
<h3 id="checklist">Checklist</h3>
<ol>
<li>Grammar check – Is your email grammatically correct? If you can’t get a teammate to sit down and help you sort out if it’s “had been” or “was” in the situation, Grammarly or MS Word should do the job just as well, if not better.</li>
<li>Attachment check – Have you attached everything you wanted to attach? Don’t be the klutz. Seriously. Don’t be the klutz.</li>
<li>Code check – Have you checked if the code you’re copying is correct? Even a missing parenthesis can wreak a lot of havoc. Not to mention, confusion.</li>
<li>Link check – Does the hyperlink work? Nothing annoys me more than receiving an email with a broken link.</li>
<li>Name check – Have you referred to the customer correctly? We recommend a double check, nay, a triple check if it’s a complex name that you don’t recognize. And while you’re at it, check if it’s the name he likes to go by. Empires have fallen because people have sent emails with “Hello James” to Henry James, instead of “Hello Henry”.</li>
<li>New reply check – Check if you’ve avoided an embarrassing booboo like shooting out a reminder to the customer minutes after the customer sent you a reply with the information you asked for and the only reason you didn’t know it is because you didn’t hit refresh before you shot out the email? You’d think this is uncommon but it is not.</li>
<li>Question check – Have you answered all the questions the customer has raised? The extra mile in this case would be answering all possible questions as well and covering your bases.</li>
</ol>
<h2 id="just-relax-and-send-awesome-email">Just relax and send awesome email</h2>
<p>To sum up, be polite, be concise and don’t overload the customer with info. And make sure you run through your email a couple of times before you hit “Send” (even if you have “Undo Send”). There! That’s all there is to it. We’ve (hopefully) started you off on the path to greatness.
However, we’ll be the first to admit that no one can achieve complete mastery over an art and we’ve probably missed out on a couple of in-your-face pointers that can really help when you’re on deck. If you can spot one, drop us a note in the comments down below and we’ll add it to our kbase.</p>yashumittal
https://i.imgur.com/YFztyCc.png
What are the main differences between ReactJS and React-Native?2018-01-03T22:38:09+00:002018-01-03T22:38:09+00:00https://blog.codecarrot.net/what-are-the-main-differences-between-reactjs-and-react-native<p>React-Native has been around for about 2 years, and became a really interesting framework since it can be used for Android and let us build cross-platform mobile apps. A few contributors also customized the framework to build desktop apps for Mac and Windows, which is quite cool.</p>
<p>React-Native is very similar to ReactJS in a way, but there are differences you need to know before you start your first native app. In this article, I’m going through the main differences I have encountered as a ReactJS web developer who learned to use React-Native and built a few native apps with this technology.</p>
<h2 id="setup-and-bundling">Setup and bundling</h2>
<p>React-Native is a framework, where ReactJS is a javascript library you can use for your website. When you start a new project with ReactJS, you probably will choose a bundler like Webpack and try to figure out which bundling modules you need for your project. React-Native comes with everything you need and you most likely wouldn’t need more. When you start a new project you will notice how easy is it to set up: it’s very fast and only takes you one command line to run in the terminal and you will be ready to go. You can start coding your first native app immediately using <a href="//facebook.github.io/react-native/docs/javascript-environment.html">ES6, some ES7 features and even a few polyfills</a>.</p>
<p>To run your app, you will need to have Xcode (for iOS, on Mac only) or Android Studio (for Android) installed on your computer. You can either decide to run it on a simulator/emulator of the platform you want to use or directly on your own devices.</p>
<h2 id="dom-and-styling">DOM and Styling</h2>
<p>React-Native doesn’t use HTML to render the app, but provides alternative components that work in a similar way. Those React-Native components map the actual real native iOS or Android UI components that get rendered on the app.</p>
<p>Most components provided can be translated to something similar in HTML, where for example a <code class="highlighter-rouge">View</code> component is similar to a <code class="highlighter-rouge">div</code> tag, and a <code class="highlighter-rouge">Text</code> component is similar to a <code class="highlighter-rouge">p</code> tag.</p>
<div class="language-js highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="k">import</span> <span class="nx">React</span><span class="p">,</span> <span class="p">{</span> <span class="nx">Component</span> <span class="p">}</span> <span class="k">from</span> <span class="dl">'</span><span class="s1">react</span><span class="dl">'</span><span class="p">;</span>
<span class="k">import</span> <span class="p">{</span> <span class="nx">View</span><span class="p">,</span> <span class="nx">Text</span> <span class="p">}</span> <span class="k">from</span> <span class="dl">'</span><span class="s1">react-native</span><span class="dl">'</span><span class="p">;</span>
<span class="k">export</span> <span class="k">default</span> <span class="kd">class</span> <span class="nx">App</span> <span class="kd">extends</span> <span class="nx">Component</span> <span class="p">{</span>
<span class="nx">render</span><span class="p">()</span> <span class="p">{</span>
<span class="k">return</span> <span class="p">(</span>
<span class="o"><</span><span class="nx">View</span> <span class="nx">style</span><span class="o">=</span><span class="p">{</span><span class="nx">styles</span><span class="p">.</span><span class="nx">container</span><span class="p">}</span><span class="o">></span>
<span class="o"><</span><span class="nx">Text</span> <span class="nx">style</span><span class="o">=</span><span class="p">{</span><span class="nx">styles</span><span class="p">.</span><span class="nx">intro</span><span class="p">}</span><span class="o">></span><span class="nx">Hello</span> <span class="nx">world</span><span class="o">!<</span><span class="sr">/Text</span><span class="err">>
</span> <span class="o"><</span><span class="sr">/View</span><span class="err">>
</span> <span class="p">);</span>
<span class="p">}</span>
<span class="p">}</span>
</code></pre></div></div>
<p>Because your code doesn’t get rendered in an HTML page, this also means you won’t be able to reuse any libraries you previously used with ReactJS that renders any kind of HTML, SVG or Canvas. Although you might find alternative libraries for React-Native, <a href="//react.parts/">react.parts</a> has a Native category for you to find what you need.</p>
<p>To style your React-Native components, you will have to create stylesheets in Javascript. It looks similar to CSS, but it’s not exactly the same. This can be quite confusing at first, and you might reach a point where you wonder how you can create mixins like you would do with SASS, or how you can override the style of a component you want to reuse. Then you understand React-Native is not made from web elements and can’t be styled in the same way. Fortunately, you will most likely find alternative solutions available in order to accomplish what you need.</p>
<div class="language-js highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="kd">const</span> <span class="nx">styles</span> <span class="o">=</span> <span class="nx">StyleSheet</span><span class="p">.</span><span class="nx">create</span><span class="p">({</span>
<span class="na">container</span><span class="p">:</span> <span class="p">{</span>
<span class="na">flex</span><span class="p">:</span> <span class="mi">1</span><span class="p">,</span>
<span class="p">},</span>
<span class="na">content</span><span class="p">:</span> <span class="p">{</span>
<span class="na">backgroundColor</span><span class="p">:</span> <span class="dl">'</span><span class="s1">#fff</span><span class="dl">'</span><span class="p">,</span>
<span class="na">padding</span><span class="p">:</span> <span class="mi">30</span><span class="p">,</span>
<span class="p">},</span>
<span class="na">button</span><span class="p">:</span> <span class="p">{</span>
<span class="na">alignSelf</span><span class="p">:</span> <span class="dl">'</span><span class="s1">center</span><span class="dl">'</span><span class="p">,</span>
<span class="na">marginTop</span><span class="p">:</span> <span class="mi">20</span><span class="p">,</span>
<span class="na">width</span><span class="p">:</span> <span class="mi">100</span><span class="p">,</span>
<span class="p">},</span>
<span class="p">});</span>
</code></pre></div></div>
<p><em>Example of stylesheet with React-Native</em></p>
<p>I don’t know about you, but even though Flexbox has been around for quite some time already, I’ve never been completely immersed into its use, mostly because the projects I was involved with required backward compatibility with older browsers. With React-Native, you have no better way to build a nicely responsive app than using Flexbox. It can be tricky at first as it doesn’t always behave like it would do with CSS, but you will become quickly good at it once you got the basic understanding. I would recommend you to read this article to learn more about it: <a href="/understanding-react-native-flexbox-layout">Understanding React Native flexbox layout</a>.</p>
<h2 id="animations-and-gestures">Animations and Gestures</h2>
<p>Goodbye CSS animations! With React-Native, you’ll have to learn a completely new way to animate the different components of your app with Javascript. The recommended way to animate a component is to use the <a href="//facebook.github.io/react-native/docs/animated.html">Animated</a> API provided by React-Native. You can compare it to the famous Javascript library <a href="//velocityjs.org/">Velocity.js</a>. It allows to create different kind of animations, timed or based on a velocity associated to a gesture, and can be used with different types of <a href="//facebook.github.io/react-native/docs/easing.html">Easing</a>. Overall you can do pretty much any kind of animation you would do on the web. React-Native also provides <a href="//facebook.github.io/react-native/docs/layoutanimation.html">LayoutAnimation</a> which is actually very cool and simple to use for transitions but only works for iOS at this point, as Android doesn’t support it very well.</p>
<p>To interact with user gestures, React-Native provides something similar to the Javascript touch events web API called the <a href="//facebook.github.io/react-native/docs/panresponder.html">PanResponder</a>. Getting it up and running can feel discouraging, but you will see it’s finally not that complicated. The PanResponder needs to be applied to a View (or Text or Image) of your component to enable the touch handler on this View. From there, the PanResponder provides a list of functions you can use to catch the different touch events, such as <code class="highlighter-rouge">onPanResponderGrant</code> (touchstart), <code class="highlighter-rouge">onPanResponderMove</code> (touchmove) or <code class="highlighter-rouge">onPanResponderRelease</code> (touchend). Those functions will give you access to the native event and the gesture state with information like all the touches and their locations as well as accumulated distance, velocity and the touch origin.</p>
<p><img src="https://cdn.codecarrot.net/images/1_zZ7-crRaRTaLbz2Myvsu2w.gif" alt="react-native-swipeout component using PanResponder" /></p>
<p>In my opinion, the main difficulty with the PanResponder comes when you have nested views/components with their own PanResponder, and you need to decide which one must be granted the control of the gesture.</p>
<h2 id="navigation">Navigation</h2>
<p>When I started to build my first mobile app with React-Native, I was wondering how to navigate between 2 scenes. The first thing that I’ve done was to search for an alternative to <a href="//github.com/ReactTraining/react-router">react-router</a>, this famous library that most React web apps uses to transition between pages. I found a few libraries that do similar jobs, but there was always something I didn’t like about the ones I tried: either it was quite complicated to use, I wasn’t satisfied with the animations, wasn’t customizable the way I wanted it to be, or wasn’t behaving or working properly on both Android and iOS devices. Then I started wondering how navigation actually works, and I found the <a href="//facebook.github.io/react-native/docs/navigator.html">Navigator</a> component provided by React-Native. I should have started from there, looking for an alternative of react-router was in my opinion not the best idea.</p>
<p><img src="https://cdn.codecarrot.net/images/1_pVbpZsAcopk9c_8UMsxlNw.gif" alt="Transitions between scenes with Navigator" /></p>
<p>Most mobile apps don’t have plenty of scenes going in every direction like would do a web app, the Navigator component even though it might seem a bit complicated to use at first <a href="//facebook.github.io/react-native/docs/using-navigators.html">will provide you everything you need</a> to manage the transition between scenes. Unless you build a very large scale mobile app that requires lots of different scenes and you are afraid to get lost at some point, I think you should stick with Navigator. You can also have a look to <a href="//facebook.github.io/react-native/docs/navigation.html#navigationexperimental">NavigatorExperimental</a>, but in my opinion, it’s not ready yet to be used for production.</p>
<h2 id="platform-specific-code">Platform specific code</h2>
<p>Designing an app for multiple platforms with the same set of code can sometimes be a bit overwhelming and your code will start soon to look ugly. I’m sure you’ve been involved in similar issues while coding for modern browsers and the need to make things look “not too bad” on older browsers, adding a few sets of conditional code here and there in your CSS or even in Javascript.</p>
<p>When you build a Native app, it’s important to know the user interface and experience for iOS and Android might need to be different.</p>
<p>On the assumption you have the control over how your app will look like and behave, you have two choices:</p>
<ul>
<li>You can define a universal design for your app to look exactly the same for both platforms as long as it stays intuitive and doesn’t confuse either platform users.</li>
<li>You can define sets of code for each platform, meaning you will have a different DOM, stylesheets and even maybe different logic and animations in order to follow the UI and UX guideline of the platform.</li>
</ul>
<p>If you decide to go with the second point, <a href="//facebook.github.io/react-native/releases/0.39/docs/platform-specific-code.html">React-Native can detect which platform you are running the code from</a> and load the right code for the right platform. I would recommend you to have the main logic of your components defined in one file called index.js, then you’ll have the presentational components defined with individual files. For iOS and Android, you will have respectively index.ios.js and index.android.js files.</p>
<p>If you <a href="/how-to-better-organize-your-react-applications">organize your folder structure following my recommendation</a>, it will look like this:</p>
<div class="highlighter-rouge"><div class="highlight"><pre class="highlight"><code>/src
/components
/Button
/components
/Icon
/index.android.js
/index.ios.js
/Content
/index.android.js
/index.ios.js
/index.js
</code></pre></div></div>
<p>If you feel like having 2 different files is too much overhead for very minimal changes you can use the <a href="//facebook.github.io/react-native/releases/0.39/docs/platform-specific-code.html#platform-module">Platform module</a> with a conditional statement.</p>
<h2 id="developer-tools">Developer tools</h2>
<p>When you start a new native project, you get a few developer tools out of the box from React without the need of installing anything, and that’s pretty awesome in my opinion. Hot Reloading is available and is great to use when you need to make small changes to the styles of your app. For bigger changes impacting the logic of the app, I usually prefer to use Live Reload which reloads your app entirely as you make a change in the code.</p>
<p><img src="https://cdn.codecarrot.net/images/1_SbcR3aSpp6CPfoTuRgNq5w.jpeg" alt="React-Native debug tools" /></p>
<p>The beauty of working with React-Native is also the ability to use most developer tools you use with ReactJS. Chrome Dev Tools works beautifully to inspect the network requests, display the console logs and stop the code on <code class="highlighter-rouge">debugger</code> statements. You can even use the great <a href="https://github.com/gaearon/redux-devtools">Redux DevTools</a> to inspect the state of your Redux store. One feature that I miss the most though is the ability to inspect the DOM like you would do on the web, the native Inspector is definitely not as good.</p>
<h2 id="publishing">Publishing</h2>
<p>If you develop an app for both iOS and Android, you will need to learn how Xcode and Android Studio work in order to make sure everything is set up properly before the first deployment of your app on the App Store or the Google Play. For iOS, it works just like you will deploy a regular native app, although for Android, you will need to <a href="//facebook.github.io/react-native/docs/signed-apk-android.html">follow the React recommendation</a> to sign your APK before uploading it to the Google Play.</p>
<p>If you miss the ability to simply type a single command line to publish an update of your native app like you would do it with a web app and a VCS properly setup, you can use the awesome Code Push to deploy code directly to the user, without the need of archiving, sending your app to the store and waiting for it to be ready. Code Push is great if you want to make a few improvements or bug fixes but is not recommended if you want to add entirely new features.</p>
<h2 id="wrapping-up">Wrapping up</h2>
<p>I really enjoy using React-Native today. I’ve been using it for a bit less than a year now and it’s damn fast to get an app up and ready! You can build complex UI as quick as you would do with ReactJS and usually works pretty well for both iOS and Android. The learning curve from ReactJS to React-Native is I think quite easy, especially if you like to learn new Javascript frameworks ; it’s just a different way to use React.</p>
<p>The community around React-Native gets very big and keeps growing, the technology is not going away any time soon and I would definitely recommend any web developer who wants to create a mobile app to forget about Cordova and give it a try.</p>yashumittalReact-Native has been around for about 2 years, and became a really interesting framework since it can be used for Android and let us build cross-platform mobile apps. A few contributors also customized the framework to build desktop apps for Mac and Windows, which is quite cool.
https://cdn.codecarrot.net/images/1_bUtWGJQv8QFXTkLF_WBINA.png
Hiring the right people for your scale up business2018-01-03T14:21:12+00:002018-01-03T14:21:12+00:00https://blog.codecarrot.net/hiring-the-right-people-for-your-scale-up-business<p><em>Top tips for scale-up hiring</em></p>
<ul>
<li><em>Treat your hiring process like a sales funnel – fill the top, qualify on the way through and sell</em></li>
<li><em>Move from generalists to specialists to accelerate your ability to scale fast</em></li>
<li><em>Only implement the processes you really need</em></li>
<li><em>Hire people who are better than you</em></li>
</ul>
<h2 id="getting-the-right-skills">Getting the right skills</h2>
<p>When a start-up scales fast, it needs people with a different kind of skillset from those who helped build the business.</p>
<p>Start-ups thrive when a team are empowered to act fast and roll up their sleeves to help out with everything. Headcounts are low, but there’s much to be done. Late nights and early mornings are commonplace, you work hard and play hard.</p>
<p>Anil Stocker, CEO and co-founder of MarketInvoice knows the importance of getting the right people:</p>
<blockquote>
The process of hiring is very similar to a sales funnel. You have to fill the pipeline at the top level by creating as much awareness as possible. This can be done through things like events and job boards – really utilise your network to get as many candidates as possible. We’ve found that referrals also work really well. Incentivising your existing employees to refer results in better quality candidates at a lower cost than you could achieve through agencies.
</blockquote>
<p><em>“Once they’re in the funnel you have to prioritise which ones to spend time with and how to fast-track the best ones. Then think about your interview process, how you’re going to test their skills, essentially going through a qualification process. You’ve got to sell to a candidate too, so they’re excited to come and work for you.”</em></p>
<p><em>“At MarketInvoice, we have a very robust hiring process in place. Candidates are interviewed and scored by not only their hiring manager, but also the wider team to ensure a good culture fit. After that, either myself or my co-founder Ilya will conduct a culture-check interview to gain a deep understanding of the candidate and make sure their values are aligned with the company.”</em></p>
<h2 id="generalists-vs-specialists">Generalists vs specialists</h2>
<p>The team you hired to help start your business were likely young, ambitious and entrepreneurial. They don’t necessarily have vast experience in business but they are smart, resourceful and know how to get the job done quickly. To scale up you’ll need a different kind of team dynamic.</p>
<p>Anouk Agussol, Chief People Officer at MarketInvoice says <em>“You’ll tend to move from generalists to specialists in each area and you’ll probably need to bring in people with experience of what ‘great’ looks like.”</em></p>
<p>Your team will work best when you’ve got the right leadership in place and the right skills to make things happen quickly, so the challenge will be to get your new and existing team members working in harmony.</p>
<p>Agussol also gives the advice to <em>“be completely honest with anyone new that you’re hiring, especially to a senior position.”</em> If they’re not from a start-up background, make sure they’re a good culture fit as larger companies tend to do things more slowly and with more planning than scale-ups have the luxury of doing.</p>
<p>You might also want to think about your policy when it comes to promoting internally. Start-ups tend to have flat structures, and if you’re on the road to becoming a bigger company, your staff will want to know that their careers can progress if they stick with you.</p>
<h2 id="process-vs-control--getting-the-balance-right">Process vs control – getting the balance right</h2>
<p>Scaling up any business requires the introduction of structure to ensure that growth is manageable and maintainable.</p>
<p>Until now you may have been ‘bootstrapping’ your way to success, deploying minimum viable product (MVP) and prioritising fast results over internal process. But the work-arounds that were fine for your first hundred customers won’t be sustainable when you scale to 1,000 or 10,000 so it’s important to understand which business processes are going to be crucial.</p>
<p>While your team may understand the need for process changes, they are still likely to struggle with the extra burden, so when you introduce more structure to their everyday workload make sure it’s for the right reasons.</p>
<p>Agussol advises <em>“there is a difference between adding structure for the good of the business and adding structure purely for control.</em> <em>Nobody wants to be tied down by unnecessary process. As a rule of thumb, if a process doesn’t make things better or faster, then consider whether you need it at all.”</em></p>
<h2 id="hire-people-who-are-better-than-you">Hire people who are better than you</h2>
<p>When employees are empowered to own their roles, your company will ultimately benefit. When hiring, always find the best that you can and hire people who are experts in their field.</p>
<p>Patrick Drake, co-founder of leading recipe box service HelloFresh says: “<em>You’ve got to have the confidence to hire people who are as good, or better, than you.</em> <em>Some people have a tendency to be insecure about their ability or position and will hire below them to avoid being shown up – but doing that will be the death of your company.”</em></p>
<p><em>“Every time someone joins HelloFresh they are told “the reason you are here, is because you are better than us at what you do. You are a leader, please lead” and that’s changed the game for us.”</em></p>
<h2 id="communicating-change">Communicating change</h2>
<p>The changes that inevitably come with scaling up a business can cause some tension amongst your most valuable employees.</p>
<p>To tackle any difficulties head-on it’s important to keep communication lines open. Agussol advises <em>“if you’re in any doubt, always over-communicate as much as you can – people appreciate being kept in the loop and you’ll soon figure out how much information is the right amount.”</em></p>
<p>“<em>Above all, treat your employees well</em>. <em>If you look after them, they will look after you. There’s an old proverb that sums up the experience of running a scale-up perfectly: “If you want to go fast, go alone. If you want to go far, go together.” It’s really important to bring people on the journey with you.”</em></p>yashumittalTop tips for scale-up hiring
https://i.imgur.com/j9g72Jy.jpg
168 Custom Interface Icons2017-12-30T15:45:48+00:002017-12-30T15:45:48+00:00https://blog.codecarrot.net/168-custom-interface-icons<p>Our friends at Swifticons put together an freebie icons: 168 custom interface icons you can use however you’d like, no licensing or attribution required.</p>
<p>The icons come in 3 styles—outlined, filled, and colored—each available in EPS, PNG, PDF, JPG, and 2-version SVG.</p>
<blockquote>
“Get 168 custom interface icons—free.”
</blockquote>
<p>This pack also includes the source files in AI and Sketch formats.</p>
<p><a href="https://www.instamojo.com/codecarrot/168-custom-interface-icons/">Download your free icons now</a> (downloads ZIP file)!</p>yashumittalOur friends at Swifticons put together an freebie icons: 168 custom interface icons you can use however you’d like, no licensing or attribution required.
https://cdn.codecarrot.net/images/swift-interface-hero.jpg
13 Landing Page Tricks that Increase Conversion2017-12-30T06:30:00+00:002017-12-30T06:30:00+00:00https://blog.codecarrot.net/13-landing-page-tricks-that-increase-conversion<p>When it comes to business on the Web, conversion is truly king. Whether it’s email subscribers, new accounts or good ole-fashioned purchases, conversion makes or breaks businesses online. Thousands of articles, hundreds of papers and dozens of books have been written on the subject. In fact, a whole discipline, Conversion Rate Optimization (CRO), has been born out of the intense need to transform traffic into transactions. So without further ado, we throw our top 13 best tips to increase the conversion of your landing pages and improve your business.</p>
<h2 id="13-landing-page-tricks-that-increase-conversion">13 Landing Page Tricks that Increase Conversion</h2>
<p><strong>1. Test, Test, Test –</strong> Start testing before you even start spending. Run your design up the flagpole and learn what users think, remember and do with your design. Then, once you’ve found a direction you’re comfortable with, put it to the test immediately. Start with A/B testing to try larger variations of design and copy, and fine-tune with multivariate testing of discreet elements.</p>
<p><strong>2. Epic headlines –</strong> Most people abandon your landing page within 8 seconds, so your headline is often your one and only shot at convincing them to stick around. So be clear and concrete in what you’re offering and what they’ll get out of the deal. If you can’t summarize what the user will get from you in five words or less, keep iterating until you can. In most cases, cute or clever wording doesn’t convert. People won’t work that hard to figure out what you’re trying to say. Be specific, be brief, and be compelling.</p>
<p><strong>3. Write Killer Copy –</strong> If you’ve hooked them with the headline, you’ll need to land them with awesome copy. Having a content strategy for your landing pages ensures you tell a compelling story in a way that resonates with your users. You need to communicate the essentials while weaving in the brand narrative, all while maintaining crystalline clarity. Great copy is explicit, bold and direct. A user needs to be able to quickly understand what you do and what you’re offering. Use bullets and short useful sentences to explain the benefits of your product or service. Clarity is king in conversion-driving copy.</p>
<p><strong>4. Eliminate Options –</strong> Don’t create analysis paralysis for your visitors. Give users one choice, not three, not five. Multiple choices lead to confusion and confusion leads to … well, no where good. Eliminate choice and you make the conversion option easier to understand and easier to take action on. And less friction means more conversions.</p>
<p><strong>5. Ask for the absolute bare minimum –</strong> Fewer fields = more conversions. This is a no-brainer, but you’d be surprised at how many people fight for fields that in-the-end do little more than kill your conversion rate. Fight for Fewer Fields! It’s our new call to action.</p>
<p><strong>6. Keep it above the fold –</strong> As designers, we hate the notion of boxing ourselves into the top 600 pixels of the design. But the fact is, people don’t scroll on a landing page unless they’re really, really intrigued. Don’t bury the good stuff, particularly main benefits and the call to action. Keep it up top and easy to digest in that initial eight-second look. If you go long, repeat the call to action near the bottom of your page to save the user the scroll back up.</p>
<p><strong>7. Use Real, Happy People –</strong> Trust is huge in conversion, and people trust people. Putting a person’s face on your landing page can drive real results. 37Signals put people on their Highrise pages and increased conversion 102.5%, and plenty of other studies have been done about the impact of human faces on website conversion.</p>
<p><strong>8.Try a Video –</strong> Need to do some product ‘splanin? Try a video that shows off the benefits of the product in action. Pay attention to the video thumbnail, too. That’s what users will see when they first hit the page. Yobongo saw a 70.9% increase in conversions when they changed their video thumbnail. So, go with fewer words and give visitors a pithy and enjoyable video to watch. Then, sit back and watch your conversions go up, and to the right.</p>
<p><strong>9. Use Social Proof –</strong> Logos, Likes, Pins – whatever it is, show the visitor that other people love your stuff. When visitors lack information they’ll turn to what others have done to help guide their decision. Reinforce the conversion with respected logos, testimonials and other points of social proof that help a visitor on the fence make the decision you want them to make.</p>
<p><strong>10. Design for Context –</strong> Different inbound traffic sources have different needs and expectations. Someone coming from an article or lengthy blog post needs less information than someone coming from a Tweet. Each user has different needs based on their inbound source. By understanding those user heuristics you can create landing pages tailored to them — and crank conversions higher.</p>
<p><strong>11. Craft your Buttons Carefully –</strong> Buttons count, big time. In many cases they’re the primary call to action. So pay attention to the look, feel, shape, color, size and placement of your buttons. And be sure to test. Simple changes can have a big impact.</p>
<p><strong>12. Keep it Snappy –</strong> Speed kills on the Web. Slow speed. You can lose up to 7% in conversion rate for every one second of lag. Use the Google page speed tools for suggestions on ways to optimize your page speed. Reduce and optimize image elements, and leverage CSS and typography to keep your code light and your page lightning fast. Check out more ways to speed up your site.</p>
<p><strong>13. Keep it Sexy –</strong> Design wins. Great looking pages convey expertise and professionalism. They create trust and security simply by being better than the other options out there. So pay attention to design. The quality of design transfers to the quality of the product or service the visitor is considering. A bad design can hurt conversion for an amazing product or company. A great design can super-charge your conversions.</p>
<p>So there you have it. 13 ways you can increase your conversions and drive your business. The real trick to each of these points is iterating, testing and refining based on results. Landing pages aren’t things that are launched and done; they need to be continually tweaked to find the combination that really moves the needle. Craft and attention to detail to key elements such as the headline and call-to-action buttons can give your conversions lift above and beyond simple A/B testing of the design. Put these tricks together and you’ll have a landing page that works hard for your business and gets you real results. Have a tip or trick to improve conversion that’s worked for you? Share it with us in the comments.</p>yashumittalWhen it comes to business on the Web, conversion is truly king. Whether it’s email subscribers, new accounts or good ole-fashioned purchases, conversion makes or breaks businesses online. Thousands of articles, hundreds of papers and dozens of books have been written on the subject. In fact, a whole discipline, Conversion Rate Optimization (CRO), has been born out of the intense need to transform traffic into transactions. So without further ado, we throw our top 13 best tips to increase the conversion of your landing pages and improve your business.
https://i.imgur.com/TU7bpOX.png
How a Product Design Sprint Can Help You Launch a Better Product2017-12-29T19:39:42+00:002017-12-29T19:39:42+00:00https://blog.codecarrot.net/how-a-design-sprint-can-help-you-launch-a-better-product<h2 id="what-is-a-product-design-sprint">What is a Product Design Sprint?</h2>
<p>Over many years of experience and numerous projects delivered to our clients, we have learned that a good product idea and execution aren’t enough in today’s world. To succeed, you’ll need to answer critical business questions through research, design, prototyping and testing – all this with a user-centered approach in mind. So we introduced Product Design Sprints, a series of workshops based on Google Design Sprints. Read more and learn how a Product design sprint can help you launch a better product.</p>
<p>At <a href="//www.codecarrot.net/">CodeCarrot</a>, we run over 10 concurrent projects every year, the vast majority of which involve design services. We wanted to be sure we use a battle-tested process that worked for many teams around the world but tweaked it so that it can also answer more high-level problems that lots of startup founders don’t think of when starting their journey.</p>
<h2 id="who-can-benefit-from-a-product-design-sprint">Who can benefit from a Product Design Sprint?</h2>
<p>A Product Design Sprint is a perfect idea not only for clients who have already had some experience with various kinds of design services for their products. Our workshops differ from each other depending on the problem our clients are facing at the moment. We always meet in advance to get a better understanding whether they:</p>
<ul>
<li>have a rough idea for a product or a problem to solve</li>
<li>have a product and want to identify pain points to enhance it</li>
<li>have a product and want to invest in new, more complex features</li>
</ul>
<p>After that, we prepare our workshops individually for each project and adjust the exercises so that our ‘sprint’ can give as much value as possible to our clients. Sometimes, it means putting more emphasis on the product’s Value Proposition, because the client wants so many features that we think they lost focus on the core purpose of the product. In other cases, we focus on specific features or analyse current user journeys to spot any pain points and work together on finding solutions.</p>
<h2 id="what-does-the-process-look-like">What does the process look like?</h2>
<p>A Product Design Sprint consists of 5 days, and each day corresponds to another stage of solving the problem. In a nutshell, the stages are as follows:</p>
<ul>
<li><strong>Understand:</strong> What are the user needs, business needs and technology capacities? What is the key strategy? What is the focus?</li>
<li><strong>Diverge:</strong> How can we explore as many ideas as possible?</li>
<li><strong>Converge:</strong> Select the best ideas so far.</li>
<li><strong>Prototype:</strong> Create an artifact that allows testing the ideas with users.</li>
<li><strong>Test:</strong> Test the ideas with users, business stakeholders and technical experts</li>
</ul>
<p>We adjust the workshops to our clients’ needs. Sometimes, we even make them shorter to focus mainly on the first three phases.</p>
<p>Usually, in such sprints, we provide a Project Manager and a Product Designer, who heads the workshop and acts as a mentor. We also ask our developers to attend if we feel like we need a reality check on our ideas. You wouldn’t believe how eager developers can be to attend those workshops!</p>
<h2 id="workshop-benefits">Workshop benefits</h2>
<p>Depending on the purpose of the workshops and the initial problem to solve the client will:</p>
<ul>
<li>identify and choose stakeholders that have the most influence on the project and its success,</li>
<li>get a better understanding of users’ problems, needs, motivations and expectations,</li>
<li>generate as many solutions for users’ problems as possible,</li>
<li>analyze the user paths of current solutions, spot weak points and use it as a competitive advantage,</li>
<li>get a better understanding of the costs of the business and all the key partners they have have to team up with when building their product,</li>
<li>sketch and prototype solutions and validate them during the test phase.</li>
</ul>
<h2 id="what-does-the-client-get-after-the-workshop">What does the client get after the workshop?</h2>
<p>At the end of the sprint, the client gets a better understanding of users’ problems and multiple ideas on how to solve them. We prepare a detailed report of the workshops with all materials and canvases digitized. The report also contains suggestions in which way the product should go. Additionally, the clients usually get a working lo-fi prototype for some of our user stories, which they can test later.</p>
<p>If a client decides to build a product with us they’ll also get:</p>
<ul>
<li>a project roadmap, broken down into phases</li>
<li>pre-defined tasks for each phase ready for developers to start their work.</li>
</ul>
<p>Don’t hesitate and <a href="//www.codecarrot.net/services/design-sprint.html">sign up for a Product Design Sprint</a> now.</p>yashumittalWhat is a Product Design Sprint?
https://cdn.codecarrot.net/images/business-team-1440x500.jpg
Why Content Comes First2017-12-29T17:25:00+00:002017-12-29T17:25:00+00:00https://blog.codecarrot.net/why-content-comes-first<p>If you’ve worked in web or product design, you’re familiar with the debate over what should come first: design or content. Here are some practical reasons why content should come first.</p>
<p><img src="https://i.imgur.com/QSaQxKK.png" alt="Design is absence of content is just decoration" /></p>
<p>Now, I’m a content strategist, and yes, I believe that content—or at least, a concepting meeting with your content peeps—should always come first, but this isn’t a partisan stance. I don’t believe in the primacy of content just because that’s my trade, my area of expertise, or my passion.</p>
<p>I simply think content first is the right way to do things. Here’s why.</p>
<h2 id="putting-content-first-speeds-production">Putting content first speeds production</h2>
<p>Copy usually goes through several rounds of grilling, and each one typically means revisions. First, the designer has some input, either about specific wording, or the way the copy works—or rather, doesn’t work—with the design. Then it goes up the ladder, where more comments trickle down, leading to further iterations.</p>
<p>This isn’t hugely problematic, but it does slow things down, and can cause problems with versioning and record keeping. After all, every time someone asks for a revision to copy that’s already in a design, I have to update my copy document—and the designer has to update the source file, save out mocks, etc.</p>
<p>Plus, every step in this process increases the chance for miscommunication, crossed wires, and, in the worst-case scenario, the wrong copy getting published. In-context comments (like those InVision offers) can help, but all this back and forth can still slow the production process.</p>
<p>Now imagine the copy was all approved before you had to throw it into the mocks. Wouldn’t that be magical?</p>
<h2 id="the-right-copy-needs-the-right-design">The right copy needs the right design</h2>
<p>All the best creative—whether it’s a print ad, landing page, or workflow—represents a harmonious union of parts. The design and copy play off each other, each enriching the other till you can’t even consider them separately, but see them as parts of a greater whole.</p>
<p>Consider this classic Volkswagen ad. Every word, every design element—they all speak to the message the agency’s trying to drive home. They work together to tell you not just to buy a VW, but also to reconsider basic notions you’ve had drilled into your head all your life (“think big!” and “drive a fancy car” being the operative ideas here).</p>
<p><img src="https://i.imgur.com/BxYtDXH.jpg" alt="vw-small" /></p>
<p>Words could achieve that alone, but there’d have to be a lot more than 2 of them to do it. Design alone might be able to achieve it, but I can’t think of how. (Granted, I’m not a designer.) Working together, copy and design play off each other to convey a complex concept almost instantaneously.</p>
<p>Okay, you’re thinking, but that’s print design—where words traditionally do a lot more work than in a user interface (UI). I hear you, but I also believe that words do a lot more work in UIs than you might think. It can be hard to find examples of this sort of harmonious balance, but I can think a few sites do it super well. Virgin Air, for example, makes space in their purchase flow for brief messages about your destination that create real delight for their users. And that’s the sort of thing that can have huge brand impact.</p>
<p>Squarespace’s much-lauded landing page for version 7 breaks what’s actually a whole lot of copy into several pages, each with a full-screen background, large, delicately set headline, and a paragraph or so of body copy. It’s beautiful (though the copy’s a little more feature-oriented than I’d like), but its greatest achievement is the way the design reflects the brand—the interface promises to be simple, beautiful, and focused. Just like this experience.</p>
<h2 id="content-creates-understandingin-research-and-after-launch">Content creates understanding—in research, and after launch</h2>
<p>I was working on a high-stakes, long-term project that took several months, two rounds of extensive user testing, and numerous rounds of internal review. We were building a marketing site with ecommerce and content elements.</p>
<p>During user testing, we identified a problem with the lower half of the site’s homepage. Here, the design displayed a mosaic of images with links to various types of content—recent long-form articles, video tutorials, product walkthroughs, etc. The problem was that, at a glance, it wasn’t at all clear what these tiles were.</p>
<p>As a solution, I suggested creating a set of categories for these content types and displaying the category name in the same location on each tile. During one of my sweeps through the product, I went ahead and added sample labels—without asking design and without having fully defined the categories. Cheeky, I know. But in my defense, I had mentioned the idea and it seemed to fall on deaf ears.</p>
<p>In the next round of testing, the difference was dramatic. People suddenly grokked the lower half of the page at a glance—and loved that important real estate had been devoted to content.</p>
<p>Granted, this is a case of content swooping in to solve a design problem after the fact. But I can pretty much guarantee I would’ve proposed the exact same solution if they’d come to me first.</p>
<h2 id="design-is-communication">Design is communication</h2>
<p>Think about it. Most design problems are communication problems. And most interfaces are designed to facilitate interaction between people.</p>
<p>A book designer works to decide how to wrap a ton of information into a tidy package. Designers at Facebook, Twitter, Airbnb, LinkedIn, and many more design to help people communicate more quickly and easily. Apple’s iPhone 6 landing page exists solely to let people know there’s a new iPhone and give them reasons to buy it.</p>
<p>Few things we do don’t involve communication at a vital, instrumental level.</p>
<p>Design is communication. And you can’t communicate if you don’t know what you want to say.</p>
<p>So the next time you start a design, ask yourself what you’re trying to say and how you’re trying to say it. And make sure there’s a copywriter in on the conversation. (If you can. If you can’t, <a href="/10-ux-copywriting-tips-for-designers">try these 10 copywriting tips for designers</a>.)</p>yashumittalIf you’ve worked in web or product design, you’re familiar with the debate over what should come first: design or content. Here are some practical reasons why content should come first.
https://i.imgur.com/QSaQxKK.png
36 Flat Graphic Design Icons2017-12-29T11:40:00+00:002017-12-29T11:40:00+00:00https://blog.codecarrot.net/36-flat-graphic-design-icons<p>No time to create custom icons? No worries—our friends at Free Downloads put together this free set of 36 flat graphic design icons that are perfect for infographics, dashboards, and user interfaces.</p>
<p><img src="https://cdn.codecarrot.net/images/flat-graphic-design-icons-preview.png" alt="36 Flat Graphic Design Icons Preview" /></p>
<p>Included in the pack (which is under a Creative Commons Attribution 3.0 Unported License): a 1024×1024 transparent PNG of each icon, an SVG file of each icon, and EPS and AI files.</p>
<p><a href="//www.instamojo.com/codecarrot/36-flat-graphic-design-icons/">Download the icon set now</a> (ZIP file)!</p>yashumittalNo time to create custom icons? No worries—our friends at Free Downloads put together this free set of 36 flat graphic design icons that are perfect for infographics, dashboards, and user interfaces.
https://cdn.codecarrot.net/images/graphic-design-hero.jpg
5 Benefits of Product Design Sprint to Your Business2017-12-29T10:29:12+00:002017-12-29T10:29:12+00:00https://blog.codecarrot.net/5-benefits-of-design-sprint-to-your-business<p>There are times when we face big problems and hard decisions in our businesses. In fact, starting and running a company is a constant struggle to win new clients, increase awareness, respond to customer needs and successfully <a href="/how-a-product-design-sprint-can-help-you-launch-a-better-product">launch products to the market</a>. These challenges often raise questions on how it should be done properly. Having tested numerous solutions we’ve adopted <a href="//www.codecarrot.net/services/design-sprint.html">Product Design Sprint</a>, a tool initially developed within Google, which will give you answers to these strategic questions. Our clients confirm its effectiveness and enumerate its many benefits. We picked five universal advantages of Product Design Sprint to give you an idea how your business can profit from adopting this framework.</p>
<h2 id="product-design-sprint-magic-sauce-for-delivering-outstanding-solutions">Product Design Sprint: Magic Sauce for delivering outstanding solutions</h2>
<p><a href="//www.codecarrot.net/services/design-sprint.html">Product Design Sprint</a> is a collaboration framework for answering critical business questions through design, prototyping and user research. The process includes a set of methods that are selected from some of the greatest practices of business strategy, design thinking, user research and even psychology. Furthermore, it helps to avoid miles of e-mail messages endless conversations and arrangements, which often lead to miscommunication between the parties involved. See what you can win thanks to Design Sprint:</p>
<h2 id="1--simple-solutions-to-complex-business-challenges">1 ) Simple solutions to complex business challenges</h2>
<p>Right from the beginning, together with your stakeholders, your task is to set a goal and create an explicit vision for failure and success of this sprint. The main reason to conduct the sprint is to find all pain points and convert them into valuable solutions. Along with effective communication, it empowers contributors to share ideas, risks and doubts that can affect the final results. At the end you can gather all doubts, assumptions and verify them with clients. <strong>The collaborative approach enables you to get answers to complicated problems within a short period of time.</strong> It would be harder in a different environment.</p>
<h2 id="2-speed">2) Speed</h2>
<p>Agility is especially interesting for large organisations whose tremendous growth has lead them to a corporate size and structure. Bureaucracy and slow processes are often seen as the inseparable part of scaling a business, so definitely speed is the main topic on the table.</p>
<p>The sprint itself is meant to be short and agile, as it is easily adapted to the complexity of a project. <strong>It speeds up new product discovery.</strong> For instance Spotify: despite being a large company, it is able to maintain agility by giving small focused teams the autonomy to explore an opportunity within a Product Design Sprint. They validated and prototyped their Spotify „Running” project in 5 days with their own adaptation of product product design sprint.</p>
<h2 id="3-smaller-risk">3) Smaller Risk</h2>
<p>You can minimise risk by reducing time and budget on validating your ideas. Imagine that <strong>you can shrink months of development and feature testing into just a few days.</strong> It is a perfect method to create MVP in a blink of an eye. Remember, the faster you prototype, the faster you can validate your idea with investors, customers and other stakeholders. That gives you extra time for improvements or changes in case of failure. Huge companies like Google, P&G, AirBnB, or Spotify are using this Product Design Sprint methodology to transform their companies and build competitive advantage, without huge failures along the way.</p>
<h2 id="4-efficient-collaboration">4) Efficient collaboration</h2>
<p>Product Design Sprints foster collaboration with varied groups of people, with different skillsets. It is an extremely satisfying experience, when you are able to spark creativity, encourage people to think outside the box and compare their perspectives from completely distinct fields. Such a group brainstorming session is way more effective than analysing the problem by individuals separately. You skip unnecessary arrangements, misunderstandings and loads of email correspondence. During the Sprint, <strong>there is no time for a lack of organisation and ineffective discussions. As a result, you save time, money and stress.</strong> On top of that, the variety of solutions that come up during workshops, can be surprising and let in a breeze of freshness.</p>
<h2 id="5-services-validated-by-customers">5) Services validated by customers</h2>
<p>Nowadays companies underestimate the value of the user-centered approach. This often leads to misunderstandings and missing market needs. From the Product Design Sprint perspective, it is one of the most important pillars in this framework. That means that during the workshops members have to act with empathy and remain aware of the customer’s needs. What’s more, the integral part of this process is listening, trust and building meaningful relationships with users. <strong>This approach builds products from a user’s perspective and with the needs that they want to fulfill in mind.</strong> Did you know that thanks to Product Design Sprint, Airbnb developed itself from a small startup to one of the most popular services for renting accommodation?</p>
<h2 id="key-takeaways">Key Takeaways</h2>
<ul>
<li>Solve the most complex problems.</li>
<li>Increase your speed and make critical decisions fast.</li>
<li>Obtain a clear vision of success and failure.</li>
<li>Reveal and appoint KPI’.</li>
<li>Effectively collaborate within departments.</li>
<li>Reduce bureaucracy.</li>
<li>Gather all important people in one place.</li>
<li>Make the process user-centered.</li>
<li>The traditional method is much longer (the core team has to spend only 5 days on Product Design Sprint).</li>
</ul>
<h2 id="conclusions">Conclusions</h2>
<p>Building great ideas into elegant, thoughtful, engaging solutions is hard. Even harder when you and your customers are not included in the creation of those solutions. Especially for larger organisations. With faster, better solutions that your customers are using and promoting, there comes a better overall health of your business.</p>
<p>We are conducting workshops too. If you are struggling with your decision - remember to act fast and <a href="//www.codecarrot.net/services/design-sprint.html">schedule a Product Design Sprint session with CodeCarrot</a>.</p>yashumittalThere are times when we face big problems and hard decisions in our businesses. In fact, starting and running a company is a constant struggle to win new clients, increase awareness, respond to customer needs and successfully launch products to the market. These challenges often raise questions on how it should be done properly. Having tested numerous solutions we’ve adopted Product Design Sprint, a tool initially developed within Google, which will give you answers to these strategic questions. Our clients confirm its effectiveness and enumerate its many benefits. We picked five universal advantages of Product Design Sprint to give you an idea how your business can profit from adopting this framework.
https://cdn.codecarrot.net/images/DS-cc-36.jpg
30 Free Sketch Plugins2017-12-29T07:40:00+00:002017-12-29T07:40:00+00:00https://blog.codecarrot.net/30-free-sketch-plugins<p>You’ve been working up a storm in Sketch, and for that you deserve all of the high-fives. But now it’s time to kick things up a notch and improve your workflow—so stop what you’re doing and grab these 30 free Sketch plugins.</p>
<h2 id="basealign">BaseAlign</h2>
<p><img src="https://cdn.codecarrot.net/images/BaseAlign.png" alt="BaseAlign" /></p>
<p>Using the alignment tools in Sketch works great for shapes, but with text layers, the vertical alignment is based on the bounding box around the text rather than the text itself. The result is typically that text boxes with different sized fonts end up being shifted up and down, creating a jagged baseline.</p>
<p>Enter the BaseAlign plugin for Sketch. Rather than using the bounding box around the text, it uses the actual baseline, giving you perfect vertical alignment no matter what the font size is.</p>
<p><a href="https://github.com/abynim/BaseAlign">Get it now</a></p>
<p>Batch Create Symbols</p>
<p><img src="https://cdn.codecarrot.net/images/Batch-Create-Symbols.gif" alt="Batch Create Symbols" /></p>
<p>When you dive right in and start designing, it’s easy to get ahead of yourself and create a bunch of elements that are destined to become symbols. It’s in these moments that the painful reminder comes knocking… you can only create one symbol at a time.</p>
<p>The Batch Create Symbols plugin allows you to select a bunch of layers, click, and have them all magically become symbols at once. It even lets you batch name the symbols or just carry the layer names over. An absolute must-have.</p>
<p><a href="https://github.com/demersdesigns/sketch-batch-create-symbols">Get it now</a></p>
<h2 id="confetti">Confetti</h2>
<iframe width="100%" height="315" src="https://www.youtube.com/embed/rfxLThohbdg?rel=0" frameborder="0" allow="autoplay; encrypted-media" allowfullscreen=""></iframe>
<p>Here’s a fun one. Confetti will automatically take a group of layers or symbols and blast them around randomly to form confetti patterns. Sure, you could copy and paste a bunch of little tiny layers by hand, but where’s the fun in that?</p>
<p><a href="https://www.sketchconfetti.com/">Get it now</a></p>
<h2 id="chromatic-sketch">Chromatic Sketch</h2>
<p><img src="https://cdn.codecarrot.net/images/Chromatic-Sketch.png" alt="Chromatic Sketch" /></p>
<p>If you’ve ever created a colorful gradient that got a bit gray and dingy in the middle, it has to do with RGB being a bit of a disadvantage in creating perceptually beautiful gradients when transitioning between 2 different colors. Chromatic Sketch is an amazing plugin that leverages the mathematics behind the LAB color space to take your existing gradient and make it more beautiful. It’s positively mathemagical.</p>
<p><a href="https://github.com/petterheterjag/chromatic-sketch">Get it now</a></p>
<h2 id="craft">Craft</h2>
<iframe width="100%" height="315" src="https://www.youtube.com/embed/VcGRcVmWUdk?rel=0" frameborder="0" allow="autoplay; encrypted-media" allowfullscreen=""></iframe>
<p>The singular must-have in every UI/UX designer’s tool belt, Craft is a suite of plugins for Photoshop and Sketch that help streamline your design workflow by automating tedious actions and pulling in more realistic sample data.</p>
<p>Craft consists of the following tools:</p>
<p><a href="https://www.invisionapp.com/craft">Get it now</a></p>
<h2 id="dynamicbutton35">DynamicButton3.5</h2>
<p>The modern successor to the old Dynamic Button plugin we know and loved from older Sketch versions. With a single click (or keyboard shortcut), DynamicButton3.5 will automatically take the selected text layer, group it up, and place a rectangle around it with perfect margins (decided by you). Making a text button couldn’t be quicker or easier.</p>
<p><a href="https://github.com/fuggfuggfugg/sketch-dynamic-button-3.5">Get it now</a></p>
<h2 id="find-and-replace">Find and Replace</h2>
<p><img src="https://cdn.codecarrot.net/images/Find-and-Replace.png" alt="Find and Replace" /></p>
<p>Sketch isn’t necessarily a word processor, so if you’ve got a text-heavy document, you may go looking for Find and Replace. Since it isn’t built into Sketch, grab the Find and Replace plugin ASAP. It can be a lifesaver for global text changes.</p>
<p><a href="https://github.com/mscodemonkey/Sketch-Find-And-Replace">Get it now</a></p>
<h2 id="find-instances-of-symbol">Find Instances of Symbol</h2>
<p>Find Instances of Symbol is the truffle-sniffing pig you’ve been looking for if you’ve ever been trying to figure out where a symbol has been placed in your document. Run the plugin and you’ll instantly have a selection made on the chosen page with every single instance of the selected symbol.</p>
<p><a href="https://github.com/nmwoods1/Sketch---Find-all-instances-of-symbol">Get it now</a></p>
<h2 id="flipsize">Flipsize</h2>
<p>If you’ve ever found yourself working with a landscape artboard and later decided you’d like to switch it to portrait, then Flipsize is for you. Run Flipsize, and the height and width of your artboard will be instantly transposed.</p>
<p><a href="https://github.com/apertureless/sketch-flip-size">Get it now</a></p>
<h2 id="magic-mirror-3">Magic Mirror 3</h2>
<p><img src="https://cdn.codecarrot.net/images/Magic-Mirror.gif" alt="Magic Mirror 3" /></p>
<p>If you’re a Photoshop convert, you may miss Free Transform from time to time. For instance, when you’re trying to place a screen into a perspective mockup. Magic Mirror 3 lets you slap an artboard into a shape, and it’ll automatically take on the perspective of the shape. If you update the linked artboard, you can update your perspective mockup with a click and be on your merry way without having to dip into Photoshop.</p>
<p><a href="https://github.com/MagicSketch/MagicMirror">Get it now</a></p>
<h2 id="map-generator">Map Generator</h2>
<p><img src="https://cdn.codecarrot.net/images/Map-Generator.png" alt="Map Generator" /></p>
<p>At one point or another, we’ve all pulled up Google Maps to take a screenshot to pop into our comps. Well… never again. Map generator will grab an address and zoom level from you, then automatically fill the selected shape with an image of your Google Map. So many steps saved.</p>
<p><a href="https://github.com/eddiesigner/sketch-map-generator">Get it now</a></p>
<h2 id="nudge-push-shove">Nudge, Push, Shove</h2>
<p><img src="https://cdn.codecarrot.net/images/Nudge-Push-Shove.png" alt="Nudge, Push, Shove" /></p>
<p>Nudge, Push, Shove allows you to customize exactly how many pixels a layer will move with a nudge from the arrow key, a shift nudge, and an all-new interval: The Shove. All 3 allow you to type your own pixel value to set and forget. Then it’s just business as usual with the native functionality of Sketch following your choices.</p>
<p><a href="https://nudgepushshove.com/">Get it now</a></p>
<h2 id="pixel-perfector">Pixel Perfector</h2>
<p><img src="https://cdn.codecarrot.net/images/Pixel-Perfector.gif" alt="Pixel Perfector" /></p>
<p>It’s virtually inevitable that your document will end up with some layers either sized or positioned on floating values (aka half-pixels or fractions of pixels). The hard part is catching, let alone fixing, the offending layers. Pixel Perfector can find and select, or find and fix, any layer positioned or sized to a fraction of a pixel. It can even go one layer at a time so you can take a moment to decide how you’d like to handle rounding off the math.</p>
<p><a href="https://github.com/swiadek/pixel-perfecter-sketch-plugin">Get it now</a></p>
<h2 id="random-size">Random Size</h2>
<p><img src="https://cdn.codecarrot.net/images/Random-Size.png" alt="Random Size" /></p>
<p>You may have gathered from the name that Random Size will automatically apply a random size to selected layers. What makes this plugin a bit more useful is that you can randomize the width or height of selected layers within a minimum and maximum amount. There’s definitely no quicker way to throw together a bar graph.</p>
<p><strong>Pro Tip:</strong> It will respect locked proportions if you’d like to keep an object from becoming distorted.</p>
<p><a href="https://github.com/longzheng/sketch-randomSize">Get it now</a></p>
<h2 id="remove-all-disabled-styles">Remove All Disabled Styles</h2>
<p>A quick and easy was to clean up your document before handoff, Remove All Disabled Styles will comb through the visual attributes and trash anything that’s been left unchecked. A big timesaver over going layer-by-layer clicking on those little trashcans.</p>
<p><a href="https://github.com/ErikFontanel/sketch-remove-all-disabled-styles">Get it now</a></p>
<h2 id="remove-all-guides">Remove All Guides</h2>
<p>Removing guides from a document can be nearly as tedious as creating them in the first place—especially if you have a ton of them. Run Remove All Guides, and you’re all cleaned up in an instant.</p>
<p><a href="https://github.com/ichik/RemoveAllGuides">Get it now</a></p>
<h2 id="rename-it">Rename It</h2>
<p><img src="https://cdn.codecarrot.net/images/Rename-It.gif" alt="Rename It" /></p>
<p>So you’ve got a few hundred layers named rectangle copy? We all do. Rename It is here to batch rename those layers to get your document cleaned up for handoff, or just for your own sanity. It even has some tricks up its sleeve for modifying existing layer names, or even running a find and replace on the names of selected layers. Essential for the heavy Sketch designer.</p>
<p><a href="https://github.com/rodi01/RenameIt">Get it now</a></p>
<h2 id="repeat">Repeat</h2>
<p><img src="https://cdn.codecarrot.net/images/Repeat.gif" alt="Repeat" /></p>
<p>As massively timesaving as it is to use Symbols for global elements (i.e. navigation) on all of your screens, they do have to get on those screens somehow. Repeat will take the selected layer (or layers) and instantly make a copy in the same position on every single artboard. Now it’s never too late to add a global element to 195 artboards.</p>
<p><a href="https://github.com/keremciu/sketch-repeat">Get it now</a></p>
<p>Runner</p>
<p><img src="https://cdn.codecarrot.net/images/Runner.png" alt="Runner" /></p>
<p>Runner is that super peppy assistant you’ve always wanted. Hit the keyboard shortcut and up pops a search field that allows you to jump anywhere in your document, insert symbols, create styles and symbols, apply styles, and even install plugins. Think Spotlight for Sketch. It sure does make giant documents feel a whole lot smaller.</p>
<p><a href="https://sketchrunner.com/">Get it now</a></p>
<h2 id="save-with-frame">Save with Frame</h2>
<p>Save with Frame is a quick and dirty way to export an artboard mocked up onto an iPhone. It has images built in for iPhone 6 and 7 in all the colors as well as Moto 360 if you’d prefer an Android friendly piece of hardware.</p>
<p><a href="https://github.com/redgell/Save-with-Frame">Get it now</a></p>
<h2 id="select-by-name">Select By Name</h2>
<p>As the name suggests, Select By Name is a way to search for layers and select them based on—you guessed it—their name. It’s a simple plugin, but it certainly saves the time of searching in the layers list and then separately making your selection.</p>
<p><a href="https://github.com/sebj/Select-By-Name">Get it now</a></p>
<h2 id="select-children">Select Children</h2>
<p><img src="https://cdn.codecarrot.net/images/Select-Children.gif" alt="Select Children" /></p>
<p>Another simple little timesaver, Select Children will automatically drill down into the selected group and select all of the layers inside. Once you’ve made a habit of the shortcut (Option + Command + A), you won’t be able to live without this one.</p>
<p><a href="https://github.com/jshuaf/select-children">Get it now</a></p>
<h2 id="select-exportables">Select Exportables</h2>
<p>Select Exportables puts you 1 click away from selecting every artboard, group, slice, and layer in your document that has been made exportable. There’s no quicker way to add a new file format or size globally for export.</p>
<p><a href="https://github.com/yargies/sketch-select-exportables">Get it now</a></p>
<h2 id="select-parent-artboards">Select Parent Artboards</h2>
<p>Select Parent Artboards is another one that can save many tiny bits of time if you make a habit of the shortcut (Control + Command + A). Simply select any layer and hit the shortcut to get the artboard containing that layer selected.</p>
<p><a href="https://github.com/nefaurk/select-parent-artboards">Get it now</a></p>
<h2 id="select-similar-layers">Select Similar Layers</h2>
<p><img src="https://cdn.codecarrot.net/images/Select-Similar-Layers.png" alt="Select Similar Layers" /></p>
<p>If you’re an Illustrator convert, this one is going to fill a hole in your heart. Select Similar Layers will allow you to make a selection, then grab every other layer with a matching fill color, border color, border thickness, font, opacity, blend mode, or name. Once you’re used to having this one at your disposal, it’s tough to live without.</p>
<p><a href="https://github.com/wonderbit/sketch-select-similar-layers">Get it now</a></p>
<p>SketchDistributor</p>
<p><img src="https://cdn.codecarrot.net/images/SketchDistrubutor.png" alt="SketchDistributor" /></p>
<p>In addition to the automatic alignment options built into Sketch, we also have the ability to automatically distribute the spacing between layers. Sometimes you’d prefer to set a specific distance between those layers, and Sketch simply averages the existing space.</p>
<p>The SketchDistributor plugin allows you to select a group of layers and enter a specific pixel value of distance to put between them. No more fidgeting with pixel-by-pixel nudging.</p>
<p><a href="https://github.com/PEZ/SketchDistributor">Get it now</a></p>
<h2 id="sketch-nearest-8">Sketch Nearest 8</h2>
<p>Similar to the Pixel Perfector plugin, Sketch Nearest 8 is here to keep things locked tightly into the pixel grid. Where this plugin differs is that it takes the selected layer and bumps the height or width up to the next value that’s divisible by 8. For those of you designing on an 8-pixel grid system, this is sure to save some much needed time and energy.</p>
<p><a href="https://github.com/acollurafici/Sketch-Nearest-8">Get it now</a></p>
<h2 id="sketchy-pies">Sketchy Pies</h2>
<p><img src="https://cdn.codecarrot.net/images/Sketchy-Pies.jpeg" alt="Sketchy Pies" /></p>
<p>Arguably the most adorable name on this list, Sketchy Pies will convert any circle into a pie chart simply by listing comma-separated hex codes for the desired colors. After the fact, it’s easy to edit the colors by changing the border color property of each pie wedge.</p>
<p><strong>Pro tip:</strong> Shrink the border thickness of the pie wedges to create radial progress bars.</p>
<p><a href="https://github.com/abynim/sketchy-pies">Get it now</a></p>
<h2 id="sort-me">Sort Me</h2>
<p><img src="https://cdn.codecarrot.net/images/Sort-Me.gif" alt="Sort Me" /></p>
<p>We all put a focus on keeping our artboards organized on the Sketch canvas, but the layer list tends to get a bit out of order. Sort Me quickly sorts your artboards on the layers list alphanumerically. You can even chose ascending or descending order so your document can work the way your brain works.</p>
<p><a href="https://github.com/romashamin/sort-me-sketch">Get it now</a></p>
<h2 id="unlock-all-layers">Unlock All Layers</h2>
<p><img src="https://cdn.codecarrot.net/images/Unlock-All-Layers.gif" alt="Unlock All Layers" /></p>
<p>This plugin fills a hole in the Sketch menus. Unlock All Layers saves you the trouble of finding and unlocking locked layers one by one. It’s surely a feature that may one day be built into Sketch, but for now this plugin is here to save the day.</p>
<p><a href="https://github.com/truthlabs/sketch-unlock-all-layers">Get it now</a></p>yashumittalYou’ve been working up a storm in Sketch, and for that you deserve all of the high-fives. But now it’s time to kick things up a notch and improve your workflow—so stop what you’re doing and grab these 30 free Sketch plugins.
https://cdn.codecarrot.net/images/sketch-plugins-hero.png
Icons For Your Mobile App Design2017-12-29T07:40:00+00:002017-12-29T07:40:00+00:00https://blog.codecarrot.net/icons-for-your-mobile-app-design<p>Ever tried designing a mobile app without icons? Yeah… turns out those little things are kind of a big deal.</p>
<p>Knowing that, the Vexels team designed a free pack of flat icons (AI, PNG, and SVG files included in the <a href="//www.instamojo.com/codecarrot/mobile-app-design-icons/">ZIP file</a>) that’ll fast-track your next app design.</p>
<p><img src="https://cdn.codecarrot.net/images/free-icons-mobiile-app-prev.jpg" alt="Mobile App Icon Preview" /></p>
<p>We love the rounded corners and bright colors.</p>
<p>Here’s what’s illustrated in the pack</p>
<ul>
<li>Paper</li>
<li>Compass</li>
<li>Game controller</li>
<li>Microphone</li>
<li>Social media icons</li>
<li>Camera</li>
<li>Lock</li>
<li>Upload</li>
<li>Download</li>
<li>Sound levels</li>
<li>File</li>
<li>Letter and envelope</li>
<li>…and more!</li>
</ul>yashumittalEver tried designing a mobile app without icons? Yeah… turns out those little things are kind of a big deal.
https://cdn.codecarrot.net/images/free-icons-mobiile-app-prev.jpg
Typography Tips For A More Comfortable Read2017-12-28T09:58:48+00:002017-12-28T09:58:48+00:00https://blog.codecarrot.net/typography-tips-for-a-more-comfortable-read<p>There are 3 small changes you can make to your content to provide a more pleasurable read. The tips don’t just apply to design—use them to make your text documents look great, too.</p>
<p>The names of each principle may be complicated, but understanding and using them is simple.</p>
<p><img src="https://cdn.codecarrot.net/images/typographytips-01.jpg" alt="typography tips" /></p>
<p>Important note: every font is different, so if the <a href="/why-content-comes-first">content</a> doesn’t feel right, go ahead and adjust your measurements. What’s important here is that the reader is getting a comfortable reading experience and that it looks correct to your eye.</p>
<p><strong>Use typographic hierarchy to give a clear sense of the structure of a page</strong></p>
<p>Typographic hierarchy is the visual hierarchy of the text on a page.</p>
<p><img src="https://cdn.codecarrot.net/images/1-WcAzURD51Ihq8O-TC8kuw.png" alt="1--WcAzURD51Ihq8O-TC8kuw" /></p>
<p>Imagine a textbook. In it, the primary heading (the chapter title) is more prominent than the secondary heading (the sub-heading) which is, in turn, more prominent than the body text (the main content of the page). The same principles should be taken into account in a design or Word document.</p>
<blockquote>
“Use typographic hierarchy to give a clear sense of the structure of a page.”
</blockquote>
<p>All font sizes should be derived from the body text, as this is what will be most-read on each page. Here are a few simple steps to define your hierarchy.</p>
<ol>
<li>Body text: increase or decrease the text size until it’s comfortable to read. For this article, let’s set it at 22pt.</li>
<li>Primary heading: 180–200% of the body text, between 40–44pt</li>
<li>Secondary heading: 130–150% of the body text, between 29–33pt</li>
</ol>
<p>Here’s what the page looks like after following this advice:</p>
<p><img src="https://cdn.codecarrot.net/images/typographytips-02.jpg" alt="typography tips" /></p>
<h2 id="further-considerations">Further considerations</h2>
<p>These levels weren’t necessary for this article, but you should also consider a tertiary heading and caption text.</p>
<ul>
<li>Tertiary heading: 100–125% of the body text, between 22–28pt</li>
<li>Small text / captions: 70–75% of the body text, between 15–17pt</li>
</ul>
<h2 id="use-vertical-spacing-to-make-your-words-easier-to-scan">Use vertical spacing to make your words easier to scan</h2>
<p>This is the spacing and arrangement of text as the reader descends the page. We need to make sure the the line spacing and space between paragraphs is generous enough to allow the eye and brain to more easily decipher characters, words, and word shapes—which is how we all read.</p>
<p><img src="https://cdn.codecarrot.net/images/1-m_oQMHv2KaXlzJ51fknb-Q.png" alt="1-m_oQMHv2KaXlzJ51fknb-Q" /></p>
<blockquote>
“Use vertical spacing to make your words easier to scan.”
</blockquote>
<h2 id="paragraph-spacing">Paragraph spacing</h2>
<p>Setting the paragraph spacing is simple, but it’s very different than just pressing “return” twice for a new paragraph. Pressing return twice means the gap is too big to immediately decipher whether it’s part of the same or a new section of <a href="/which-comes-first-content-or-design">content</a>.</p>
<p>In most cases, it should be equal to the body text, so if the body text is 16pt then the paragraph spacing is 16pt.</p>
<ul>
<li>In design applications and CSS this is the equivalent of setting margin-bottom of paragraphs to 16px or 1em</li>
<li>In a Pages/Word document, set the “After paragraph” value to the size of your body text</li>
</ul>
<p><img src="https://cdn.codecarrot.net/images/typographytips-03.jpg" alt="Paragraph spacing" /></p>
<h2 id="line-spacing">Line spacing</h2>
<p>The line spacing should be set somewhere between 120–160% of the text size. As a rule, the smaller the text, the more generous the line spacing needs to be to give each word room to breathe.</p>
<p><strong>Pro Tip:</strong> You should be able to fit a sideways “h” between the lines without it hitting the tops of d/b/t’s (ascenders) or the bottoms of p/q/y’s (descenders).</p>
<p>If the body text is 22pt, then the line-height of that text should be between 26–35pt.</p>
<ul>
<li>In CSS, you can set this using ems or unitless values (e.g. 1.2), but it may require adjustment to make it feel right</li>
<li>In a Pages/Word document, the line height will be set in decimals, with 1.2 being equal to 120% of the text being edited</li>
</ul>
<p><img src="https://cdn.codecarrot.net/images/typographytips-04.jpg" alt="The line height has been increased, so lines are easy to scan" /></p>
<h2 id="adjust-the-measure-to-make-each-line-of-text-more-comfortable-to-read">Adjust the measure to make each line of text more comfortable to read</h2>
<p>The measure is the length of a line of text. Long lines of text are difficult to read, with shorter lines being easier. The ideal number of characters per line is 65–75. The measure should be defined by the width of the body text rather than headings or sub-headings.</p>
<blockquote>
“Set type as part of your content creation workflow, and your readers will be in for a treat.”
</blockquote>
<p><img src="https://cdn.codecarrot.net/images/1-PT_xas3H51pYB4WAepEUWA.png" alt="1-PT_xas3H51pYB4WAepEUWA" /></p>
<p><strong>Pro Tip:</strong> A line of upper- and lower-case letters and numbers is 62 characters, a simple way of finding a comfortable measure.</p>
<p>When you’ve worked out where 65–75 characters is on a line, reduce the width of the column of text until that is about to wrap, you should find the measure is comfortable.</p>
<p><img src="https://cdn.codecarrot.net/images/typographytips-05.jpg" alt="The measure has been made narrower so that each line is a comfortable reading length" /></p>
<h2 id="the-final-result">The final result</h2>
<p>Once you’ve followed these steps, the readability of your content should have vastly improved, as seen below.</p>
<p><img src="https://cdn.codecarrot.net/images/typographytips-6.gif" alt="typographytips-6" /></p>
<p>Setting type is not an inaccessible skill—it’s possible to follow a few simple principles to make every bit of content an easy read. Make this part of your content creation workflow and your readers will be in for a treat.</p>yashumittalThere are 3 small changes you can make to your content to provide a more pleasurable read. The tips don’t just apply to design—use them to make your text documents look great, too.
https://cdn.codecarrot.net/images/92015_typography_hero.png
Which comes first - Content or Design?2017-12-28T07:40:00+00:002017-12-28T07:40:00+00:00https://blog.codecarrot.net/which-comes-first-content-or-design<p>As a copywriter, I’ve historically been charged with filling in the blanks in already-approved wireframes. Those bits of lorem ipsum? Yeah, those are for me. I work to decipher the design’s intent and fill each section with the appropriate language. It’s kind of like painting by numbers: someone else has designated the areas I get to work in, the colors I get to use. My only real creative freedom is deciding on the shade of the color, the stroke of the brush.</p>
<p>This process does a disservice to the project as a whole. Design alone won’t accomplish a site’s goal: it requires words, carefully chosen words, to enhance and drive home the message. <a href="/13-landing-page-tricks-that-increase-conversion">We need words</a> to get the user to do what we want them to.</p>
<p>So why do we box up content and lead with design? It’s like starting a fight with one arm tied behind your back. Instead, let’s get both fists up—pair the design and content.</p>
<h2 id="a-better-way-to-collaborate">A better way to collaborate</h2>
<p>I recently had the incredible opportunity to do some deep collaboration with a designer on a quick-turnaround project. Together, we were able to wireframe, write, and design an entire page in 3 days—and it was good work, too.</p>
<p>First, we conducted hours of stakeholder interviews to understand the company and its goals. While I scribbled notes and built a word bank from language I heard frequently during the interviews, my design counterpart sketched ideas for the layout. Then, during breaks, we bounced ideas off each other, playing with various story concepts, sketching out content areas and image ideas.</p>
<p>Was it awkward at first? Totally. We both had to find a way to help each other, giving just enough to spark an idea and a new way to approach it. It was a give and take, figuring out what felt best for both of us—which was new and wonderful to me as a writer.</p>
<p>And it was great for the designer I was working with too. He got help crafting the story and layout of the page. With a simple content outline in place, he could start sketching out the final page, thinking of supporting images to go along with the copy we selected. In the end, our final product told a compelling story visually and verbally.</p>
<h2 id="its-all-in-the-approach">It’s all in the approach</h2>
<p>When a designer and copywriter work together from start to finish, there’s great potential for creating a beautiful and cohesive story. While everyone works differently, I’ve found that you’ll need to do the following to achieve smooth writer-designer collaboration.</p>
<h2 id="think-of-what-youre-building-as-a-minimum-viable-product-mvp">Think of what you’re building as a minimum viable product (MVP)</h2>
<p>You can’t expect to nail the entire project after 1 or 2 collaboration sessions. Approach your time together as a way to nail down a concept, and get a minimum viable product started. After all, you’re probably going to get feedback from the client about design and copy, so it is okay to leave some room for tweaks. Seriously, don’t get yourself into an “analysis paralysis” situation.</p>
<h2 id="start-with-the-story">Start with the story</h2>
<p>The story drives both design and copy. Discuss how topics can be laid out to best convey the message, and come up with a logical way to introduce new ideas to the user. This will help the designer understand how to lay out the page, and will direct the copy as well.</p>
<h2 id="allow-for-alone-time">Allow for alone time</h2>
<p>When you’re used to working on your own and then bringing fully formed ideas to the table, it can be difficult to think out loud with a partner. Give yourselves time to do some deep thinking and brainstorming alone. I find it easier to write when I’m focused. After an hour alone in a quiet place, I came back to the table with lots of headline and body copy choices for us to pick from.</p>
<h2 id="be-receptive">Be receptive</h2>
<p>The writer will have ideas for how the design should work. The designer will have copy ideas. Be ready to take the good with the bad, and be open to disagreement, discussion, and compromise. It’s an adjustment if you’re used to working alone, but ease into it and the results will be glorious.</p>
<h2 id="the-chicken-and-the-egg">The chicken and the egg</h2>
<p>The question of which comes first, content or design, can feel like a chicken and egg scenario: you can’t have one without the other, but which actually comes first? In this scenario, a high-level content outline preceded design—but it was born from designer-writer collaboration, not the writer working in isolation. I believe this is the best way to steer a strategic design.</p>
<p>Next project, get the designer and copywriter together to draw up some concepts. Design and content are equally important to the success of a site, so giving them equal weight throughout the whole process will dramatically increase the quality of your work. Give it a shot—you’ll be glad you did.</p>
<p>Want more on this topic? Check out <a href="/why-content-comes-first">why content comes first</a>.</p>yashumittalAs a copywriter, I’ve historically been charged with filling in the blanks in already-approved wireframes. Those bits of lorem ipsum? Yeah, those are for me. I work to decipher the design’s intent and fill each section with the appropriate language. It’s kind of like painting by numbers: someone else has designated the areas I get to work in, the colors I get to use. My only real creative freedom is deciding on the shade of the color, the stroke of the brush.
https://cdn.codecarrot.net/images/chicken-and-eggs-of-tray.jpg
4 Principles For Designing Future-Proof Content2017-12-28T01:40:00+00:002017-12-28T01:40:00+00:00https://blog.codecarrot.net/4-principles-for-designing-future-proof-content<p>Technology moves like a steamroller strapped to a rocket engine—fast, furious, and flattening everything in its wake. It’s all about the newest thing. So when you’re designing content, you’ve got to wonder: how long will what I create actually last?</p>
<p>Realistically, some content should be ephemeral—here today, gone tomorrow. Vlog rants about Tim Cook’s presentation at Apple Live. 16 things Iron Man can teach us about UX. Infographics depicting variations of the name “MailChimp” in podcasts. They’re too “of the moment” to endure for long.</p>
<p>But some content has to last—to engage your audience wherever they are today, tomorrow, and 10 years from now.</p>
<p>So how do you do that? Design your content with these 4 design principles in mind.</p>
<h2 id="1-design-for-your-audience">1. Design for your audience</h2>
<p>No matter where the future takes us, design will always start with your audience. But that’s a simple statement with complex ramifications.</p>
<h3 id="context-is-queen">Context is queen</h3>
<p>First, consider where people might access your content: Are they out and about or strapped down to a desk? What devices are they using? Good design lets people access the content they need when they need it, <a href="/5-ways-to-bridge-the-designer-developer-gap-on-responsive-web-projects">so start your designs with the smallest and largest screens in mind</a>.</p>
<h3 id="match-form-to-function">Match form to function</h3>
<p>Working with visual aesthetics that resonate with your audience is your best bet. Keep an eye on trending styles, but <a href="/9-bad-reasons-for-a-website-redesign">don’t redesign just to keep up with the latest fads</a>. After all, trends come and go, but great design is timeless. And don’t forget that <a href="/why-content-comes-first">your content and your visual style should work together</a> to form a more powerful whole.</p>
<h3 id="dont-forget-to-delight">Don’t forget to delight</h3>
<p>Always be on the lookout for opportunities to delight your audience. Interactivity gives us a powerful way to create delightful moments through things like video, animated SVGs, or scroll-based interactions. And the future of design will only get more media-rich. Make sure, though, that your delightful interactions support your content, rather than distract from it.</p>
<h2 id="2-think-responsively">2. Think responsively</h2>
<p>Meet your audience on the devices they’re using now and the ones they’ll use next. Do everything you can with HTML- and CSS-based content to deliver your message on every device possible.</p>
<h3 id="start-small">Start small</h3>
<p>Once you’ve nailed down your design for the smallest screen, it’s easier to expand to larger screens like tablets or desktops. On the flipside, scaling down gives people a less-than-ideal experience. Or it just might not work at all.</p>
<h3 id="think-in-patterns">Think in patterns</h3>
<p>To make scaling up and down easier, think of your designs as rearrangeable systems of patterns or modules.</p>
<p>Aggregate all the pieces you’ll need: links, images, interactive elements, and content. Then start thinking about how they work together. Identify which pieces depend on each other, and which can be easily rearranged. For example, you may have a column of images on mobile that can reflow into a gridded gallery on a tablet.</p>
<h3 id="be-flexible">Be flexible</h3>
<p>Discuss what works and what doesn’t with your developer so you can strike the right balance between aesthetics and functionality.</p>
<h2 id="3-keep-your-code-clean">3. Keep your code clean</h2>
<p>As designers build digital content for the future, an extensible and reliable code base will become increasingly important.</p>
<p>Extensible code means it should work for you (and your developers), not against you. Create modular and adaptable elements, and stick to clear and consistent naming conventions, and you’ll be able to quickly update your code as your design needs change.</p>
<p>Reliable code works with languages that devices and browsers support now and will continue supporting in the future. HTML5 and CSS3 are the modern languages of digital design, and browsers will continue to evolve with them in mind. Instead of creating PDFs, or even using XML, use the web’s lingua franca to be truly future-proof.</p>
<h2 id="4-iterate-improve-repeat">4. Iterate, improve, repeat</h2>
<p>What’s the best way to ensure that your content stands the test of time? Keep improving.</p>
<p>After you publish, turn to your data. Did the average time on page drop after a redesign? Did an added interactive element spark a spike in pageviews? Knowing what works and what doesn’t should inform all your design decisions.</p>
<p>You’ll also need the right tools to measure your content—and that starts with format. Building your content in the language of the web lets you leverage Google Analytics or other built-in dashboards, while static formats like PDFs won’t offer any insight. Think carefully about what data you’ll need from your content now and in the future, and which formats will give that to you.</p>
<h2 id="the-bottom-line">The bottom line</h2>
<p>When you’re riding a steamroller strapped to a rocket, there’s no way to be 100% prepared for what devices or trends will hit the market next. But we do know that these 4 simple principles will help keep you in the saddle. Oh, and have some fun while you’re at it!</p>yashumittalTechnology moves like a steamroller strapped to a rocket engine—fast, furious, and flattening everything in its wake. It’s all about the newest thing. So when you’re designing content, you’ve got to wonder: how long will what I create actually last?
https://i.imgur.com/Pv049Ts.jpg
104 Free, Radical Science Icons2017-12-28T01:40:00+00:002017-12-28T01:40:00+00:00https://blog.codecarrot.net/104-free-radical-science-icons<p>What do designers and chemists have in common? They both have all the solutions.</p>
<p>Hopefully that got some sort of reaction. We’ll give you a moment to stop laughing before we let you know that the Swifticons team just designed a pack of 104 free science icons that you can <a href="//www.instamojo.com/codecarrot/radical-science-icons/">download here</a>. They’re perfect for corporate presentations, web apps, print designs, websites, or just for experimentation.</p>
<p><img src="https://cdn.codecarrot.net/images/free-science-icons-prev.jpg" alt="Free Radical Science Icon Preview" /></p>
<p><strong>What’s included</strong></p>
<p>Download the pack, and you’ll get 104 icons in the following formats: AI, EPS, JPG, PDF, PNG, and SVG—oh, and there are filled, flat, and outlined options for each format. Here are a few of the icons illustrated in the pack:</p>
<ul>
<li>Toxic barrel</li>
<li>Alien</li>
<li>Bacteria</li>
<li>Bomb</li>
<li>Moon</li>
<li>Brain</li>
<li>Mouse</li>
<li>Ugly virus</li>
<li>Telescope</li>
<li>Spaceship</li>
</ul>yashumittalWhat do designers and chemists have in common? They both have all the solutions.
https://cdn.codecarrot.net/images/free-science-icons-prev.jpg
Typography And Creating Grids For Screens2017-12-27T19:45:48+00:002017-12-27T19:45:48+00:00https://blog.codecarrot.net/typography-and-creating-grids-for-screens<p>At the core of typography is the critical task of setting type in grids. A grid brings order and hierarchy to a page—it lives at the center of any piece of design. It can influence every aspect of the design, like image ratios, measure, order of information, and the remainder of the layout.</p>
<p>Grids are an essential part of a designer’s arsenal, creating a neatly-crafted, equal system for arranging content in the space of a screen. But they aren’t rigid—grids can change depending on the content around them.</p>
<p>Related: <a href="/free-typography-resources">The big list of free typography resources</a></p>
<p>In this eBook (which is totally free—<a href="//www.instamojo.com/codecarrot/designing-with-type/">get the entire course here</a>), I’m going to talk about creating grids for screens.</p>
<h2 id="multi-column-grids">Multi-column grids</h2>
<p>A multi-column grid focuses on splitting the page into more than one vertical column, with a gutter. Traditionally for the screen, this has manifested itself in a 12-column grid, often set at 960px wide with 60px columns and 20px gutters.</p>
<p>The numbers 960, 60, and 20 may seem arbitrary, but there’s a good logic behind them: 960 is a versatile grid that is divisible by many different numbers (16, 12, 10, 8, 6, 4, and 2). This versatility makes it possible for a designer to use many varying widths within the grid to make a design feel both interesting and uniform.</p>
<h2 id="anatomy-of-a-grid">Anatomy of a grid</h2>
<p>A grid is made up of 2 parts: the column and the gutter.</p>
<ul>
<li>A <strong>column</strong> of a grid is the widest part</li>
<li>A <strong>gutter</strong> is the space between each column</li>
</ul>
<p>Gutters are technically made up of 2 margins. An example: With a 30px gutter, there are 15 pixels on either side of the entire grid from the outer columns.</p>
<p><img src="https://cdn.codecarrot.net/images/typography-grids-1-1.png" alt="Typography Grids" /></p>
<h2 id="to-baseline-or-not">To baseline or not?</h2>
<p>Maintaining a baseline when designing for the screen is next to impossible. It requires total control over the content to a degree that isn’t maintainable for most user interfaces or websites. With this in mind, I usually focus more on ensuring a consistent vertical rhythm rather than being strict about a baseline grid.</p>
<p><img src="https://cdn.codecarrot.net/images/typography-grids-1.png" alt="Typography Grids 2" /></p>
<p>If baselines are easy to maintain in print, why are they difficult to maintain for the screen? Because print is static and user interfaces are dynamic. It’s too difficult to enforce content guidelines or to estimate the sizes of media and content that people will add to a page. Even services like Instagram would struggle to maintain a baseline grid.</p>
<p>In short, focus on maintaining a clear, consistent vertical rhythm on a page and you’ll achieve a similar, just as elegant effect.</p>
<h2 id="creating-a-grid">Creating a grid</h2>
<p>Your grid for the screen should consider a number of things:</p>
<ul>
<li>The measure of the body text (How many columns will it span?)</li>
<li>The size of the viewport you’re designing for and the flexibility of that grid</li>
<li>The horizontal and vertical rhythms (the gutters and margins)</li>
</ul>
<p>A combination of these 3 allows you to come up with an idea grid. When designing for the web, I typically create a grid that’s around 1200px wide with 30px gutters, as this suits the size of type I tend to use for the screen and the kind of whitespace necessary for a project—plus, it looks great on the monitors we use today.</p>
<p><img src="https://cdn.codecarrot.net/images/typography-grids-2.png" alt="Typography Grids 3" /></p>
<p>So, figure out what the answer is to these requirements, and figure out a grid that’s right for you. Applications like Photoshop and Sketch have tools that let you create a grid and start practicing, so jump into these to find a perfect width for your project. Always pick a grid that can break down into different sizes, or one that will have flexibility to scale up or down in size.</p>
<p>When you’re using a grid, see it as a useful guide on how to lay out, reorganize, and set content into the page. Grids save you time.</p>
<h2 id="reducing-the-grid-to-a-smaller-size">Reducing the grid to a smaller size</h2>
<p>With responsive design, the size of the grid must increase and decrease. The values of the grid should always be a little flexible (e.g. percentages and max widths), but when the layout starts to break, know when to reduce the number of columns in the grid to suit the screen device.</p>
<p>To do this, simply resize the page to a point where it’ll break in its flexibility, and reduce the number of columns. The reduction of columns is an aspect some designers forget about and instead they reduce the widths of each column. Realistically, a 12-column grid on a 320px screen isn’t going to help anyone. So reduce it down to 2 or 4 columns so that sufficient gutters are available.</p>
<h2 id="putting-text-in-the-grid">Putting text in the grid</h2>
<p>Once you set up the grid, start setting type in the grid and placing content inside it. All text doesn’t have to be set flush left—it can be set in equal columns or anywhere on the page. Consider what you’ve learned in this e-course and use your new skills to create an elegant layout with type.</p>
<h2 id="grids-are-versatile">Grids are versatile</h2>
<p>Don’t ignore the versatility of the grid. Just because the edge of a column is there doesn’t mean images have to totally span all of the columns. Consider the Gestalt Principle of Proximity when designing within it.</p>
<p>For example, imagine you have a block of text, and to the right of it you have a sidebar that contains some links. If the text block went all the way up to the edge of the sidebar, those 2 blocks would feel related. As designers, we need to communicate to users that these 2 types of content aren’t necessarily related. An easy way to do this is to move them further apart! This breaks the grid a little, but it improves the experience.</p>
<p><img src="https://cdn.codecarrot.net/images/typography-grids-3.png" alt="Typography Grids 4" /></p>
<p>Breaking the grid is a great way to draw the reader’s eye to content or to a promotional area. When I’m designing a hero area, for example, I try to do something that disrupts the grid. This prevents that area from blending into the flow of the page, making the user more likely to engage with that area.</p>
<h2 id="final-thoughts">Final thoughts</h2>
<p>Typography has a massive impact on how a design is perceived. Make sure it’s one of the highest priorities on a project, and spend plenty of time choosing the right font and setting it correctly to bring visual harmony to a page.</p>
<p><a href="//www.instamojo.com/codecarrot/designing-with-type/"><img src="https://cdn.codecarrot.net/images/designing-with-type.png" alt="Designing with type" /></a></p>yashumittalAt the core of typography is the critical task of setting type in grids. A grid brings order and hierarchy to a page—it lives at the center of any piece of design. It can influence every aspect of the design, like image ratios, measure, order of information, and the remainder of the layout.
https://cdn.codecarrot.net/images/typography-grids.gif
Bringing Product Design Sprints Inside Your Company2017-12-27T18:39:42+00:002017-12-27T18:39:42+00:00https://blog.codecarrot.net/bringing-product-design-sprints-inside-your-company<p>Product Design sprints are consuming conversations among all sorts of makers—from authors testing out new book concepts to software teams working on the next VR breakthroughs.</p>
<p>Who wouldn’t love a prescriptive framework that enables you to validate your biggest ideas in 5 days?</p>
<p>But <a href="//www.codecarrot.net/services/design-sprint">Product design sprints</a> are new and disruptive to traditional approaches. That probably means that if you’re the one minting product design sprints inside your company, you’re probably also struggling to get others to play ball.</p>
<p><img src="https://cdn.codecarrot.net/images/nh-sprints-hero.jpg" alt="People discussing in group" /></p>
<h2 id="non-believers">Non-believers</h2>
<p>When I first read about Google Ventures’ design sprints, I was excited and suspicious. I was brainwashed at Accenture to believe project plans always needed months of gathering requirements and spec writing before a single discussion could take place about product design. How on Earth, then, could anything practical be accomplished in 5 days?!</p>
<p>But then something happened—I sat in on our first sprint we ran with a <a href="//www.codecarrot.net/clients.html">CodeCarrot client</a>. Sure, it was sloppy compared to how we run sprints today, but even in that beautiful disaster there was an obvious lift in thinking, collaboration, energy, and speed. We (and our clients) were instantly hooked.</p>
<p>Over the past year we’ve run dozens of sprints against our own ideas, as well as for the companies that hire us to design and build their digital products. But now, more and more, we’re talking with people on teams inside companies that have attempted to bring design sprints into their culture and hitting stiff arm after stiff arm… from navigating changing processes, to <a href="/why-business-leaders-should-care-a-lot-about-design-sprints">getting business leadership to agree</a>, to the bevy of other 1-line excuses.</p>
<p>Let’s break down these 3 types of pushback and arm you with some specific tips to help you bring product design sprints into your organization, successfully.</p>
<p><img src="https://cdn.codecarrot.net/images/nh-sprint-01.jpg" alt="Lessons learned from running a design sprint with an ed-tech startup" /></p>
<h2 id="new-is-scary">New is scary</h2>
<p>For many, the idea of changing anything stirs up angst. When we kick off with large organizations to train their product teams on design thinking we hear all sorts of grunts and groans. For example, project managers want to know how a sprint will impact budgets and timelines. The truth is, by spending these 5 well-orchestrated days upfront, we’ve seen product development budgets and timelines shrink by up to 75%. That’s PM gold right there!</p>
<p>Likewise, creative directors squirm that their design processes are already “lean,” “agile,” or both. But I bet they’d love a way to efficiently capture stakeholder and customer insights upfront so their design teams had better direction with the solutions they were building.</p>
<p><img src="https://cdn.codecarrot.net/images/nh-sprint02.jpg" alt="How to assemble your Product design sprint team" /></p>
<h2 id="5-days-in-a-row-will-never-happen">“5 days in a row will never happen”</h2>
<p>Everyone is busy. That’s why one of the biggest gripes we hear from people, especially those operating in corporate environments where you have meetings to plan for meetings, is that the idea of spending 5 days on a single topic seems impossible.</p>
<p>But the issue is that they’ve never had a real process (brainstorming is not a process) to raise an important challenge and identify a solution that didn’t involve weeks of emails, stakeholder interviews, meetings, and more meetings. Product Design sprints now provide that exact framework.</p>
<p>When these same people complete their first product design sprint with us, not a single individual leaves the sprint week without acknowledging how much time they could have saved over their career had they adopted the process sooner.</p>
<h2 id="brainstorming-is-not-a-process">“Brainstorming is not a process.”</h2>
<p><strong>Pro Tip:</strong> Try to convince the team to spend time getting through Day 1 of the sprint. This should provide enough insight into how powerful the sprint can be, to get them to agree to finish the remaining 4 days.</p>
<h2 id="when-all-else-fails-pick-an-excuse">When all else fails, pick an excuse</h2>
<ul>
<li>“We’ve tried brainstorming meetings.”</li>
<li>“Our customers don’t know what they want.”</li>
<li>“We already did our research.”</li>
<li>“We are the customer.”</li>
<li>“We know what we have to build.”</li>
</ul>
<p>Most of us are creatures of habit and comfort. We trust what we know already. So when it comes to deciding how to solve a really important problem, most of us want to jump right to the solution. We convince ourselves and others around us that we already know everything we need to know and can just get started.</p>
<p><img src="https://cdn.codecarrot.net/images/nhsprint04.jpg" alt="People are writing on white board" /></p>
<p>Unfortunately, it’s typically not until weeks or months later that the hard questions appear and you need to start from the beginning, all over again.</p>
<p>Instead, product design sprints provide you with the tools and techniques to enable a team of individuals to arrive at the right solution, together, in 5 days.</p>
<p>Can your company afford for the answer to ever be “no” here?</p>yashumittalProduct Design sprints are consuming conversations among all sorts of makers—from authors testing out new book concepts to software teams working on the next VR breakthroughs.
https://cdn.codecarrot.net/images/nh-sprints-hero.jpg
Designing with type2017-12-27T15:45:48+00:002017-12-27T15:45:48+00:00https://blog.codecarrot.net/designing-with-type<p><a href="//www.instamojo.com/codecarrot/designing-with-type/">Sign up</a> to receive this free eBook on using typography with purpose.</p>
<p>Learn basic type terms, the mechanics behind the best font pairings, how to use type on a grid, and much more.</p>
<p>You’ll learn the following in this eBook:</p>
<ol>
<li>Describing typefaces</li>
<li>Choosing a font</li>
<li>Pairing fonts</li>
<li>Developing a hierarchy</li>
<li>Formatting text</li>
<li>Kerning and tracking</li>
<li>Ligatures, small caps, and numerals</li>
<li>Dashes, punctuation, and bullets</li>
<li>Setting type in grids</li>
</ol>
<p><a href="//www.instamojo.com/codecarrot/designing-with-type/">Sign up</a> to receive this free eBook on using typography with purpose.</p>yashumittalSign up to receive this free eBook on using typography with purpose.
https://cdn.codecarrot.net/images/designing-with-type.jpg
23 Obvious Signs You’re a Writer2017-12-22T18:21:00+00:002017-12-22T18:21:00+00:00https://blog.codecarrot.net/23-obvious-signs-you-re-a-writer<p>Ah, the writing life. You know it so well.</p>
<p>Endless caffeine, a little bit of procrastination, blank Word documents, piles of notebooks, bouts of self-doubt and the satisfying clickety-clack of the keyboard. All things those of us who fancy ourselves writers are intimately familiar with. (OK. Maybe it’s a lot of procrastination, not just a little.)</p>
<p>We took to social media to ask writers all over the world to complete the sentence, <em>“You know you’re a writer when…”</em> The results are hilarious, honest and heartfelt.</p>
<h2 id="you-know-youre-a-writer-when">You know you’re a writer when…</h2>
<p>You keep a journal and pen by your bed — you know, for those middle-of-the-night bursts of inspiration.</p>
<p><img src="https://cdn.codecarrot.net/images/when-i-try-to-do-work-in-bed.gif" alt="when-i-try-to-do-work-in-bed" /></p>
<p>Every moment when you’re not writing is spent thinking about writing.</p>
<p><img src="https://cdn.codecarrot.net/images/thinking-about-something.gif" alt="thinking about something" /></p>
<p>You take a sick day from work to stay home and work on your latest project.</p>
<p><img src="https://cdn.codecarrot.net/images/dog-typing-while-laying-on-bed.gif" alt="Dog typing while laying on bed" /></p>
<p>You can never have enough coffee to keep you going.</p>
<p><img src="https://cdn.codecarrot.net/images/drinking-a-lots-of-coffee.gif" alt="Drinking a lots of coffee" /></p>
<p>You have a stockpile of 15+ blank notebooks and journals and buy more faster than you fill them.</p>
<p><img src="https://cdn.codecarrot.net/images/just-thinking-to-write-something.gif" alt="Just thinking to write something" /></p>
<p>Your friends, family, and colleagues make you write their important emails, cover letters…and even the inscriptions on greeting cards.</p>
<p><img src="https://cdn.codecarrot.net/images/writing-something-on-paper.gif" alt="Writing something on paper" /></p>
<p>You turn down plans with family and friends so you can keep writing.</p>
<p>You type, type, type away and don’t even care about the time.</p>
<p><img src="https://cdn.codecarrot.net/images/typing-like-a-mad-person.gif" alt="Typing like a mad person" /></p>
<p>Your wrist physically aches.</p>
<p><img src="https://cdn.codecarrot.net/images/suddenly-starting-paining-in-wrist.gif" alt="Suddenly starting paining in wrist" /></p>
<p>You finish reading a novel and you head straight to your laptop to start writing yours!</p>
<p><img src="https://cdn.codecarrot.net/images/heading-somewhere-to-go.gif" alt="Heading somewhere to go" /></p>
<p>Your friends and family are a tad sick of hearing about your latest writing project.</p>
<p><img src="https://cdn.codecarrot.net/images/family-is-watching-you-while-dancing.gif" alt="Family is watching you while dancing" /></p>
<p>You get in a writing groove and just can’t stop.</p>
<p><img src="https://cdn.codecarrot.net/images/getting-excited-by-something.gif" alt="Getting excited by something" /></p>
<p>Word counts only slightly stress you out. OK. They really stress you out.</p>
<p><img src="https://cdn.codecarrot.net/images/man-typing-on-type-writer.gif" alt="Typing on a type writer" /></p>
<p>Your computer is filled with half-baked story ideas that you’ll get to one day.</p>
<p><img src="https://cdn.codecarrot.net/images/person-writes-about-zombies.gif" alt="Person writes about zombies" /></p>
<p>A blank page no longer scares you.</p>
<p><img src="https://cdn.codecarrot.net/images/not-really-a-good-idea.gif" alt="Not really a good idea" /></p>
<p>You think “this will make a great story” as you’re in the middle of an experience.</p>
<p><img src="https://cdn.codecarrot.net/images/this-is-the-best.gif" alt="This is the best" /></p>
<p>You’d rather be reading a book.</p>
<p><img src="https://cdn.codecarrot.net/images/i-have-books-as-friends.gif" alt="I have books as friends" /></p>
<p>You use words like an artist uses paint.</p>
<p><img src="https://cdn.codecarrot.net/images/artist-is-painting-the-painting.gif" alt="Artist is painting the painting" /></p>
<p>Writing non stop for more than 10 minutes.</p>
<p><img src="https://cdn.codecarrot.net/images/when-you-are-writing-non-stop.gif" alt="When you are writing nonstop" /></p>
<p>Every part of your life (purse, car, house) is filled with random Post-it Notes and scribbled-on-receipts because you got an idea at a random moment.</p>
<p><img src="https://cdn.codecarrot.net/images/pages-flew-away-because-of-air.gif" alt="Pages flew away because of air" /></p>
<p>Killing off one of your beloved characters gives you real heartbreak.</p>
<p><img src="https://cdn.codecarrot.net/images/girl-is-crying.gif" alt="Girl is crying" /></p>
<p>You finally admit it to yourself.</p>
<p><img src="https://cdn.codecarrot.net/images/i-love-writing-and-i-recommend-it-to-everyone.gif" alt="I love writing and i recommend it to anyone" /></p>
<p>You write. Simple as that.</p>
<p><img src="https://cdn.codecarrot.net/images/flipping-the-pages.gif" alt="Flipping the pages" /></p>yashumittalAh, the writing life. You know it so well.
https://cdn.codecarrot.net/images/photodune-5057545-writing-woman-lying-in-bed-s.jpg
How to Make Your Mobile Marketing Strategy2017-12-21T18:41:25+00:002017-12-21T18:41:25+00:00https://blog.codecarrot.net/how-to-make-your-mobile-marketing-strategy<p>People are using mobile as an integral part of their day-to-day lives and as an online marketer, you need to get onboard. Your audience determines what marketing strategies you need to incorporate. What makes sense for one target base may not interact with the other, therefore you need to keep this in mind while formulating your mobile marketing strategy.</p>
<p>As per Google, nearly 60% of searches come directly from mobile devices. This number is huge and hence your content must be optimized for a seamless mobile experience.</p>
<p>To start with, conduct a small survey and ask people how they use their mobile. It will help you to formulate your strategies. Here are three simple questions which you should definitely ask in your survey:</p>
<ul>
<li>Which types of mobile devices do you use?</li>
<li>Where do you access to content with your phone or tablet?</li>
<li>What types of content do you consume on your mobile device?</li>
</ul>
<p>The data you get from your survey will further guide you. Consider below-mentioned steps and boost your mobile marketing strategy like never before:</p>
<h2 id="step-1-define-your-target-audience">Step 1: Define Your Target Audience</h2>
<p>The first step is to identify your target audience and map its behavior. Most of the online businesses will have more than one set of audience. You need to define the demographics, behavior, and interests of your prospect target audience before starting any mobile marketing activity.</p>
<p>Identifying your target audience helps you:</p>
<ul>
<li>Determine which mobile channel makes sense for which audience base</li>
<li>Determine what kind of content you need to create</li>
<li>Set the tone and delivery strategies for your mobile messages</li>
<li>Understand where your buyers get their information and how they want to consume it on a mobile platform</li>
</ul>
<h2 id="step-2-understand-the-customer-life-cycle">Step 2: Understand the Customer Life-cycle</h2>
<p>Now that you have identified your prospect target audience, you need to define their customer lifecycle. It will help you in determining the entire decision-making process during the purchase of your products or services. Through customer life-cycle, you can directly speak with your customers at any given point of engagement.</p>
<p>The process of customer lifecycle involves:</p>
<ul>
<li>Awareness</li>
<li>Research</li>
<li>Sale</li>
<li>Feedback</li>
<li>Advocacy</li>
</ul>
<h2 id="step-3-define-your-goals">Step 3: Define Your Goals</h2>
<p>Once you have determined your target audience and mapped out its life cycle, you must define your goals. Making your mobile strategy should be a holistic part of your business goal and it should relate to the company’s overall business. The key to creating a successful mobile marketing strategy is to first identify what you are doing now for mobile engagement and then asking:</p>
<ul>
<li>Are you currently using responsive design in your marketing materials?</li>
<li>Do you currently have a mobile app?</li>
<li>Are you currently using push notifications?</li>
</ul>
<p>This question enables you to define your goals.</p>
<h2 id="step-4-define-your-kpis">Step 4: Define Your KPIs</h2>
<p>Set your KPIs (Key Performance Indicator) after you have defined your marketing goals. While there are large numbers of possible KPIs, you may consider customer engagement as the most crucial aspect. It is one of the keyparametersr to measure the success of your mobile activity.</p>
<p>How is this measured? Well, below are some critical aspects which you can consider to define your KPIs</p>
<ul>
<li>Number of app downloads</li>
<li>Total number of mobile users</li>
<li>Contacts and new customers attributed to mobile</li>
<li>Spend per new mobile customer</li>
<li>Higher conversion rates</li>
<li>Closed sales connected to mobile contacts</li>
<li>Customer lifetime value of mobile users</li>
<li>In app purchases</li>
</ul>
<h2 id="step-5-integrate-in-overall-strategy">Step 5: Integrate in Overall Strategy</h2>
<p>Think about how your mobile marketing strategy fits into your overall marketing initiatives. Visit your marketing calendar to determine how other channels are communicating with your existing customers and prospect audience base. Deliver a coordinated customer experience across all of channels that your customers use.</p>
<p>Set the frequency of your communication if you are engaging in mobile notification of any kind. Also ensure that all your communications are in sync. Set a marketing calendar which records all your marketing activities taking place across channels at one place.</p>
<p>In order to communicate with your customers every day, you must include mobile as an important part of your marketing strategy. To create mobile campaigns that are engaging and compelling, you need to create a mobile strategy that shapes the state of your online business effectively.</p>yashumittalPeople are using mobile as an integral part of their day-to-day lives and as an online marketer, you need to get onboard. Your audience determines what marketing strategies you need to incorporate. What makes sense for one target base may not interact with the other, therefore you need to keep this in mind while formulating your mobile marketing strategy.
https://i.imgur.com/4tjDmMI.jpg
How to Increase Website Readership2017-12-21T18:21:00+00:002017-12-21T18:21:00+00:00https://blog.codecarrot.net/how-to-increase-website-readership<p>Google today processes more than 40,000 searches every second which amounts to over 3.5 billion searches per day and 1.2 trillion searches annually. This statistics clears that online visitors are endless and they are just a click away from visiting your web-page.</p>
<p>This massive audience base doesn’t have to pay in order to visit your website. All you have to do is showcase your website in front of their search queries. It makes readership quite crucial for your online business.</p>
<p>Building a strong readership comes with hard work and consistent effort. It is challenging but definitely rewarding. By devising correct strategies, you can successfully increase your readership and drive sales to your website.</p>
<p>However, you should not be implementing any magic formula circulating the internet. Your efforts must contribute positively to your search engine optimization. Don’t indulge in link building schemes or networks. Instead follow these simple steps which you can integrate to increase readership on your website:</p>
<h2 id="be-creative">Be Creative</h2>
<p>Creative content is the most valuable driving force which can increase readership. Publish blogs which are creative and valuable. Even if your main purpose is to drive sales, don’t promote your product directly in every content piece. Instead try to create a knowledge and diversified pool.</p>
<h2 id="be-engaging">Be Engaging</h2>
<p>Engage your readers that boosts your website and thereby increasing readership. Try engaging your readers with contests, brain teasers and puzzles.</p>
<h2 id="be-consistent">Be Consistent</h2>
<p>Post content on regular basis as it keeps your readers interest alive. Also define ideal time and frequency of content publication. Frequent posting of content not only maintains relevancy but also enhances your search engine optimization. It refreshes your web-pages, thereby inviting Google Crawlers to your website more habitually.</p>
<h2 id="enhance-with-multimedia">Enhance with Multimedia</h2>
<p>High definition and creative images increases the possibility of high readership. Multimedia images, videos and info-graphics helps in engagement.</p>
<h2 id="go-social">Go Social</h2>
<p>One of the most popular way to increase readership on your website is Social Media Marketing. Publish your content on social channels such as Facebook, Twitter and LinkedIn. With large customer base and easy-to-navigate interface social media can help in increasing readership.</p>
<h2 id="feed-the-humming-bird">Feed the Humming Bird</h2>
<p>Humming Bird is the new algorithm where Google has been ranking synonyms in its search results. Don’t forget to optimize your content for synonyms. For example, if you search for “<a href="//www.codecarrot.net/">CodeCarrot Developer</a>”, you will also see results for “Website Developer”. Hence, include multiple synonyms of value prepositions which you are marketing across channels.</p>
<h2 id="diversified-content">Diversified Content</h2>
<p>Too much photos and videos can be bad for your website. Hence, try publishing diversified content such as articles, posts, offers, info-graphics etc. It keeps your reader’s interest as intact.</p>yashumittalGoogle today processes more than 40,000 searches every second which amounts to over 3.5 billion searches per day and 1.2 trillion searches annually. This statistics clears that online visitors are endless and they are just a click away from visiting your web-page.
https://cdn.codecarrot.net/images/jens-kreuter-58481.jpg
How to make a difference for a cause that matters2017-12-19T20:51:00+00:002017-12-19T20:51:00+00:00https://blog.codecarrot.net/how-to-make-a-difference-for-a-cause-that-matters<p>If you see a need and are moved to help, act on that impulse. Remember that most causes — <a href="https://www.codecarrot.net/clients/hasifoundation">HASI Foundation</a> — often can’t get enough help. You don’t need to wait for someone else to step up and set things into action when you can do it yourself. Want to know how to make a difference? Just use these five steps.</p>
<h2 id="get-started-in-5-simple-steps">Get started in 5 simple steps</h2>
<p>With all that’s going on in the world, it’s easy to get discouraged. The antidote? Action.</p>
<ol>
<li>Recruit participants.</li>
<li>Name your cause.</li>
<li>Start crowdfunding.</li>
<li>Work your website.</li>
<li>Promote your cause.</li>
</ol>
<p>If you’re ready to learn how to make a difference for causes you care about, let’s dive in!</p>
<h2 id="1-recruit-participants">1. Recruit participants</h2>
<p>Like we said, taking action for good won’t be difficult. It’s something that many of your peers are most likely interested in as well! When friends see how passionate you are about helping, they’ll be encouraged to jump on board.</p>
<blockquote>
Reach out to friends, family and peers who have similar interests as you and may be compelled to help.
</blockquote>
<p>Once you round up a group of interested individuals, you can build a team of fundraisers or volunteers. A solid team is the first step to answering your question of how to make a difference. It’s a vital element in organizing your fundraiser.</p>
<h2 id="2-name-your-cause">2. Name your cause</h2>
<p>Next up, you’ll want to name your cause, making sure your team knows exactly what you’re supporting and why. This way, you can avoid any feelings of uncertainty or hesitancy from your volunteers and donors and instead build trust.</p>
<p><img src="https://i.imgur.com/WwLXHZX.jpg" alt="How to Make a Difference Fire" /></p>
<blockquote>
Be transparent with your team and later on, your donors, so everyone knows what cause you’re supporting and where their donations are going.
</blockquote>
<p>Take a look and see if a matching domain name is available. If it is, register it now before someone else does. If your preferred domain is already taken, think of something similar that still relates to your cause.</p>
<p>Sure, <strong>.com</strong> is the most widely recognized domain extension and it’s a solid choice. But you might also consider these domain extensions for naming your cause:</p>
<ul>
<li>.gives</li>
<li>.love</li>
<li>.house (.casa .maison, .haus)</li>
<li>.build</li>
<li>.life</li>
<li>.earth</li>
<li>.zone</li>
<li>.faith</li>
<li>.vote (.voto)</li>
<li>.partners</li>
<li>.family</li>
<li>.land</li>
<li>.lgbt</li>
<li>.club</li>
<li>.community</li>
<li>.farm</li>
<li>.network</li>
<li>.care</li>
<li>.one</li>
<li>.pet</li>
<li>.repair</li>
</ul>
<p>Registering a domain that matches your cause as closely as possible helps keep your efforts transparent. In addition, the right domain name will inform your donors of what cause you’re raising money for right off the bat so there’s never a moment where they’re in the dark. Find more tips on choosing a domain name <a href="/10-tips-for-choosing-the-perfect-domain-name">here</a>.</p>
<h2 id="3-start-crowdfunding">3. Start crowdfunding</h2>
<p>One of the easiest ways to fundraise digitally is through a crowdfunding platform, which helps new organizations transform a typical in-person campaign into an online campaign.</p>
<div class="callout">
Crowdfunding platforms harness the power of social sharing and personal networks.
</div>
<p>While you ask for donations from your friends, family and peers, your provider will also help you create an online crowdfunding page to explain your cause’s significance and accept donations from a potentially global audience.</p>
<p><strong>What to look for in a crowdfunding platform</strong></p>
<p>Every crowdfunding platform offers different features, but here are some popular ones you should look into:</p>
<ul>
<li><strong>Fundraising thermometer.</strong> A fundraising thermometer on your crowdfunding page will constantly display how close you are to reaching your goal. The closer you get, the more urgency is created and the more donors will feel compelled to contribute.</li>
<li><strong>List of participants.</strong> Many crowdfunding platforms will publish who donated and how much they donated to your campaign right on your page. This often encourages other supporters to donate!</li>
<li><strong>Updates.</strong> In order to successfully engage donors and empower them to donate, you’ll need to share your passion for the cause. Pick a platform that lets you post updates on the progress of your campaign, along with impactful photos and videos.</li>
<li><strong>Secure payment processing.</strong> Make sure your platform is PCI-compliant, meaning it follows all of the Payment Card Industry’s regulations to protect both you and your donors.</li>
<li><strong>Social sharing.</strong> You’ll want to share information about your crowdfunding page on social media as well to encourage your donors to share your campaign with their own networks.</li>
</ul>
<p>Keep in mind, you’ll want to avoid crowdfunding platforms that aren’t geared toward philanthropy because you’re raising money with a specific charitable cause in mind. When it comes to how to make a difference, crowdfunding is a popular and successful option!</p>
<h2 id="4-work-your-website">4. Work your website</h2>
<p>You don’t have to be a tech guru for this step! We <em>(<a href="https://www.codecarrot.net/">CodeCarrot</a>)</em> can help you out to build a website for you, that can accept donations, publish calendars and organize volunteers can give you more leverage in persuading website visitors to support your cause.</p>
<blockquote>
By building your own website, you have more influence on how it looks and what it displays, meaning you have more persuasion on your side.
</blockquote>
<p>How to make a difference starts with your passion for your cause. Make this clear throughout your new website. That way, your donors will instantly be drawn to donate when landing on it.</p>
<h2 id="5-promote-your-cause">5. Promote your cause</h2>
<p><img src="https://i.imgur.com/mUidHAv.jpg" alt="One by one by one we can make our corner of the world a better place" /></p>
<p>Your next step is to get the word out about your cause. The most effective promotional tools include social media, blogging and email.</p>
<p>You’ll want to promote your cause on both your blog and your social media sites. You should craft a promotional strategy for your blog and your social media, too, when it comes to your campaign. An editorial calendar will help you organize what to post and when to post it. Remember to include plenty of descriptive photos and videos to emphasize your passion for your cause.</p>
<p><strong>Pro tip:</strong> For your blog to successfully promote your new campaign, you should make sure you start blogging at least half a year before your campaign launches.</p>
<p>Keep in mind that a huge part of successfully promoting your campaign is to maintain your authenticity. Build your campaign’s brand and stick to it.</p>
<h2 id="how-to-make-a-difference">How to make a difference</h2>
<p>So there you have it, five easy steps that will change the world by organizing and fundraising for a cause you feel connected with. Remember that if you feel compelled, you can take action to make your corner of the world a little brighter!</p>yashumittalIf you see a need and are moved to help, act on that impulse. Remember that most causes — HASI Foundation — often can’t get enough help. You don’t need to wait for someone else to step up and set things into action when you can do it yourself. Want to know how to make a difference? Just use these five steps.
https://i.imgur.com/lN8z1zq.jpg
Buying a new Domain name? Avoid these stinky domain naming mistakes2017-12-19T18:11:20+00:002017-12-19T18:11:20+00:00https://blog.codecarrot.net/buying-a-new-domain-name-avoid-these-stinky-domain-naming-mistakes<p>Buying a domain for your business is a big deal. I feel like I put as much time and thought into finding the right domain for my new beard care business as I did thinking of a name for my daughter. Well, maybe not quite that much, but certainly more effort than it would’ve taken to register the first not-quite-perfect-but-available domain name that popped into my mind.</p>
<p>Unfortunately, that’s what a lot of entrepreneurs do. And it’s a big mistake.</p>
<p>Your domain name is your business’s unique identifier on the web, so it’s super-important that it makes the right impression. If you avoid these five domain naming mistakes, you’ll be well on your way to making that happen.</p>
<h2 id="1-dont-fart-or-avoid-an-embarrassing-mishap">1. Don’t fart (or, avoid an embarrassing mishap)</h2>
<p>Seriously, it never goes over like you think it will. I have a friend named Frank who makes some amazing sculptures using liquid metal. He signs all of his artwork with a single letter “F.” When he started his website for F Art Gallery, he called me up for some help registering a domain.</p>
<p>I didn’t think anything of it, until I went online to see if the domain that exactly matched the name of his business was available. As I typed out Frank’s choice domain name, I burst into tears with laughter. I couldn’t even talk on the phone while I caught my breath. The gallery’s domain sounded great when written with the appropriate spaces — but not when typed into a web browser. Sure, fartgallery.com was memorable. But I doubted it was the kind of memory Frank wanted to leave with potential customers.</p>
<p>So when you think about your website address, think about it as a sequence of words and letters in a sequence, rather than as separate words. You’ll save yourself some embarrassing looks when people see your new domain on a business card or email address.</p>
<h2 id="2-dont-show-off-or-try-too-hard-to-be-clever">2. Don’t show off (or, try too hard to be clever)</h2>
<p>The point of doing business online is to make it easy for people to find your website and take whatever action you want them to take — check out your products and services, call you for estimates, buy your widgets, whatever.</p>
<blockquote>
If you want people to easily find you, don’t make it hard for them to remember your website address by choosing a domain name that takes liberties with language simply for the sake of being clever.
<blockquote>
Say you’re selling orange-flavored water and you decide to name your business Karrot. (Most) carrots are orange. They’re all spelled with a “c.” You think it’s a witty name and are stoked to snag karrotwater.global as your domain name. Bad move. If people hear your business name and want to check you out online, they’re likely to search for carrotwater.global. That will do you no good.
Also consider the international spelling of words. If you use a word like “colour” and your business is primarily doing business in the U.S., expect to lose potential customers typing your domain with the American spelling of “color.” Clever is cute, but using a clever spelling of a domain makes it harder to market your business online. That leads us to our next don’t.
## 3. Don’t stunt your growth (or, name yourself into a corner)
In the example above, you’ve effectively chosen a name that makes it seem like you sell carrot-flavored water. Yum. What’s more, you’ve named yourself into a corner if you decide to branch out into other flavors. When choosing a domain name, it pays to think ahead.
I was looking to include “Arizona” in the domain for my new business because I live here. The problem is that because I want customers from all over the world, I had to respect that not everyone loves or cares about where I’m located. If you are a brick-and-mortar business and you service a specific region, jump in the geo-domain with both feet. It’s the best thing you can do for a great search engine ranking. On the other hand, if you are an online business with a global market, be as generic with your domain name as possible.
The same is true with the products and services you offer. Avoid GenericCarWash.com if you also provide tune-ups and tire rotations. You’ll make a killing on car wash customers, but you’ll miss out on those lucrative add-on services your potential customers don’t know you offer. Consider GenericAutoCare.com instead. Give yourself room to grow.
## 4. Don’t be antisocial (or, pick a domain that’s not available on social media)
I was convinced I had the perfect domain name for my startup beard care business. I’d done my research and knew it was available. Then I went over to Facebook to create my first Facebook Business Page — and when I typed in the business name, Facebook told me it was already taken. How could that be? I re-checked and my preferred .com domain was definitely not registered by someone else. Back to Facebook …. Ah, the business with my chosen name was operating in Australia, and had registered the domain name with the .com.au extension.
Sure, I could have purchased the .com version like I had planned, but that might set me up for trademark issues down the road. Not to mention the confusion it might cause when marketing my business on social media. Back to the domain naming drawing board.
<blockquote>
My best advice is to check social media before settling on your new domain.
</blockquote>
You’ll avoid both potential trademark issues and lost sales. It’s just not worth the risk of potential customers turning up a competitor’s site when they type in your too-similar domain.
## 5. Don’t sell yourself cheap (or, avoid premium domains)
I know an entrepreneur who went looking for his business domain and it was already taken, but for sale on the domain aftermarket. The .com version was listed for $2,500 — a price this entrepreneur considered too high to shell out for the ideal domain name. He decided to go with the .net version because it was available at a normal price.
Within a few years the business exploded; their product was everywhere. This happy entrepreneur then decided to invest in the .com version of the business’s domain name. Here’s the catch: A heck of a lot of people had been typing .com instead of .net when searching for the business’s website. The company’s marketing content might’ve clearly stated the correct website address, but .com has been around for so long that it’s the default domain extension for many web users.
The result? The impressive number of “hits” to the parked web page attached to the premium .com domain had spiked its price to $15,000.
A simple decision to save money turned into a $15k mistake. So, if you know you want a domain for your business and it’s available as a premium domain, save up and invest in the perfect domain at the beginning. You can save yourself money in the long run.
## Good domain sense
I’ve seen these five common domain naming mistakes repeated over and over again during the time I’ve spent helping small business owners register domains. But I’ve also watched plenty of entrepreneurs with great ideas do them justice by taking the time to pick just the right domains. Here’s how, in a nutshell:
* Write out your domain. You want to make sure people will read it the way you intend it to be read.
* Make it easy to spell and remember.
* Ensure nobody else is using your business/preferred domain name on social media.
* Think ahead to pick a name that will grow with your business.
* Invest in a premium domain name if it’s the perfect domain for your business.
Oh, and don’t feel like you’re limited to one domain. There are a lot of good reasons to register more than one domain for your business. It’s easy to point secondary domains — like domains that account for common misspellings of your domain, or that feature geographic- or industry-specific domain extensions — to your primary site. With these basic domain naming tenets in mind, you’ll be well on your way to picking a domain name for your business that smells just right.
</blockquote></blockquote>yashumittalBuying a domain for your business is a big deal. I feel like I put as much time and thought into finding the right domain for my new beard care business as I did thinking of a name for my daughter. Well, maybe not quite that much, but certainly more effort than it would’ve taken to register the first not-quite-perfect-but-available domain name that popped into my mind.
https://i.imgur.com/HnnFpz5.jpg
10 tips for choosing the perfect domain name2017-12-19T17:11:20+00:002017-12-19T17:11:20+00:00https://blog.codecarrot.net/10-tips-for-choosing-the-perfect-domain-name<p>Choosing a domain name is similar to choosing a company name — it requires a lot of thought and consideration. Your domain name is your identity on the web; you want to make sure you choose a domain name that not only fits your business, but is also easy to find and promote.</p>
<p>Follow the steps below to help you pick the perfect domain name.</p>
<h2 id="1-make-it-easy-to-type">1. Make it easy to type</h2>
<p>Finding a domain name that’s easy to type is critical to online success. If you use slang (u instead of you) or words with multiple spellings (express vs. xpress), it might be harder for customers to find your site.</p>
<h2 id="2-keep-it-short">2. Keep it short</h2>
<p>If your domain name is long and complex, you risk customers mistyping or misspelling it. Short and simple is the way to go.</p>
<h2 id="3-use-keywords">3. Use keywords</h2>
<p>Try using keywords that describe your business and the services you offer. For example, if you’re a glass replacement business, you may want to register GlassRepair.com or GlassReplacement.com.</p>
<div class="callout">
Include the keywords that people enter when searching for your products or services.
</div>
<p>It helps improve your rank on search engines (which increases traffic) and just makes more sense to your customers.</p>
<h2 id="4-target-your-area">4. Target your area</h2>
<p>If your business is local, consider including your city or state in your domain name to make it easy for local customers to find and remember. Example: <em>bathindashop.com</em>.</p>
<h2 id="5-avoid-numbers-and-hyphens">5. Avoid numbers and hyphens</h2>
<p>Numbers and hyphens are often misunderstood — people who hear your website address don’t know if you’re using a numeral (5) or it’s spelled out (five) or they misplace or forget the dash. If you need these in your domain, register the different variations to be safe.</p>
<h2 id="6-be-memorable">6. Be memorable</h2>
<p>There are millions of registered domain names, so having a domain that’s catchy and memorable is essential. Once you’ve come up with a name, share it with close friends to make sure it sounds appealing and makes sense to others.</p>
<p>Quick solution: Got a great idea for a domain? Register your name today and put a website out there before someone else beats you to it.</p>
<h2 id="7-research-it">7. Research it</h2>
<p>Make sure the name you’ve selected isn’t trademarked, copyrighted or being used by another company. It could result in a huge legal mess that could cost you a fortune, as well as your domain!</p>
<p>Don’t forget to research the value of your possible domain. As the largest reseller of aftermarket domain names, Domain registrar has access to extensive data that we use to analyze millions of historical domain sales. Visit the domain registrar website to determine the value of your domain, so your can name your business with purpose.</p>
<h2 id="8-use-an-appropriate-domain-name-extension">8. Use an appropriate domain name extension</h2>
<p>Extensions are suffixes, such as .com or .net, at the end of web addresses. These can have specific uses, so make sure to choose one that works for your business. The .com domain extension is far and away the most popular, but it can be tough to get a short and memorable .com domain name because it’s been around for so long.</p>
<p>A bevy of new generic top-level domains — like .photography, .nyc and .guru — offer a great opportunity to register short and highly relevant names. And here are some other top extensions and how they’re often used:</p>
<p>.co : an abbreviation for company, commerce, and community.
.info : informational sites.
.net : technical, Internet infrastructure sites.
.org : non-commercial organizations and nonprofits.
.biz : business or commercial use, like e-commerce sites.
.me : blogs, resumes or personal sites.</p>
<p><strong>Pro tip:</strong> You don’t <a href="https://www.codecarrot.net/">need to build a website</a> for every domain. Just forward any additional domains to your primary website.</p>
<h2 id="9-protect-and-build-your-brand">9. Protect and build your brand</h2>
<p>To protect your brand, you should purchase various domain extensions, as well as misspelled versions of your domain name. This prevents competitors from registering other versions and ensures your customers are directed to your website, even if they mistype it.</p>
<h2 id="10-act-fast">10. Act fast</h2>
<p>Domain names sell quickly. Thankfully, they’re also inexpensive, so register your favorite domain names as soon as possible. If you’re having trouble finding an available name, domain registrars will suggest alternate names during your domain search to help you find the perfect domain name.</p>yashumittalChoosing a domain name is similar to choosing a company name — it requires a lot of thought and consideration. Your domain name is your identity on the web; you want to make sure you choose a domain name that not only fits your business, but is also easy to find and promote.
https://i.imgur.com/aMYkHuY.jpg
What is the Difference Between Free SSL Certificate & Paid SSL Certificate2017-12-19T15:50:00+00:002017-12-19T15:50:00+00:00https://blog.codecarrot.net/what-is-the-difference-between-free-ssl-certificate-and-paid-ssl-certificate<p><strong>Everything you need to know about the practical difference between a free and a commercial SSL Certificate.</strong></p>
<p>In an age when the number of hacking attempts and fraudulent activities is growing with each passing day, website owners and online users have become much more concerned about their security. As a result, having an SSL certificate installed has become a prerequisite for any website. Not only do SSL certificates serve as an invaluable weapon for web security, but they can also give you a helping hand to boost your search engine rankings.</p>
<p>As you probably know, there are two types of SSL certificate. The first one is ‘Free SSL Certificate’, which as the name suggests is available for free. The other one which is paid is simply known as ‘SSL Certificate’. Let’s have a closer look at both.</p>
<p><img src="https://cdn.codecarrot.net/images/free-ssl-vs-paid-ssl.jpg" alt="Free SSL vs Paid SSL certificate" /></p>
<h2 id="what-is-a-free-ssl-certificate">What is a Free SSL Certificate?</h2>
<p>As the name implies, these certificates don’t have a price tag attached to them. The purpose of making an SSL certificates available free of cost was to make the access to HTTPS available for all websites.</p>
<p>Free SSL certificates fit into two categories. ‘Self-Signed Certificates’ are the ones in which there is no need for any Certificate Authority to sign them. They are signed by the issuer him/herself. On the other hand, the second type of free SSL certificate available in the market is signed by a Certificate Authorities (CA). As far as the level of encryption is concerned, a free SSL certificate provides the same level of encryption as the paid ones.</p>
<h2 id="paid-ssl-certificates">Paid SSL Certificates</h2>
<p>To equip a website with these certificates, one must pay for it. A paid certificate is issued and signed by a trustworthy certificate authority (CA). You either get it directly from the Certificate Authority’s website or you can purchase it from 3rd party entities called ‘Resellers’.</p>
<p>As far as the level of encryption is concerned, a free SSL certificate provides the same level of encryption as a paid one. Now you must be wondering, ‘why should I pay for the same certificate when you can get it for free?’</p>
<p>Well, there are some major differences between the two.</p>
<h2 id="key-differences-between-free-ssl-and-paid-ssl">Key Differences Between Free SSL and Paid SSL</h2>
<h3 id="type-of-ssl-certificate">Type of SSL Certificate</h3>
<p>Free SSL certificates only come with a Domain Validation (DV) option. DV certificates are used only for providing a basic level of authentication. Usually, they are used for platforms such as small websites and blogs. Free SSL certificates don’t have the provision for Organization Validation (OV) and Extended Validation (EV) certificates. Whereas the paid SSL certificates do come with OV & EV options, which are absolutely necessary for protecting business websites.</p>
<h3 id="level-of-validation">Level of Validation</h3>
<p>When it comes to verifying a website owner’s business details before issuing a free certificate, CA does not validate anything apart from the identity of the website owner. While in the case of paid SSL certificates, verification of the identity of the website owner is a must before issuing the certificate to the site owner and in the case of OV & EV certificates, in-depth verification of the business is carried out by the certificate authority (CA).</p>
<h3 id="validity-period">Validity Period</h3>
<p>Free SSL certificates provided by popular CAs is issued for 30-90 days. As a result, the website proprietor must renew the certificate every 30-90 days. In the case of paid certificates, they can be issued for a period of 1-3 years.</p>
<h3 id="support">Support</h3>
<p>The certificate authorities (CAs) and resellers of paid certificates are committed to providing round the clock support to their customers. Those customers get to choose whichever type of support they want, be whether its chat, email or call. On the other hand, free CA’s don’t assist their customers with such remarkable support because they can’t afford to. If you need help with an issue regarding free SSL, you’re going to have sift through a bunch of old forum posts to find it.</p>
<h3 id="level-of-trust">Level of Trust</h3>
<p>As mentioned earlier, the free certificates assist with domain level validation only. If one wants to get OV and EV certificates, he/she has no option but to go with paid SSL certificates. With OV & EV certificates comes visual indicators such as the green address bar and better site seals. Whereas, free SSL certificates don’t deliver such privileges. It has been proven time and time again via research that the chances of a customer buying from you increase significantly with a green address bar and well placed site seals.</p>
<h3 id="warranty">Warranty</h3>
<p>With a free SSL certificate, if anything goes wrong on the CA’s end – like, a catastrophic failure of their PKI for instance – you are completely out of luck. Paid SSL certificates don’t have this issue, because they come backed by warranties that pay out anywhere between 10 grand and 1.75 mil.</p>
<h2 id="conclusion">Conclusion</h2>
<p>Today, web security has become a matter of ‘No Compromise’ and SSL certificates offer a great helping hand to site owners. There is no denying that free SSL certificates represent a great option for many, but as discussed above, they come with constraints. They are an ideal choice for someone who wants to secure his/her blog or even a small website. But when it comes to real business, there is not much to think about, is there? If the free SSL certificates were appropriate then all the leading e-commerce websites would be using them, right? But they don’t and there are plenty of reasons for it. Paid SSL certificates can help accelerate conversion rates on websites by implanting an element of trust in the customer’s mind which ultimately escalates revenues. Although you must pay a bit for it up front, you will surely savor the fruits later. After all, no good thing comes for free…right?</p>yashumittalEverything you need to know about the practical difference between a free and a commercial SSL Certificate.
https://cdn.codecarrot.net/images/the-importance-of-ssl-certificates.jpg
How much does a domain name cost?2017-12-19T15:31:00+00:002017-12-19T15:31:00+00:00https://blog.codecarrot.net/how-much-does-a-domain-name-cost<p>If you’re looking to start an online venture, securing a domain name is ground zero. Whether or not you already have an established business, you can’t make a stand on the internet without a domain. But how much does a domain name cost? How much time should you spend looking for one? What are your options? Fortunately, we’ve got some answers to help steer you in the right direction.</p>
<h2 id="how-much-does-a-domain-name-cost">How much does a domain name cost?</h2>
<p>The price of a domain name varies depending on a number of factors:</p>
<ul>
<li>The domain extension (i.e., <strong>.com</strong> vs. <strong>.shop</strong>)</li>
<li>Where you purchase the domain name from (i.e., a reputable registrar, an aftermarket service, a private seller, etc.)</li>
<li>The term length or add-ons you select (i.e., registering for multiple years, electing to include domain privacy, etc.)</li>
</ul>
<p>Generally speaking, a domain name can cost you anywhere from $2 to $20 per year, depending on specials or discounts. Newer domain extensions, such as <strong>.design</strong>, <strong>.global</strong> and <strong>.cheap</strong>, might be on the higher-end of that scale (or above it), as they’ve only recently gone on the market.</p>
<p>There are no definitive prices for domain names in these avenues. The business of buying and selling domains means that prices vary widely. The only way to know is to visit the domain registrar sites to get a feel for the cost.</p>
<p>Pro tip: If you’re looking to purchase a domain that someone else already owns, check out GoDaddy’s Domain Buy Service. Let the brokers handle the nitty-gritty of negotiating so you can own the domain your business deserves.</p>
<p>How do I pick one?</p>
<p><img src="https://i.imgur.com/dsVMw1Q.jpg" alt="How Much Does A Domain Name Cost Pick One" /></p>
<blockquote class="twitter-tweet" data-theme="light" data-link-color="#2B7BB9"><p lang="en" dir="ltr">10 <a href="https://twitter.com/hashtag/tips?src=hash&ref_src=twsrc%5Etfw">#tips</a> for choosing the perfect <a href="https://twitter.com/hashtag/domain?src=hash&ref_src=twsrc%5Etfw">#domain</a> name <a href="https://t.co/RFG1f3utXJ">https://t.co/RFG1f3utXJ</a><a href="https://twitter.com/hashtag/branding?src=hash&ref_src=twsrc%5Etfw">#branding</a> <a href="https://twitter.com/hashtag/marketing?src=hash&ref_src=twsrc%5Etfw">#marketing</a> <a href="https://twitter.com/hashtag/naming?src=hash&ref_src=twsrc%5Etfw">#naming</a> <a href="https://twitter.com/hashtag/business?src=hash&ref_src=twsrc%5Etfw">#business</a> <a href="https://twitter.com/hashtag/startup?src=hash&ref_src=twsrc%5Etfw">#startup</a> <a href="https://twitter.com/hashtag/sweets?src=hash&ref_src=twsrc%5Etfw">#sweets</a></p>— CodeCarrot (@codecarrotnet) <a href="https://twitter.com/codecarrotnet/status/946461977462833152?ref_src=twsrc%5Etfw">December 28, 2017</a></blockquote>
<script async="" src="https://platform.twitter.com/widgets.js" charset="utf-8"></script>
<p><a href="/10-tips-for-choosing-the-perfect-domain-name">When it comes to choosing a domain name</a>, there are a few things to consider:</p>
<h3 id="incorporate-keywords">Incorporate keywords</h3>
<p>What’s your business about? Are you selling T-shirts online or do you make handmade jewelry? Maybe you sell services instead of goods — that’s OK, too. You might try something like:</p>
<ul>
<li>mywebsite.com</li>
<li>mywebsite.shop</li>
<li>mywebsite.design</li>
</ul>
<p>Whatever you do, research keywords by using a tool like <a href="https://adwords.google.com/home/tools/keyword-planner/">Google Keyword Planner</a> and see what your target audience is searching for. Then, if you can, <a href="/domain-seo-can-including-keywords-in-a-domain-name-improve-search-ranking">incorporate one into your domain name</a>.</p>
<h3 id="avoid-hyphens-or-odd-spellings">Avoid hyphens or odd spellings</h3>
<p>How often do you use punctuation when searching for something online? My guess is rarely. The last thing you want is a domain name that requires extra effort from your visitors. Using something like, the-best-shirts-youll-ever-wear.com — no matter how compelling — won’t do you any favors.</p>
<blockquote>
Stay away from domains with hyphenations or odd spellings to make it easier for people to find you.
</blockquote>
<p>When possible, avoid using uncommon spellings or numbers. Is that a 4 or a four? What about 2, to, two or too? You catch my drift. If anyone ever shares your domain via word-of-mouth, your name could get lost in translation.</p>
<h3 id="make-it-memorable">Make it memorable</h3>
<p>There are more than one billion websites live on the internet right now. How are you going to make yours stand out? For starters, you’ll need a domain name that’s memorable. Use something that speaks to your brand or the services and products you offer. Make sure it rolls off the tongue nicely, and definitely run your ideas by friends and family. Don’t make the same mistakes as <a href="/buying-a-new-domain-name-avoid-these-stinky-domain-naming-mistakes">this guy did</a>.</p>
<h3 id="do-i-need-more-than-one">Do I need more than one?</h3>
<p><img src="https://i.imgur.com/ofcphjP.jpg" alt="How Much Does A Domain Name Cost Apples" /></p>
<p>Short answer, yes. Even if you only plan to launch one website, the answer is still yes. Let me tell you why — brand protection.</p>
<blockquote>
Owning multiple variations of your domain name accounts for accidental misspellings and encroaching competitors.
</blockquote>
<p>Remember the odd spelling examples we mentioned above? Even if you decided to opt with an easier version of your name, the true domain could still get misinterpreted. If you secure common errors, you can cover all your bases and still point each domain name to the primary site. Now, traffic that wants to find you will actually make it to your site, regardless of errant typos.</p>
<p>And, perhaps on a grander scheme, owning multiple domain names protects your business from mooching competitors. If you own <em>mywebsite.com</em> and are widely known for your grandmother’s chocolate chip recipe, you might find competitors eager to snag <em>myownwebsite.com</em>. Now, when foodies everywhere take to the internet in search of your goods, they could end up on someone else’s site.</p>
<p>If you have it in the budget, consider purchasing domain names pertinent to your brand (even if they’re not immediately recognizable as your business’s name) to keep competitors off your traffic.</p>
<h2 id="are-you-asking-the-right-questions">Are you asking the right questions?</h2>
<p>Instead of asking yourself, “how much does a domain name cost,” you should be asking, “how much would it cost my business not to have a domain that matches my brand?” It isn’t always easy to find an available domain name that aligns with your company. But the cost of sacrificing immediate recognition, traffic and sales could easily outweigh the price of a domain.</p>yashumittalIf you’re looking to start an online venture, securing a domain name is ground zero. Whether or not you already have an established business, you can’t make a stand on the internet without a domain. But how much does a domain name cost? How much time should you spend looking for one? What are your options? Fortunately, we’ve got some answers to help steer you in the right direction.
https://i.imgur.com/H9az1Rw.jpg
How a Password Manager Saves You Time2017-12-18T15:01:45+00:002017-12-18T15:01:45+00:00https://blog.codecarrot.net/how-a-password-manager-saves-you-time<p>Don’t we all wish we had a little more time? There never seems to be enough of it when it comes to checking everything off our to-do list and getting all our work done. What would you do for even just 10 minutes of your day back?</p>
<p>Believe it or not, a password manager does more than just store your passwords. It actively helps you save time on the tedious tasks you do every day. By making it easier to get things done and decreasing interruptions to your day, a password manager can improve your productivity tremendously and save you some serious time.</p>
<p>So just how does a password manager save you time?</p>
<h2 id="1-a-password-manager-fills-in-passwords-for-you">1. A password manager fills in passwords for you.</h2>
<p>Typing in a few usernames and passwords here and there doesn’t seem like a lot of effort. But you’d be surprised how quickly it adds up. Even if you recall your password immediately, it can take anywhere from a few seconds to more than 20 seconds to type in a username and password, and login to an account. By filling in passwords for you, a password manager saves you time typing in every single password when you need to login.</p>
<h2 id="2-a-password-manager-saves-you-from-password-resets">2. A password manager saves you from password resets.</h2>
<p>Even when you recall a password, it takes some time to type it out and login to an account. But if you don’t recall the password? Boy can that take some time to deal with. Going through an account recovery process can take several minutes and often involves more than one step. By remembering every password for you, and filling the correct one in when you need to login to a password-protected account, a password manager minimizes interruptions to your workflow and saves you the time it takes to reset any forgotten passwords.</p>
<h2 id="3-a-password-manager-generates-passwords-for-you">3. A password manager generates passwords for you.</h2>
<p>The only thing that’s probably more annoying than having to remember passwords is having to create them when you sign up for a new account. These days, every website wants a different number of characters with a combination of letters, numbers, and symbols. Trying to come up with a new password that perfectly fits each page’s requirements takes time and slows you down. With a password manager, it can instantly create new passwords for you. You can even designate how many characters it should have, and the combination of characters. And of course, once it creates that new password, it remembers it for you. That’s a serious headache saver!</p>
<h2 id="4-a-password-manager-syncs-passwords-where-you-need-them">4. A password manager syncs passwords where you need them.</h2>
<p>If you use the same browser on the same computer all the time, you may be thinking: “Wait, can’t my browser just do this for me?” Technically yes, it can. But if you want those same stored passwords on any other browser or device, you need to make sure you activate sync. Then you’ll need to login with the same user profile on the other browser or computer. And most browsers only sync to the same browser – so if you ever need to switch from Chrome to Safari, for example, there’s no hope from automatically syncing your passwords from one to the other. A password manager takes all the work out of that by syncing passwords for you, automatically. Plus, they work with every browser, and every platform, so you’re not locked into using the same browser or out of luck if you need to switch.</p>
<h2 id="5-a-password-manager-remembers-your-contact-information">5. A password manager remembers your contact information.</h2>
<p>Every time you sign up for a new account, or get ready to buy something online, a website prompts you for your contact information. Typing it in over and over gets pretty repetitive. Sometimes websites remember your address or your credit card, but not always. And they often accumulate old, unused addresses after a while. Using a password manager with address profiles and credit card profiles makes it easy to enter all that information in one click. No typing, no scrolling through addresses or cards to make sure you’re using the right one. Just pick the profile you need, and move on.</p>
<h2 id="6-a-password-manager-alerts-you-to-breaches-and-security-issues">6. A password manager alerts you to breaches and security issues.</h2>
<p>These days, it seems like a website or service is getting hacked every day. It can be overwhelming to keep track of which accounts you use and whether you may have been affected by a big breach. A password manager has built-in security alerts to let you know when one of your accounts might be at risk. That way, you can take action if needed, but not get too caught up in the details of every single breach that hits the headlines.</p>
<h2 id="7-a-password-manager-changes-passwords-for-you">7. A password manager changes passwords for you.</h2>
<p>After a website has a security incident, you’re often asked to update the password to a new one. A password manager makes this less painful by creating that new password for you, and saving it so you don’t have to worry about remembering the new one. That way you know you are using a strong, different password for every website, and you know that a security issue for one of your online accounts won’t affect all of your other online accounts.</p>
<h2 id="8-a-password-manager-gives-you-a-window-into-your-security">8. A password manager gives you a window into your security.</h2>
<p>When people start using a password manager, they’re often surprised to find out just how many passwords they have. Most people think they only have 10 or 20 passwords. But once you start storing them in one central, secure place, it’s easy to accumulate 50, 60, even 100 passwords. Between online banking, social media, email accounts, gaming sites, movie streaming, music streaming, investment accounts, productivity apps, storage sites, cell phone accounts…you get the idea. It adds up to a lot. More than anything, a password manager gives you a way to audit all of your passwords and make sure you’re using a strong, different password for every account. It can give you a security score and take you step-by-step through improving your passwords so you’re better protected from hackers and thieves, with much less time commitment and worrying on your part.</p>yashumittalDon’t we all wish we had a little more time? There never seems to be enough of it when it comes to checking everything off our to-do list and getting all our work done. What would you do for even just 10 minutes of your day back?
https://cdn.codecarrot.net/images/time-clock-with-background-pattern.png
Importance of an SEO plan2017-12-13T15:16:10+00:002017-12-13T15:16:10+00:00https://blog.codecarrot.net/importance-of-an-seo-plan<p>Once you have all the <a href="/what-are-the-key-website-ingredients">key ingredients for your website</a> now let’s have a good grasp of search engine optimization (SEO), you are ready to optimize your website. Just follow this step-by-step process to create an SEO plan, and learn how to develop, prioritize and adjust the plan to best suit your goals.</p>
<p>Let’s say you want to reach new customers for your new handicrafts emporium and online selling service.
Your first step should be keyword research—that means finding out what your potential customers are searching for.</p>
<p>Are they looking for <a href="/do-you-need-your-own-website-to-sell-jewelry-online">handcrafted jewelry</a> or decorative items? Are they searching to <a href="/sell-more-properties-with-these-real-estate-website-design-tips">buy a house</a>?</p>
<p>Next, consider related topics. Is terracotta popular? Do requests for paper-craft techniques come up?
This will help make your keywords more specific and a better match to what your customers are looking for. You should do this at least once a year as part of your SEO plan.</p>
<p>Once you’ve identified good keywords, take a look at how you’re doing in search results for those words.
How many of these words and phrases bring up your website on a search engine? Are there specific topics that don’t bring much traffic to your site?</p>
<p>This info will help you figure out what’s working for you and what’s not. If a popular phrase like “handloom sarees” isn’t pointing customers to your site, you can address those missing pieces in your SEO plan.</p>
<p>Once you’ve discovered gaps in your SEO performance, your next step is to think about how to fix them. Maybe none of the content on your site mentions that you can arrange regular seasonal deliveries.</p>
<p>Is no one linking to your site? Perhaps you can invite bloggers to check out your store in the hopes that they’ll mention you in a future blog post. Make a list of anything you think might improve your SEO performance.</p>
<p>OK, so now you have quite a to-do list. Don’t worry. It’s just time to prioritize.</p>
<p>It’s natural to want to tackle the items that will give you the biggest bang first, but be realistic. Adding an entire section about Indian traditions to your site might require hiring a programmer & copywriter to help, which might cost a fair bit. In the short term, you could post a quick article about a topic on your blog.</p>
<p>The next step? Give yourself a deadline for each task so you’re working through your SEO plan steadily throughout the year.</p>
<p>OK, once you’ve set this plan in motion, don’t just forget about it.
Your SEO plan will change over time. But how do you know when it needs updating? One easy way is to check in when you’re making other changes in your business, like introducing a new dish or redesigning your website.
Also remember that search engines release new features and improve their algorithms. For example, many have made adjustments because so many people now search on mobiles.</p>
<p>Finally, adjust your plan when something isn’t working. Is there a web page that’s not getting much organic traffic? It may need a refresher.</p>
<p>Are you attracting visitors to your site but not making sales? Perhaps you need stronger calls to action.
Review your results regularly and shift focus to the areas that need help.</p>
<p>And that’s how you build an SEO plan.</p>
<p>Let’s recap. Start with keyword research to understand what your customers are looking for, then use that info to assess your successes and failures.</p>
<p>Brainstorm solutions to improve your weak spots, and prioritize them.</p>
<p>And never be afraid to redo your SEO plan based on changes in your world and the world of search engines.
Be sure to check out our lesson explaining the SEO process. That has more helpful information to get your plan in motion.</p>yashumittalOnce you have all the key ingredients for your website now let’s have a good grasp of search engine optimization (SEO), you are ready to optimize your website. Just follow this step-by-step process to create an SEO plan, and learn how to develop, prioritize and adjust the plan to best suit your goals.
https://cdn.codecarrot.net/images/346_1.jpg
What are the Key website ingredients2017-12-13T02:21:00+00:002017-12-13T02:21:00+00:00https://blog.codecarrot.net/what-are-the-key-website-ingredients<p>The best website address for your business would be: <strong>www.yourbusinessname.com</strong></p>
<p>Having the name of the business in the website’s domain name is the best idea. That way it’s easy for customers to find her online, and also recognize her business in town.</p>
<p>A good domain name should be short but also relevant. While <em>yourname</em>, <em>yourbusinessname</em> and <em>mybusiness</em> are all short, they don’t reflect the business name so won’t help customers to find her in the real world.</p>
<p>In this article, I will be talking through some crucial early decisions you’ll make about your website- choosing a website name and planning how your site is structured. The goal is making it easy for customers to find their way around and get what they want. Because a happy customer equals a more successful business, right?</p>
<h2 id="ready-to-go">Ready to go?</h2>
<p>First up, your domain name. That’s what people will type into a web browser to find you.
When choosing a domain name, you first need to check if the one you want is available. There can only be one “TastyBakery.com” on the web, for example, and if someone has already claimed it, you won’t be able to use it.</p>
<p>So, how do you know if the name you want is taken? Just do a search for “domain registrar” and click on one of the results. There should be a tool on the site that lets you see if someone is already using the name you want. And, if they are, it may suggest another similar name that’s available for you to use.</p>
<p>A good domain name is one that people can easily remember. Keep it as short, relevant and as to-the-point as possible.</p>
<p>You may be able to get a variation of the name you want by choosing a different extension, which is the fancy name for the bit at the end. You’re probably familiar with the “.com” or “.co.in” extensions, but you might find others that are available or a better fit. For example, non-profit organizations often use “.org.”</p>
<p>What this also means is that although <strong>“yourbusinessname.com”</strong> may be taken, <strong>“yourbusinessname.net”</strong> may still be available.</p>
<p>OK, that’s the name sorted. Let’s have a look at some other common parts of a website, like the “home page.” This is the first page people see after they type in your domain name and get to your website.</p>
<p>The home page is your shop window, where you invite people in and explain what you’re all about.</p>
<p>A home page also directs visitors to other pages of your website through what we call “navigation.” Your navigation headings may run across the top of a page or down the side. Either way, it’s a menu that lets people travel from one part of the site to another.</p>
<p>How you organize the site is very important. Start by thinking about the websites you visit regularly. How are they organized?</p>
<p>Now, decide what kind of content you want to offer, and then group it together in ways that make sense.</p>
<p><a href="//www.codecarrot.net/">CodeCarrot</a>, can help your business up and running online and design a website for your business that can help you get started.</p>
<p>One easy place to start? The pages and sections you see on most websites: things like “About” and “Contact” pages.</p>
<p>Your website’s Contact page might include your address, phone number, email and a map with directions.</p>
<p>The About page might tell the story of your business and include photos of some of your best offerings.</p>
<p>There’s no right or wrong way to organise a site, but you’ll always want to put yourself in your visitor’s shoes. What’s he or she looking for? What are they trying to accomplish on the website?</p>
<p>Now, you want to set things up so it’s super-easy for visitors to find the information they need, like the bakery’s working hours, or submitting an online order.</p>
<p>Let’s check out what you’ll see on the pages themselves.</p>
<p>First, you’ll notice those navigation signposts, like the About and Contact headings. They should appear on every page of your site so that people can always get to where they want to go, or back to where they’ve been.</p>
<p>Of course, there will also be words, or text: headlines, paragraphs, bulleted lists. And you might also have things like images and video.</p>
<p>Text and images can also be set up to link to other pages on the Internet when they’re clicked. These are known as “hyperlinks”, or shortcuts to other pages either on your site or elsewhere on the web.</p>
<p>Many websites also invite customers to interact, with features like forms to submit questions, maps with turn-by-turn directions to your store, or shopping baskets to buy products directly.</p>
<p>Your website—your digital storefront—is a great opportunity to connect with customers. Choosing the right domain name, organizing the site logically, and including nifty features can help your visitors find exactly what they’re looking for.</p>yashumittalThe best website address for your business would be: www.yourbusinessname.com
https://cdn.codecarrot.net/images/405_1.jpg
Ready to Become a Full-Time Entrepreneur? Here’s How to Quit Your Job2017-12-12T23:40:00+00:002017-12-12T23:40:00+00:00https://blog.codecarrot.net/ready-to-become-a-full-time-entrepreneur-here-how-to-quit-your-job<p>In most cases, resigning is an exciting but scary experience. On one hand, you’re likely pursuing a better opportunity, such as a new job or starting your own business. On the other hand, letting go of a stable job is always tough. This is especially true if you’re leaving your job to launch a company, or commit to your existing business full-time.</p>
<p>Regular employment provides more than just a regular paycheck. It provides a network of relationships and opportunities. Fortunately, you don’t have to give those things up.</p>
<p>By resigning professionally, you can make sure you don’t close any doors or sour any relationships. In this post, I’ll cover how to do just that.</p>
<h2 id="get-your-ducks-in-a-row">Get Your Ducks in a Row</h2>
<p><img src="https://i.imgur.com/9I222Tj.jpg" alt="Get Your Ducks in a Row" /></p>
<p>Resigning from your job, especially a good one, isn’t a decision to make suddenly. Many people spend years building their business on the side before taking the leap. Only you know when you’re ready to leave your full-time jobbehind.</p>
<p>Before you take the the plunge, there a few things to consider.</p>
<h2 id="line-up-your-savings">Line Up Your Savings</h2>
<p>Do you have any savings to fall back on? Being a successful entrepreneur is about balancing risk with reward. You can remove some of the risk if you have money in the bank to get you through the hard times. Even very successful businesses sometimes run into cash flow shortfalls, so make sure you can cover your personal expenses if you don’t get paid for a while.</p>
<p>Whether you’re starting up or scaling up, you need to plan for how things will change once you commit to your business full-time. What additional responsibility will you be taking on? How will you grow? If your business doesn’t grow, you may regret leaving your old job behind. Have a plan to make sure it does.</p>
<h2 id="prepare-for-a-lifestyle-change">Prepare for a Lifestyle Change</h2>
<p>Things are going to be different when you’re working for yourself. And that’s ok. Great actually. You’ll have more freedom and the control to work how you want, where you want, and when you want. This includes control over your own compensation package.</p>
<p>Do you have unused vacation days? Use them up before you go. You may not get another chance to take time off for a while.</p>
<p>Do you rely on company health care benefits? Get your own plan lined up before you let go.
Can you work at home or do you need an office away from home? Don’t forget to account for the cost of a workspace.</p>
<p>Are you willing and able to hold yourself accountable for getting things done? You have to be your own boss now.</p>
<h2 id="how-to-resign-professionally">How To Resign Professionally</h2>
<p><img src="https://i.imgur.com/Yqou99P.jpg" alt="How To Resign Professionally" /></p>
<p>If you’ve made your decision and laid the groundwork for resigning, here’s how to do it right.
It doesn’t matter what your relationship with your employer is. Whether it’s awesome or awful, don’t ruin it. You never know when you’ll run into people in the future when they could help—or harm—you. Keep things friendly.</p>
<p>If you have had a negative experience, take a moment and tell yourself how right you are. And then move on. Now is not the time to air your grievances. Do not try and prove a point.</p>
<p>No matter what, give your employer two weeks notice. This is widely accepted as the standard and it’s the professional thing to do. If you have a good relationship with your employer, you may want to offer more notice to give them ample time to fill your shoes.</p>
<p>However, just because you give notice doesn’t mean your employer will accept it. It is within their rights to terminate your role immediately and some employers prefer not to have people around after they’ve resigned. Be prepared for this outcome.</p>
<p>Also, consider how much support you’re willing to provide during the transition. Plan your limits ahead of time. How involved will you be in finishing up projects, handing over responsibilities, and hiring and training your replacement? Decide on this ahead of time so that you don’t over-promise let your employer down.</p>
<p>Oh, and before you do anything else, read over your contract or the terms of your employment. You don’t want any surprises!</p>
<h2 id="write-your-resignation-letter">Write Your Resignation Letter</h2>
<p><img src="https://i.imgur.com/XDOvc1V.jpg" alt="Write Your Resignation Letter" /></p>
<p>When it comes to actually writing your resignation letter, there are a few best practices to consider.</p>
<h2 id="be-direct">Be Direct</h2>
<p>Don’t take too long to make your point or beat around the bush. Be upfront with what your message. Your boss shouldn’t be left wondering what you’re trying to say. They should know right away.</p>
<h2 id="dont-explain">Don’t Explain</h2>
<p>You don’t need to explain yourself. I repeat, you don’t need to explain yourself. You are under no obligation to do so. However, if you want to, you can. Just know that whatever you say could be held against you in the future. Especially if you end up trying to come back.</p>
<h2 id="be-polite">Be Polite</h2>
<p>Even if you hate your boss, you should be polite. Remember, there’s no point in destroying relationships just to make a point. Ideally, go beyond polite and include something nice. Thank your employer for the experience and opportunity.</p>
<h2 id="outline-next-steps">Outline Next Steps</h2>
<p>Your resignation letter is also a good time to outline how much help you’re willing to provide during the transition. How long you’re willing to stay and how involved you’re willing to be in this process. Lay clear boundaries and don’t overcommit yourself. Remember that you don’t have to provide any support, but it is a nice, professional thing to do.</p>
<h2 id="what-happens-next">What Happens Next</h2>
<p><img src="https://i.imgur.com/VTLkM3v.jpg" alt="What Happens Next" /></p>
<p>After you submit your letter of resignation, your boss may want to chat with you. Especially if they didn’t see it coming. At this point, you may want to discuss more of your reasons, such as wanting to focus on your own business—but you’re not obligated to.</p>
<p>There may also be some steps you need to take with your human resources department. Once you’ve confirmed your resignation with them, consider making a personal statement to the rest of the company.</p>
<p>A personal statement allows you to take control of the messaging around your departure, rather than letting the rumor mill run wild. Let your fellow employees know that you’re leaving, why (you can be vague), thank them and let them know you enjoyed working with them, and share contact info so they can keep in touch.</p>
<p>That’s it. It’s a big, sometimes scary, step, but you’re moving on to better things. Best of luck with your next opportunity. If you’re resigning to start or grow your own business, subscribe to this blog for great tips and advice.</p>
<p>Have you quit your job to become a full-time entrepreneur? Brag about it in the comments!</p>yashumittalIn most cases, resigning is an exciting but scary experience. On one hand, you’re likely pursuing a better opportunity, such as a new job or starting your own business. On the other hand, letting go of a stable job is always tough. This is especially true if you’re leaving your job to launch a company, or commit to your existing business full-time.
https://i.imgur.com/lIC2Xu6.jpg
How to Pair Fonts2017-12-12T20:45:48+00:002017-12-12T20:45:48+00:00https://blog.codecarrot.net/how-to-pair-fonts<p>We’ve already gone over how to describe typefaces and how to choose a font, so now it’s time to learn about mixing fonts. Combining different typefaces is an indispensable part of providing readers with an elegant, pleasurable read.</p>
<p>Mixing fonts isn’t a matter of picking 2 contrasting typefaces at random and putting them on a page—it requires careful effort so the fonts complement one another in their different shapes, sizes, and textures, and bring a visual harmony to the page.</p>
<h2 id="why-mix-fonts">Why mix fonts?</h2>
<p>Mixing fonts is usually useful for 2 main reasons:</p>
<ul>
<li>Provides typographic contrast without adding design noise to a page</li>
<li>Provides an additional font when body text may not be suitable by itself for many different kinds of content</li>
</ul>
<h3 id="to-provide-typographic-contrast">To provide typographic contrast</h3>
<p>An additional font can bring emphasis to different kinds of content (headings and block quotes, for example). Bringing contrast to these can make the page feel more elegant, or it can make the content easier to read.</p>
<p>A great example: using serif text for a block quote. The serif text complements the surrounding text and provides a gravitas that the standard font would not.</p>
<p><img src="https://cdn.codecarrot.net/images/ch3-image1.png" alt="If you can dream it, you can do it." /></p>
<h3 id="because-the-body-font-is-unsuitable">Because the body font is unsuitable</h3>
<p>In cases where a superfamily isn’t suitable and the body text font doesn’t work at larger sizes, use a different font for larger text such as headings. Using a <em>similar</em> font to the body text is a dangerous game—each font will be subtly different, and while people may not be able to articulate why something <em>looks</em> wrong, they’ll feel it. So it’s best to provide some contrast between these 2 different kinds of fonts.</p>
<p><img src="https://cdn.codecarrot.net/images/ch3-image2.png" alt="Heading for text" /></p>
<h3 id="experimentation">Experimentation</h3>
<p><em>Mixing fonts is about experimentation and playing with ideas</em>, but understand how the font is going to be used. Is it a heading font? Then create a layout where the text will need to be tested as a heading. Is it a blockquote font? Do the same.</p>
<p>Once the role of the new font is clear, start searching and mixing fonts. Use the same methods mentioned in the previous chapter to find the required font, and compare it alongside your font to see if it works.</p>
<p><img src="https://cdn.codecarrot.net/images/ch3-image3.png" alt="Heading for text" /></p>
<h3 id="tips-for-finding-the-right-font">Tips for finding the right font</h3>
<p>A simple tip for deciding whether 2 fonts will compare well: Look at the x-height of the font and try and match that to the body text. The x-height is a major factor in defining how text feels when read, so if 2 fonts have a similar x-height, they’ll be easier to combine and will flow into one another more naturally.</p>
<blockquote>
“Mixing fonts is about experimentation and playing with ideas.”
</blockquote>
<h3 id="inspiration-for-mixing-fonts">Inspiration for mixing fonts</h3>
<p>Need some recommendations and inspiration? Check out these sites:</p>
<ul>
<li>TypeGenius (http://www.typegenius.com)</li>
<li>Just My Type (http://justmytype.co)</li>
<li>Font Pair (http://fontpair.co)</li>
</ul>
<h3 id="2-fonts-might-not-be-enough">2 fonts might not be enough!</h3>
<p>In traditional print design, it’s common to mix more than 2 fonts to bring contrast, texture, and hierarchy to a page. Newspapers are filled with words—and these words are designed to help communicate the design.</p>
<p>So if a design is complex and requires more weights of a font, then it’s okay to introduce them.</p>
<p><img src="https://cdn.codecarrot.net/images/ch3-image4.png" alt="Heading for text" /></p>
<p>This isn’t to say it’s okay to add a bunch of fonts to a design—this has further ramifications like page weight and additional complexity in typesetting. Use only what’s necessary and nothing more.</p>
<h3 id="dont-settle-on-the-first-fonts-you-find">Don’t settle on the first fonts you find</h3>
<p>It’s possible to strike gold on your first attempt, but it’s never a good idea to stop the moment you find a font that seems right. Continue to experiment with different fonts. Think of the different variations of where this font will appear and what screens it’ll be on.</p>
<p>Think of mixing fonts as any other part of an iterative design challenge. With each choice there’s an opportunity to improve.</p>
<h3 id="managing-the-roles-of-each-font">Managing the roles of each font</h3>
<p>Now that you’ve chosen fonts and they’re working well, start figuring out each font’s roles in the design. Something as simple as a text document outlining what each font will be used for will help bring consistency to a project—plus, it’ll be a good reference throughout.</p>
<p>A document like this is the beginning of a style guide, and starting early is an incredibly efficient way of moving through a design.</p>
<p>Here’s an example of what the document could look like:</p>
<p>Primary heading: [ Font Name y ]</p>
<p>Secondary heading: [ Font Name y]</p>
<p>Tertiary heading: [ Font Name x ]</p>
<p>Intro text: [ font name x ]</p>
<p>Body text: [ font name x ]</p>
<p>Pull quotes: [ font name z ]</p>
<p>Caption text: [ font name x ]</p>
<p>Most applications have useful paragraph or character style palettes that can be used to manage these styles as an easy reference, too. On a daily basis, I use Sketch, Photoshop, Keynote, or Pages—each of these applications has a sidebar where I can click a button to add, modify, or remove a text style. At the click of a button there’s a reference to my font styles and a way to update every text style in a document.</p>yashumittalWe’ve already gone over how to describe typefaces and how to choose a font, so now it’s time to learn about mixing fonts. Combining different typefaces is an indispensable part of providing readers with an elegant, pleasurable read.
https://cdn.codecarrot.net/images/ch3-hero.png
Free Typography Resources - The Big List2017-12-12T19:45:48+00:002017-12-12T19:45:48+00:00https://blog.codecarrot.net/free-typography-resources<p>Everyone, even non-designers, can agree that the smallest typographical change can make a world of difference. Elevating designs through typography is a skill every designer should have in their back pocket.</p>
<p>Do you want to become a typography wiz—and, ultimately, an even better designer? We want that for you too! That’s why we’ve gathered <a href="//twitter.com/intent/tweet?text=a+list+of+the+best+free+typography+resources+https://blog.codecarrot.net&via=codecarrotnet">a list of the best free typography</a> resources—handpicked, just for you.</p>
<ul>
<li><a href="//typedia.com/">Typedia</a> – Like Wikipedia for fonts!</li>
<li><a href="//type.method.ac/">Kerntype</a> – Test your skills by distributing space between letters, also known as “kerning”</li>
<li><a href="//practicaltypography.com/">Butterick’s Practical Typography</a> – Created by Matthew Butterick, creator of original fonts for Apple and Microsoft</li>
<li><a href="//hackdesign.org/lessons#typography">Hack Design: Dive Into Typography</a> – Courses to guide you to design and typography literacy</li>
<li><a href="//www.fonts.com/content/learning/fontology">Fontology</a> – Learn typography in 4 awesome levels</li>
</ul>
<h2 id="free-downloadable-fonts">Free downloadable fonts</h2>
<p>From well-known sites to independent curated collections, downloadable fonts are right at your fingertips.</p>
<ul>
<li><a href="//www.google.com/fonts">Google Fonts</a></li>
<li><a href="//graphicdesignjunction.com/2017/03/fresh-free-fonts-19-fonts/">Graphic design junction</a></li>
<li><a href="//www.1001fonts.com/">1001fonts</a></li>
<li><a href="//freebiesbug.com/free-fonts/">Freebiesbug</a></li>
<li><a href="//www.urbanfonts.com/">Urbanfonts</a></li>
<li><a href="//www.fontspace.com/">Fontspace</a></li>
<li><a href="//www.dafont.com/">DaFont</a></li>
<li><a href="//www.fontsquirrel.com/">Font Squirrel</a></li>
<li><a href="//fontdaddy.com/">Fontdaddy</a></li>
<li><a href="//www.free-fonts-download.com/">Free Fonts Download</a></li>
</ul>
<h2 id="typography-inspiration">Typography inspiration</h2>
<p>Get your creative juices flowing with these stimulating type resources.</p>
<p><img src="https://cdn.codecarrot.net/images/hand-lettering-hl-thumb.jpg" alt="Tricks that will help you learn hand-lettering" /></p>
<p><strong>Read more:</strong> <a href="/tricks-that-will-help-you-learn-hand-lettering">Tricks that will help you learn hand-lettering</a></p>
<ul>
<li><a href="//designspiration.net/">Designspiration</a> – Just search for some good ol’ design inspiration</li>
<li><a href="//typeinspire.com/">Typeinspire</a> – Typography inspiration and gallery</li>
<li><a href="//typehunting.com/">Type Hunting</a> – Hunt for loads of type inspiration</li>
<li><a href="//welovetypography.com/">We Love Typography</a> – A collection of typography inspiration by people who love typography</li>
<li><a href="//www.behance.net/">Behance</a> – Search for great design and type inspiration</li>
<li><a href="//palettab.com/">Palettab</a> – Use this Chrome extension to get new font inspiration every time you open a new tab!</li>
<li><a href="//www.typegoodness.com/">Typegoodness</a> – Tons of resources, free fonts, and inspiration</li>
<li><a href="//typeverything.com/">Type everything</a> – Browse fonts and submit your own work</li>
<li><a href="//friendsoftype.com/">Friends of Type</a> – Features original typographic design and lettering</li>
<li><a href="//www.fridayfonts.com/">Fridayfonts</a> – Browse typeface experiments by design students, developed in classes and workshops</li>
<li><a href="//fontsinuse.com/">Fonts In Use</a> – An independent archive of typography</li>
<li><a href="//blog.8faces.com/">TypeWorship</a> – Official blog of 8 Faces Magazine, featuring inspirational typography and lettering</li>
<li><a href="//incredibletypes.com/">Incredible Types</a> – Curated collection of incredible design and typography by designers from around the world</li>
</ul>
<h2 id="font-identifiers">Font identifiers</h2>
<p>Don’t know that font? These tools will help you figure it out!</p>
<ul>
<li><a href="//www.identifont.com/">Identifont</a> – A massive database for searching fonts using metrics</li>
<li><a href="//www.chengyinliu.com/whatfont.html">WhatFont</a> – Use a browser extension to hover over text and discover more info about that particular font</li>
<li><a href="//www.myfonts.com/WhatTheFont/">What the Font</a> – This program will output results based on images of fonts you submit!</li>
<li><a href="//www.bowfinprintworks.com/SerifGuide/serifsearch.php">Bowfin Printworks Serif Font Identification Guide</a> – Use this tool to identify serif fonts</li>
<li><a href="//www.fontspring.com/matcherator">The Font Matcherator</a> – Detects fonts from an uploaded screenshot</li>
<li><a href="//www.typesample.com/">Type Sample</a> – Download this Google Chrome extension for identifying fonts</li>
</ul>
<h2 id="visual-font-calculators">Visual font calculators</h2>
<p>Use these tools to get exact font measurements.</p>
<ul>
<li><a href="//typecast.com/preview/google">Typecast</a> – Style type within your browser</li>
<li><a href="//www.typetester.org/">Typetester</a> – Get started with a free trial to make and edit your own fonts</li>
<li><a href="//www.modularscale.com/">Modular scale</a> – Determine bases and ratios with this scale calculator</li>
<li><a href="//pxtoem.com/">Px to Em</a> – Use this tool to convert pixels to ems</li>
<li><a href="//pxtoem.com/">Size Calculator</a> – Calculates font size and visibility</li>
<li><a href="//type-scale.com/">Type Scale</a> – A great visual type scale calculator</li>
<li><a href="//www.prototypo.io/index.html">Prototypo</a> – Customize and create your own original typeface in just a few clicks</li>
</ul>
<h2 id="font-pairing-resources">Font pairing resources</h2>
<p>A font match made in Heaven—and you get to be cupid!</p>
<p><img src="https://cdn.codecarrot.net/images/pt-serif.png" alt="PT Serif Regular Then Italic" /></p>
<ul>
<li><a href="//fontpair.co/">Font Pair</a> – Pair google fonts together</li>
<li><a href="//font-combinator.com/">Font Combinator</a> – Preview fonts in browser-based way</li>
<li><a href="//www.typewolf.com/">Typewolf</a> – Combine various fonts and check out what’s trending in typography</li>
<li><a href="//typespiration.com/">Typespiration</a> – Browse tons of web font combinations</li>
<li><a href="//fontflame.com/">Font Flame</a> – Choose whether you love a font or hate it! They refer to themselves as “Tinder for font pairing”</li>
<li><a href="//www.boldwebdesign.com.au/font-combinations-for-web-designers.html">Font Combination Tool</a> – A new font combination tool that provides over 400 Google font combinations, and renders the page as a clean website typography layout.</li>
<li><a href="//www.canva.com/font-combinations/">Canva font combinations</a> – Select the right combinations for your design needs</li>
</ul>
<p>Pssstttt… Check out the <a href="/how-to-pair-fonts">guide to pairing fonts</a>.</p>
<p>This list will never be done</p>
<p>Have any awesome typography resources to add? Share them below in the comment section.</p>yashumittalEveryone, even non-designers, can agree that the smallest typographical change can make a world of difference. Elevating designs through typography is a skill every designer should have in their back pocket.
https://cdn.codecarrot.net/images/marcus-depaula-43304.jpg
How to successfully kick off your Product Discovery Process2017-12-12T07:51:00+00:002017-12-12T07:51:00+00:00https://blog.codecarrot.net/how-to-successfully-kick-off-your-product-discovery-process<p>At <a href="https://www.codecarrot.net/">CodeCarrot</a>, we’ve had many internal discussions about the line between project and product management in a client-services product management model. But there is a product practice area that we use for almost all of our clients: Discovery facilitation — also known as, <em>how to communicate with people and get what you need from them.</em></p>
<p>At some point, many product managers — even those who align with a single product or feature — will be in a position to facilitate a face-to-face Discovery session. There is magic in a well-scoped, well-run Discovery that easily delivers a shared understanding of the task at hand. Here are some guidelines we’ve found helpful in this process.</p>
<h2 id="set-the-stage">Set the stage</h2>
<p>Preparation plays an important role in getting the right people to give you the right information and requires careful attention to detail, but can usually be summed up by two major questions:</p>
<h3 id="1-what-do-you-need">1) What do you need?</h3>
<p>Decide what the objective of the Discovery is ahead of time so that when you invite people to your meeting, everyone is on the same page about the meeting’s objective before they attend. This helps other people feel that you value their time and shortens the distance you need to travel toward a shared understanding.</p>
<p>It is also important to know what answers you want to receive by the conclusion of the Discovery. This involves doing your homework, conducting background research, talking one-on-one with people close to the effort — any avenues that can provide you with enough information and context to ask smart questions.</p>
<p>Document your questions beforehand. When you know what you need, you can then decide how much time you need and schedule accordingly.</p>
<h3 id="2-who-do-you-need">2) Who do you need?</h3>
<p>Typically, fewer voices in the conversation yield better discussion and better Discovery. Aim for the lowest-level people who can answer your questions effectively so you can spare more in-demand people from yet another time commitment. The exception is the executive stakeholder who is accountable for the effort, who should be available anytime a critical business decision is being made or should send a delegate.</p>
<h2 id="facilitate-the-conversation">Facilitate the conversation</h2>
<p><strong>Humans are bad at multitasking.</strong></p>
<p>Don’t do other things while you try to listen. Try these strategies to reduce the urge to multitask:</p>
<ul>
<li>Re-read the first section of this post. Come prepared.</li>
<li>Consider bringing a scribe with you. Ironically, you’ll find that if your sole focus is listening, you’ll rely less on those notes anyway.</li>
<li>Consider recording your meetings if you do feel you’ll need to go back to refer to topics that were discussed. This is an excellent alternative to having a note-taker.</li>
<li>Keep the meeting focused and set to a reasonable scope for the amount of time you have. It’s okay to zoom in and out of detail to get a better understanding, but don’t wander. Don’t be afraid to guide the meeting back on track if you need to, with six magical words: <em>“Let’s put a pin in that.”</em></li>
<li>Time-box the topics you prepare beforehand (e.g. spend two minutes discussing the problem statement, spend 10 minutes sketching high-level user personas). Time-boxing is an effective way to keep the meeting focused. Remember to reserve a certain amount of time to revisit “pinned” items at the end of the meeting.</li>
</ul>
<p><strong>Get on the same wavelength.</strong></p>
<p>Ask to hear about the stakeholder’s vision and high-level objectives, in their own words. Ask them to visualize where they think the work you are discussing will get them and why that matters. Ask them:</p>
<ul>
<li>What do you want to do? <em>(Not, “What do you want to build?”)</em></li>
<li>Why do you want to do this?</li>
<li>Who are you doing this for?</li>
<li>What need will this satisfy?</li>
<li>Why is now the right time?</li>
</ul>
<p><strong>Practice active listening.</strong></p>
<p>This technique not only helps you understand but makes the speaker feel understood.</p>
<ul>
<li>Concentrate on the person speaking and listen to what the person is saying without preparing a response internally.</li>
<li>Provide acknowledgments <em>(“I see,” or “Right”)</em>, so they know you are still focused on them.</li>
<li>Paraphrase what you heard and repeat it in your own words. <em>(“What I am hearing is XYZ…”)</em></li>
<li>Confirm your understanding. <em>(“Is that right?”)</em></li>
<li>Draw a line back to the context of the conversation — the stakeholder goals, etc. <em>(“So what that means is that X is a high priority because it will enable you to do Y, right?”)</em></li>
<li>Withhold response until you’re certain you’ve understood.</li>
</ul>
<p><strong>Discussion should flow naturally, like water.</strong></p>
<p>A stream changes direction and pace, flowing around obstructions with ease, but none of its motions are random. Let your discussion be nimble. Address different concerns. Focus on detail or broaden as needed, but only change enough to get a strong enough understanding of the objective to continue moving forward.</p>
<p>If you are listening but don’t feel you have enough information to connect what was said to the larger context, probe for more detail. <em>“Can you tell me more about why that’s important for the product?”</em></p>
<p>Stop wading through the details when they become impertinent to the high-level goals. You’re not trying to make every product decision — you’re just getting enough context to feel empowered to make good decisions later.</p>
<h2 id="dont-reinvent-the-wheel">Don’t reinvent the wheel</h2>
<p>In an initial consultation with any industry, there are typically some standard questions that can help isolate scope and cost. For a house painter, those questions might include ones like, <em>“how many rooms do you have?” or, *“Will you be including trim, railings, and doors?”</em> The same goes for digital products — there are standard questions to fall back on that go a long way in helping you understand the task at hand.</p>
<p>Stay tuned for my next post where I’ll share a few of the go-to questions that I use to help tease out important aspects of the product we’re building and empower engineers to make more informed estimates around the work.</p>yashumittalAt CodeCarrot, we’ve had many internal discussions about the line between project and product management in a client-services product management model. But there is a product practice area that we use for almost all of our clients: Discovery facilitation — also known as, how to communicate with people and get what you need from them.
https://i.imgur.com/3Kd1mk6.jpg
6 Common Mistakes Made By Startup Founders & How To Avoid Them2017-12-11T17:51:00+00:002017-12-11T17:51:00+00:00https://blog.codecarrot.net/6-common-mistakes-made-by-startup-founders-how-to-avoid-them<p>The most effective way to learn as an entrepreneur is by making mistakes or learning from the mistakes of others; learning from our mistakes helps us to perform better and become better business people.</p>
<p>However, you don’t have to wait until you made a mistake before you can learn.</p>
<p>Since it’s better to learn from other’s mistakes, we’ll share 6 common mistakes made by entrepreneurs. Here we go:</p>
<h2 id="1-expanding-too-soon">1. Expanding Too Soon</h2>
<p>Expanding your business idea without getting the right things on the ground could lead to a negative consequence. Experience and further business research have shown that before you expand your startup, it needs to have the following key resources:</p>
<ul>
<li>Access to credit,</li>
<li>Access to equity,</li>
<li>Cash,</li>
<li>Key management or staff,</li>
<li>Secured supply lines etc.</li>
</ul>
<p>Never underestimate the power of organic growth, it may be slow at the beginning, but truly it achieves solid positive results.</p>
<h2 id="2-not-taking-advice">2. Not Taking Advice</h2>
<p>Many startup founders are not succeeding because of their failure to learn or seek proper advice from the right people. It is always necessary to seek advice from someone who is highly knowledgeable in business transactions such as strategy experts, financial planners, lawyers, accountants etc.</p>
<p>Good business people derive maximum joy in seeking advice from the right people. If you want to win bigger contracts or want buyers to take you seriously, then you need to start an LLC.</p>
<p>Get in touch with a seasoned mentor. You may have a business idea but doesn’t know how to make it happen. All you need to do is to keep networking, reach out to the right people. These connections will assist your business growth.</p>
<h2 id="3-failure-to-deal-with-people">3. Failure To Deal With People</h2>
<p>You need to develop a likable personality; if people don’t like you and/or don’t like what you do, they will never do business with you. So, it is a necessity you have basic people management skills. Besides having effective customer service skills, you must also learn how to deal with your workforce, because they are your biggest asset.</p>
<p>They are there to help in growing your startup; you need to treat them well by paying their salaries and/or remunerations at the right time as well as relating well with them on a professional basis.</p>
<h2 id="4-failing-to-adapt-to-change">4. Failing To Adapt To Change</h2>
<p>Many entrepreneurs are blind to know why they should adapt to current change in their organizations. There are stories of many businesses that were handed down from father to son or from grandfather to the son and now to the grandson, which have crashed because the current manager is yet to adopt new changes. Some of the managers don’t know the beauty of people management skills. Many of them lack real entrepreneurial mindset.</p>
<p>Some inherit and destroy the business within a short time, while a good number of them are still doing the business the old way. Today, advancements in technology have brought a lot of innovations to the way we do business.</p>
<p>Your startup will fail to realize its set objectives if you neglect to explore the available huge benefits in this digital age. Adapting to the current technological innovation is the real deal.</p>
<h2 id="5-admit-your-weaknesses">5. Admit Your Weaknesses</h2>
<p>Every person no matter how talented they have strengths and weaknesses. One of the biggest mistakes you can make today as a startup founder and/or CEO is to ignore your weaknesses. You should know things you can do well and areas you can’t.</p>
<p>Those areas where you can’t do well, it is necessary you hire experts who can assist you. That you took a course in accounting or Business Law during your MBA class is not a guarantee that you are suitably qualified to review legal agreements or interpret balance sheets of your business. Don’t try to be a jack of all trades; hire people who can provide valuable expertise in areas you have shortcomings, while you improve on your strengths.</p>
<h2 id="6-skipping-market-research">6. Skipping Market Research</h2>
<p>Before you start a business, make sure you have a well-defined target market. Do a proper business research. It is not wise to launch a startup idea after discussing with your friends and family about it.</p>
<p>Do a research, and see if it is workable; see if it is something you can easily get involved with. In kick-starting a business, both primary and secondary sources will help you to identify your ideal clients and hire the right talent that will help in driving your vision.</p>yashumittalThe most effective way to learn as an entrepreneur is by making mistakes or learning from the mistakes of others; learning from our mistakes helps us to perform better and become better business people.
https://i.imgur.com/TiS1k7X.jpg
Want To Start Your Own Startup But Hate The Home Office Concept?2017-12-11T15:52:35+00:002017-12-11T15:52:35+00:00https://blog.codecarrot.net/want-start-your-own-startup-but-hate-the-home-office-concept<p>The idea of being stuck in a home office every day is not ideal for many people. While some view it as a convenience, others regard it as a dull existence and they miss the social interactions they would otherwise get.</p>
<p>More people are starting their own business than ever because it is attractive for many reasons. You are your own boss, you have control over who you work with, who you serve, and you can work to the beat of your own drum. If you want to be your own boss but meet new people every day, here are some business ideas that may resonate at a high level.</p>
<h2 id="start-a-food-truck-business">Start A Food Truck Business</h2>
<p>If you want low overhead and low-cost startup, starting your own food truck business could be your perfect option. As for startup costs, the insurance is significantly lower than a brick and mortar location, you don’t have to pay rent or a mortgage, and the cost of a food truck is roughly 80% cheaper than buying commercial real estate with a full kitchen. Based on your needs, food trucks range from 85K€ to 258K€ when you have a high-quality, reputable builder design your mobile kitchen. Never pay for a cheap build; repair bills on poorly made trucks can kill your business. It is smart to invest in a well-made truck using the highest quality parts. Then all you need to do is yearly routine maintenance. Also, make sure the food truck builder offers the whole package: branding, design, technology, and customizations.</p>
<p>Food trucks are extremely popular, make huge profits, and allow owners to work when and where they want. You can serve your local community, make stops throughout the city, or travel the state. Food trucks are money-making business models that also grant owner’s total freedom to live and work at their pace.</p>
<h2 id="start-a-tour-company">Start A Tour Company</h2>
<p>Do you live in a large city or in an area known for beautiful nature? Consider starting your own tour company. Whether you lead nature lovers along guided hiking trails where they can identify plants and wildlife, or you are giving historical walking tours through your city, a tour company removes you from the office and puts you in a position to meet new people every day. You can even invest in a minibus and drive tourists through your city on architectural tours. Do you live on the coast? Consider a snorkeling tour where you take groups out and help them identify local fish. The angles are endless!</p>
<h2 id="become-a-personal-trainer">Become A Personal Trainer</h2>
<p>If you have any previous training in nutrition and fitness, you love the outdoors, and you value working with new people while not being stuck in an office, personal training could be your dream business. First, work with a popular personal trainer in your area and see how they operate and treat clients so you can get a good read on what resonates with you. You can run boot camps outdoors with groups of people, or go to individual client’s homes and give white-glove service while training people in their home gyms or living rooms.</p>
<h2 id="do-your-research">Do Your Research</h2>
<p>Discover what you love, what you are good at, and see how you can turn it into a business away from a computer screen and office setting. Whether you open the city’s most popular food truck serving homemade Italian recipes passed down from grandma, you educate tourists on your city’s rich history, or you help people lose weight so they can look and feel amazing, make sure your business reflects your heart and dreams.</p>yashumittalThe idea of being stuck in a home office every day is not ideal for many people. While some view it as a convenience, others regard it as a dull existence and they miss the social interactions they would otherwise get.
https://i.imgur.com/z1evvvy.jpg
5 Non-Technical Questions To Ask When Hiring A Development Firm2017-12-10T21:21:00+00:002017-12-10T21:21:00+00:00https://blog.codecarrot.net/5-non-technical-questions-to-ask-when-hiring-a-development-firm<p>Hiring a software development firm is often one of the largest decisions a new web or mobile product company will make. Questions about technology choices, programming languages, frameworks, development methodologies, and the like are all important, but so are the non-technical questions sometimes overlooked by technically-focused or inexperienced entrepreneurs and product authors. Here are a few to keep in mind.</p>
<h2 id="can-i-see-what-youre-doing-on-my-project-on-a-daily-or-weekly-basis">Can I see what you’re doing on my project on a daily or weekly basis?</h2>
<p>This is a question about transparency and the more transparent a firm, the better. You really do want to see how the sausage is made. Increased visibility into the building of your application is going to help you avoid common pitfalls, and increase the likelihood that you get the results you want.</p>
<p>When you work closely with a development firm, watching your application come to life, you’ll be in a much better position to evaluate for yourself the value you’re receiving. You’ll also be able to judge the pace (or velocity) of development, and make your own estimations as to whether the project is on track from a timing or budgetary standpoint.</p>
<h2 id="can-i-adjust-my-feature-set-and-specifications-as-we-go">Can I adjust my feature set and specifications as we go?</h2>
<p>Unless you’re building a very trivial application, chances are you’re going to want to make course corrections (change the scope) throughout the development process. You might need to re-prioritize features to take advantage of a new opportunity, or you may want to respond to initial user feedback. That feedback could mean dropping features you had planned for at the outset and replacing them with ones you hadn’t even thought of, or even significantly changing your approach (a.k.a “pivoting”).</p>
<p>This flexibility is often the difference between the success and failure of a project or business, but it comes at the expense of budget certainly. This is why the transparency we discussed earlier is so important. You’ve got to ensure your development team is delivering working software incrementally, and that you’re in a position to evaluate its value. With high visibility, that evaluation should be easy since you see exactly what you’ve got, and you know how much it cost.</p>
<h2 id="can-i-meet-and-work-directly-with-the-designers-and-developers-on-my-project">Can I meet and work directly with the designers and developers on my project?</h2>
<p>At the end of the day people, not processes, tools, or frameworks, are building your software. Working with people that “get” what you’re trying to accomplish and have internalized your objectives will result in much better outcomes.</p>
<p>You’ll know you’ve got a team that “gets it” if they ask you why you want something built, not just what you want built. The impact this has on a project is massive. Designers will ensure that they are creating a user experience that is aligned with your users, and developers will push back on features they think are cumbersome or won’t be used (or both), and will suggest alternatives that provide better value.</p>
<p>If you’re hiring a top-notch firm they are going to have some very smart people working for them, and you want their input.</p>
<h2 id="who-owns-the-code-and-designs-you-produce-for-me-aka-the-work-product-and-deliverables">Who owns the code and designs you produce for me (a.k.a. the work product and deliverables)?</h2>
<p>If the answer to this question isn’t a resounding “you do,” your Spidey sense should start tingling. You want all the work done for you to be defined as a “work made for hire” under the U.S. Copyright Act. If it isn’t, you may run into issues when you want to sell, or otherwise transfer rights to someone else, since you can’t sell something you don’t own.</p>
<p>Some firms may carve out certain exceptions for open source software and development tools, which is generally appropriate. Just make sure the line is clear between those two different types of deliverables / work products.</p>
<h2 id="will-you-help-me-transition-to-an-in-house-team-or-mentor-and-train-my-team">Will you help me transition to an in-house team or mentor and train my team?</h2>
<p>At some point you may want take new feature development or maintenance in-house. A leading development firm will view this transition as an indicator of a successful project, and will be very supportive in the transition.</p>
<p>The best way to make this transition is to hire your own developer who can be integrated into the firm’s existing development process as tightly as the firm will allow. That way the new developer will not only learn the code-base, but will also pick up on what should be a mature and well-tested development and deployment process.</p>
<p>If you’re asking your development firm to take a new hire under their wing, keep in mind they will probably want the opportunity to interview your candidates, because they will want to make sure you end up with someone that can do the job and will fit in with the rest of the team.</p>
<p>· · · · ·</p>
<p>If you’re building a web or mobile app, <a href="//www.codecarrot.net/">CodeCarrot</a> might be able to help. We turn ideas into products, build full-featured applications, mentor and accelerate development teams, rescue stray projects, and help our clients make smart decisions that pay off. <a href="//www.codecarrot.net/">Let’s build something you’ll love</a>.</p>yashumittalHiring a software development firm is often one of the largest decisions a new web or mobile product company will make. Questions about technology choices, programming languages, frameworks, development methodologies, and the like are all important, but so are the non-technical questions sometimes overlooked by technically-focused or inexperienced entrepreneurs and product authors. Here are a few to keep in mind.
https://cdn.codecarrot.net/images/1_plEaN007eQK8SMdNzYNGQg.png
Your Startup Idea Is Bad - Now Make It Work2017-12-10T20:56:00+00:002017-12-10T20:56:00+00:00https://blog.codecarrot.net/your-startup-idea-is-bad-now-make-it-work<p>I want to help you not to fail. I respect you might have your vision and you are confident it is good. Your product or development team respects that as well. There is a chance you are a genius in the making, and your business idea will change the world. Or you’re not and you just don’t know it. This is why I’m being honest and why I want to tell you not to rely on your gut and vision all the time. You don’t have to learn from your own mistakes and this is how to avoid some of the most popular ones.</p>
<p>Learning from others’ mistakes and successes always saves you time, effort and heartache.</p>
<h2 id="understanding-vs-believing">Understanding vs. Believing</h2>
<p>When they start working on a product, or found a startup, people often believe they have a solution to an existing problem. Whether the solution works or not is often not a case of deep understanding but more of a leap of faith. Some founders I’ve met showed a lot of belief in their own abilities rather than theoretical or practical understanding of a subject. As designers, we often spend a while explaining the difference. Knowing the difference between understanding and believing is really essential.</p>
<h2 id="your-idea-comes-from-a-real-struggle">Your Idea Comes from a Real Struggle</h2>
<p>You’re solving a problem that seems real to you – that’s great! You’re off for a good start and have an actual chance to solve someone else’s problem. You have to get to know whether the fact you want to solve this problem means that somebody else wants to have it solved too.</p>
<p>It is hard to stay focused and unbiased when you’ve never built a product for masses but you want to. How do you know your solution would help people other than yourself? You will leave personal footprint on a given product, but how do you know when it’s too much?</p>
<p>It’s always hard for newbies to research and measure the market for a product. It’s especially</p>
<p>hard if you’ve never done it or you don’t have any people with such experience to help you. Luckily there are ways. Find an existing solution to a similar problem. Then, add your own experience and expertise and you’re off to a good start. Launching a product isn’t exclusive to experienced specialists. Ask simple questions and look for the unobvious answers.</p>
<p>The maker community is alluring – startupers love success, share it and embrace it. Unfortunately, it is impossible to reverse-engineer somebody else’s success. You can try and learn how to be successful by reading dozens of articles about The 10 Principles of Success, or, alternatively, conduct proper research and get to know the market and your competition.</p>
<p>Luckily, it is much easier to reverse-engineer failure. The maker community doesn’t like failure, though. The community hates failure. We say fail fast, fail often, but failure is virtually invisible… or wait..is it?</p>
<h2 id="failure-porn">Failure Porn</h2>
<p>Repackaging failure into success has been very popular lately. Especially by those who made it in the end: a shiny example of success reverse-engineering. What product teams may sometimes experience from stakeholders/founders is this:</p>
<p>If they (entrepreneurs) first failed but then they succeeded, I can do it too! This gives me the right to be less rational, less factual, to take unnecessary risks, stand by my beliefs, and to swear by ‘my vision.’</p>
<p>Can you see a problem there? During the design process, a lot of time will be spent on dismissing “disruptive (yet unviable) ideas” just because the stakeholder/founder will refuse to hear criticism most of the time. This serves no one. Neither the designer nor the founder. The hunger for success is great fuel to start off with. Fear of failure, however, can be a true blocker. You just can’t hide your head in the sand and ignore the facts. This would be foolish.</p>
<p><strong>I know what I’m talking about because I failed and understood why</strong>. I co-created a startup - it had all the magic stuff to change the world, we even had a working prototype, and yet we failed miserably. A couple of years later I understood what went wrong. At least I believe I do, having been involved in many more startups since then.</p>
<p>This was not right after the failure event but more than two years later, when I was exposed to good practices, which I compared to my past experience. It’s hard to know or describe what the light is if you’ve never seen it. When the reasons I had failed became obvious, it was sad, revealing and cathartic. I constantly draw conclusions from this lesson, and I hope every project and every man I have work with ever since have benefitted from the lessons I learned then.</p>
<h2 id="expose-yourself-to-good-practices">Expose Yourself to Good Practices</h2>
<p>Knowledge is more available than ever before. Libraries aren’t filled with books on bad practices and lies. I suggest you read a lot, enhance your vision with others experience.</p>
<h2 id="i-have-an-idea-you-have-the-money--lets-found-a-startup">I Have an Idea, You Have the Money – Let’s Found a Startup!</h2>
<p>An idea is not a solution. A proven and working system is. Having a live product, support team, development and sales teams are. Having a groundbreaking business idea on your mind or paper means nothing. Especially ideas from first-time fledgeling founders. This is how the market sees you, and I hope I’m not the first one to tell you that. To top it all, your idea how to solve a problem isn’t close to actually being a valid solution – a solution that works in real life and has solid business foundations. Haste and an eagerness to quickly corner the market can give you a false impression you must rely on your gut and intuition to be quicker, more agile and more competitive. Yet there’s high chance you’ll oversimplify wrong things, take the wrong shortcuts and make critical errors that will hurt your business the day after tomorrow.
Tips on how to become more self-aware from a guy who has seen a fair share of successes and failures.</p>
<ul>
<li>Explore different options and don’t get hung up on the initial idea – even thought experiments are better than nothing. What seems to be an obvious solution is often neither the simplest solution nor the best one. Participate in a design sprint or try to run your own.</li>
<li>Know how to monetize and know it before you start the development. Late adjustments to core product features caused by the lack of clear strategy will cost you a lot of money, time and frustration. You’ll also lose your competitive edge.</li>
<li>Start with an MVP and think how to scale, but don’t scale at the beginning. Decide on what the MVP is going to look like, then focus and stick to the MVP. However hard it is for a person with a vision to let go, without doing so you may find yourself building up a feature creep – adding more and more unnecessary features for no apparent reason. Design for the MVP only. New and untested ideas should end up in your notebook or the backlog before they are approved for development.</li>
<li>Think about growth, and I don’t mean adding more features here. What I am driving at are a scalable architecture and a flexible product roadmap. Have a marketing and growth strategy – a good product isn’t enough.</li>
</ul>
<h2 id="stress-test-ideas">Stress-test Ideas</h2>
<ul>
<li>First of all, google your idea, because someone may have done or started doing it already. If in fact there is something like your idea, don’t panic and don’t put the lid on it yet. Instead, try to learn and copy what’s good from your unexpected competitors.</li>
<li>If you know who your competitors are, do your research. Check their history, talk to people who know the market, read whatever you can find.</li>
<li>Talk to market experts. If the market you’re after is not your area of expertise, talk to an expert or somebody with more experience or knowledge of the market</li>
<li>Talk to the most intelligent person you know and ask her/him to bash your idea and pick holes in it. Get to know your market and try to find a niche – this will help you gain initial traction.</li>
</ul>
<h2 id="i-have-a-random-golden-idea--there-is-nothing-like-this-on-the-market-today">I Have a Random Golden Idea + There Is Nothing Like This on the Market Today</h2>
<p>You probably think you’ve just won the lottery. You should ask yourself whether there is really no product like this or maybe:</p>
<ul>
<li>Your research was insufficient</li>
<li>You can’t get the knowledge/insider info out of your desired market</li>
</ul>
<p>Just ask companies that could create something similar to your idea why there is no such product on the market. You may learn valuable things there. Sometimes, there is no such product because it failed earlier for various reasons. Why did it fail?</p>
<h2 id="my-idea-is-wrong-or-has-no-market-value--what-do-i-do-now">My Idea is Wrong or Has No Market Value – What Do I Do Now?</h2>
<p>If you’re done with research and conclusion is sad, yet your problem remains unsolved, giving up isn’t always the best choice. Participate in design sprints or iterate until your idea fits business and customer market needs (or kill it before you go bankrupt). The beauty of the design process is that it provides solutions for problems. Know instead of just believing. Don’t believe if you don’t need to.</p>yashumittalI want to help you not to fail. I respect you might have your vision and you are confident it is good. Your product or development team respects that as well. There is a chance you are a genius in the making, and your business idea will change the world. Or you’re not and you just don’t know it. This is why I’m being honest and why I want to tell you not to rely on your gut and vision all the time. You don’t have to learn from your own mistakes and this is how to avoid some of the most popular ones.
https://i.imgur.com/aNwzqip.jpg
8 Ways to Establish and Maintain a Successful Client-Designer Relationship2017-12-10T09:40:00+00:002017-12-10T09:40:00+00:00https://blog.codecarrot.net/8-ways-to-establish-and-maintain-a-successful-client-designer-relationship<p>I’ve been working as a product designer for a while, met dozens of clients and learned a lot. One of the things that I came to understand during the process is that clients and designers sometimes suffer from communication problems, because they have misunderstood their roles. As a consequence, projects cost more than expected, take more time, and their quality is inferior. There is a way to avoid it, though! Read on and learn how to establish and maintain an effective client-designer relationship that will translate into your product’s success.</p>
<h2 id="1-learn-that-design-is-fundamentally-about-solving-problems">1. Learn that design is fundamentally about solving problems</h2>
<p>Many people think that design is only about making things visually appealing. Wrong. This is only the tip of the iceberg. The visual is the first layer, and the most obvious one. You can see it with your naked eye – it is superficial. That’s why the myth about making things visually appealing exists. This myth is very dangerous, because it leads to the “move it two pixels to the left” attitude. What people don’t see is the process underneath. The process of solving problems that they didn’t realise were being solved. To address a problem, you need to understand it first. To be able to understand it you have to define it first. These are all tasks of a designer, and at this stage there are usually no beautiful pictures involved, just an enormous amount of time spent on conceptual thinking.</p>
<h2 id="2-know-that-designing-the-obvious-solution-is-hard-and-time-consuming">2. Know that designing the obvious solution is hard and time-consuming</h2>
<p>You are discussing long hours with a designer, you are waiting long days or even weeks for the results of their work, and what they show you is a single form. You’re shocked. But you shouldn’t be. The most important part is to come up with solutions that will be invisible and transparent for the end user.</p>
<blockquote>
“Good design is as little design as possible”.
</blockquote>
<p>We tend to notice only the bad design as it disturbs us. Good design is invisible – you don’t see the problem that has already been solved. When you drive a car, you are not aware of the thousands of challenges that the generations of inventors, engineers and designers overcame one by one. And this is what design is about – making your life easier, because you won’t need to deal with problems in the end product. We don’t want the user to notice the designed elements but to perceive that product as useful.</p>
<h2 id="3-understand-that-the-design-is-not-a-beautiful-picture-but-a-system">3. Understand that the design is not a beautiful picture but a system</h2>
<blockquote>
A system is a set of interacting or interdependent component parts forming a complex/intricate whole.
</blockquote>
<p>In a system, all parts are connected – they work with each other and in a certain context. Keep in mind that changing one part will influence how the other parts work. <strong>Whenever a change is introduced, its context must also be taken into account</strong>. Every element, button, section, widget must be analysed for user roles, technical requirements, input methods, specific devices, etc. Next time you want to change an element, please consider that it is not only “what you see”, but also what is underneath.</p>
<h2 id="4-treat-your-designer-as-your-business-partner">4. Treat your designer as your business partner</h2>
<p>Imagine that you have a business partner and not only do they have a great understanding of your product, but great problem-solving and design skills! Amazing, right? Guess what – you can achieve the same by applying to the designer you hired the same approach as to your business partners. A designer is here to help you and your product grow.</p>
<blockquote>
“If a designer has no say about the future shape of the product and its business model, we can’t expect they will be able to really help in the development of the business itself.”
</blockquote>
<h2 id="5-always-communicate-your-business-goals-and-intentions">5. Always communicate your business goals and intentions</h2>
<p>The more a designer knows about the product, your intentions, your goals, your obstacles and your fears, the better they can address them. (<strong>Read more:</strong> <a href="/how-to-talk-to-designers-about-design-for-non-designer">How to Talk to Designers About Design: Tips for Non-Designers</a>). <strong>The worst thing you can demand from a designer is to make a blind guess about your needs</strong>. Imagine you are an archer and you have to shoot a target 30 feet away. Seems straightforward, right? Now imagine that you are surrounded by a complete darkness and you don’t know where the target is – seems harder now, doesn’t it? The designer is the archer, the user’s needs are the target and the arrow is the solution. Don’t force the designer to take a blind shot. Treat the designer as a teammate, or a business partner. It’s the only way to reach your target.</p>
<h2 id="6-trust-your-designer">6. Trust your designer</h2>
<p>If you don’t trust your designer, then they will spend most of their time trying to convince you that they make right decisions. <strong>A designer will always follow their best knowledge and intuition to serve the goals of your users</strong>. By dint of their education and experience, a designer will know more guidelines, benchmarks, more patterns, more case studies of good implementations, so the range of possible solutions in a designer’s head is wider than in the typical client. A designer is here to share their experience and expertise. Don’t be afraid to take advantage of it.</p>
<h2 id="7-ask-why">7. Ask “why?”</h2>
<p>In the design process, asking the right questions is crucial if you want to get the right answers. The question investigates options that you might not have considered before. Why do we want this feature? What if the user will want to close that modal? What if the user will make a mistake?</p>
<p><img src="https://cdn.codecarrot.net/images/200_s.gif" alt="But why" /></p>
<p>The questions help both parties understand the solutions. Albert Einstein once said that we cannot solve problems on the level that we made them. The questions help us to get to a higher level of thinking.</p>
<p>For many client’s requests, the designer will ask “why?” <strong>They are asking this question all the time not because they hate your idea but because there can be multiple reasons behind a particular request</strong>.</p>
<p>Imagine that you ask a designer: “Can we try some other options for these?” The designer needs to know the reason for the request to do their job properly:</p>
<ul>
<li>“we think that the user will not understand the buttons”,</li>
<li>“we think that the user will not notice the buttons”,</li>
<li>“I was trying to use this form and I didn’t know what these buttons do”,</li>
<li>“they are ugly!”</li>
</ul>
<p><strong>By knowing the concerns (that designer might not even think about) it is easier for them to address them</strong>. Next time after you ask the designer to change the colour of a button ask yourself: “why?” and share the answer with the designer. Changing the colour of the button might not be the best solution. A designer will come up with their own solution and they should be able to defend all of their decisions so that the client can easily understand why they were made.</p>
<h2 id="8-think-in-terms-of-problems">8. Think in terms of problems</h2>
<p>Basically, think in terms of problems first (the designer is here for the solutions). You can also contribute to the solutions to a great extent, but please don’t exclude the designer from the process. <strong>You will then be able to think in terms of problem->solution, rather than let’s implement that (without specifying the problem)</strong>. And yes, sometimes defining problems (challenges) is harder that coming up with the solutions.</p>
<h2 id="summing-up">Summing up</h2>
<p>Design is a rational and time-consuming process which involves massive amounts of thinking and effort, as it depends on the characteristics of the product, your business goals and your target group. What you see is only the final phase of it, presented visually. Don’t let the misconceptions about design and wrong attitudes have a detrimental effect on your project. By understanding the role of the designers, the real essence of their job and the challenges they have to face, and by trusting them, you will increase your own chances for success.</p>yashumittalI’ve been working as a product designer for a while, met dozens of clients and learned a lot. One of the things that I came to understand during the process is that clients and designers sometimes suffer from communication problems, because they have misunderstood their roles. As a consequence, projects cost more than expected, take more time, and their quality is inferior. There is a way to avoid it, though! Read on and learn how to establish and maintain an effective client-designer relationship that will translate into your product’s success.
https://cdn.codecarrot.net/images/rawpixel-com-423665.jpg
Project Management vs. Product Management - You Need Them Both2017-12-09T20:44:20+00:002017-12-09T20:44:20+00:00https://blog.codecarrot.net/project-management-vs-product-management-you-need-them-both<p>Most software development projects fail.</p>
<p>It’s an unpleasant truth, but a truth nonetheless.</p>
<p>There are ways you can hedge against failure and set yourself up for success. For example, you can invest time in validating your idea before you get started, you can translate your idea into an MVP and build iteratively, and you can hire a development agency that’s built hundreds of successful products before yours.</p>
<p>But still, many projects will fail, and there are hundreds of reasons why that happens.</p>
<p>A lot of people attribute failure to project management.</p>
<p>After all, if a project is behind schedule or over budget, these are objective measures that often fall under the purview of the project manager. It’s easy to blame them.</p>
<p>But the reality is that this perspective is far too simplistic, and often misses a huge underlying reason for many, if not most, project failures that I’ve seen: poor product (not project) management.</p>
<h2 id="the-difference-between-product-management-and-project-management">The difference between product management and project management</h2>
<p><em>Project management</em> is a tactical role. It’s your job to ensure that, every single day, things move like clockwork and deadlines are hit. You oversee the array of moving pieces — designers, developers, clients, marketers, and anyone else involved — and keep everyone on course.</p>
<p><em>Product management</em> is a strategic role. As a product manager, you have a huge impact on the success or failure of a software project, because you’re the one who defines exactly what the product is, and who it’s for. That’s the mandate that the project manager — and the rest of the team — then follow.</p>
<p>As a product manager, you need to make tough calls about the scope of the project. You need to keep the application focused on the users, know when the product is ready to ship for testing, know when you should hold the product back because a particular feature isn’t polished enough, and a whole lot more.</p>
<p>You need to look at the long-term roadmap and business goals of the company or client, and balance those future plans with the need for a quick launch, as well as the need to bob, weave and change course as feedback comes in.</p>
<h2 id="there-are-two-important-things-to-note-about-the-product-management-role">There are two important things to note about the product management role:</h2>
<ol>
<li>It’s an underappreciated one; far fewer projects have dedicated product managers than project managers, and many think that they simply don’t need an expert in that role.</li>
<li>100% of successful projects have good product management, whether intentional or not.</li>
</ol>
<p>Because of that, you can give yourself a massive advantage by ensuring that your product team has a skilled product manager.</p>
<p>If you don’t have the skills and experience to perform the role effectively yourself, then hire a product manager, and give them the resources and authority to make the tough decisions that will make or break the project’s success.</p>yashumittalMost software development projects fail.
https://i.imgur.com/xkTHNwp.jpg
Node.js vs Ruby on Rails Comparison - Which Environment to Choose for Your Next Project?2017-12-09T19:21:00+00:002017-12-09T19:21:00+00:00https://blog.codecarrot.net/node-js-vs-ruby-on-rails-comparison-which-environment-to-choose-for-your-next-project<p>Node.js and Ruby on Rails (RoR) are two popular server-side solutions for web application development. Despite the fact that both environments can manage apps of any complexity, they are built around different concepts and architectures.</p>
<p>As an app owner, you might be wondering which tool to choose for your next project. The choice might not be an easy one, but to make the final decision you should be aware of advantages and limitations of both Node and ROR, and, more importantly, understand cases and types of applications where Node.js may be better than Rails, and vice versa.</p>
<p>Interested in <a href="/pros-cons-ruby-on-rails">Ruby on Rails pros and cons</a>? Read <a href="/pros-cons-ruby-on-rails">this article</a>.</p>
<h2 id="nodejs-and-ruby-comparison">Node.js and Ruby Comparison</h2>
<p>Node.js is a JavaScript runtime environment that features great native modules to deploy web servers, manage computing resources, file systems, and security of your applications. However, Node.js should not be confused with a web framework shipped with routers, controllers, database integrations and other handy tools to facilitate web development. Ruby and Ruby on Rails are much closer to that. It is quite a rich ecosystem consisting of small packages which, summed up, create solid web applications.</p>
<p>In a nutshell, Rails is a full-fledged web framework with a basic web development functionality provided out of the box. The framework is built on Ruby, a powerful and expressive programming language developed by Yukihiro Matsumoto in 1993.</p>
<p>Both RoR and Node.js are wildly popular among web developers. Rails is used by such popular sites and companies as GitHub, Shopify, Airbnb and SoundCloud, whereas Node.js is a preferred choice for PayPal, Uber, Netflix and other tech giants.</p>
<h2 id="pros-of-nodejs">Pros of Node.js</h2>
<h3 id="1-fast-server-side-solution">1. Fast server-side solution</h3>
<p>When we think about the strengths of Node.js, the first thing that comes to our mind is its innovative application of asynchronous and event-based programming and non-blocking I/O maximising the usage of a single CPU and computer memory. Thanks to this architecture, Node.js servers can process more concurrent requests than conventional multi-threaded servers. Node.js event loop, which does not block program execution under I/O-heavy workflow, improves runtime performance making Node one of the fastest server-side solutions around.</p>
<h3 id="2-one-language-on-both-the-front--and-the-back-end">2. One language on both the front- and the back-end</h3>
<p>Node.js is written in Javascript, a programming language that dominates front-end development. Some of the most popular front-end frameworks, such as Ember, React, and Angular, leverage power and flexibility of JS to create dynamic Web 2.0 applications. With Node.js installed server-side, developers can use the same programming language across the web stack. The same language at the front end and the back end means you need a smaller and more efficient team, which can communicate better and, as a result, deliver tasks much faster.</p>
<p><img src="https://cdn.codecarrot.net/images/image1-14.png" alt="Benchmark runtime - Lower is better" /></p>
<h3 id="3-scalable-solution">3. Scalable solution</h3>
<p>Node.js is a very scalable solution too. Node clusters and workers are abstractions that can spawn additional Node.js processes depending on the workload of your web application. Limited only by the number of CPUs at their disposal, you can easily scale your Node applications to fully functional enterprise solutions.</p>
<h2 id="cons-of-nodejs">Cons of Node.js</h2>
<h3 id="1-less-efficient-with-cpu-intensive-operations">1. Less efficient with CPU intensive operations</h3>
<p>At the same time, however, Node.js asynchronous and single-threaded models have certain limitations. Yes, Node is good at handling multiple concurrent events and requests. However, it is not as efficient when it comes to CPU intensive operations, such as generating graphics or resizing images. Luckily, a workaround of making a new task queue to manage CPU intensive requests exists, though it requires spawning additional workers, and introducing new layers to your Node.js application.</p>
<h3 id="2-poor-quality-or-lack-of-documentations-for-some-modules-in-npm">2. Poor quality or lack of documentations for some modules in npm</h3>
<p>Also, Node’s flexibility may sometimes backfire on those who want to quickly deploy their web applications. The thing is that Node.js leaves it to the developer which modules to select. Although some choices may be obvious (e.g Express for a web server and routing), others may not. Developers might spend a considerable amount of time figuring out which library to choose for handling Javascript Promises (Async or, maybe, Bluebird), or which template engine to use. As result, more planning, time, and involvement may be needed to bootstrap a Node.js project. Developers have to find the right modules and follow instructions to integrate them. Some of these modules might be buggy and introduce unexpected behavior to your Node applications. Since a Node.js application may depend on dozens of modules, it is crucial to have an experienced developer in your team.</p>
<h2 id="pros-of-ruby-on-rails">Pros of Ruby on Rails</h2>
<h3 id="1-based-on-best-web-development-practices">1. Based on best web development practices</h3>
<p>RoR creators describe Rails as an opinionated framework because it implements their vision of the best web development practices and solutions. Since RoR values convention over configuration, the framework ships with all necessary modules and libraries. All of them are implemented with MVC (Model-View-Controller) paradigm in mind.</p>
<h3 id="2-rich-and-well-developed-infrastructure">2. Rich and well-developed infrastructure</h3>
<p>Rails offers a fully integrated web server solution (Puma web server) and ActiveRecord database that allows to abstract schema and models. Even better, Rails features generators – powerful scripts that allow to rapidly scaffold a RoR application by creating the directory structure, files, controllers, routers, database models, and other common web development nuts and bolts. All this makes Rails suitable for rapid prototyping and deployment of web applications.</p>
<h3 id="3-easy-portability-across-various-database-platforms">3. Easy portability across various database platforms</h3>
<p>Similarly, web developer community values Rails for its easy portability across various database platforms. This feature is supported by the Rails database migrations. Active Model that underlies the Rails default database ActiveRecord can easily abstract the differences between various SQL back-ends. Rather than writing schema in pure SQL, migrations allow using easy Ruby DSL syntax to describe changes to tables. As a result, RoR allows creating a database-agnostic schema and models simplifying migration of Rails applications across different database environments.</p>
<h2 id="cons-of-ruby-on-rails">Cons of Ruby on Rails</h2>
<h3 id="1-less-flexibility">1. Less flexibility</h3>
<p>If your application has unique functionality and demands, it may turn hard to adjust an opinionated framework such as Rails to your product’s needs. Since Rails imposes much of authority over the app development process, you may get to the point when adjusting the framework takes more time than building it from scratch, or using a less opinionated one.</p>
<h3 id="2-drop-in-performance">2. Drop in performance</h3>
<p>Since RoR offers a majority of modules out of the box, the framework is heavier and somewhat slower in performance than Node.js. It is also less efficient than Node.js in managing simultaneous requests. The only solution to this is using additional server instances, which consumes additional memory.</p>
<h3 id="3-slow-debugging">3. Slow Debugging</h3>
<p>Rails large stack frames and multiple layers of abstraction can make a debugging of RoR applications difficult. Your development team has to spend more time fixing errors and making updates to applications. This may slow down development, testing, and production cycles.</p>
<h2 id="so-how-to-make-the-right-choice">So, How to Make the Right Choice?</h2>
<p>Our brief overview demonstrates that neither Node nor Rails are perfect. If so, how to make the right decision about which one to use? The answer is straightforward: both environments are good for specific apps and tasks.</p>
<p>Node.js is more suitable for dynamic applications with multiple server requests, and frequent shuffling of data between the client and the server. What kind of applications are these? These are instant messaging apps like <strong>chats and collaborative apps (drawing, video conferencing) collectively referred to as RTAs (Real-Time Applications)</strong>. Event-based Node.js architecture is perfect in handling heavy I/O operations, server requests and data flow in these apps. For the same reason, Node.js is a preferred choice for <strong>Single Page Applications (SPAs)</strong> that involve heavy client-side processing, rendering, and where the main function of the back-end is to provide a REST API. Similarly, whenever performance and scalability of web applications are of concern, lightweight and fast Node.js outperforms the Rails framework. That is why such companies as Linkedin began using Node.js for performance and scalability reasons.</p>
<p>Ruby on Rails, on the other hand, performs better than Node.js in <strong>CPU-intensive applications</strong>. Node.js is a single-threaded environment that was not designed for CPU intensive operations with graphics, images, and data. Making computations on vast arrays of data may simply block all incoming requests rendering the main advantage of the Node.js useless. If you consider building CPU-heavy applications, Rails is definitely a better option than Node. Rails is also better when the <strong>speed of development is critical</strong>. With all the modules and generators available out of the box, Rails is very powerful in <strong>Rapid Application Development (RAD)</strong>. Just in few commands, you may have a fully functional prototype that may be amended with additional features later. Node.js repositories also provide generator scripts to speed up the development, but fast prototyping is the philosophy of Rails.</p>
<p>So, when choosing between Node and Rails you should consider a speed of development, performance, and scalability of your application, and the type of use cases it addresses. If your requirement is a fast development of CPU-heavy applications, go with Rails. On the opposite, choose Node.js if you are thinking about RTAs, SPAs, and other I/O heavy solutions. Hopefully, this overview will help you make the right choice of your web development environment for the next project.</p>yashumittalNode.js and Ruby on Rails (RoR) are two popular server-side solutions for web application development. Despite the fact that both environments can manage apps of any complexity, they are built around different concepts and architectures.
https://cdn.codecarrot.net/images/pexels-photo-340152-1.jpeg
9 Common Product Issues Fixed by a UX Review2017-12-09T14:34:28+00:002017-12-09T14:34:28+00:00https://blog.codecarrot.net/9-common-product-issues-fixed-by-a-ux-review<p>UX review is a process during which we thoroughly analyse the client’s product, focusing on user experience and business value. It’s a diagnosis crucial before any treatment can commence.</p>
<p>At the end of a UX review, the client receives a report containing a list of issues to fix, quick wins, and recommendations for the future development of the product. You can find out more about the <a href="/7-ways-in-which-a-ux-review-will-save-your-product">benefits of UX review here</a>.</p>
<p>In the case of one of our projects, an online platform provider for sharing economy service markets (e.g. babysitting), the product had already existed on the market for a significant time and had already proved its efficiency when we conducted the UX review. We discovered no critical issues and confirmed that the product was working efficiently.</p>
<p>One of the major issues discovered was that the Google Analytics account wasn’t set up properly. Every online platform had two different types of users (with different goals, motivations, etc.) and needed two separate Analytics segments that would allow the team to properly study users’ behaviour.</p>
<p>Below, you’ll find a list of other problems we’ve found and solutions implemented after the UX review.</p>
<h2 id="the-challenges-we-found---and-faced">The Challenges We Found - And Faced</h2>
<h3 id="dealing-with-a-complex-interface">Dealing with a complex interface</h3>
<p>The sales screen where users could upgrade to a premium version of the product caused cognitive overload and was a bit too complicated – there were too many elements and actions to be taken on a single screen.</p>
<p><strong>Solution:</strong></p>
<p>Upgrading to the premium subscription was improved by dividing the screen with the selection of plan and payment into two steps, making it easier to understand and use. More social proof examples were added to grow conversion.</p>
<h3 id="perfecting-the-mobile-experience">Perfecting the mobile experience</h3>
<p>The mobile user experience needed some improvement: the web forms’ design diverged slightly from best practices, some elements were too small, and data inputs weren’t designed in the most efficient way.</p>
<p><strong>Solution:</strong></p>
<p>Mobile usability was improved through the use of best practices for data input UI elements (segmented controls, native mobile date pickers, appropriate keyboards for specific data, etc.). Additionally, form-filling was simplified by merging fields, implementing sliders, and using segmented controls for mobile devices.</p>
<h3 id="clearing-up-the-messaging-system">Clearing up the messaging system</h3>
<p>The messaging system was somewhat unclear and reduced the speed and efficiency of user communication.</p>
<p><strong>Solution:</strong></p>
<p>The messaging system was completely redesigned, allowing for smooth and clear communication between users.</p>
<h3 id="cleaning-up-the-information-architecture">Cleaning up the information architecture</h3>
<p>The information architecture wasn’t optimal. Upon opening a user’s profile, only the name and image were shown, and important information was presented only later. The main CTA within the user profile was duplicated, which might have confused users.</p>
<p><strong>Solution:</strong></p>
<p>The accessibility of key information was improved, especially on mobile profiles. Placing rating, profile details and main CTA buttons on the top spot “above the fold” introduced a clear hierarchy. Unnecessary duplicates of CTAs were removed, which decluttered the space.</p>
<h3 id="optimising-the-searching-functionality">Optimising the searching functionality</h3>
<p>Searching for information in the platform guide could be a bit easier. The results sorting on mobile devices was hidden and required additional effort. It was hard to find the right information without strong sorting and filtering options for mobile devices.</p>
<p><strong>Solution:</strong></p>
<p>Searching on the platform was improved for mobile users through UI fixes such as sliders instead of dropdown fields in filters. Moreover, sorting options were made more accessible, and an option to instantly clear filter settings was added.</p>
<h3 id="making-the-ctas-more-effective">Making the CTAs more effective</h3>
<p>CTAs (calls to action) asking users to give/receive feedback were not easily accessible, and the majority of users didn’t rate the services at all.</p>
<p><strong>Solution:</strong></p>
<p>The giving/receiving feedback functionality was improved by including it within the messaging system and adding additional CTA buttons for those users who haven’t given feedback yet.</p>
<h3 id="simplifying-the-registration-process">Simplifying the registration process</h3>
<p>The registration process on the landing page for a dating platform was creating additional friction for users by asking them to go through several steps.</p>
<p><strong>Solution:</strong></p>
<p>The landing page for the dating service was improved by replacing the ‘register’ button with a registration form. This reduced the number of steps required for registration.</p>
<h3 id="making-the-sign-up-and-social-proof-sections-more-visible">Making the sign-up and social proof sections more visible</h3>
<p>The sign-up section on the landing page was not prominent enough and too few social proof examples were shown, which reduced the likelihood of converting users.</p>
<p><strong>Solution:</strong></p>
<p>Landing pages for other platforms were improved by adding a featured social proof section and making the registration section more prominent.</p>
<h3 id="following-industry-standards-for-the-ui">Following industry standards for the UI</h3>
<p>The alignment and positioning of some UI elements did not follow the industry standards. This caused users to experience confusion when interacting with the platform.</p>
<p><strong>Solution:</strong></p>
<p>The alignment and positioning of UI elements throughout the platform were improved, enhancing usability.</p>
<h2 id="how-can-your-product-benefit-from-a-ux-review">How can your product benefit from a UX review?</h2>
<p>This is an example of one of our client’s UX review and the improvements that followed. Many of the issues and resulting changes were related to general user friendliness, interface and functionality.</p>
<p>Do you think your product could benefit from a UX review? A UX review could help you find out what issues to prioritise in order to enhance your product or service and amaze your users. Let us know if you have any questions!</p>yashumittalUX review is a process during which we thoroughly analyse the client’s product, focusing on user experience and business value. It’s a diagnosis crucial before any treatment can commence.
https://cdn.codecarrot.net/images/taras-shypka-424932.jpg
Smart Retail Solutions That Change Ecommerce2017-12-09T12:11:54+00:002017-12-09T12:11:54+00:00https://blog.codecarrot.net/smart-retail-solutions-that-change-ecommerce<p>A world in which nearly everybody now carries around a smart device – i.e. the smartphone – is what has enabled this revolution in retail. Read on if you want to find out how smart retail can take ecommerce to the next level.</p>
<p>Smart retail is a term used to describe <strong>a set of smart technologies that are designed to give the consumer a greater, faster, safer and smarter experience when shopping</strong>. A world in which nearly everybody now carries around a smart device – i.e. the smartphone – is what has enabled this revolution in retail. It can be used to house online stores, as a catalog and directory for ‘real’ stores, and now increasingly as a direct means of payment for goods and services.</p>
<h2 id="the-internet-of-things">The Internet Of Things</h2>
<p>Everything around us is becoming increasingly interconnected through technology. Sensors (such as iBeacons – see below) can be placed onto almost anything, and can connect any number of devices together in some very powerful and innovative ways.</p>
<p>If you’ve been shopping around for car insurance recently, then you may be aware of such a thing as Black Box Insurance. This is where sensors are placed in cars to allow insurance companies to link policy premiums to actual data on where and how well the car is being driven. In hospitals, there are even sensors that are being placed in teddy bears to monitor the health of sick children in discreet and non-threatening ways.</p>
<p>What if your car was guarded by a small sensor?</p>
<p>But this is only scratching the surface of what is being made possible by the Internet Of Things. According to McKinsey, these disruptive technologies are <strong>forecast to have a $6.2 trillion effect on the economy by 2025</strong>. And one of the key industries that this will impact will be retail.</p>
<p><strong>Smart retail is something that the world is now waking up to</strong>. In-store mobile marketing is becoming increasingly more sophisticated, and is being used more-and-more by retailers around the globe.</p>
<p>If you haven’t moved your store into the exciting new world of smart retail already, then perhaps now is the time to start considering how you can implement the technologies to make it happen – and it isn’t as hard nor even as expensive as you might think. There are, essentially, four elements to smart retail – ecommerce, beacons, smartphones and smart point of sale (POS).</p>
<p>Let’s take a look at these four things individually and consider how you might implement them into your business to give your customers the smart retailing experience that will make them come back again and again.</p>
<h2 id="ecommerce">Ecommerce</h2>
<p>It’s not enough to just have a shop on the high street – you need to be online as well. And, although it’s possible in theory to create a smart shopping experience for your in-store customers without also selling your goods online, to really make the most out of your efforts, then your best bet is to set up an online storefront. Thankfully, this couldn’t be simpler. Spree Commerce is an open-source Ruby on Rails based ecommerce platform that allows you to get an e-shop up and running quickly, efficiently and customized to your requirements. You can start building your shop right away, in fact. Spree’s BSD licence means that no matter the size of your business, you can start using Spree immediately for commercial purposes without having to pay a licence fee.</p>
<p>Spree is also one of <strong>the easiest and most reliable frameworks</strong> used today by developers. Based on Ruby on Rails, it is favored all over the web because of its simplicity and high quality. You can either choose from a number of high functioning and high quality themes to build your store, or, you can start completely from scratch with a custom-built e-shop to meet your exact requirements.</p>
<p>Either way, when thinking about creating a smart retail experience for your customers, it’s on your online store where you’ll be showcasing your products in all their glory. Full product descriptions, lots of images with the products being used in context, and perhaps even some promotional video shorts is what you want. Here is where your customers will be directed when they come into your shop and start browsing your shelves. How will this happen? You will strategically insert beacons into your store. What are beacons? Keep reading to find out.</p>
<h2 id="ibeacons">iBeacons</h2>
<p>iBeacons are small smart technology devices that can be attached to anything, anywhere. When a customer comes in close proximity to them, they broadcast tiny radio signals, which a user’s smartphone can receive and interpret. If you were selling digital cameras on one of your shelves, for instance, you could stick an iBeacon underneath, and, when a customer comes nearby, a notification will be automatically sent to that person’s smartphone. If clicked, the user will be directed right to your online store where the product specifications, pictures and pricing can all be displayed.</p>
<p>The great thing about iBeacons is that they create additional value for shoppers while they are in your store. And people are already turning to their smartphones to help them with their shopping experiences. A recent survey commissioned by Google found that more than 66% of smartphone users are already using their phones to help them shop and make purchasing decisions when in a physical, bricks and mortar, store.</p>
<p><strong>iBeacons act like digital signs, and the power of these is that they can deliver the right message, at the right time, in the right place, to the right person</strong>. They are true innovations to the retail experience, and something that every smart retailer should have in their arsenal.</p>
<h2 id="smartphones-and-apps">Smartphones and Apps</h2>
<p>For the iBeacons to work, then the smart retailer needs at least one if not a suite of smart apps that consumers can download onto their smartphones. These are already being successfully used by pioneering retailers such as Timberland, Alex and Ani and Kenneth Cole. When customers walk into these stores, the beacons immediately deliver a push notification with a personalized greeting and an exclusive offer.</p>
<p>Why not do a shopping haul by a cup of coffee, with just a smartphone in your hand?</p>
<p><strong>According to GIGAOM,</strong></p>
<blockquote>
“over 90 percent of surveyed shoppers who visited Kenneth Cole, Timberland and Alex and Ani in New York and Boston during their pilots of this technology said they would be highly likely or likely to use an in-store mobile experience again. These retailers reported a 75 percent open rate for in-store personalized offers and an impressive 35 percent conversion rate, meaning a substantial amount of shoppers not only appreciated the personalized offers but also acted on them.”
</blockquote>
<p>Smart retailing is all about smart devices and smart technology – by connecting smartphone to in-store beacons the whole shopping experience for your customers can suddenly explode into something truly sensational, smart, and very, very cool indeed.</p>
<h2 id="pos">POS</h2>
<p>Aside from these personalized shopping opportunities that the combination of online stores, iBeacons and smartphones enable, there is one further innovation to complete the smart retailing experience for the consumer – <strong>point of sale (POS)</strong> technology that allows consumers to pay for their goods quickly, safely and smartly.</p>
<p>Apple Pay is the big one that came out earlier this year. Using either your iPhone, Apple Watch or iPad, consumers now have the ability to pay for their purchases by simply presenting their device to in-store contactless readers with their fingers on Touch ID.</p>
<p>But Apple has even further innovations than that. The “Apple Store Experience”, as it has become known, has earned a reputation as being one of the most effective in retail. Store associates are able to service and check out customers no matter where they are in the store, creating mobile POS that eliminates long checkout lines, and of course cut down on lost sales due to walkouts.</p>
<p>With POS, queues at your brick-and-mortar store will become a thing of the past.</p>
<p>One of the beauties of implementing such a system into your business is that you can also use mobile POS devices to sell products outside of the four walls of your actual shop. Consider the opportunity for kiosks, pop-up stores or stalls at special events. Indeed, the great thing about smart retailing is that it can be done anywhere – after all, your customers will carry their smartphones around with them wherever they go, so bring your end of the smart technology to them, and there will be literally no boundaries to the smart retail experience.</p>
<h2 id="constant-connections">Constant Connections</h2>
<p><strong>If you start with a strong ecommerce presence, then there’s really no limit to what you can achieve in terms of the smart shopping experience for the customer</strong>. Using Spree, you can create a visually brilliant online store that contains and catalogues every single piece of information that a customer could possibly need to make an informed purchase. But don’t stop there. You want even your walk-in customers to access this site, and by strategically placing iBeacons around your store, you can automatically direct your customers to the information that they need, and the message that you want them to have. Apps make this possible, and by using something like Estimote you can create contextually rich mobile experiences for your in-store customers who come within close proximity to your beacons. Finally, make the smart shopping experience complete by offering a smart payment service – and this can be implemented directly into your Spree e-shop as well as your high street store.</p>
<p>When all of these things come together in retail, you can really start to foster an experience for shoppers like they’ve never had before, and you can expect increased sales, conversions and ultimately, profits for your efforts.</p>yashumittalA world in which nearly everybody now carries around a smart device – i.e. the smartphone – is what has enabled this revolution in retail. Read on if you want to find out how smart retail can take ecommerce to the next level.
https://i.imgur.com/I4HqL05.jpg
Developing Ruby on Rails Apps as an API for React on Front-end2017-12-09T11:31:00+00:002017-12-09T11:31:00+00:00https://blog.codecarrot.net/developing-ruby-on-rails-apps-as-an-api-for-react-on-front-end<p>Currently, more and more applications have dynamic content. Users expect apps to be engaging, responsive and fast. If you want to live up to these expectations you will need a proven technology on the backend with interactive framework on the frontend. Otherwise, users might get discouraged from using your app and move to a competitor. Having tested many combinations we’ve found a great solution for quick development of dynamic applications. What’s our secret?</p>
<h2 id="single-page-applications-a-new-trend-in-development">Single-Page Applications, a New Trend in Development</h2>
<p>Modern web applications such as Facebook, or Instagram focus on microinteractions. It’s crucial that the application is dynamic and quickly reacts to user behaviour. That’s why Single-Page Applications (SPAs) have recently gained on popularity. SPAs can be defined as “web applications that load a single HTML page and dynamically update that page as the user interacts with the app”. They resemble fast, native, mobile and desktop app experience. The users don’t have to wait for the website to reload every time they click on something. As a result, their experience improves thanks to fewer full page reloads and a better overall performance as less bandwidth is needed.</p>
<p>There are many combinations of different technologies and frameworks you can base your SPA on. We’ve researched and tested many options that include RoR, Node.js, Angular, Ember, or React. In this piece we want to focus on a setup which includes Ruby on Rails on the backend with React on the frontend which is one of the optimal choices for SPAs. It allows for fast rendering, great user-experience and quick development. What else do you need?</p>
<p><img src="https://cdn.codecarrot.net/images/ruby-on-rails-and-react-benefits-of-setup.png" alt="Ruby on rails and react.jpg" /></p>
<h2 id="benefits-of-using-react-for-a-ruby-on-rails-backend">Benefits of Using React for a Ruby on Rails Backend</h2>
<h3 id="1-reliable-technology">1. Reliable technology</h3>
<p><a href="/top-30-sites-built-with-ruby-on-rails-in-2017">Ruby on Rails is a proven technology, battle-tested by well-known brands such as Crunchbase, Shopify, Twitter, Airbnb or GitHub</a>. It’s strongly supported by an active community of great developers. On GitHub, it’s the largest repository of source code in the world. It makes <strong>RoR a reliable framework</strong>, in line with the highest development standards.</p>
<iframe src="https://www.facebook.com/plugins/post.php?href=https%3A%2F%2Fwww.facebook.com%2Fcodecarrotinc%2Fposts%2F366491627195858&width=500" width="500" height="520" style="border:none;overflow:hidden" scrolling="no" frameborder="0" allowtransparency="true" allow="encrypted-media"></iframe>
<h3 id="2-fast-and-convenient-development">2. Fast and convenient development</h3>
<p>Ruby on Rails has an enormous system of modules (gems), that provides you with ready-made solutions. Developers don’t need to write everything from scratch. It also provides access to <strong>tools for building APIs</strong> on the backend which can communicate with the client side, such as a React-based frontend. It’s a convenient <strong>solution for programmers</strong>, making development much faster and, as a result, reducing costs.</p>
<h3 id="3-less-code-needed">3. Less code needed</h3>
<p><strong>React is also lighter</strong> than Angular, or Ember. Devs build the frontend of an application using structured components, adding only the modules that are needed and dropping lines of unnecessary code.</p>
<h3 id="4-easy-to-test-and-maintain">4. Easy to test and maintain</h3>
<p>When we compare such combination to a traditional RoR app setup in which the frontend is also based on Rails it is a much <strong>cleaner solution in terms of engineering, easier to test and maintain</strong>. There is a distinct division of responsibilities between frameworks and each of them handles what it is best at: RoR - backend and React - frontend.</p>
<h3 id="5-efficient-teamwork">5. Efficient teamwork</h3>
<p>Clear division into frontend and backend based on different frameworks also improves communication within the team, making it clear who’s accountable for what. As a result, the development process is more efficient. With React, your frontend developers don’t have to know the details of RoR - they can handle frontend separately. It is not possible in the traditional RoR setup.</p>
<h3 id="6-good-documentation">6. Good documentation</h3>
<p>The tools and libraries available in RoR make it way easier for the team to create and constantly update documentation of the most important parts of the application (endpoints) - to the extent that it is almost unnoticeable. Not only is it more convenient for programmers, but it also guarantees reliable documentation.</p>
<h3 id="7-great-user-experience">7. Great user-experience</h3>
<p>React uses virtual <a href="/the-difference-between-virtual-dom-and-dom-in-react">DOM (Document Object Model)</a> technology that speeds up app rendering. The end user gets a faster and highly-interactive application with more-native-app-like experience.</p>
<p><img src="https://cdn.codecarrot.net/images/ruby-on-rails-and-react-when-you-should-you-use-it.png" alt="Ruby on rails and react" /></p>
<h2 id="downsides-of-ror--react-setup">Downsides of RoR + React Setup</h2>
<p>RoR + React combination doesn’t have any major downsides when it comes to the app performance, development or maintenance. But before jumping into the RoR and React setup you should consider potential challenges when it comes to building up your team.</p>
<p>Ruby on Rails apps as an API for React is not a standard yet. The majority of software houses still stick to the traditional approach, so it might be harder to find specialists who will have the knowledge, skills and experience in similar projects. Secondly, you will also need a dedicated React developer who will handle the frontend of your application.</p>
<p>Actionable Tips For Development</p>
<p>We chose RoR with React for many of our projects and it turned out to be a successful solution. However, it is not a good fit for all kinds of applications. To make the right decision you need to specify your business needs and goals.</p>
<p>RoR and React combined will be a good solution for <strong>modern, snappy applications in which a dynamic frontend is crucial to your business success</strong>. That’s why it’s perfect for <strong>SPAs</strong>. It’s also a better choice for <strong>B2C applications</strong>, or <strong>B2B apps with high user volume</strong>. You shouldn’t waste your resources on Single Page Application that will be used by few people.</p>
<p>Finally, if you <strong>plan to later scale your app to mobile platforms</strong>, React will be a great base for <a href="https://www.codecarrot.net/">React Native development</a>.</p>
<h2 id="how-its-done-at-codecarrot---showcases">How It’s Done at CodeCarrot - Showcases</h2>
<h3 id="tweet-streaming">Tweet streaming</h3>
<p>One of our internal projects aimed at developing a snappy and fast application for real-time tweet streaming. The app was a SPA, so there was no need for website reloading. It enabled instant interaction with a dynamic content. It also provided a well-written front and backend for user account management. Development of the application took one month and involved one developer only. With RoR+React the process went smooth, whereas a traditional RoR setup would have produced more problems.</p>
<p><img src="https://cdn.codecarrot.net/images/codecarrot-twitter.png" alt="CodeCarrot Twitter Account" /></p>
<h3 id="marketplace-app">Marketplace app</h3>
<p>In another project, this time for commercial purposes, the CodeCarrot team had to develop an elaborate marketplace application connecting two parties. The size and characteristics of the application required big team, but thanks to a well-written documentation it was not much of a problem. Development time was much shorter, too. The team was divided into frontend and backend, both could work separately. The frontend team was not lagged by backend development and iterations as they could use endpoints and mock them, continuing coding. At the same time, the server-side code based on good standards (<a href="//jsonapi.org/">JSON API</a>) enabled the backend team to keep on working independently from the frontend, streamlining the whole development process.</p>
<h3 id="should-you-use-it">Should You Use It?</h3>
<p>Is RoR and React setup a universal solution for all kind of applications? Definitely not. But if you aim at building dynamic application with many microinteractions it is an optimal choice. If you want to know more, <a href="mailto:contact@codecarrot.net">drop us a message</a>. We’ll be happy to help you achieve your business goals.</p>yashumittalCurrently, more and more applications have dynamic content. Users expect apps to be engaging, responsive and fast. If you want to live up to these expectations you will need a proven technology on the backend with interactive framework on the frontend. Otherwise, users might get discouraged from using your app and move to a competitor. Having tested many combinations we’ve found a great solution for quick development of dynamic applications. What’s our secret?
https://cdn.codecarrot.net/images/pexels-photo-209726.jpeg
What Is a Code Review and Why Do You Need It?2017-12-03T17:05:00+00:002017-12-03T17:05:00+00:00https://blog.codecarrot.net/what-is-code-review-and-why-do-you-need-it<p>Building a startup is hard, building software for it is not easier. But what makes software great? Good code. But how can you be sure that the code is good?</p>
<p>Working with many clients who came to us with software samples they would like to develop, we found out that, apparently, many freelance developers and even IT companies ignore the process of code review. Since we in <a href="//www.codecarrot.net">CodeCarrot</a> consider the code review stage to be a basic service, we decided to explain our perspective.</p>
<p>So let’s start with the basic terminology.</p>
<h2 id="what-is-code-review">What Is Code Review?</h2>
<p>Code review is a systematic examination of software source code, intended to find bugs and to estimate the code quality.</p>
<p>The code review process contains the following stages:</p>
<ul>
<li>Best practice - identifying more efficient ways of completing any task.</li>
<li>Error detection - finding the logical errors.</li>
<li>Vulnerability exposure - identifying the most common vulnerabilities.</li>
<li>Malware discovery - a special kind of code review used to detect the suspicious pieces of code or to find the back-doors and any malware integrated into the software.</li>
</ul>
<h2 id="why-do-you-need-code-review">Why Do You Need Code Review?</h2>
<p>There are several reasons why doing a code review is a necessary part of development.</p>
<p>The first reason is reducing risks. For example, if you have some software that was coded by a freelancer or an agency but you are not sure of the quality of the work because even good developers can miss something. So, double-checking is always a good idea.</p>
<p>Moreover, while working together on examining the code, every team member can suggest smarter solutions that would improve the general performance of the project.</p>
<p>The main thing you need to remember about code review is that it should be performed <strong>BEFORE</strong> your new development team takes on a new codebase or project. Checking the code before starting a project gives your team the chance to get familiar with it and to determine whether the code is clean or requires any rework.</p>
<p><img src="https://cdn.codecarrot.net/images/coding-zOvBKUUEERdNm.gif" alt="Money coding on laptop" /></p>
<h2 id="code-review-checklist">Code Review Checklist:</h2>
<p>Having a lot of practice in reviewing code, we decided to prepare a small guideline for developers who are going to check the source code for their projects.</p>
<p>Divide the review into time slots. Don’t try to review the whole project at once. Experts advise not to review more than 400 lines of code at once. Moreover, a single check should take no more than an hour. The reason is humans cannot effectively process that amount of information, especially over such a long period of time. When you try to go beyond this mark, the ability to detect bugs decreases notably, so you might miss some crucial errors.</p>
<p>Ask teammates for help. Two heads are better than one. You might be surprised how the quality of the review increases when you share this process with someone else. We are used to performing the collaborative code review using <a href="//www.atlassian.com/software/crucible">Crucible</a> by Atlassian. This tool allows you to assign reviewers from across our team, discuss the chosen lines of source code, files, or an entire changeset. We can also track and report the parts of the code that have now been reviewed yet. <a href="/code-together-in-real-time-with-teletype-for-atom">Collaborative code review</a> not only enhanced the code itself but also the level of the team’s’ expertise due to sharing knowledge while discussing changes.</p>
<p>Capture metrics. Before starting the review, the team should set precise goals like “reduce the percentage of defects in half”. The goal “to find more bugs” is not clear so it’s impossible to reach. Besides setting goals, capture such metrics as the speed of performing the review, number of bugs found per hour, an average number of bugs per code line. Constant tracking of review performance will show you the real picture of your inner processes.</p>
<p>Stay positive. Code review can sometimes put a strain on the relationships within the team. Nobody likes to be criticised, so it’s very important to keep a friendly atmosphere unless you want your coworkers to lose their motivation. Instead of perceiving each and every bug negatively, think positively, as they are the new opportunities for improving the code quality in general.</p>
<p>Set up the bug fixing process. So your team provided the code review of the whole process but how about fixing all those bugs found? It was a pure surprise for us, but not all the development teams actually have the established a method for fixing bugs that they find. Fortunately, we use the collaborative method, not only to discover bugs and errors but also to fix them. All the bugs are discussed with the creator <em>(except situations when we review another team’s code)</em>, and all the changes are always approved before submission into the source code.</p>
<h2 id="wrapping-things-up">Wrapping Things Up</h2>
<p>Providing code review must be an essential process in any web development company, as it helps to maintain high-quality coding standards. Working together on code analysis brings the team together and gives the opportunity to share knowledge and experience within the company.</p>
<p>So if you run a startup and you decided to hand over the project to another team, always request a code review in order to get the best quality software in the end.</p>yashumittalBuilding a startup is hard, building software for it is not easier. But what makes software great? Good code. But how can you be sure that the code is good?
https://cdn.codecarrot.net/images/lee-campbell-86958.jpg
How Should Companies Approach Twitter?2017-12-03T16:24:00+00:002017-12-03T16:24:00+00:00https://blog.codecarrot.net/how-should-companies-approach-twitter<p>While I was planning to write a new blog post for <a href="https://www.codecarrot.net">CodeCarrot</a>. My friend asked me “Should a company tweet as itself on Twitter <em>(ie <a href="https://www.twitter.com/codecarrotnet">@codecarrotnet</a>)</em> or should the Twitter account be written from a more personal perspective <em>(ie <a href="https://www.twitter.com/mittalyashu77">@mittalyashu77</a>)</em>?”</p>
<p>If the Twitter account is written from the company perspective then followers might expect certain things; updates on <strong>what the company is doing</strong> and customer support, for example. Followers may not expect to hear that <a href="https://www.twitter.com/codecarrotnet">@codecarrotnet</a> is having coffee with its buddies in Starbucks – that might throw some people and feel a bit weird.</p>
<p>Similarly, if you have a personal Twitter account your followers may not want to hear about what your company is up to when they’re following you because they are interested in how you <a href="https://www.twitter.com/mittalyashu77">@mittalyashu77</a> think and what you do.</p>
<p>This conundrum leaves businesses in a sort of limbo land – not knowing how to approach Twitter. Larger companies, I think, may have a particular problem.</p>
<p>If, as a company founder, CEO or manger, you have employed a marketing person to market your company and products then there’s probably a reason for that. Either you don’t have the time to do it yourself, or you’re not the kind of person who would be good at it. Both valid reasons. However, if potential Twitter followers will be more interested in what you have to say, on a personal level, then isn’t the best way to use Twitter for the founder or CEO to have his or her own Twitter account?</p>
<p>If you don’t think that the public at large is particularly interested in you (as the founder) then you might go for a ‘company’ Twitter account where you announce news and offer support to your followers but don’t talk about personal stuff since the account is meant to be the voice of the company.</p>
<p>Or of course you could do a mixture of the two where you have an official company twitter account which includes news, offers and support and a bit of personal input from the team. But the founder also has a personal account which gives an insight into his or her personal world while being also peppered with company updates.</p>
<p>You can follow <a href="https://www.twitter.com/codecarrotnet">CodeCarrot on twitter</a>.</p>
<p><a href="https://www.twitter.com/codecarrotnet"><img src="https://i.imgur.com/vm0XUOK.png" alt="CodeCarrot Twitter Page" /></a>.</p>yashumittalWhile I was planning to write a new blog post for CodeCarrot. My friend asked me “Should a company tweet as itself on Twitter (ie @codecarrotnet) or should the Twitter account be written from a more personal perspective (ie @mittalyashu77)?”
https://i.imgur.com/CxibsHP.png
CodeCarrot has moved to Https2017-11-29T13:15:55+00:002017-11-29T13:15:55+00:00https://blog.codecarrot.net/codecarrot-has-moved-to-https<p>Our content has now been served over HTTPS for two months and we thought it was time to share some of the reasons, processes and challenges behind the project.</p>
<h2 id="the-reasons-for-our-move">The reasons for our move</h2>
<h3 id="privacy">Privacy</h3>
<p>By using HTTPS, internet service providers (ISPs) are not able to track the pages our readers are accessing. It means we protect the privacy of our readers when accessing content that may disclose political opinions, faith, sexual orientation or any information that may be used against them. It matches our core values. We believe that protecting our visitors is good internet citizenship.</p>
<h3 id="security">Security</h3>
<p>Once on HTTPS, we prevent malicious third parties from inserting code into our site, or tracking what our visitors are doing.</p>
<h3 id="seo">SEO</h3>
<p>It also gives us other benefits such as a potential increase in search results. For the reasons mentioned above Google has announced that it will favour https content. It is also helping us decipher traffic from secure and ‘unknown’ referrers.</p>
<h3 id="content-authoring-and-integrity">Content authoring and integrity</h3>
<p>By switching to HTTPS, browsers will ensure that the content displayed is actually published by the CodeCarrot. Without HTTPS someone between the browser and our website could maliciously display other content or alter our content.</p>
<h3 id="new-features">New features</h3>
<p>It allows us to take advantage of emerging technologies, such as service workers, web notifications, ‘add to homescreen’ prompts and offline web pages. This is critical to developing relationships with audiences who are either unable to, or choose not to download the app, such as the majority of audiences in South America or India.</p>
<h2 id="why-has-this-taken-so-long">Why has this taken so long?</h2>
<h3 id="editorial-challenges">Editorial challenges</h3>
<p>We had several specific challenges in front of us:</p>
<ul>
<li>avoiding negative audience impacts</li>
</ul>
<p>For a long time ad agencies and ad exchange networks have not adopted HTTPS, jeopardising revenues of any free mainstream website willing to switch to HTTPS. Despite Google’s willingness and actions on this subject there was a risk of having a negative impact we could not afford.</p>
<ul>
<li>continuing to allow embeds to be inserted in articles</li>
</ul>
<p>Our articles often contain various external components such as YouTube videos or tweets. For each of them we had to find a way to embed them securely or another solution if the providers did not support HTTPS.</p>
<ul>
<li>keeping our older interactives working</li>
</ul>
<p>Interactive content is created differently to our standard articles with a lot of variation in technologies used over the years and without HTTPS being a concern at the time.</p>
<h3 id="approach--techniques">Approach & techniques</h3>
<p>The migration was such a big change that it was not possible to highlight all the problems at the beginning of the project, nor find a solution on paper for each of them. We had to work iteratively and solve these issues as they arose.</p>
<p>To overcome those challenges rather than draw a big plan we decided to defeat in detail:</p>
<ul>
<li>Migrate one small audience section to HTTPS</li>
<li>Identify the problems and track them</li>
<li>Fix the problems that need to be fixed before the next section migration</li>
</ul>
<p>One advantage of this strategy is that it enabled us to detect real problems rather than discussing hypothetical ones and improve our confidence step by step.</p>
<p>We have complemented this approach with 3 techniques:</p>
<h3 id="monitoring">Monitoring</h3>
<p>We closely monitored audience numbers, mixed content warnings and errors after each section migration.</p>
<h3 id="decoupling-backends-and-frontend-migrations">Decoupling backends and frontend migrations</h3>
<p>We migrated our backend systems before the frontend. Our content API was returning HTTPS links for all content ahead of time and we updated our internal tools and integrations to support the new scheme at an early stage. By doing this we ensured that any problems we found as part of a section migration to HTTPS were limited to the website itself and could be identified quickly.</p>
<h3 id="usage-of-early-adopters">Usage of early adopters</h3>
<p>We added the ability for users to enable the entire website to HTTPS. We offered this ability to readers willing to report issues and encouraged our engineers to enable this feature. We enabled us to discover several issues before they were seen by end users. At the same time we ensured that our journalists were shown this secure version of the site when previewing content. This allowed us to capture any further unknown issues and find solutions to problems early on.</p>
<h2 id="how-did-we-technically-migrate">How did we technically migrate?</h2>
<h3 id="conditional-redirection-to-https">Conditional redirection to HTTPS</h3>
<p>To enable a migration per section we have leveraged the capability of our CDN provider to write easily and apply very fast redirection rules based on the path of the request (our path contains the section of an article).</p>
<p>We used this, not the upgrade-insecure-requests option for two reasons. Most importantly, this feature was (and is currently still) not supported by enough browsers. Secondly the specification is quite complex and interaction with HSTS was not crystal clear to us and HSTS was our final goal. This meant that, sadly, the upgrade-insecure-requests feature was not useful to us in practice.</p>
<h3 id="content-security-policy-with-report-only">Content-Security-Policy with report only</h3>
<p>This feature has enabled us to log all mixed mode warning and errors and analyze them later. Passive content was still displayed, so minimizing impact for the end users. We switched to block only recently when we were confident there would be almost no impact.</p>
<h3 id="rewriting-of-old-content">Rewriting of old content</h3>
<p>To migrate historic interactive content we wrote a simple script to update a predefined list of urls to HTTPS. We migrated most of the interactive archive using this tool before enabling HTTPS on them.</p>
<h3 id="hsts-header">HSTS header</h3>
<p>The HTTP Strict-Transport-Security response header lets a web site inform the browser that it should never load the site using HTTP and should automatically convert all attempts to access the site using HTTP to HTTPS requests instead. It is intended to protect against man-in-the-middle attacks such as SSL stripping.</p>
<p>We added this header at the very end of the migration after all sections were redirected to HTTPS, which meant we were extremely confident that adding the header would not have any negative impact.</p>yashumittalOur content has now been served over HTTPS for two months and we thought it was time to share some of the reasons, processes and challenges behind the project.
https://i.imgur.com/U7Qbipp.jpg
Vectorize your hand lettering2017-11-26T09:10:30+00:002017-11-26T09:10:30+00:00https://blog.codecarrot.net/vectorize-your-hand-lettering<p>We need an initial sketch of a hand lettering which can be quite rough as we can always adjust it on Illustrator. The sketch is only for a reference; we can tweak it anytime in the software. We’re going to scan the sketch and import it to Illustrator and then begin tracing it using the Pen tool (P).</p>
<p>Here’s my hand lettering. You can use your own hand made letters or copy mine.</p>
<p><img src="https://cdn.codecarrot.net/images/18.jpg" alt="my hand lettering drawing" /></p>
<h2 id="vectorization">Vectorization</h2>
<h3 id="step-1">Step 1:</h3>
<p>Create a new document and Import your scanned lettering art to Illustrator.</p>
<p><strong>File > Place</strong> (select your file).</p>
<p><img src="https://cdn.codecarrot.net/images/21.jpg" alt="selecting the file" /></p>
<h3 id="step-2">Step 2:</h3>
<p>This imported image will help you to trace on it. <strong>Rename the layer as “background image”</strong> or anything that makes sense.</p>
<p>Reduce the opacity of this layer for a better visibility of your pen tool. Lock the layer.</p>
<p><img src="https://cdn.codecarrot.net/images/31.jpg" alt="trace the image and remove background" /></p>
<h3 id="step-3">Step 3:</h3>
<p>Create a new layer and start tracing the background image with the <strong>Pen tool (P)</strong>.</p>
<ol>
<li>Select the Pen tool (P)</li>
</ol>
<p><img src="https://cdn.codecarrot.net/images/41.png" alt="Selecting the pen tool from adobe illustrator" /></p>
<ol>
<li>Position the Pen tool where you want the curve to begin. Then position the Pen tool where you want the curve segment to end. To create a C‑shaped curve, drag the handles in the opposite direction to the previous line. Then release the mouse.</li>
</ol>
<p><img src="https://cdn.codecarrot.net/images/52.jpg" alt="showing different using of pen tool in adobe illustrator" /></p>
<ol>
<li>Similarly, to create an S-Shaped curve, drag in the same direction as the previous line and release the mouse.</li>
</ol>
<p><img src="https://cdn.codecarrot.net/images/61.jpg" alt="create an s-shape curve using pen tool in adobe illustrator" /></p>
<h3 id="step-4">Step 4:</h3>
<p><strong>Keep adjusting the anchor points</strong> with the Anchor Point tool <em>(Shift+C)</em> to best match the sketch. It’s always preferable to make a separate layer for each closed path and we can merge them later if needed.</p>
<p><img src="https://cdn.codecarrot.net/images/71.jpg" alt="Keep adjusting the anchor points" /></p>
<p>Use as few anchor points as possible to create your shape. Fewer anchor points make a smoother curve.</p>
<p>Add anchor points where there is a change in direction of the curve using the <strong>“Add Anchor point tool” (+)</strong>.</p>
<p>I’m drawing the outlines in a red color for better visibility over the background image. We can change it to a different color later.</p>
<p><img src="https://cdn.codecarrot.net/images/81.jpg" alt="Add Anchor point tool" /></p>
<p>After drawing the outlines, we need to draw those little paths inside the “i”, “r”, “t”, “h”, “d”, “a” and “y” and use the Pathfinder option to merge them into a single path. This is how it goes:</p>
<p><img src="https://cdn.codecarrot.net/images/91.jpg" alt="drawing the outlines using the pen tool" /></p>
<ol>
<li>Draw all the inner paths in the same layer as the outer path. In my example, I’m drawing those paths in a different color so you can see them. We need to merge the inner and outer layers into a single path so that we can color them.</li>
</ol>
<p><img src="https://cdn.codecarrot.net/images/102.jpg" alt="Draw all the inner paths in the same layer as the outer path" /></p>
<ol>
<li>Now, we need to select each inner path separately and go to <strong>Pathfinder > Divide</strong>.</li>
</ol>
<p><img src="https://cdn.codecarrot.net/images/112.jpg" alt="select each inner path separately and go to Pathfinder > Divide" /></p>
<p>Don’t forget to select the inner path first and then the outer path and then click on the <strong>Pathfinder > Divide</strong>.</p>
<p><img src="https://cdn.codecarrot.net/images/121.jpg" alt="Pathfinder > Divide" /></p>
<p>After this process, the inner path color automatically changes to the color of the outer path, which shows that the paths are merged. Repeat this for all the inner layers.</p>
<p><img src="https://cdn.codecarrot.net/images/131.jpg" alt="inner path color automatically changes to the color" /></p>
<h3 id="step-5">Step 5:</h3>
<p>After drawing the outlines, select all the layers with the <strong>selection tool (v)</strong> and <strong>double click on the fill (x)</strong> and select the color you like.</p>
<p><img src="https://cdn.codecarrot.net/images/142.jpg" alt="select all the layers and select the color you like" /></p>
<p>In my case, I removed the <strong>Stroke (X)</strong> and filled with this color.</p>
<p><img src="https://cdn.codecarrot.net/images/151.jpg" alt="removed and filled with this color" /></p>
<h3 id="step-6">Step 6:</h3>
<p>Now, let’s add some highlights to make it more appealing.</p>
<p>Lock the present layer. Create a new layer and start drawing the highlights.</p>
<p>The best way to draw highlights is to imagine as though the light is shining on your design from a specific direction.</p>
<p><img src="https://cdn.codecarrot.net/images/161.jpg" alt="draw highlights is to imagine as though the light is shining" /></p>
<p>Draw the highlight paths using the Pen tool. A lighter gradient color works well for highlights.</p>
<p><img src="https://cdn.codecarrot.net/images/171.jpg" alt="Draw the highlight paths using the Pen tool" /></p>
<h3 id="final-step">Final Step:</h3>
<p>Complete drawing the highlights to each letter and add a background layer (create a rectangle in the layer below the text layers) with a suitable color.</p>
<p><img src="https://cdn.codecarrot.net/images/182.jpg" alt="Complete drawing the highlights to each letter" /></p>yashumittalWe need an initial sketch of a hand lettering which can be quite rough as we can always adjust it on Illustrator. The sketch is only for a reference; we can tweak it anytime in the software. We’re going to scan the sketch and import it to Illustrator and then begin tracing it using the Pen tool (P).
https://cdn.codecarrot.net/images/171.jpg
Elixir vs Ruby - Which One is the Language for Your Next Project?2017-11-24T08:29:50+00:002017-11-24T08:29:50+00:00https://blog.codecarrot.net/elixir-vs-ruby-which-one-is-the-language-for-your-next-project<p>Ruby is the one of the main language we use for web development at <a href="//www.codecarrot.net/">CodeCarrot</a>. It’s already solid on its own, but gets even better with Ruby on Rails - a great framework that had a major influence on web development. Still, life goes on and the whole tech industry keeps moving forward. New languages are invented, new frameworks are created and different architectures gain popularity. The Ruby community is looking towards Elixir, a language based on the Erlang VM - the language that helped WhatsApp build their product. As an app owner, you’re probably wondering which language to choose for your new project. This article aims to shed some light on the pros and cons of both Ruby and Elixir.</p>
<h2 id="elixir-and-ruby---a-comparison">Elixir and Ruby - a comparison</h2>
<p>Elixir is built on top of the Erlang VM (virtual machine). The language itself was invented and co-created by José Valim, a well-known Ruby developer and creator of many great gems (libraries in Ruby parlance), such as Rails or Devise. The Erlang VM is over 30 years old. It was created by Ericsson to handle large numbers of concurrent connections - a must for the telecom industry. The solution had to be fault-tolerant, reliable and offer high concurrency at the same time.</p>
<p>José created Elixir because he was tired of improving the performance of Rails applications in multicore environments. Elixir already has many great libraries such as Phoenix, a tool that helps you build web applications that are fault-tolerant and perform well. At the same time, Phoenix makes it quick and easy to implement new features and write maintainable code.</p>
<p>Ruby was created back in 1993 by Yukihiro Matsumoto. His main objective wasn’t to create a fast language, but to make developer happiness his top priority. A couple of years later David Heinemeier Hansson created the Ruby on Rails framework that changed how we write web applications forever. It allowed developers around the globe to work much faster and was a breath of fresh air at a time when most web development was done in Java EE or PHP - neither of which were really known for their good quality or development speed.</p>
<h2 id="pros-of-elixir">Pros of Elixir:</h2>
<h3 id="1-battle-proven-solution">1. Battle-proven solution</h3>
<p>Elixir is based on the Erlang VM (BEAM). It’s one of the oldest virtual machines in the world, but remains broadly used. It’s actually older than the Java VM (1994) or the C# VM (2000). Erlang and Erlang VM are a the go-to solution for messaging systems or applications that have to manage a lot of persistent connections.</p>
<h3 id="2-performance">2. Performance</h3>
<p>Elixir is a compiled language, which makes it faster than Ruby. Is it comparable to Node.js? It’s similar performance-wise, but since most of the code runs concurrently, it’s more difficult to write blocking code in CPU-bound applications. Node.js makes use of the JavaScript event loop - it blocks the whole Node.js process when you have your code calculating something. That’s a clear advantage of Elixir over both Ruby and Node.js, especially when speed matters.</p>
<h3 id="3-otp">3. OTP</h3>
<p>The Open-Telecom Platform (OTP) is a set of tools that makes writing concurrent programs easy and fault-tolerant by providing a generic framework on top of which you can write your applications. It makes extensive use of actor model concurrent programming - you may know it from other popular libraries such as <a href="//github.com/celluloid/celluloid#motivation">Celluloid</a> or <a href="//github.com/ruby-concurrency/concurrent-ruby#general-purpose-concurrency-abstractions">concurrent-ruby</a>. This makes Elixir great at handling a lot of concurrent connections at once.</p>
<h2 id="cons-of-elixir">Cons of Elixir:</h2>
<h3 id="1-lack-of-talent-on-the-market">1. Lack of talent on the market</h3>
<p>Because Elixir is still a fresh programming language, there may not be too much talent on the market with expertise in it. Nonetheless, most Ruby developers can be up and running with Elixir in around a week or two. This should be enough time for most programmers to be able to build CRUD applications and implement basic functionalities.</p>
<h3 id="2-functional-programming-paradigm">2. Functional programming paradigm</h3>
<p>It’s not a bad thing per se that Elixir is based on the functional paradigm but, since most people program in object-oriented languages such as Ruby, Java, C# or Python, it may be harder for them to adjust to this new way of thinking. Functional languages aren’t better or worse - they’re just different.</p>
<h3 id="3-smaller-ecosystem">3. Smaller ecosystem</h3>
<p>Because Elixir is relatively young, there are fewer libraries around for it than for Ruby. This means that you might have to write features from scratch that you would get by simply importing a gem in Ruby. Most basic functionalities are already written and can be re-used, but some libraries may still be missing.</p>
<h2 id="pros-of-ruby">Pros of Ruby:</h2>
<h3 id="1-really-fun-to-write">1. Really fun to write</h3>
<p>Ruby was created with developer happiness in mind. Because of this, it’s still fun to write Ruby code, even after so many years. Reading well-written Ruby code is also a pleasure.</p>
<h3 id="2-ruby-on-rails">2. Ruby on Rails</h3>
<p>Ruby on Rails, created back in 2005, was a really disruptive piece of technology. It changed how we write web applications - it was just mind blowing how much you could achieve by writing so little code. It also made prototyping applications faster.</p>
<h3 id="3-productivity">3. Productivity</h3>
<p>Ruby is a really expressive language. A couple of lines in Ruby can do the same job as whole chunks of code in other languages. There are a lot of gems that solve almost all problems, making it easier to build an MVP.</p>
<h2 id="cons-of-ruby">Cons of Ruby:</h2>
<h3 id="1-harder-to-maintain">1. Harder to maintain</h3>
<p>Many Ruby libraries and tools use magic behind the scenes to keep the code concise. This is fine as long as you use each library the way it was designed to be used. Problems appear when you need to change a gem’s implementation to fit your business needs. Another thing is that Ruby doesn’t introduce any “good practices” out of the box. Seasoned developers use them to make sure that code stays maintainable, but doing so requires discipline.</p>
<h3 id="2-threading-and-concurrency">2. Threading and concurrency</h3>
<p>Ruby isn’t great for writing concurrent applications. The Global Interpreter Lock (GIL) makes it so that, at any given time, only one thread and one core are busy. GIL doesn’t allow developers to take full advantage of most hardware. Additionally, some base classes are not thread-safe.</p>
<h3 id="3-worse-performance">3. Worse performance</h3>
<p>Ruby was never a performance beast but, then again, it was never meant to be one. You may think that this only affects production speed, but it’s not entirely true. There is a great article written on this subject that you can find <a href="/the-fallacies-of-web-application-performance">here</a>.</p>
<h2 id="what-should-you-choose">What Should You Choose?</h2>
<p>As is almost always the case in our industry, the answer is “it depends”. If you will need to use a lot of concurrent connections (chat, IoT) or you know that your application will have a high user count - use Elixir. If you just want to prototype something, create a small application or know that your product won’t have too many users, then Rails is a proven solution for such products. It helped many companies create great software. Another thing for you to consider is the ability to maintain and extend your product as time goes on - you can do this with Ruby, but Elixir makes the process more sustainable.</p>yashumittalRuby is the one of the main language we use for web development at CodeCarrot. It’s already solid on its own, but gets even better with Ruby on Rails - a great framework that had a major influence on web development. Still, life goes on and the whole tech industry keeps moving forward. New languages are invented, new frameworks are created and different architectures gain popularity. The Ruby community is looking towards Elixir, a language based on the Erlang VM - the language that helped WhatsApp build their product. As an app owner, you’re probably wondering which language to choose for your new project. This article aims to shed some light on the pros and cons of both Ruby and Elixir.
https://cdn.codecarrot.net/images/applesandoranges-167668-edited.jpg
Meaning of Columns in Bootstrap2017-11-23T11:13:00+00:002017-11-23T11:13:00+00:00https://blog.codecarrot.net/meaning-of-columns-in-bootstrap<p>If you are confused with the grid system in the bootstrap, particularly with these classes, you can read this article.</p>
<p>Ignoring the letters <em>(xs, sm, md, lg)</em> <strong>for now</strong>, I’ll start with just the numbers…</p>
<ul>
<li>the numbers (1-12) represent a portion of the total width of any div</li>
<li>all divs are divided into 12 columns</li>
<li>so, <code class="highlighter-rouge">col-*-6</code> spans 6 of 12 columns (half the width), <code class="highlighter-rouge">col-*-12</code> spans 12 of 12 columns (the entire width), etc</li>
</ul>
<p>So, if you want <strong>two equal columns</strong> to span a div, write</p>
<div class="language-html highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="nt"><div</span> <span class="na">class=</span><span class="s">"col-xs-6"</span><span class="nt">></span>Column 1<span class="nt"></div></span>
<span class="nt"><div</span> <span class="na">class=</span><span class="s">"col-xs-6"</span><span class="nt">></span>Column 2<span class="nt"></div></span>
</code></pre></div></div>
<p>Of if you want <strong>three unequal columns</strong> to span that same width, you could write:</p>
<div class="language-html highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="nt"><div</span> <span class="na">class=</span><span class="s">"col-xs-2"</span><span class="nt">></span>Column 1<span class="nt"></div></span>
<span class="nt"><div</span> <span class="na">class=</span><span class="s">"col-xs-6"</span><span class="nt">></span>Column 2<span class="nt"></div></span>
<span class="nt"><div</span> <span class="na">class=</span><span class="s">"col-xs-4"</span><span class="nt">></span>Column 3<span class="nt"></div></span>
</code></pre></div></div>
<p>You’ll notice the # of columns always add up to 12. It can be less than twelve, but beware if more than 12, as your offending divs will bump down to the next row (not <code class="highlighter-rouge">.row</code>, which is another story altogether).</p>
<p>You can also <strong>nest columns within columns</strong>, (best with a <code class="highlighter-rouge">.row</code> wrapper around them) such as:</p>
<div class="language-html highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="nt"><div</span> <span class="na">class=</span><span class="s">"col-xs-6"</span><span class="nt">></span>
<span class="nt"><div</span> <span class="na">class=</span><span class="s">"row"</span><span class="nt">></span>
<span class="nt"><div</span> <span class="na">class=</span><span class="s">"col-xs-4"</span><span class="nt">></span>Column 1-a<span class="nt"></div></span>
<span class="nt"><div</span> <span class="na">class=</span><span class="s">"col-xs-8"</span><span class="nt">></span>Column 1-b<span class="nt"></div></span>
<span class="nt"></div></span>
<span class="nt"></div></span>
<span class="nt"><div</span> <span class="na">class=</span><span class="s">"col-xs-6"</span><span class="nt">></span>
<span class="nt"><div</span> <span class="na">class=</span><span class="s">"row"</span><span class="nt">></span>
<span class="nt"><div</span> <span class="na">class=</span><span class="s">"col-xs-2"</span><span class="nt">></span>Column 2-a<span class="nt"></div></span>
<span class="nt"><div</span> <span class="na">class=</span><span class="s">"col-xs-10"</span><span class="nt">></span>Column 2-b<span class="nt"></div></span>
<span class="nt"></div></span>
<span class="nt"></div></span>
</code></pre></div></div>
<p>Each set of nested divs also span up to 12 columns of their parent div. <strong>NOTE:</strong> Since each <code class="highlighter-rouge">.col</code> class has 15px padding on either side, you should usually wrap nested columns in a <code class="highlighter-rouge">.row</code>, which has -15px margins. This avoids duplicating the padding, and keeps the content lined up between nested and non-nested col classes.</p>
<p>– You didn’t specifically ask about the <code class="highlighter-rouge">xs, sm, md, lg</code> usage, but they go hand-in-hand so I can’t help but touch on it…</p>
<p>In short, they are used to define at which screen size that class should apply:</p>
<ul>
<li>xs = extra small screens (mobile phones)</li>
<li>sm = small screens (tablets)</li>
<li>md = medium screens (some desktops)</li>
<li>lg = large screens (remaining desktops)</li>
</ul>
<p>You should usually classify a div using multiple column classes so it behaves differently depending on the screen size (this is the heart of what makes bootstrap responsive). eg: a div with classes <code class="highlighter-rouge">col-xs-6</code> and <code class="highlighter-rouge">col-sm-4</code> will span half the screen on mobile phone (xs) and 1/3 of the screen on tablets(sm).</p>
<div class="language-html highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="nt"><div</span> <span class="na">class=</span><span class="s">"col-xs-6 col-sm-4"</span><span class="nt">></span>Column 1<span class="nt"></div></span> <span class="c"><!-- 1/2 width on mobile, 1/3 screen on tablet) --></span>
<span class="nt"><div</span> <span class="na">class=</span><span class="s">"col-xs-6 col-sm-8"</span><span class="nt">></span>Column 2<span class="nt"></div></span> <span class="c"><!-- 1/2 width on mobile, 2/3 width on tablet --></span>
</code></pre></div></div>
<p><strong>NOTE:</strong> as per comment below, grid classes for a given screen size apply to that screen size and larger unless another declaration overrides it (i.e. <code class="highlighter-rouge">col-xs-6 col-md-4</code> spans 6 columns on <code class="highlighter-rouge">xs</code> and <code class="highlighter-rouge">sm</code>, and 4 columns on <code class="highlighter-rouge">md</code> and <code class="highlighter-rouge">lg</code>, even though <code class="highlighter-rouge">sm</code> and <code class="highlighter-rouge">lg</code> were never explicitly declared)</p>
<p><strong>NOTE:</strong> if you don’t define <code class="highlighter-rouge">xs</code>, it will default to <code class="highlighter-rouge">col-xs-12</code> (i.e. <code class="highlighter-rouge">col-sm-6</code> is half the width on <code class="highlighter-rouge">sm</code>, <code class="highlighter-rouge">md</code> and <code class="highlighter-rouge">lg</code> screens, but full-width on <code class="highlighter-rouge">xs</code> screens).</p>
<p><strong>NOTE:</strong> it’s actually totally fine if your <code class="highlighter-rouge">.row</code> includes more than 12 cols, as long as you are aware of how they will react. –This is a contentious issue, and not everyone agrees.</p>yashumittalIf you are confused with the grid system in the bootstrap, particularly with these classes, you can read this article.
https://cdn.codecarrot.net/images/layout-12-grid2.png
9 Great Apps Written with React Native2017-11-20T15:07:00+00:002017-11-20T15:07:00+00:00https://blog.codecarrot.net/9-great-apps-written-with-react-native<p>The idea of creating apps using only one paradigm for all platforms sounds a bit unreal. However, <a href="/why-you-should-consider-react-native-for-your-mobile-app">React Native, despite its immaturity, enables to accelerate the process of building apps across different platforms, thanks to the possibility of reusing most of the code between them</a>. No wonder that many companies settle upon React Native for their mobile apps. Here is a list of those that have leveraged this framework in production.</p>
<h2 id="facebook">Facebook</h2>
<p><a href="//www.codecarrot.net/services/react-native">React Native</a> started as Facebook’s hackathon project developed in response to the company’s needs. Facebook wanted to bring all the benefits of web development - such as fast iterations and having a single team build the whole product - to mobile. That’s how React Native was brought to life and leveraged in mobile app development for both iOS and Android apps.</p>
<p>The dev team converted the Events Dashboard feature in the Facebook for iOS app to <a href="/why-you-should-consider-react-native-for-your-mobile-app">React Native to test app performance, such as startup time, which is crucial in this kind of applications</a>. It is a significant part of the user’s first impression of the app and determines whether they will stay or leave. What they achieved was cutting time-to-market in half. Read about their journey with React Native here.</p>
<p><img src="https://cdn.codecarrot.net/images/pexels-photo-267482.jpeg" alt="pexels-photo-267482.jpeg" /></p>
<h2 id="skype">Skype</h2>
<p>Skype has recently announced that it is testing a new Android app written in React Native. It’s a pretty good information for all the users, as the fairly well-designed app has suffered from numerous issues. The new version is totally revamped starting from the icons to the whole layout, adding a few extra neat features as well. As Microsoft has also announced, Skype Preview for iOS is already available in limited capacity through Apple’s TestFlight for Skype Insiders.</p>
<p>It’s also worth noting that the <a href="//github.com/Microsoft/react-native-windows">GitHub repo</a> with the React Native plugin for Universal Windows Platforms was recently moved to Microsoft. That means that not only can we expect Skype for iOS but also a desktop version which will be the first the big React Native project for Windows. This is a good sign for the platform. Very soon we might see RN working quite well on Windows too.</p>
<p><img src="https://cdn.codecarrot.net/images/mobile-phone-android-apps-phone-163065.jpeg" alt="mobile-phone-android-apps-phone-163065.jpeg" /></p>
<h2 id="facebook-ads">Facebook Ads</h2>
<p>The social networking platform isn’t the only React Native application that was developed under Facebook’s roof. Facebook Ads was actually the first React Native app for Android and, the first fully React Native based, cross-platform app built in the company. The framework seemed perfectly suitable for the lot of complex business logic required to accurately handle differences in ad formats, time zones, date formats, currencies, currency conventions, and so on, especially that a big chunk of it was already written in JavaScript. On top of that, implementation of UI surfaces with much data would be much easier with React Native.</p>
<p>Numerous components developed alongside with the Facebook Ads app have been useful for other developers in building their apps.</p>
<h2 id="instagram">Instagram</h2>
<p>Instagram took the challenge to integrate React Native into their existing native app starting from the simplest view you can imagine: the Push Notifications view which was originally implemented as the WebView. It didn’t require building navigation infrastructure, as UI was quite simple.</p>
<p>The dev team at Instagram faced a few problems on the way, but they substantially improved developer velocity. 85% to 99% of code was shared between Android and iOS apps, depending on products, thus the team was able to deliver the app much faster than they would have with a native solution.</p>
<p><img src="https://cdn.codecarrot.net/images/IndyMockups_01.png" alt="IndyMockups_01.png" /></p>
<h2 id="walmart">Walmart</h2>
<p>Walmart aims really high, aspiring to become the world’s largest online retailer. With such big goals the company needs to take bold moves that involve higher risk in order to gain a competitive advantage. That’s why they always seek the ways to improve customer experience by trying new technologies. Walmart has already proved its innovative attitude introducing Node.js into their stack. A few years later they also rewrote their mobile app into React Native.</p>
<p>Walmart managed to improve performance of the app on both iOS and Android by using less resources and within shorter time span. 95% of the codebase was shared between platforms while skills and experience of developers were leveraged across the organization. React Native allowed for great performance, nearly identical to native apps, and extremely smooth animations.</p>
<p><img src="https://cdn.codecarrot.net/images/IndyMockups_02.png" alt="IndyMockups_02.png" /></p>
<h2 id="airbnb">Airbnb</h2>
<p>Airbnb has also integrated React Native into their mobile application. What they first noticed when working with the framework was that the cost of integration with existing native apps was high, but it paid off. React Native was very easy to start off, but some challenges popped up along the way. The major issue resulted from the fact that people new to React struggled with some concepts of status management in the context of a React app. The biggest advantage, on the other side, was the ability to reuse the code. Most components were extremely reusable. Moreover, React made the code very easy to refactor and iterate on.</p>
<h2 id="soundcloud-pulse">SoundCloud Pulse</h2>
<p>SoundCloud Pulse is an application for creators that helps them manage their accounts and keep their community humming. When the company started designing the second set of native apps, they faced a few obstacles. iOS developers were impossible to find and they didn’t want to have a huge gap between the iOS and Android releases. Therefore, an independent research team started to run user-testing sessions with React Native-based prototypes.</p>
<p>Despite a few weaknesses the team at SoundCloud spotted, their experience with the framework was generally positive. Developers found it easier to work on a React-based application than on a native application. Moreover, they were capable of building the application by themselves without frequent input from specialised mobile developers.</p>
<h2 id="yeti-smart-home">Yeti Smart Home</h2>
<p>The dev team at Yeti Smart Home faced a similar problem as the guys at SoundCloud. They lacked iOS and Android developers, but they really wanted to start building native apps. That’s why they turned to React Native, a framework that seemed to be a better option than learning from scratch, to create good native experiences in Swift and Java separately. It wasn’t too easy at the beginning, as React Native was still a very immature landscape. Only with time and contribution of the growing Open Source community, the project moved forward faster and faster and then they could jump outside the mobile screen to design components that would control different devices. React Native, thanks to its modular construction, made it possible to reuse those “little bricks” to build each interface.</p>
<p><img src="https://cdn.codecarrot.net/images/pexels-photo3.jpg" alt="pexels-photo (3).jpg" /></p>
<h2 id="uber-eats">Uber Eats</h2>
<p>Uber has recently shared their insights about leveraging React Native in engineering of their food delivery app. Unlike the standard Uber app, Uber Eats marketplace involves three parties: restaurants, delivery-partners and eaters. Such model required an extra dashboard for restaurants. The original Restaurant Dashboard was built for the web and it provided limited access to the native device functionalities, such as sound notifications which was a crucial problem for user experience. As the team had a great deal of experience using React but limited iOS/Android exposure they decided to rebuild the dashboard with RN. Although the framework constitutes only a small part of technology stack used in Uber Eats, developers are very positive about its possibilities and capacity that can help them meet needs as the marketplace grows.</p>
<p>Naturally, there are many more applications written in React Native and we can see that there is a growing space for the framework in the future of development. <a href="/react-native-pros-and-cons-of-facebook-framework">Despite its immaturity and faults it brings a wide range of possibilities</a>. With a dynamic community growth and higher popularity, we can see many more React Native applications popping up in the near future.</p>
<p><a href="https://reactjs.flock.com/"><img src="https://cdn.codecarrot.net/images/join-our-react-js-native-flock-channel.png" alt="Join our React Js/Native Flock Channel" /></a></p>yashumittalThe idea of creating apps using only one paradigm for all platforms sounds a bit unreal. However, React Native, despite its immaturity, enables to accelerate the process of building apps across different platforms, thanks to the possibility of reusing most of the code between them. No wonder that many companies settle upon React Native for their mobile apps. Here is a list of those that have leveraged this framework in production.
https://cdn.codecarrot.net/images/StockSnap_3M1WKORDOL-610982-edited.jpg
4 Kinds of Applications to Build with React Native2017-11-20T14:25:00+00:002017-11-20T14:25:00+00:00https://blog.codecarrot.net/4-kinds-of-applications-to-build-with-react-native<p>Every time you want to create an application, you have to ask yourself what kind of OS APIs it needs to utilise and how to do that. Defining a problem-solution fit from the very beginning helps in delivering a top-notch product. Having known what needs to be done, you can decide which tech stack meets your requirements and what are the limitations of chosen technology. Even in programming, there is no rose without a thorn, so you need to be aware what will bud and what can prick.</p>
<p><a href="/why-you-should-consider-react-native-for-your-mobile-app">React Native framework was presented to developers as the next step towards creating mobile applications</a>. Before choosing it for your project, you can check whether your app matches one of the types below. If so, the idea of using RN is worth considering.</p>
<h2 id="clickable-prototypes">Clickable Prototypes</h2>
<p>If you have to build a simple app that needs to be verified by a group of test users quickly, RN might be a good choice. In the process of rapid prototyping, it is important to create a prototype that represents a working version of the app quickly. Although it is hard to achieve total fidelity to the mocks at this stage, it is worth trying to validate your business idea this way.</p>
<h2 id="apps-with-simplified-user-interfaces">Apps with Simplified User Interfaces</h2>
<p>In case you have to implement User Interfaces that consist of a small number of views and interactions, consider using this framework. It might be harder to implement sophisticated animations with RN, so please keep it in mind during the design stage.</p>
<h2 id="cross-platform-applications-with-basic-functionalities">Cross-platform Applications with Basic Functionalities</h2>
<p>RN allows validating your business ideas quickly - you can have both Android and iOS prototypes developed concurrently without additional costs. As long as your app is a quasi-static one or a simple external API consumer, consider using RN.</p>
<h2 id="applications-that-do-not-rely-on-using-native-apis-heavily">Applications that Do Not Rely on Using Native APIs Heavily</h2>
<p>You can always use RN by writing bridges, but - believe me - it is not something you want to do. Doing so requires additional Java/Objective-C/Swift knowledge and complicates the scope of the app. Instead of having one developer, you end up with three. Furthermore, passes over the bridge affect your performance, so - to keep your application performant - these calls have to be reduced to a minimum.</p>
<p>React Native is being actively developed, and so, something that seems to be difficult for the time being might become easier in the future. This framework surely resolves many mobile development-related issues, but just as every powerful tool, it has to be used wisely. If you are still unsure if React Native should be used in your project, <a href="//www.codecarrot.net">contact us</a>.</p>
<p><a href="https://reactjs.flock.com/"><img src="https://cdn.codecarrot.net/images/join-our-react-js-native-flock-channel.png" alt="Join our React Js/Native Flock Channel" /></a></p>yashumittalEvery time you want to create an application, you have to ask yourself what kind of OS APIs it needs to utilise and how to do that. Defining a problem-solution fit from the very beginning helps in delivering a top-notch product. Having known what needs to be done, you can decide which tech stack meets your requirements and what are the limitations of chosen technology. Even in programming, there is no rose without a thorn, so you need to be aware what will bud and what can prick.
https://cdn.codecarrot.net/images/pexels-photo-1-1.jpg
Marketing Is Not About Your Company’s Values2017-11-19T08:20:00+00:002017-11-19T08:20:00+00:00https://blog.codecarrot.net/marketing-is-not-about-your-companys-values<p>Marketing Is Not About Your Company’s Values, it’s about your customer’s values — and aspirations.</p>
<p>Twenty years ago, in 1997, Steve Jobs told us,</p>
<iframe width="100%" height="315" src="https://www.youtube.com/embed/AKNb40SqkKo?rel=0" frameborder="0" allow="autoplay; encrypted-media" allowfullscreen=""></iframe>
<div class="callout">
“Marketing is about values”
</div>
<p>He was right, of course. He was right about a lot of things, and marketing in particular was where he ruled. He was right in that the way to talk about a brand is “not to talk about speeds and fees” or “bits and mega-hertz” or “why we are better than windows.” He was right that marketing is about benefits, not features. And he was right when he said,</p>
<blockquote>
“Our customers want to know who is Apple and what is it that we stand for?”
</blockquote>
<p>All true.</p>
<p>But what he didn’t explicitly say is that customers only want to know “what a company stands for” <em>as it relates back to them</em>.</p>
<p>Marketing, at the end of the day, is not just about a company’s values — it’s about understanding what these mean to a customer, and getting that meaning to be felt strongly enough that they buy.</p>
<p>Now, the real mastery of Jobs is that he almost certainly knew this, consciously or subconsciously. He almost certainly knew full well that people care more about themselves than Apple — and he also almost certainly knew full well that <strong>that speech he gave was not talking about marketing. It was marketing</strong>.</p>
<p>Which is why he said things like:</p>
<blockquote>
“Apple at the core — it’s core value — is that we believe that people with passion can change the world for the better.”
</blockquote>
<p>And,</p>
<blockquote>
“The people who believe they can change the world are the ones who do.”
</blockquote>
<p>When he said this, he almost certainly knew:</p>
<p>He wasn’t talking about Apple. And he wasn’t even talking about the customers.</p>
<p>He was talking to them.</p>
<h2 id="people-dont-care-about-you--people-care-about-themselves">People don’t care about you — people care about themselves</h2>
<p>And they care about you only to the extent that you fulfill their wants and needs.</p>
<p>Look, it’s not cynical — it’s a fact. People not do business with you as an act of charity, or to get in on some of that sweet, sweet value set you got going on. They do business with you because they believe you are adding value to their lives — and how that sweet value set of yours aligns with their own.</p>
<p>People don’t come into the whiskey bar just because it’s cool — they come in because they want to feel cool. They don’t drink whiskey just because it’s “manly” or “strong” — they drink it so they feel manly and strong.</p>
<p>People didn’t buy Apple because they liked that Apple “believed people with passion can change the world” (like “oh, now isn’t that nice!”) No. People bought Apple because they wanted to see themselves as one of those people.</p>
<p>And the success of a business — and its marketing message — is partially figuring out what people want. And partially the promise of fulfilling it.</p>
<h2 id="people-care-about-the-way-you-make-them-feel">People care about the way you make them feel</h2>
<p>There are a number of companies popping up that sell clothing with elephants on it and donate part of the proceeds to “saving the elephants.”</p>
<p>They’re popular. And they’re popular not because donating makes people feel good, but because <em>elephants make people feel good</em>.</p>
<p>It’s not accidental. These companies aren’t donating to, say, endangered Amazonian spiders or rock moss.</p>
<p>No. It’s elephants.</p>
<p>Why? It’s simple. You want to sell some fast-fashion casual clothing? Look at who’s buying it. Once you know who’s buying it (and we all know who it is: early 20’s to early 30’s women), then look at why they’re buying it — their values, their insecurities, their wants and aspirations and motivations.</p>
<p>What do they value? What are they insecure about? How do they want to feel? How can we remind them of these things?</p>
<p>Cue the elephants.</p>
<p>Elephants are sociable. They’re cute. They’re smart. They’re just exotic enough to seem special but not exotic enough to be unfamiliar. They’re family-oriented. They’re strong. But they’re safe, not scary. Elephants are on trend.</p>
<p>And if you think this is reading too much into it, recall that we’ve been using motifs such as this since the beginning of time. Almost every smoker wanted to be the Marlboro Man, and at the end of the day you have to understand that, when it comes to inspiring feelings, an elephant isn’t that far off from a cowboy.</p>
<p>And marketing is about figuring out who your customers are, what they value, and most importantly how this manifests in insecurities and aspirations. And then it’s showing them the solutions in your brand.</p>yashumittalMarketing Is Not About Your Company’s Values, it’s about your customer’s values — and aspirations.
https://i.imgur.com/CdWfDNt.png
Your Step-by-Step Guide to A/B Testing with Google Analytics2017-11-19T07:51:00+00:002017-11-19T07:51:00+00:00https://blog.codecarrot.net/step-by-step-guide-to-ab-testing-with-google-analytics<p>A/B testing can be as simple as reciting the alphabet…</p>
<p>You design two versions of a web page (A & B), divide the traffic between the two, and choose the one that gives you the maximum conversions.</p>
<p>Simple, right? Wrong.</p>
<p>Most newbies to A/B testing struggle with which tools to use, how to set up their test, and how to know when it’s done. In this article, I’ll show you a free tool, readily available to every website owner. I’ll also give you some guidance on setting up your test and knowing when to call it done.</p>
<h2 id="before-you-start">Before you start</h2>
<p>There are many things you can learn from an A/B test. It can be used to determine whether you should focus on single conversion goal or strive for multiple conversion goals. It can help you know which design elements and messaging are most persuasive for your audience.</p>
<p>No matter what you’re testing, keep your priorities straight. <strong>The end goal of any CRO (conversion rate optimization) process should be to increase your total revenue</strong>.</p>
<p>Imagine you’ve set up an A/B test to choose the best page design for increasing your subscriber rate. It works. Your subscription rate goes through the roof—but the design somehow hurts your sales rate and results in lower revenue.</p>
<p>This might make you insane. Do you keep your winning design? No. Always choose the page that will increase your bottom line, not just your conversions. Remember, companies run on revenue, not on conversion rates.</p>
<p>A conversion for a business could be anything.</p>
<ul>
<li>For bloggers, a single subscription could be considered a conversion.</li>
<li>For eCommerce, a conversion might be a sale, subscription, newsletter sign-up, product carting, or even an event click.</li>
</ul>
<p><strong>Before you can start conversion testing, you’ll first need to define what your goal is</strong> for each test, so you can accurately identify the winning page design.</p>
<p><img src="https://i.imgur.com/Z54PM9c.png" alt="a/b testing Google analytics" /></p>
<p>There are many conversion testing tools on the market, but the best are usually paid and add to your marketing expenses. The one exception to this rule is Google Analytics.</p>
<p>It’s very simple to use Google Analytics for A/B testing or split testing with two or multiple variations in the website design. Now, I’m going to provide you with a step-by-step guide for easily testing your web page through a Google Analytics content experiment.</p>
<h2 id="choose-an-experimental-objective">Choose an Experimental Objective</h2>
<p>Google has combined A/B testing and split testing into one term—content experiment.</p>
<p>You’ll find it in Google Analytics under “Behavior” and “Experiments.” On that page, simply click the button for “Create Experiment.”</p>
<p><img src="https://i.imgur.com/d8cDTbm.png" alt="behavior experiment" /></p>
<p>You’ll be take to a screen (pictured below) where you can set up your experiment.</p>
<p>First, add in the experiment name. For instance, if you want to perform A/B testing for a sign-up form or product selling button, then create a descriptive name that makes it easy to identify the experiment.</p>
<p>Under “Objective for this experiment,” you’ll define the metric you’ll use to evaluate the results from your test. Metrics can be chosen from Adsense, Ecommerce, Goals, Site Usage, etc.</p>
<ul>
<li>If you’re looking to improve ad clicks or impressions, then choose the Adsense option.</li>
<li>If you want to boost revenue or the number of transactions, select eCommerce.</li>
<li>If you have predefined goals like session duration, event attendances, or destination page clicks, then opt for the goal metric.</li>
<li>Lastly, if you’re looking to better user experience through average page views or time on site, go for site usage.</li>
</ul>
<p>The best part is you can set multiple metrics at one time.</p>
<p><img src="https://i.imgur.com/DpjHmhH.png" alt="set objective of a/b testing" /></p>
<h2 id="divide-your-web-traffic">Divide Your Web Traffic</h2>
<p>Once you’ve set the objective, you can divide the percentage of web traffic for the content experiment. This will control how many people visiting your website will see one of your test pages as opposed to your original page.</p>
<p>For quick results, you may want to include a high percentage of visitors in the experiment. However, if your experiment is rather drastic or risky, include only a small percentage of your website’s traffic. It’s also smart to turn on the email notification to stay updated on any changes occurring in the experiment.</p>
<p>In the “Advanced Options” tool, you can control how to divide the traffic by turning on the “Distribute traffic” toggle button. Enable this option to assign an equal amount of traffic to each variation for the life of the experiment.</p>
<p>If this button is left disabled, content experiments will follow the default behavior by adjusting traffic dynamically based on variation performance.</p>
<p>From there, you should set the minimum experiment time at three weeks for the best results.</p>
<p>Google Analytics also allows you to fix the confidence threshold for your content experiment to determine the minimum confidence level that must be achieved before a winner can be declared.</p>
<p>The higher the threshold, the more confident you can be that the winning web page has competed well against the other design. Keep in mind that higher thresholds can make your content experiment considerably longer as Analytics waits to crown a champion.</p>
<p><strong>Pro Tips:</strong> Use this confidence calculator to determine your confidence threshold.</p>
<h2 id="configure-your-experiment-and-code">Configure Your Experiment and Code</h2>
<p>The next step is to configure the experiment by adding in your original web page and your test pages.
As you can see in the image below, you simply need to enter the URL of your current page and all variation web pages.</p>
<p>Once you add the original and test pages, look over the preview image to be sure you’ve entered the right URL. Hit the “Save Changes” button after you check for completeness to head to the next experiment section.</p>
<p><img src="https://i.imgur.com/pb8xmSR.png" alt="configure the experiment" /></p>
<p>Now, you’ll need the experiment code for your testing project.</p>
<p>If Google Analytics tracking codes are properly installed on your original and variation pages, an experiment code will be immediately visible in the box.</p>
<p>Place this code immediately after the opening head tag at the top of your original web page. Once it’s added, hit the “Save Changes” button again to progress to the final step.</p>
<p><img src="https://i.imgur.com/xKiv3DC.png" alt="setup the a/b testing code" /></p>
<p><strong>Pro Tips:</strong> You can use the <a href="https://wordpress.org/plugins/google-content-experiments/screenshots/">Google Content Experiments plugin</a> to enter the code on your page.</p>
<h2 id="review-and-get-started">Review and Get Started</h2>
<p>When you’ve added the code, Google Analytics will validate it and show any errors that have been encountered if applicable.</p>
<p>Sometimes Analytics isn’t able to find the code. In this case, you can skip the validation phase as long as you’re sure the code was properly added. Google recommends skipped validation as only a last resort move. Instead, check your page for any errors that may have been introduced.</p>
<p>Otherwise, you’ll be given the green flag to start your content experiment. Your experiment will launch and you’ll start seeing reported data within one to two days.</p>
<p><img src="https://i.imgur.com/HEM4s0M.png" alt="review the experiment" /></p>
<h2 id="check-your-results">Check Your Results</h2>
<p>After your experiment has run its course, Google Analytics will declare the winner based on your previously defined metrics and confidence threshold. It will take at least three weeks to reach this step.</p>
<p>By reviewing your results, you’ll identify the page that performs the best. You can then publish this as the page you want viewed by all website visitors.</p>
<p>Easy. But does it work?</p>
<p>Kapitall increased conversions by 44 percent through A/B testing from a Google Analytics content experiment. So clearly it does.</p>
<p>Overall, Google Analytics is a free tool that’s very easy to configure for running testing experiments because the search engine handles all of the dirty work.</p>
<p>There’s one downside though. Analytics doesn’t support multivariate testing, which is a well-known technique for testing multiple variables like color, text size, and buttons all at once. Google Analytics can’t be used for an email campaign either.</p>
<p>That said, it’s still the best option for running A/B testing on your landing page and conducting a content experiment at the very low price of free.</p>
<p>Have you used Google Content Experiments? What was your biggest win?</p>yashumittalA/B testing can be as simple as reciting the alphabet…
https://i.imgur.com/TywPcjM.jpg
How much to build and how much to buy - powering chat and messaging apps2017-11-19T07:51:00+00:002017-11-19T07:51:00+00:00https://blog.codecarrot.net/how-much-to-build-and-how-much-to-buy-powering-chat-and-messaging-apps<p>When you’re building a chat application of any kind — from mobile group messaging and multiplayer in-game chat, to customer support and chatbots — choosing the right platforms, frameworks, and protocols can make or break your business.</p>
<p>That’s because deciding whether to build or buy a chat app isn’t binary. The days of making a decision to do-it-yourself or buy from a vendor are gone.</p>
<p>The question now is <strong>how much do I want to build, and how much do I want to buy?</strong></p>
<p>Between open-source, IaaS, PaaS, SaaS, SDKs, APIs and Microservices, businesses have never had more options for <strong>how</strong> they want to build their chat products. And the spectrum of choices only continues to widen.</p>
<p>As cloud computing becomes more accessible and affordable, innovative new companies solve specific problems. Devices become more powerful. If businesses want to keep up, they must understand the vendor landscape along with the benefits and challenges of each option along the spectrum.</p>
<p>As a result, there are many mistakes that developers and organizations can make when choosing chat or messaging platforms for their application.</p>
<p>In this post, we’ll discuss a number of different chat application types and look at the different platform options for powering and delivering messaging apps. We’ll also discuss challenges that can arise from making certain decisions throughout the development cycle, like scalability, time to market, and other differentiators.</p>
<h2 id="choosing-a-chat-service-provider-current-landscape">Choosing a chat service provider: current landscape</h2>
<p>There are a wide variety of options across the build vs. buy spectrum. You have open-source on one end (build) and fully built out (SaaS) solutions on the other (buy). With hundreds of options in between, all with different pros and cons, we’ll seek to give you an idea of the landscape in a simple chart:</p>
<p><img src="https://i.imgur.com/aDvmn5r.png" alt="1_5pSZtT1kQVHNijWUaikmqA.png" /></p>
<h3 id="open-source-protocols">Open-source protocols</h3>
<p>The furthest on the build side are open-source protocols like WebSockets and HTTP Long Polling. These are simply protocols, which means that you manage everything to make them work. That includes spinning up your back-end infrastructure, maintaining it, building new SDKs to support new devices and languages, and everything else.
These are great for prototyping, building small applications, or getting your hands dirty with the full stack. But most real-time messaging services offer free versions with all the back-end infrastructure included. And you’ll need to gear up for some serious headaches when it’s time to scale.</p>
<h3 id="open-source-frameworks">Open-source frameworks</h3>
<p>Open-source frameworks are a smidge past pure build, but still require you to maintain the infrastructure on your own. For chat use cases, open-source frameworks tend to rely on a community of developers to update the framework and maintain the client SDKs.</p>
<h3 id="infrastructure-as-a-service-iaas">Infrastructure-as-a-Service (IaaS)</h3>
<p>These are the big dogs — the cloud infrastructure service providers like AWS, Digital Ocean, Azure, Bluemix, and Google Cloud. They actually end up powering a lot of the PaaS, messaging solution providers, and SaaS products that we’ll talk about next.</p>
<p>In a nutshell, you can use open-source protocols with an IaaS to launch your app. The infrastructure is taken care of, but there’s still a lot of building to do yourself.</p>
<h3 id="platform-as-a-service-paas">Platform-as-a-Service (PaaS)</h3>
<p>PaaS providers like <a href="https://firebase.com/">Firebase</a> offer hosted solutions for building chat applications. They include not only the infrastructure, but also the APIs for building chat features. Building and customizing the application requires engineering resources, since their SDKs are open. But security and maintenance of the service (the back-end and the client SDKs) are handled by the PaaS.</p>
<h3 id="chat-frameworks">Chat frameworks</h3>
<p>These framework providers are almost as close to buying as you can get, but still require a fair amount of engineering. The big difference between these providers and PaaS is that they provide more of a black box approach — you have less freedom to customize the APIs and infrastructure. Often they’ll provide the UI as well.
PubNub ChatEngine offers a more open and extensible framework, for example. Layer would fall closer to the black box SaaS chat solutions, but still offers a fair amount of customization options.</p>
<h3 id="saas">SaaS</h3>
<p>Lastly, the furthest over on the buy side of the spectrum, SaaS companies provide a fully-built out solution that requires a small amount of engineering. UI, integrations, and infrastructure are all handled by the SaaS provider. Leaders in the space include Intercom and Zendesk Chat.</p>
<h2 id="questions-to-ask-yourself-when-choosing-your-chat-service-provider">Questions to ask yourself when choosing your chat service provider</h2>
<p>As with all the other parts of your critical infrastructure, the key questions still remain the same:</p>
<ul>
<li>Do you run your own service, or do you utilize a hosted service?</li>
<li>How much does it cost upfront? How much will it eventually cost at scale?</li>
<li>Is the hosted service reliable, secure, and scalable?</li>
<li>How mission-critical is chat to your application?</li>
<li>Who on your team will maintain it? Do they have the skills to make it scalable and secure?</li>
<li>Where does the service store the data, and who has access to it?</li>
</ul>
<h2 id="choosing-your-chat-service-provider-open-source-vs-hosted">Choosing your chat service provider: open-source vs. hosted</h2>
<p><img src="https://i.imgur.com/lvdhnzv.png" alt="0_FRYhZWS5NkRf-GMZ.png" /></p>
<p>When it comes to software development, everyone knows that what works in the lab is not guaranteed to work in the wild. That’s because the wild presents all those challenges you may not think about, or may not even know about yet.</p>
<p>When it comes to choosing the right technology to power your chat, there are a number of build and buy considerations to look at. We’ll look at security, scalability, reliability, customization, and business reasons for selecting your stack in the lab vs. the real world.</p>
<h3 id="infrastructure">Infrastructure</h3>
<p>In you’re going down the open-source route, you’ll choose your tool, install it, and orchestrate the operation of that tool.</p>
<p>From there, you’ll start thinking about the infrastructure side of things, like load-balancing and redundant nodes. These are requirements for launching an app at scale. This is when you may tap an IaaS provider to handle the back-end. Even so, it will still require heavy engineering, including:</p>
<ul>
<li>Spinning up multiple testing, staging, and production environments</li>
<li>Twelve factor</li>
<li>Coordinating provisioning for those multiple environments (like a Kubernetes)</li>
<li>Deploying your application code to the environments</li>
<li>Setting up service management, system monitoring, and Ops alerting</li>
<li>Creating a load balancing scheme (like Nginx or HAProxy)</li>
<li>Figuring out how to segment data by channels or topics (like Redis pub/sub with Socket.io)</li>
<li>Finding a store and forward solution for signal recovery, like in-memory caching</li>
<li>Implementing a method to detect which client to connect to which data center and port</li>
<li>Figuring out which channels/topics to send/receive for a given client</li>
<li>Deciding which platforms and languages you’ll support</li>
<li>Creating universal data serialization (JSON)</li>
<li>Customizing code to detect data uplink that works across device types</li>
<li>Determining Quality of Service and level of loss, and developing a data recovery scheme (or settle for “fire and forget”)</li>
<li>Deciding which APIs and capabilities you’ll need, then building them (presence detection)</li>
</ul>
<p>That’s a laundry list of considerations. But if you’re choosing the open-source route, these are the things you’ll have to consider once you’re outside the lab and scaling your app.</p>
<h3 id="security">Security</h3>
<p>For chat, security is paramount. We’re increasingly sending more confidential and mission-critical information via chat applications, from financial details to chatbot commands. Ensuring that you have full control over access and encryption is imperative.</p>
<p><img src="https://i.imgur.com/7rU6Ji7.png" alt="0_CCahFHHZJiwWZxXi.png" /></p>
<p>Every successful chat service provider offers different levels of security. Here are the most important features that must be included in any hosted-service provider:</p>
<ul>
<li>End-to-end encryption with TLS for in/outbound packets and AES for packets</li>
<li>Support fine-grained, token-based access control. Token-based access control allows you to grant and revoke access to any messaging channel.</li>
<li>Compliance is key, especially for verticalized chat applications. The hosted-service provider should be certified for HIPAA (healthcare), SOC 2, GDPR (EU), Data Shield, and SafeHarbor (EU/US).</li>
</ul>
<p>For those who choose not to utilize a hosted-service provider, the following are additional security considerations that you’ll have to handle on your own:</p>
<ul>
<li>Purchasing a TLS certificate, then distributing and managing that certificate securely</li>
<li>Figuring out how to protect channels and topics (not covered by TLS)</li>
<li>Building an authorization systems for users</li>
<li>Considering AES and/or RSA encryption for payloads (not covered by TLS)</li>
<li>Complying with legislative security policies (like SafeHarbor or HIPAA)</li>
</ul>
<h3 id="scalability">Scalability</h3>
<p>For chat apps with thousands of active users chatting simultaneously, and ones that continue to grow, expertise on scale is a major challenge. Both open-source and some hosted-service providers deal with this. But when it comes to scale, hosted solutions mitigate the risk of app-breaking scalability issues far greater than open-source options.</p>
<p>For hosted solutions, there are a couple indicators that your service of choice will scale with your app growth.</p>
<p><strong>Multiple global points of presence:</strong> Chat messages should be globally replicated, so that if messages are dropped, a backup message will be delivered. This also increases the performance of your application, as every chat user doesn’t have to connect to the same data center (especially those halfway across the earth).</p>
<p><strong>Uptime SLAs:</strong> Uptime SLAs hold hosted-service providers accountable, and they should credit you if those SLAs are not met based on the terms.</p>
<p>For the do-it-yourselfers, you need to consider:</p>
<ul>
<li>A custom built load testing service that can simulate a realistic audience</li>
<li>Creating update protocol & continuously modifying your network to support new products/services</li>
<li>Paying for Socket server costs, QA systems, and hot failovers</li>
<li>Ongoing Ops monitoring and additional headcount required</li>
</ul>
<h2 id="reliability">Reliability</h2>
<p>There is so much competition for messaging applications. With the app store a click away, any issue a user encounters can lead them to an alternative. Reliability is a key factor in making your app sticky. When vetting hosted service providers, here are a couple key indicators of reliability:</p>
<ul>
<li>Data replication for multiple points of presence and automatic failover to ensure that messages are delivered 100% of the time (and actually in realtime)</li>
<li>Message “catch-up” in case of connection dropout (if a user is in a tunnel, for example, they’ll receive the message when they come out the other side)</li>
</ul>
<p>If using an open-source solution, you’ll have to also handle:</p>
<ul>
<li>Building a load distribution system</li>
<li>Identifying error messages</li>
<li>Building a log system</li>
<li>Knowing when faults occur and developing a playbook of responses</li>
<li>Building service management (like PagerDuty)</li>
<li>Developing multi-datacenter deployment</li>
</ul>
<h2 id="open-source-vs-hosted">Open-source vs. hosted</h2>
<p>When you look at the major considerations, you can see that building out a realtime messaging system on your own poses a lot of risks. It is a great option for smaller chat applications. But once you begin to grow, security, reliability, and scalability challenges can add up.</p>
<p>Most hosted-solution providers also allow a free-forever sandbox pricing tier. This allows you to develop your app without paying, and once you’ve grown to a certain size, you pay as you grow. For those companies looking to move fast and not wanting to worry about all the intricacies of networking and infrastructure, hosted-solutions are the way to go.</p>
<p>This article is written by <a href="https://medium.freecodecamp.org/@joehanson">Joe Hanson</a>.</p>yashumittalWhen you’re building a chat application of any kind — from mobile group messaging and multiplayer in-game chat, to customer support and chatbots — choosing the right platforms, frameworks, and protocols can make or break your business.
https://i.imgur.com/SiDXv2g.png
All You Need To Know About CSS-in-JS2017-11-18T13:13:00+00:002017-11-18T13:13:00+00:00https://blog.codecarrot.net/all-you-need-to-know-about-css-in-js<p>TL;DR: <strong>Thinking in components</strong> — No longer do you have to maintain bunch of style-sheets. CSS-in-JS abstracts the CSS model to the component level, rather than the document level (modularity).</p>
<h2 id="styled-react-component-example">Styled React Component Example</h2>
<p><img src="https://cdn.codecarrot.net/images/1_DFwkvCRyz9K0Mbl59r2hMg.png" alt="1_DFwkvCRyz9K0Mbl59r2hMg.png" /></p>
<hr />
<p>You probably heard terms like <strong><a href="//cssinjs.org/?v=v9.1.0">CSS-in-JS</a></strong>, <strong><a href="//www.styled-components.com/">Styled Components</a></strong>, <strong><a href="//github.com/FormidableLabs/radium">Radium</a></strong>, <strong><a href="//github.com/Khan/aphrodite">Aphrodite</a></strong> and you’re left there hanging <strong>“why is this a thing?</strong> — I’m perfectly happy with <strong>CSS-in-CSS (CSS in .css).”</strong></p>
<p>I’m here to shine some light on why this is a thing and hopefully we will least understand the concept and understand why it’s a thing. With that said — please feel free to use CSS-in-CSS — on no terms are you obligated to use CSS-in-JS. <strong>Whatever works best for you and makes you happy is hands down the best solution, always-always!</strong></p>
<p>CSS-in-JS is a delicate and controversial topic — I’m advocating having an open mind and weighing if this makes sense to you — ask yourself <strong>“will it improve my workflow?” — in the end — that’s the only thing that matters — use tools that make you happier and more productive!</strong></p>
<p>I’ve always felt awkward having to maintain a huge folder of stylesheets. I would like to try different approaches. I’ve seen many people asking if there are new styling ideas. CSS-in-JS is so far the best concept.</p>
<p>Let’s give CSS-in-JS a shot.</p>
<p><img src="https://cdn.codecarrot.net/images/1_bsbmmLcGl2kSJSuKW-JFqw.png" alt="Small-To-Medium size project CSS" /></p>
<p><em>Small-To-Medium size project CSS</em></p>
<hr />
<h2 id="what-is-css-in-js">What is CSS-in-JS?</h2>
<blockquote>
JSS is a more powerful abstraction over CSS. It uses JavaScript as a language to describe styles in a declarative and maintainable way. It is a high performance JS to CSS compiler which works at runtime and server-side. This core library is low level and framework agnostic. It is about 6KB (minified and gzipped) and is extensible via plugins API.
</blockquote>
<p>Keep in mind Inline styles and CSS-in-JS are not the same! They’re different — Quick demonstration time!</p>
<h2 id="how-inline-styles-works"><a href="//developer.mozilla.org/en-US/docs/Web/API/HTMLElement/style">How Inline Styles Works</a></h2>
<div class="language-js highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="kd">const</span> <span class="nx">textStyles</span> <span class="o">=</span> <span class="p">{</span>
<span class="na">color</span><span class="p">:</span> <span class="nx">white</span><span class="p">,</span>
<span class="na">backgroundColor</span><span class="p">:</span> <span class="nx">black</span>
<span class="p">}</span>
<span class="o"><</span><span class="nx">p</span> <span class="nx">style</span><span class="o">=</span><span class="p">{</span><span class="nx">textStyles</span><span class="p">}</span><span class="o">></span><span class="nx">inline</span> <span class="nx">style</span><span class="o">!<</span><span class="sr">/p</span><span class="err">>
</span></code></pre></div></div>
<p><em>inline styles</em></p>
<p>In the browser this will get attached to the DOM node like so:</p>
<div class="language-html highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="nt"><p</span> <span class="na">style=</span><span class="s">"color: white; backgrond-color: black;"</span><span class="nt">></span>inline style!<span class="nt"></p></span>
</code></pre></div></div>
<h2 id="how-css-in-js-works">How CSS-in-JS works</h2>
<div class="language-js highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="k">import</span> <span class="nx">styled</span> <span class="k">from</span> <span class="dl">'</span><span class="s1">styled-components</span><span class="dl">'</span><span class="p">;</span>
<span class="kd">const</span> <span class="nx">Text</span> <span class="o">=</span> <span class="nx">styled</span><span class="p">.</span><span class="nx">div</span><span class="s2">`
color: white,
background: black
`</span>
<span class="o"><</span><span class="nx">Text</span><span class="o">></span><span class="nx">Hello</span> <span class="nx">CSS</span><span class="o">-</span><span class="k">in</span><span class="o">-</span><span class="nx">JS</span><span class="o"><</span><span class="sr">/Text</span><span class="err">>
</span></code></pre></div></div>
<p>In the browser this will gets attached to the DOM like so:</p>
<div class="language-html highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="nt"><style></span>
<span class="nc">.hash136s21</span> <span class="p">{</span>
<span class="nl">background-color</span><span class="p">:</span> <span class="no">black</span><span class="p">;</span>
<span class="nl">color</span><span class="p">:</span> <span class="no">white</span><span class="p">;</span>
<span class="p">}</span>
<span class="nt"></style></span>
<span class="nt"><p</span> <span class="na">class=</span><span class="s">"hash136s21"</span><span class="nt">></span>Hello CSS-in-JS<span class="nt"></p></span>
</code></pre></div></div>
<h2 id="difference">Difference</h2>
<p>See the slight difference? CSS-in-JS attached a <code class="highlighter-rouge"><style></code> tag on top of the DOM while inline styles just attached the properties to the DOM node.</p>
<p><strong>Why does this matter?</strong></p>
<p><strong>Not all CSS features can be aliased with JavaScript event handlers</strong>, many pseudo selectors (like <code class="highlighter-rouge">:disabled</code>, <code class="highlighter-rouge">:before</code>, <code class="highlighter-rouge">:nth-child</code>) aren’t possible, styling the <code class="highlighter-rouge">html</code> and <code class="highlighter-rouge">body</code> tags isn’t supported etc.</p>
<p><strong>With CSS-in-JS</strong>, you have all the power of CSS at your fingertips. Since actual CSS is generated, you can use every media query and pseudo selector you can think of. Some libraries (like <code class="highlighter-rouge">jss</code>, <code class="highlighter-rouge">styled-components</code>) even add support for neat, non-CSS-native features like nesting!</p>
<p><a href="/writing-your-styles-in-js-vs-writing-inline-styles">Brilliant article going in depth on how they’re different</a>.</p>
<p><em>“Just write the darn CSS in CSS and be done with it.”</em></p>
<p>Yes — while that’s the case for how it’s been done for a long-long time — <strong>the challenge is modern web is written in components not pages.</strong></p>
<p><strong>CSS was never actually made for component based approaches</strong>. CSS-in-JS solves exactly this problem. Shout-out to <a href="//vuejs.org/">Vue</a> for solving this problem beautifully even tho Vues styles have no access to components state.</p>
<p><img src="https://cdn.codecarrot.net/images/1_jk3SeXoIgOfymKO-8JO23A.gif" alt="Here’s Bob Ross painting rocks to cool down the tension" /></p>
<p><em>Here’s Bob Ross painting rocks to cool down the tension 😄</em></p>
<h2 id="what-are-the-benefits-of-using-css-in-js">What are the benefits of using CSS-in-JS?</h2>
<ul>
<li><strong>Thinking in components</strong> — No longer do you have to maintain bunch of style-sheets. CSS-in-JS abstracts the CSS model to the component level, rather than the document level (modularity).</li>
<li>CSS-in-JS <strong>leverages the full power of the JavaScript ecosystem</strong> to enhance CSS.</li>
<li><strong>“True rules isolation”</strong> — Scoped selectors are not enough. CSS has properties which are inherited automatically from the parent element, if not explicitly defined. Thanks to <a href="//cssinjs.org/jss-isolate">jss-isolate</a> plugin, JSS rules will not inherit properties.</li>
<li><strong>Scoped selectors</strong> — CSS has just one global namespace. It is impossible to avoid selector collisions in non-trivial applications. Naming conventions like BEM might help within one project, but will not when integrating third-party code. JSS generates unique class names by default when it compiles JSON representation to CSS.</li>
<li><strong>Vendor Prefixing</strong> — The CSS rules are automatically vendor prefixed, so you don’t have to think about it.</li>
<li><strong>Code sharing</strong> — Easily share constants and functions between JS and CSS.</li>
<li><strong>Only the styles which are currently</strong> in use on your screen are also in the DOM (<a href="//github.com/cssinjs/react-jss">react-jss</a>).</li>
<li><strong><a href="//en.wikipedia.org/wiki/Dead_code_elimination">Dead code elimination</a></strong></li>
<li><strong>Unit tests</strong> for CSS!</li>
</ul>
<h2 id="what-are-the-drawbacks-of-using-css-in-js">What are the drawbacks of using CSS-in-JS?</h2>
<ul>
<li><strong>Learning curve.</strong></li>
<li><strong>New dependencies.</strong></li>
<li><strong>Harder for newer teammates to adapt to the code-base.</strong> People who are new to front-end have to learn “more” things.</li>
<li><strong>Challenging</strong> the status quo. (not necessarily a con)</li>
</ul>
<p>The pros out-weight the cons heavily — let’s give CSS-in-JS a shot! <strong>Nothing to lose!</strong></p>
<hr />
<h2 id="most-popular-css-in-js-libaries">Most popular CSS-in-JS libaries</h2>
<p><em>Will provide a quick hello world example for all the popular CSS-in-JS libraries— help yourself to choose which one you like the most based on the syntax.</em></p>
<p><img src="https://cdn.codecarrot.net/images/1_xXIXJeI3l6_k-rXg6cqNjw.png" alt="NPM trends" /></p>
<p><em>NPM trends</em></p>
<h2 id="styled-components"><a href="//www.styled-components.com/">Styled Components</a></h2>
<p><img src="https://cdn.codecarrot.net/images/1_QvSrt0RgwuOKYlLHLjkDQw.png" alt="1_QvSrt0RgwuOKYlLHLjkDQw.png" />
JSS-React</p>
<div class="language-js highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="k">import</span> <span class="nx">React</span><span class="p">,</span> <span class="p">{</span> <span class="nx">Component</span> <span class="p">}</span> <span class="k">from</span> <span class="dl">'</span><span class="s1">react</span><span class="dl">'</span><span class="p">;</span>
<span class="k">import</span> <span class="nx">styled</span> <span class="k">from</span> <span class="dl">'</span><span class="s1">styled-components</span><span class="dl">'</span><span class="p">;</span>
<span class="kd">const</span> <span class="nx">Title</span> <span class="o">=</span> <span class="nx">styled</span><span class="p">.</span><span class="nx">h1</span><span class="s2">`
color: white;
`</span><span class="p">;</span>
<span class="kd">const</span> <span class="nx">Wrapper</span> <span class="o">=</span> <span class="nx">styled</span><span class="p">.</span><span class="nx">div</span><span class="s2">`
background: black
`</span>
<span class="kd">class</span> <span class="nx">App</span> <span class="kd">extends</span> <span class="nx">Component</span> <span class="p">{</span>
<span class="nx">render</span><span class="p">()</span> <span class="p">{</span>
<span class="k">return</span> <span class="p">(</span>
<span class="o"><</span><span class="nx">Wrapper</span><span class="o">></span>
<span class="o"><</span><span class="nx">Title</span><span class="o">></span><span class="nx">Hello</span> <span class="nx">World</span><span class="o">!<</span><span class="sr">/Title</span><span class="err">>
</span> <span class="o"><</span><span class="sr">/Wrapper</span><span class="err">>
</span> <span class="p">);</span>
<span class="p">}</span>
<span class="p">}</span>
<span class="k">export</span> <span class="k">default</span> <span class="nx">App</span><span class="p">;</span>
</code></pre></div></div>
<h2 id="jss-react"><a href="//github.com/cssinjs/react-jss">JSS-React</a></h2>
<p><img src="https://cdn.codecarrot.net/images/1_z7kPKLW6meQuC5sznIYnkQ.png" alt="1_z7kPKLW6meQuC5sznIYnkQ.png" /></p>
<div class="language-js highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="k">import</span> <span class="nx">React</span> <span class="k">from</span> <span class="dl">'</span><span class="s1">react</span><span class="dl">'</span>
<span class="k">import</span> <span class="nx">injectSheet</span> <span class="k">from</span> <span class="dl">'</span><span class="s1">react-jss</span><span class="dl">'</span>
<span class="kd">const</span> <span class="nx">styles</span> <span class="o">=</span> <span class="p">{</span>
<span class="na">wrapper</span><span class="p">:</span> <span class="p">{</span>
<span class="na">background</span><span class="p">:</span> <span class="dl">'</span><span class="s1">black</span><span class="dl">'</span>
<span class="p">},</span>
<span class="na">title</span><span class="p">:</span> <span class="p">{</span>
<span class="na">color</span><span class="p">:</span> <span class="dl">'</span><span class="s1">white</span><span class="dl">'</span>
<span class="p">}</span>
<span class="p">}</span>
<span class="kd">const</span> <span class="nx">App</span> <span class="o">=</span> <span class="p">({</span><span class="nx">classes</span><span class="p">})</span> <span class="o">=></span> <span class="p">(</span>
<span class="o"><</span><span class="nx">div</span> <span class="nx">className</span><span class="o">=</span><span class="p">{</span><span class="nx">classes</span><span class="p">.</span><span class="nx">wrapper</span><span class="p">}</span><span class="o">></span>
<span class="o"><</span><span class="nx">h1</span> <span class="nx">className</span><span class="o">=</span><span class="p">{</span><span class="nx">classes</span><span class="p">.</span><span class="nx">title</span><span class="p">}</span><span class="o">></span>
<span class="nx">Hello</span> <span class="nx">JSS</span><span class="o">-</span><span class="nx">React</span><span class="o">!</span>
<span class="o"><</span><span class="sr">/h1</span><span class="err">>
</span> <span class="o"><</span><span class="sr">/div</span><span class="err">>
</span><span class="p">)</span>
<span class="k">export</span> <span class="k">default</span> <span class="nx">injectSheet</span><span class="p">(</span><span class="nx">styles</span><span class="p">)(</span><span class="nx">App</span><span class="p">)</span>
</code></pre></div></div>
<h2 id="glamorous"><a href="//glamorous.rocks/">Glamorous</a></h2>
<p><img src="https://cdn.codecarrot.net/images/1_tWuxJKAhaod4WNsm3MkMgQ.png" alt="1_tWuxJKAhaod4WNsm3MkMgQ.png" /></p>
<div class="language-js highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="k">import</span> <span class="nx">React</span> <span class="k">from</span> <span class="dl">'</span><span class="s1">react</span><span class="dl">'</span>
<span class="k">import</span> <span class="nx">glamorous</span> <span class="k">from</span> <span class="dl">'</span><span class="s1">glamorous</span><span class="dl">'</span>
<span class="kd">const</span> <span class="nx">Wrapper</span> <span class="o">=</span> <span class="nx">glamorous</span><span class="p">.</span><span class="nx">div</span><span class="p">({</span>
<span class="na">backgroundColor</span><span class="p">:</span> <span class="dl">'</span><span class="s1">black</span><span class="dl">'</span>
<span class="p">})</span>
<span class="kd">const</span> <span class="nx">Title</span> <span class="o">=</span> <span class="nx">glamorous</span><span class="p">.</span><span class="nx">h1</span><span class="p">({</span>
<span class="na">color</span><span class="p">:</span> <span class="dl">'</span><span class="s1">white</span><span class="dl">'</span>
<span class="p">})</span>
<span class="kd">const</span> <span class="nx">App</span> <span class="o">=</span> <span class="p">()</span> <span class="o">=></span> <span class="p">(</span>
<span class="o"><</span><span class="nx">Wrapper</span><span class="o">></span>
<span class="o"><</span><span class="nx">Title</span><span class="o">></span> <span class="nx">Hello</span> <span class="nx">JSS</span><span class="o">-</span><span class="nx">React</span><span class="o">!<</span><span class="sr">/Title</span><span class="err">>
</span> <span class="o"><</span><span class="sr">/Wrapper</span><span class="err">>
</span><span class="p">)</span>
<span class="k">export</span> <span class="k">default</span> <span class="nx">App</span><span class="p">;</span>
</code></pre></div></div>
<h2 id="radium-caveat-uses-inline-styles"><a href="//formidable.com/open-source/radium/">Radium</a> (caveat: uses inline styles)</h2>
<p><img src="https://cdn.codecarrot.net/images/1_UsS6OxCfH6r7JLWx-wNeIQ.png" alt="1_UsS6OxCfH6r7JLWx-wNeIQ.png" /></p>
<div class="language-js highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="k">import</span> <span class="nx">React</span><span class="p">,</span> <span class="p">{</span> <span class="nx">Component</span> <span class="p">}</span> <span class="k">from</span> <span class="dl">'</span><span class="s1">react</span><span class="dl">'</span><span class="p">;</span>
<span class="k">import</span> <span class="nx">Radium</span> <span class="k">from</span> <span class="dl">'</span><span class="s1">radium</span><span class="dl">'</span><span class="p">;</span>
<span class="p">@</span><span class="nd">Radium</span> <span class="c1">// decorator</span>
<span class="kd">class</span> <span class="nx">App</span> <span class="kd">extends</span> <span class="nx">Component</span> <span class="p">{</span>
<span class="nx">render</span><span class="p">()</span> <span class="p">{</span>
<span class="kd">const</span> <span class="nx">styles</span> <span class="o">=</span> <span class="p">{</span>
<span class="na">wrapper</span><span class="p">:</span> <span class="p">{</span>
<span class="na">background</span><span class="p">:</span> <span class="dl">'</span><span class="s1">blue</span><span class="dl">'</span><span class="p">,</span>
<span class="p">}</span>
<span class="nl">title</span><span class="p">:</span> <span class="p">{</span>
<span class="na">color</span><span class="p">:</span> <span class="dl">'</span><span class="s1">white</span><span class="dl">'</span>
<span class="p">}</span>
<span class="p">};</span>
<span class="k">return</span> <span class="p">(</span>
<span class="o"><</span><span class="nx">div</span> <span class="nx">style</span><span class="o">=</span><span class="p">{</span><span class="nx">styles</span><span class="p">.</span><span class="nx">wrapper</span><span class="p">}</span><span class="o">></span>
<span class="o"><</span><span class="nx">h1</span> <span class="nx">style</span><span class="o">=</span><span class="p">{</span><span class="nx">styles</span><span class="p">.</span><span class="nx">title</span><span class="p">}</span><span class="o">></span><span class="nx">Hello</span> <span class="nx">Radium</span><span class="o">!<</span><span class="sr">/h1</span><span class="err">>
</span> <span class="o"><</span><span class="sr">/div</span><span class="err">>
</span> <span class="p">);</span>
<span class="p">}</span>
<span class="p">}</span>
<span class="k">export</span> <span class="k">default</span> <span class="nx">Radium</span><span class="p">(</span><span class="nx">App</span><span class="p">);</span>
</code></pre></div></div>
<p><strong>Note:</strong> Radium uses <a href="/exploring-es7-decorators">decorators</a>!</p>
<h2 id="aphrodite"><a href="//github.com/Khan/aphrodite">Aphrodite</a></h2>
<div class="language-js highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="k">import</span> <span class="nx">React</span><span class="p">,</span> <span class="p">{</span> <span class="nx">Component</span> <span class="p">}</span> <span class="k">from</span> <span class="dl">'</span><span class="s1">react</span><span class="dl">'</span><span class="p">;</span>
<span class="k">import</span> <span class="p">{</span> <span class="nx">StyleSheet</span><span class="p">,</span> <span class="nx">css</span> <span class="p">}</span> <span class="k">from</span> <span class="dl">'</span><span class="s1">aphrodite</span><span class="dl">'</span><span class="p">;</span>
<span class="kd">const</span> <span class="nx">styles</span> <span class="o">=</span> <span class="nx">StyleSheet</span><span class="p">.</span><span class="nx">create</span><span class="p">({</span>
<span class="na">wrapper</span><span class="p">:</span> <span class="p">{</span>
<span class="na">backgroundColor</span><span class="p">:</span> <span class="dl">'</span><span class="s1">red</span><span class="dl">'</span>
<span class="p">},</span>
<span class="na">title</span><span class="p">:</span> <span class="p">{</span>
<span class="na">backgroundColor</span><span class="p">:</span> <span class="dl">'</span><span class="s1">blue</span><span class="dl">'</span>
<span class="p">}</span>
<span class="p">});</span>
<span class="kd">class</span> <span class="nx">App</span> <span class="kd">extends</span> <span class="nx">Component</span> <span class="p">{</span>
<span class="nx">render</span><span class="p">()</span> <span class="p">{</span>
<span class="k">return</span> <span class="p">(</span>
<span class="o"><</span><span class="nx">div</span> <span class="nx">className</span><span class="o">=</span><span class="p">{</span><span class="nx">css</span><span class="p">(</span><span class="nx">styles</span><span class="p">.</span><span class="nx">wrapper</span><span class="p">)}</span><span class="o">></span>
<span class="o"><</span><span class="nx">h1</span> <span class="nx">className</span><span class="o">=</span><span class="p">{</span><span class="nx">css</span><span class="p">(</span><span class="nx">styles</span><span class="p">.</span><span class="nx">title</span><span class="p">)}</span><span class="o">></span><span class="nx">Hello</span> <span class="nx">Aphrodite</span><span class="o">!<</span><span class="nx">h1</span><span class="o">></span>
<span class="o"><</span><span class="sr">/div></span><span class="err">;
</span> <span class="p">)</span>
<span class="p">}</span>
<span class="p">}</span>
</code></pre></div></div>
<h2 id="stylotron"><a href="//github.com/rtsao/styletron">Stylotron</a></h2>
<p><img src="https://cdn.codecarrot.net/images/1_a0c0iulx7pZFScn0fsAn0w.png" alt="1_a0c0iulx7pZFScn0fsAn0w.png" /></p>
<div class="language-js highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="k">import</span> <span class="nx">React</span><span class="p">,</span> <span class="p">{</span> <span class="nx">Component</span> <span class="p">}</span> <span class="k">from</span> <span class="dl">'</span><span class="s1">react</span><span class="dl">'</span><span class="p">;</span>
<span class="k">import</span> <span class="p">{</span> <span class="nx">styled</span> <span class="p">}</span> <span class="k">from</span> <span class="dl">'</span><span class="s1">styletron-react</span><span class="dl">'</span><span class="p">;</span>
<span class="kd">const</span> <span class="nx">Wrapper</span> <span class="o">=</span> <span class="nx">styled</span><span class="p">(</span><span class="dl">'</span><span class="s1">div</span><span class="dl">'</span><span class="p">,</span> <span class="p">{</span>
<span class="na">backgroundColor</span><span class="p">:</span> <span class="dl">'</span><span class="s1">black</span><span class="dl">'</span>
<span class="p">})</span>
<span class="kd">const</span> <span class="nx">Title</span> <span class="o">=</span> <span class="nx">styled</span><span class="p">(</span><span class="dl">'</span><span class="s1">h1</span><span class="dl">'</span><span class="p">,</span> <span class="p">{</span>
<span class="na">color</span><span class="p">:</span> <span class="dl">'</span><span class="s1">white</span><span class="dl">'</span>
<span class="p">})</span>
<span class="kd">class</span> <span class="nx">App</span> <span class="kd">extends</span> <span class="nx">Component</span> <span class="p">{</span>
<span class="nx">render</span><span class="p">()</span> <span class="p">{</span>
<span class="k">return</span> <span class="p">(</span>
<span class="o"><</span><span class="nx">Wrapper</span><span class="o">></span>
<span class="o"><</span><span class="nx">Title</span><span class="o">></span><span class="nx">Hello</span> <span class="nx">Styletron</span><span class="o">!<</span><span class="nx">Titleh1</span><span class="o">></span>
<span class="o"><</span><span class="sr">/Wrapper></span><span class="err">;
</span> <span class="p">)</span>
<span class="p">}</span>
<span class="p">}</span>
</code></pre></div></div>
<p>These are really simple examples which demonstrate the core functionality. All of the libraries have much more functionality included — for example, <strong>theming, dynamic props, server side rendering</strong> and much more!</p>yashumittalTL;DR: Thinking in components — No longer do you have to maintain bunch of style-sheets. CSS-in-JS abstracts the CSS model to the component level, rather than the document level (modularity).
https://cdn.codecarrot.net/images/1_OH0dDfJAGv6aEGFk2zLAxw.jpeg
How to Disable Links2017-11-18T12:25:00+00:002017-11-18T12:25:00+00:00https://blog.codecarrot.net/how-to-disable-links<p>The topic of disabling links popped up at my work the other day. Somehow, a “disabled” anchor style was added to our typography styles last year when I wasn’t looking. There is a problem though: there is no real way to disable an <code class="highlighter-rouge"><a></code> link <em>(with a valid <code class="highlighter-rouge">href</code> attribute)</em> in HTML. Not to mention, why would you even want to? Links are the basis of the web.</p>
<p>At a certain point, it looked like my co-workers were not going to accept this fact, so I started thinking of how this could be accomplished. Knowing that it would take a lot, I wanted to prove that it was not worth the effort and code to support such an unconventional interaction, but I feared that by showing it could be done they would ignore all my warnings and just use my example as proof that it was OK. This hasn’t quite shaken out for me yet, but I figured we could go through my research.</p>
<p>First, things first:</p>
<h2 id="just-dont-do-it">Just don’t do it.</h2>
<p>A disabled link is not a link, it’s just text. You need to rethink your design if it calls for disabling a link.</p>
<p>Bootstrap has examples of applying the <code class="highlighter-rouge">.disabled</code> class to anchor tags, and I hate them for it. At least they mention that the class only provides a disabled style, but this is misleading. You need to do more than just make a link look disabled if you really want to disable it.</p>
<h2 id="surefire-way-remove-the-href">Surefire way: remove the href</h2>
<p>If you have decided that you are going to ignore my warning and proceed with disabling a link, then <strong>removing the <code class="highlighter-rouge">href</code> attribute is the best way I know how</strong>.</p>
<p>Straight from the official <a href="//www.w3.org/TR/html5/links.html#attr-hyperlink-href">Hyperlink spec</a>:</p>
<blockquote>
The href attribute on a and area elements is not required; when those elements do not have href attributes they do not create hyperlinks.
</blockquote>
<p>An easier to understand definition from <a href="//developer.mozilla.org/en-US/docs/Web/HTML/Element/a">MDN</a>:</p>
<p>This attribute may be omitted (as of HTML5) to create a placeholder link. A placeholder link resembles a traditional hyperlink, but does not lead anywhere.</p>
<p>Here is basic JavaScript code to set and remove the href attribute:</p>
<div class="language-js highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="cm">/*
* Use your preferred method of targeting a link
*
* document.getElementById('MyLink');
* document.querySelector('.link-class');
* document.querySelector('[href="https://unfetteredthoughts.net"]');
*/</span>
<span class="c1">// "Disable" link by removing the href property</span>
<span class="nx">link</span><span class="p">.</span><span class="nx">href</span> <span class="o">=</span> <span class="dl">''</span><span class="p">;</span>
<span class="c1">// Enable link by setting the href property</span>
<span class="nx">link</span><span class="p">.</span><span class="nx">href</span> <span class="o">=</span> <span class="dl">'</span><span class="s1">https://unfetteredthoughts.net</span><span class="dl">'</span><span class="p">;</span>
</code></pre></div></div>
<p>Styling this via CSS is also pretty straightforward:</p>
<div class="language-css highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="nt">a</span> <span class="p">{</span>
<span class="c">/* Disabled link styles */</span>
<span class="p">}</span>
<span class="nt">a</span><span class="nd">:link</span><span class="o">,</span> <span class="nt">a</span><span class="nd">:visited</span> <span class="p">{</span> <span class="c">/* or a[href] */</span>
<span class="c">/* Enabled link styles */</span>
<span class="p">}</span>
</code></pre></div></div>
<p><em>That’s all you need to do!</em></p>
<h2 id="thats-not-enough-i-want-something-more-complex-so-that-i-can-look-smarter">That’s not enough, I want something more complex so that I can look smarter!</h2>
<p>If you just absolutely have to over-engineer some extreme solution, here are some things to consider. Hopefully, you will take heed and recognize that what I am about to show you is not worth the effort.</p>
<p>First, we need to style our link so that it looks disabled.</p>
<div class="language-css highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="nc">.isDisabled</span> <span class="p">{</span>
<span class="nl">color</span><span class="p">:</span> <span class="n">currentColor</span><span class="p">;</span>
<span class="nl">cursor</span><span class="p">:</span> <span class="n">not-allowed</span><span class="p">;</span>
<span class="nl">opacity</span><span class="p">:</span> <span class="m">0.5</span><span class="p">;</span>
<span class="nl">text-decoration</span><span class="p">:</span> <span class="nb">none</span><span class="p">;</span>
<span class="p">}</span>
</code></pre></div></div>
<div class="language-html highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="nt"><a</span> <span class="na">class=</span><span class="s">"isDisabled"</span> <span class="na">href=</span><span class="s">"https://unfetteredthoughts.net"</span><span class="nt">></span>Disabled Link<span class="nt"></a></span>
</code></pre></div></div>
<p><img src="https://cdn.codecarrot.net/images/disabled-link_yg83an.webp" alt="disabled-link_yg83an.webp" /></p>
<p>Setting <code class="highlighter-rouge">color</code> to <code class="highlighter-rouge">currentColor</code> should reset the font color back to your normal, non-link text color. I am also setting the mouse cursor to <code class="highlighter-rouge">not-allowed</code> to display a nice indicator on hover that the normal action is not allowed. Already, we have left out non-mouse users that can’t hover, mainly touch and keyboard, so they won’t get this indication. Next the opacity is cut to half. According to <a href="//www.w3.org/WAI/WCAG20/quickref/#visual-audio-contrast-contrast">WCAG</a>, disabled elements do not need to meet color contrast guidelines. I think this is very risky since it’s basically plain text at this point, and dropping the opacity in half would make it very hard to read for users with low-vision, another reason I hate this. Lastly, the text decoration underline is removed as this is usually the best indicator something is a link. Now this <strong>looks</strong> like a disabled link!</p>
<p>But it’s not really disabled! A user can still click/tap on this link. I hear you screaming about <code class="highlighter-rouge">pointer-events</code>.</p>
<div class="language-css highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="nc">.isDisabled</span> <span class="p">{</span>
<span class="err">...</span>
<span class="nl">pointer-events</span><span class="p">:</span> <span class="nb">none</span><span class="p">;</span>
<span class="p">}</span>
</code></pre></div></div>
<p>Ok, we are done! Disabled link accomplished! Except, it’s only really disabled for mouse users clicking and touch users tapping. What about browsers that don’t support <code class="highlighter-rouge">pointer-events</code>? According to <a href="//caniuse.com/#feat=pointer-events">caniuse</a>, this is not supported for Opera Mini and IE<11. IE11 and Edge actually don’t support <code class="highlighter-rouge">pointer-events</code> unless <code class="highlighter-rouge">display</code> is set to <code class="highlighter-rouge">block</code> or <code class="highlighter-rouge">inline-block</code>. Also, setting <code class="highlighter-rouge">pointer-events</code> to <code class="highlighter-rouge">none</code> overwrites our nice <code class="highlighter-rouge">not-allowed</code> cursor, so now mouse users will not get that additional visual indication that the link is disabled. This is already starting to fall apart. Now we have to change our markup and CSS…</p>
<div class="language-css highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="nc">.isDisabled</span> <span class="p">{</span>
<span class="nl">cursor</span><span class="p">:</span> <span class="n">not-allowed</span><span class="p">;</span>
<span class="nl">opacity</span><span class="p">:</span> <span class="m">0.5</span><span class="p">;</span>
<span class="p">}</span>
<span class="nc">.isDisabled</span> <span class="o">></span> <span class="nt">a</span> <span class="p">{</span>
<span class="nl">color</span><span class="p">:</span> <span class="n">currentColor</span><span class="p">;</span>
<span class="nl">display</span><span class="p">:</span> <span class="n">inline-block</span><span class="p">;</span> <span class="c">/* For IE11/ MS Edge bug */</span>
<span class="nl">pointer-events</span><span class="p">:</span> <span class="nb">none</span><span class="p">;</span>
<span class="nl">text-decoration</span><span class="p">:</span> <span class="nb">none</span><span class="p">;</span>
<span class="p">}</span>
</code></pre></div></div>
<div class="language-html highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="nt"><span</span> <span class="na">class=</span><span class="s">"isDisabled"</span><span class="nt">><a</span> <span class="na">href=</span><span class="s">"https://unfetteredthoughts.net"</span><span class="nt">></span>Disabled Link<span class="nt"></a></span></span>
</code></pre></div></div>
<p>Wrapping the link in a <code class="highlighter-rouge"><</code> <code class="highlighter-rouge">span</code> <code class="highlighter-rouge">></code> and adding the <code class="highlighter-rouge">isDisabled</code> class gives us half of our disabled visual style. A nice side-affect here is that the disabled class is now generic and can be used on other elements, like buttons and form elements. The actual anchor tag now has the <code class="highlighter-rouge">pointer-events</code> and <code class="highlighter-rouge">text-decoration</code> set to none.</p>
<p>What about keyboard users? Keyboard users will use the <code class="highlighter-rouge">ENTER</code> key to activate links. <code class="highlighter-rouge">pointer-events</code> are only for pointers, there is no keyboard-events. We also need to prevent activation for older browsers that don’t support <code class="highlighter-rouge">pointer-events</code>. Now we have to introduce some JavaScript.</p>
<h2 id="bring-in-the-javascript">Bring in the JavaScript</h2>
<div class="language-js highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="c1">// After using preferred method to target link</span>
<span class="nx">link</span><span class="p">.</span><span class="nx">addEventListener</span><span class="p">(</span><span class="dl">'</span><span class="s1">click</span><span class="dl">'</span><span class="p">,</span> <span class="kd">function</span> <span class="p">(</span><span class="nx">event</span><span class="p">)</span> <span class="p">{</span>
<span class="k">if</span> <span class="p">(</span><span class="k">this</span><span class="p">.</span><span class="nx">parentElement</span><span class="p">.</span><span class="nx">classList</span><span class="p">.</span><span class="nx">contains</span><span class="p">(</span><span class="dl">'</span><span class="s1">isDisabled</span><span class="dl">'</span><span class="p">))</span> <span class="p">{</span>
<span class="nx">event</span><span class="p">.</span><span class="nx">preventDefault</span><span class="p">();</span>
<span class="p">}</span>
<span class="p">});</span>
</code></pre></div></div>
<p>Now our link looks disabled and does not respond to activation via clicks, taps, and the <code class="highlighter-rouge">ENTER</code> key. But we are still not done! Screen reader users have no way of knowing that this link is <code class="highlighter-rouge">disabled</code>. We need to describe this link as being disabled. The disabled attribute is not valid on links, but we can use <code class="highlighter-rouge">aria-disabled="true"</code>.</p>
<div class="language-html highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="nt"><span</span> <span class="na">class=</span><span class="s">"isDisabled"</span><span class="nt">><a</span> <span class="na">href=</span><span class="s">"https://unfetteredthoughts.net"</span> <span class="na">aria-disabled=</span><span class="s">"true"</span><span class="nt">></span>Disabled Link<span class="nt"></a></span></span>
</code></pre></div></div>
<p>Now I am going to take this opportunity to style the link based on the <code class="highlighter-rouge">aria-disabled</code> attribute. I like using ARIA attributes as hooks for CSS because having improperly styled elements is an indicator that important accessibility is missing.</p>
<div class="language-css highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="nc">.isDisabled</span> <span class="p">{</span>
<span class="nl">cursor</span><span class="p">:</span> <span class="n">not-allowed</span><span class="p">;</span>
<span class="nl">opacity</span><span class="p">:</span> <span class="m">0.5</span><span class="p">;</span>
<span class="p">}</span>
<span class="nt">a</span><span class="o">[</span><span class="nt">aria-disabled</span><span class="o">=</span><span class="s1">"true"</span><span class="o">]</span> <span class="p">{</span>
<span class="nl">color</span><span class="p">:</span> <span class="n">currentColor</span><span class="p">;</span>
<span class="nl">display</span><span class="p">:</span> <span class="n">inline-block</span><span class="p">;</span> <span class="c">/* For IE11/ MS Edge bug */</span>
<span class="nl">pointer-events</span><span class="p">:</span> <span class="nb">none</span><span class="p">;</span>
<span class="nl">text-decoration</span><span class="p">:</span> <span class="nb">none</span><span class="p">;</span>
<span class="p">}</span>
</code></pre></div></div>
<p>Now our links <strong>look</strong> disabled, <strong>act</strong> disabled, and are <strong>described</strong> as disabled.</p>
<p>Unfortunately, even though the link is described as disabled, some screen readers (JAWS) will still announce this as clickable. It does that for any element that has a click listener. This is because of developer tendency to make non-interactive elements like <code class="highlighter-rouge">div</code> and <code class="highlighter-rouge">span</code> as pseudo-interactive elements with a simple listener. Nothing we can do about that here. Everything we have done to remove any indication that this is a link is foiled by the assistive technology we were trying to fool, ironically because we have tried to fool it before.</p>
<p>But what if we moved the listener to the body?</p>
<div class="language-js highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="nb">document</span><span class="p">.</span><span class="nx">body</span><span class="p">.</span><span class="nx">addEventListener</span><span class="p">(</span><span class="dl">'</span><span class="s1">click</span><span class="dl">'</span><span class="p">,</span> <span class="kd">function</span> <span class="p">(</span><span class="nx">event</span><span class="p">)</span> <span class="p">{</span>
<span class="c1">// filter out clicks on any other elements</span>
<span class="k">if</span> <span class="p">(</span><span class="nx">event</span><span class="p">.</span><span class="nx">target</span><span class="p">.</span><span class="nx">nodeName</span> <span class="o">==</span> <span class="dl">'</span><span class="s1">A</span><span class="dl">'</span> <span class="o">&&</span> <span class="nx">event</span><span class="p">.</span><span class="nx">target</span><span class="p">.</span><span class="nx">getAttribute</span><span class="p">(</span><span class="dl">'</span><span class="s1">aria-disabled</span><span class="dl">'</span><span class="p">)</span> <span class="o">==</span> <span class="dl">'</span><span class="s1">true</span><span class="dl">'</span><span class="p">)</span> <span class="p">{</span>
<span class="nx">event</span><span class="p">.</span><span class="nx">preventDefault</span><span class="p">();</span>
<span class="p">}</span>
<span class="p">});</span>
</code></pre></div></div>
<p>Are we done? Well, not really. At some point we will need to enable these links so we need to add additional code that will toggle this state/behavior.</p>
<div class="language-js highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="kd">function</span> <span class="nx">disableLink</span><span class="p">(</span><span class="nx">link</span><span class="p">)</span> <span class="p">{</span>
<span class="c1">// 1. Add isDisabled class to parent span</span>
<span class="nx">link</span><span class="p">.</span><span class="nx">parentElement</span><span class="p">.</span><span class="nx">classList</span><span class="p">.</span><span class="nx">add</span><span class="p">(</span><span class="dl">'</span><span class="s1">isDisabled</span><span class="dl">'</span><span class="p">);</span>
<span class="c1">// 2. Store href so we can add it later</span>
<span class="nx">link</span><span class="p">.</span><span class="nx">setAttribute</span><span class="p">(</span><span class="dl">'</span><span class="s1">data-href</span><span class="dl">'</span><span class="p">,</span> <span class="nx">link</span><span class="p">.</span><span class="nx">href</span><span class="p">);</span>
<span class="c1">// 3. Remove href</span>
<span class="nx">link</span><span class="p">.</span><span class="nx">href</span> <span class="o">=</span> <span class="dl">''</span><span class="p">;</span>
<span class="c1">// 4. Set aria-disabled to 'true'</span>
<span class="nx">link</span><span class="p">.</span><span class="nx">setAttribute</span><span class="p">(</span><span class="dl">'</span><span class="s1">aria-disabled</span><span class="dl">'</span><span class="p">,</span> <span class="dl">'</span><span class="s1">true</span><span class="dl">'</span><span class="p">);</span>
<span class="p">}</span>
<span class="kd">function</span> <span class="nx">enableLink</span><span class="p">(</span><span class="nx">link</span><span class="p">)</span> <span class="p">{</span>
<span class="c1">// 1. Remove 'isDisabled' class from parent span</span>
<span class="nx">link</span><span class="p">.</span><span class="nx">parentElement</span><span class="p">.</span><span class="nx">classList</span><span class="p">.</span><span class="nx">remove</span><span class="p">(</span><span class="dl">'</span><span class="s1">isDisabled</span><span class="dl">'</span><span class="p">);</span>
<span class="c1">// 2. Set href</span>
<span class="nx">link</span><span class="p">.</span><span class="nx">href</span> <span class="o">=</span> <span class="nx">link</span><span class="p">.</span><span class="nx">getAttribute</span><span class="p">(</span><span class="dl">'</span><span class="s1">data-href</span><span class="dl">'</span><span class="p">);</span>
<span class="c1">// 3. Remove 'aria-disabled', better than setting to false</span>
<span class="nx">link</span><span class="p">.</span><span class="nx">removeAttribute</span><span class="p">(</span><span class="dl">'</span><span class="s1">aria-disabled</span><span class="dl">'</span><span class="p">);</span>
<span class="p">}</span>
</code></pre></div></div>
<p>That’s it. We now have a disabled link that is visually, functionally, and semantically disabled for all users. It only took 10 lines of CSS, 15 lines of JavaScript (including 1 listener on the body), and 2 HTML elements.</p>
<p>Seriously folks, <strong>just don’t do it</strong>.</p>
<p>This article is written by <strong>Gerard Cohen</strong>.</p>yashumittalThe topic of disabling links popped up at my work the other day. Somehow, a “disabled” anchor style was added to our typography styles last year when I wasn’t looking. There is a problem though: there is no real way to disable an <a> link (with a valid href attribute) in HTML. Not to mention, why would you even want to? Links are the basis of the web.
https://cdn.codecarrot.net/images/jj-ying-215308.jpg
Sublime Text 2 Tips and Shortcuts2017-11-16T14:52:30+00:002017-11-16T14:52:30+00:00https://blog.codecarrot.net/sublime-text-2-tips-and-shortcuts<p>You must be thinking, why I am writing a article on Sublime Text 2, now when they have already launched Sublime Text 3. But not everyone has upgraded to ST3, so here’s some tips and shortcuts for them.</p>
<p>I’ve been using Sublime Text 2 for probably six months and in that time I’ve discovered tons of useful tricks. I figured I should start writing them down for anyone who might be interested. I’ll try to explain the bits that seem esoteric because there are a lot of cool commands which only work in certain contexts.</p>
<h2 id="finding-your-preferences">Finding your preferences</h2>
<p>One of the first things you want to do with Sublime is to find your User key bindings. They’re located under <code class="highlighter-rouge">Sublime Text 2 > Preferences > Key Bindings - User</code></p>
<p>Sublime Text is very DIY so there isn’t a fancy GUI to help you change keyboard shortcuts. Instead you use the preference file to override the default shortcuts. Like a lot of things in Sublime, this can at first seem annoying and non-intuitive. That is, until you realize that by doing it this way Sublime has actually given you the power to make extremely awesome key bindings. Take some time to look around in this file. I still only understand a fraction of what all it does but the little bits I learn here and there give me all sorts of ideas for new shortcuts. Just remember, if you want to change a keyboard shortcut you should do it in the User’s key bindings and not the Default key bindings.</p>
<p><strong>Pro Tip:</strong> If you ever want to change a keyboard shortcut but can’t figure out what command is currently running open up Sublime’s built in terminal with</p>
<div class="highlighter-rouge"><div class="highlight"><pre class="highlight"><code>ctrl+`
</code></pre></div></div>
<p>then type <code class="highlighter-rouge">sublime.log_commands(True)</code>. Now when you execute your command from the menu you should see its name show up in the console. Just remember to turn logging off when you’re done :)</p>
<h2 id="sublime-package-control">Sublime Package Control</h2>
<p>If you only follow one piece of my advice make it this: <a href="//wbond.net/sublime_packages/package_control">Install Sublime Package Control</a>.</p>
<p>Package Control makes it extremely easy to manage your Sublime plugins. It also helps with discovering new ones, which is nice. Just install it if you haven’t already, it’s impossible to live without.</p>
<h2 id="setting-up-a-command-line-shortcut">Setting up a command line shortcut</h2>
<p>I highly recommend setting up a symlink so you can easily open things with Sublime. <a href="http://www.sublimetext.com/docs/2/osx_command_line.html">This article details how to go about it on OSX</a>.</p>
<p>CLI FTW!</p>
<h2 id="the-command-palette">The Command Palette</h2>
<p>OK, so hopefully you’ve setup Sublime Package Control. Maybe you’ve even installed some plugins. It’s time for you to meet the Command Palette then. <code class="highlighter-rouge">cmd+shift+p</code> will open up the window and from here you can execute just about any command either native to Sublime or part of a plugin. It is super useful for all those things you don’t run often enough to turn into full blown keyboard shortcuts. It’s also useful if you know the name of a command but can’t remember what section of the menu it lives under.</p>
<h2 id="goto-anything">Goto Anything…</h2>
<p>So you want to fly around your project like a ninja on methamphetamines, eh? Then the shortcut you want is <code class="highlighter-rouge">cmd+p</code>. Once you’ve opened the dialog try typing a filename. Useful right? But wait, there’s more…</p>
<p>If you preface what you’re typing with a <code class="highlighter-rouge">@</code> it will look for “symbols” in the current file. Ex: @foobar. But just typing @ will give you a nice file outline. The definition of what a symbol is depends on the file-type. In a Markdown file, for instance, it will list every header. In a JavaScript or Ruby file it will list every method of an object.</p>
<p>One last trick. If instead of an <code class="highlighter-rouge">@</code> you preface things with an <code class="highlighter-rouge">:</code> you can type a line number instead and hit enter to jump to that point. Ex: <code class="highlighter-rouge">:415</code></p>
<p>There are other keyboard shortcuts for jumping to a line and going to a symbol but why bother when you can just use cmd+p and some easy prefixing.</p>
<h2 id="splitting-the-editor-windows">Splitting the editor windows</h2>
<p>OK this one is also important and I can’t recommend it enough. <strong>Learn to split your editor windows</strong>. I never used this feature in previous IDEs and now I wonder how I ever lived without it. Whether you have a unit test in one window and an implementation in the other, or some HTML and CSS, this feature is just always handy.</p>
<p><img src="https://cdn.codecarrot.net/images/sublime-split-panes.png" alt="Split panes in Sublime" /></p>
<p>I <em>live</em> in split panes. They’ve changed my workflow significantly for the better. Less time switching between files and finding your place is an incredible advantage. You can access them through <code class="highlighter-rouge">View > Layouts</code>. It will behoove you to learn these keyboard shortcuts. Also learn the shortcuts for <code class="highlighter-rouge">View > Focus Group</code> and <code class="highlighter-rouge">View > Move File to Group</code>.</p>
<h2 id="selections">Selections</h2>
<p>There are some neat selections which come in handy depending on your context. Personally I use Expand Selection to Tag, <code class="highlighter-rouge">cmd+shift+a</code> quite frequently when writing HTML. I also use Expand Selection to Line, <code class="highlighter-rouge">cmd+L</code> and Expand Selection to Word, <code class="highlighter-rouge">cmd+D</code> a lot.</p>
<h2 id="selections-with-multiple-cursors">Selections with Multiple Cursors</h2>
<p>Multiple cursors… It’s one of those things you didn’t realize you needed until suddenly you had it and you were all like “WHAAAAAAAAT!”</p>
<p>There are a handful of ways to activate multiple cursors in Sublime. Hitting <code class="highlighter-rouge">cmd+D</code> to select multiples of the same word will put us into a multi-cursor context.</p>
<p>Another way to go about it is to highlight a block of text and hit <code class="highlighter-rouge">cmd+shift+L</code> which will split each line into its own selection. This is extremely useful when editing HTML where often times you have repeating elements and you want to tweak a class name on all of them.</p>
<p>You can also just hold <code class="highlighter-rouge">cmd</code> and click around your file to add more cursors. Or you can hold <code class="highlighter-rouge">ctrl+shift</code> and tap either the up or down arrows to add a new cursor in that direction.</p>
<h2 id="moving-lines">Moving Lines</h2>
<p><code class="highlighter-rouge">Edit > Line > Swap Line Up</code></p>
<p><code class="highlighter-rouge">Edit > Line > Swap Line Down</code></p>
<p><code class="highlighter-rouge">Edit > Line > Duplicate Line</code></p>
<p>Learn em. Love em. I changed my keyboard shortcut for these so I can’t recall what it is by default. Regardless I think I use these three commands more than any other so I would say if you only learn three shortcuts, make it these three.</p>
<p><strong>Pro Tip:</strong> If you want to duplicate a block of code highlight it and hit <code class="highlighter-rouge">cmd+L</code> to select the new line before you hit <code class="highlighter-rouge">cmd+shift+D</code>. This way your duplicated block will appear on a new line, rather than next to the previous block of code.</p>
<h2 id="wrap-your-lines">Wrap your lines</h2>
<p>If you’ve installed the <a href="//github.com/SublimeText/Tag">Tag plugin</a> you should have some extra line wrapping methods. I would also recommend you install <a href="//bitbucket.org/sublimator/sublime-2-zencoding">ZenCoding</a>. I’m suggesting this for two reasons:</p>
<ol>
<li>You get awesome new features…</li>
<li>I can’t remember if what I’m about to say is native to Sublime or part of a plugin.</li>
</ol>
<p>OK with that out of the way…</p>
<p>Let’s say you’re working on some HTML and you have a block of text that you’d like to wrap in a <code class="highlighter-rouge">p</code> tag. No problemo! Highlight the text and hit <code class="highlighter-rouge">ctrl+shift+w</code> or <code class="highlighter-rouge">Edit > Tag > Wrap Selection</code> in Tag. There’s a more advanced versions that comes with the ZenCoding plugin which lets you do really elaborate wrappings. I believe the keyboard shortcut for that is <code class="highlighter-rouge">ctrl+alt+w</code>. Personally I dislike using the <code class="highlighter-rouge">ctrl key</code> on my Mac laptop so I changed both of those keyboard shortcuts to the following:</p>
<div class="highlighter-rouge"><div class="highlight"><pre class="highlight"><code>ctrl+`
</code></pre></div></div>
<p>You’ll notice that instead of just using a <code class="highlighter-rouge">wrap_in_tag</code> command name the first entry actually calls another command, <code class="highlighter-rouge">insert_snippet</code> and passes it an argument: <code class="highlighter-rouge">Packages/XML/long-tag.sublime.snippet</code> which is the location of a snippet file. Pretty cool trick!</p>
<p>Also note that Sublime uses the term “super” to refer to the command key</p>
<h2 id="bookmarks">Bookmarks!</h2>
<p>If you’re like me then you lose your place in large files. That’s where bookmarks can be a big help. <code class="highlighter-rouge">cmd+F2</code> will add a new bookmark on the page. The bookmark is tied to the line so if you use the move line up/down commands it will move the bookmark as well (nice). To cycle through your bookmarks just hit F2. The rest of the bookmark commands are located in <code class="highlighter-rouge">Goto > Bookmarks</code>. Take note of the one that says <code class="highlighter-rouge">Select All Bookmarks</code> which will basically let you do a multi-selection on all of the lines you’ve already bookmarked.</p>
<h2 id="marks">Marks</h2>
<p>Marks are very similar to bookmarks but they serve a different purpose. They’re located in Edit > Mark and their keyboard shortcuts are a little weird because you need to hit <code class="highlighter-rouge">cmd+K</code> and then a secondary shortcut like <code class="highlighter-rouge">cmd+space</code>. I find myself using Marks a few times a day to do large selections. For instance if you have a big block of HTML it can be very tricky to stay inside the proper scope if you’re trying to delete all the contents of a very high level container. With Marks you can just put a mark on the opening line of the container, hit <code class="highlighter-rouge">cmd+shift+a</code> to select down to the bottom of the tag, and then hit <code class="highlighter-rouge">cmd+K</code>, <code class="highlighter-rouge">cmd+a</code> to select everything back to your previous mark. Marks can also be used to swap lines of text but I’ve never needed to do that in practice.</p>
<h2 id="hide-the-sidebar">Hide the Sidebar</h2>
<p>To hide the sidebar hit <code class="highlighter-rouge">cmd+K, cmd+B</code>. Since I work on a laptop I often hide the sidebar to give myself that extra 100px of reading space.</p>
<p>If you don’t want to use <code class="highlighter-rouge">cmd+K, cmd+B</code>, you can replace these two different commands with single one, by adding this in your <code class="highlighter-rouge">key bindings</code>.</p>
<div class="language-json highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="p">[</span><span class="w">
</span><span class="p">{</span><span class="w"> </span><span class="nl">"keys"</span><span class="p">:</span><span class="w"> </span><span class="p">[</span><span class="s2">"ctrl+</span><span class="se">\\</span><span class="s2">"</span><span class="p">],</span><span class="w"> </span><span class="nl">"command"</span><span class="p">:</span><span class="w"> </span><span class="s2">"toggle_side_bar"</span><span class="w"> </span><span class="p">}</span><span class="w">
</span><span class="p">]</span><span class="w">
</span></code></pre></div></div>
<h2 id="turn-off-minimap">Turn off Minimap</h2>
<p>Do you guys use that minimap thing in the top corner of the editor windows? I find it incredibly distracting and it also takes up screen space. To disable it go to View > Hide Minimap.</p>
<h2 id="saving-a-project">Saving a project</h2>
<p>This one might be obvious for many of you but it wasn’t something I was really taking advantage of until recently. Once you have a folder open it can be beneficial to save it as a project via the <code class="highlighter-rouge">Project > Save Project As... command</code>. Save the project files in the root of your app and then whenever you do <code class="highlighter-rouge">Project > Recent Projects...</code> it will open everything up with all your windows just as you left them.</p>
<p>To switch between projects use <code class="highlighter-rouge">ctrl+cmd+p</code>.</p>
<h2 id="some-awesome-plugins">Some awesome plugins</h2>
<p>Sublime is all about plugins so here’s a list of some of my favorites. Once you have Package Control installed you can just hit <code class="highlighter-rouge">cmd+shift+p</code> and type <code class="highlighter-rouge">discover</code>, then hit enter which will take you to a page listing tons of plugins. Try out some (or all) of the ones below. They’re great :D</p>
<ul>
<li>AdvancedNewFile</li>
<li>HtmlTidy</li>
<li>Nettuts+ Fetch</li>
<li>Prefixr</li>
<li>RubyTest</li>
<li>Shell Turtlestein</li>
<li>SideBarEnhancements</li>
<li>sublime-github</li>
<li>Sublime-JSHint</li>
<li>SublimeCodeIntel</li>
<li>Tag</li>
<li>ZenCoding</li>
</ul>
<h2 id="convert-case">Convert Case</h2>
<p>If you highlight some text you can use <code class="highlighter-rouge">cmd+K, cmd+U</code> to uppercase it. Likewise you can use <code class="highlighter-rouge">cmd+K, cmd+L</code> to lowercase it.</p>
<h2 id="spell-check-">Spell Check :)</h2>
<p>Finally I wouldn’t be much of a blogger if I didn’t point out the spell check feature. Hit F6 to check your current file. Once you’ve turned it on the spell checker will stay on until you hit F6 again.</p>
<h2 id="hack-the-planet">Hack the Planet!</h2>
<p>We’ve only really scratched the surface of what Sublime is capable of. In the future I’d like to write more about its awesome Macros, Snippets and Plugin architecture. Till then, keep on hacking.</p>
<p><em>What’s your favorite tips and shortcuts, let me know, in the comment section below.</em></p>yashumittalYou must be thinking, why I am writing a article on Sublime Text 2, now when they have already launched Sublime Text 3. But not everyone has upgraded to ST3, so here’s some tips and shortcuts for them.
https://cdn.codecarrot.net/images/sublime-text-2-pixafy-roundup-blog-graphic1.png
Code together in real time with Teletype for Atom2017-11-16T09:58:10+00:002017-11-16T09:58:10+00:00https://blog.codecarrot.net/code-together-in-real-time-with-teletype-for-atom<p>Writing code with another programmer is a great way to absorb knowledge, challenge yourself with new perspectives, and ultimately write better software. It can also be a fulfilling way to get to know the mind of another human being. Unfortunately, the logistics of writing code with another programmer can be such a hassle that many people don’t bother. Here are some of the common obstacles:</p>
<ul>
<li>Sharing the same physical machine is impossible for remote teams, and can be challenging to organize even when teammates share the same office.</li>
<li>Cloud-based IDEs and remote <code class="highlighter-rouge">tmux</code> sessions ask you to move your entire workflow into a hosted environment, which isn’t always possible or desirable.</li>
<li>The connection latency of screen sharing can lead to an awkward dynamic where only one collaborator can comfortably edit.</li>
</ul>
<p><img src="https://cdn.codecarrot.net/images/32577928-477e444e-c490-11e7-9118-3c69e51bf097.png" alt="32577928-477e444e-c490-11e7-9118-3c69e51bf097.png" /></p>
<p>GitHub today announced a new feature for its Atom text editor that makes it easier for programmers to work with one another on shared code with <a href="//teletype.atom.io/">Teletype for Atom</a> — a new way to dive right into code with remote collaborators. Work together in real time with your own configurations in your own programming environment on any file you can open in Atom.</p>
<p>It’s designed to let developers get the experience of in-person collaboration without huddling around the same terminal.</p>
<p>Developers can create a Teletype session from Atom and then share a link with their collaborators. At that point, the system will stream the contents of a user’s editor to their collaborators. At any time, another collaborator can start entering their own code, and it’s possible for multiple people to work in the same document at once.</p>
<p>Teletype came about in part because the Atom team itself is globally distributed. One of the engineers working on the product is based in Italy, and working on code with him was a challenge.</p>
<p>The feature doesn’t include a chat or voice conference system, so people who want to converse about the work that they’re doing will have to reach for an outside service, like Google Hangouts, Slack, or Skype.</p>
<p>Live collaboration in editing text is nothing new, but GitHub’s approach is designed to help deal with the limitations of existing systems. While Google Docs works well for collaboration on word processing files, it’s missing key features for coders. More tailor-made systems require storing code on a centralized server, which means people working close to one another but far away from the main repository would have to deal with a delay between when one user enters text and when it shows up on another screen.</p>
<p><img src="https://cdn.codecarrot.net/images/687474703a2f2f626c6f672e61746f6d2e696f2f696d672f706f7374732f74656c65747970652f636f64652d746f6765746865722e676966.gif" alt="687474703a2f2f626c6f672e61746f6d2e696f2f696d672f706f7374732f74656c65747970652f636f64652d746f6765746865722e676966.gif" /></p>
<p>Screen sharing was another workaround that people have tried, but that system doesn’t work well with multiple people trying to control the same computer at once. Plus, that brings up all sorts of issues around connection latency, as well as privacy, since users could end up having to share their entire screen.</p>
<p>Teletype could improve companies’ software development processes by allowing developers to more easily get immediate feedback on the code they’re writing. What’s more, the feature’s support for quick collaboration sessions could make the process more prevalent at companies that don’t want to set up dedicated pair programming workstations.</p>
<p>In addition, Teletype lets each user keep their preferred themes, key bindings, and plugins. That’s important, since many programmers set Atom up to work in a unique way, which can help them be more productive but also impede the productivity of people unfamiliar with a particular configuration.</p>
<p>Developers still have to look out for some important limitations when using Teletype. Key among them: The host computer is in charge of sharing its contents with the other connected developers. That means the number of connections is limited by both the host’s upstream bandwidth and the compute resources available on the computer.</p>
<p>However, Teletype was built so that the number of people that would be useful to have working on the same file is smaller than the total number of connections a machine can accommodate.</p>
<hr />
<h2 id="getting-started-with-teletype">Getting started with Teletype</h2>
<p>Once you install Teletype via Atom’s settings view or <code class="highlighter-rouge">apm install teletype</code> on the command line, you can open a “portal” into your local workspace from the new collaboration menu on the status bar.</p>
<p><img src="https://cdn.codecarrot.net/images/teletype-share.gif" alt="teletype-share.gif" /></p>
<p>Then just share your portal’s secret ID with collaborators via your preferred chat service.</p>
<p><img src="https://cdn.codecarrot.net/images/teletype-invite.gif" alt="Send the portal ID to a collaborator via a chat service" /></p>
<p>Collaborators can enter your portal by clicking “Join” in the collaboration menu and entering the portal ID.</p>
<p><img src="https://cdn.codecarrot.net/images/teletype-join.gif" alt="Once someone has your portal ID, they can join" /></p>
<p>After joining your portal, collaborators see a new tab in their workspace that lets them view and edit the contents of your active editor. Everyone gets their own cursor, and everyone can type at the same time, but since sharing is at the keystroke-level rather than the pixel-level, participants all keep their own custom key bindings, packages, and themes.</p>
<p><img src="https://cdn.codecarrot.net/images/teletype-code-together.gif" alt="Everyone gets a cursor" /></p>
<p>When you share a portal, your code stays on your local disk. As you switch between files, the contents of your current active editor are transmitted to collaborators so they can follow along, but otherwise your workflow will be unchanged.</p>
<p><img src="https://cdn.codecarrot.net/images/teletype-follow.gif" alt="Guests follow the host" /></p>
<h2 id="implementation-details">Implementation details</h2>
<h3 id="conflict-free-editing">Conflict-free editing</h3>
<p>Collaborative editing is a tricky theoretical problem. To ensure responsive editing, each collaborator maintains their own replica of each document, applying local edits immediately before transmitting them to other collaborators. In the face of concurrency, edits end up being applied in a different order on each replica, but when the dust settles, all replicas need to have the same contents.</p>
<p>After several late nights reading research papers, we ended up deciding to base Teletype on the theoretical framework of conflict-free replicated data types, or <em>CRDTs</em>. Basically, CRDTs are data structures that always converge on the same representation when updated with the same set of operations, even if those operations are applied in different orders. The CRDT for text editing we wrote for the heart of this system is available as a standalone library called <a href="//github.com/atom/teletype-crdt">teletype-crdt</a>.</p>
<h3 id="connecting-peers">Connecting peers</h3>
<p>To connect collaborators, we use <a href="//developer.mozilla.org/en-US/docs/Web/API/WebRTC_API">WebRTC</a> <a href="//developer.mozilla.org/en-US/docs/Web/API/RTCDataChannel">data channels</a>. After an initial handshake that exchanges connection metadata via GitHub’s servers, all data flows over encrypted peer-to-peer connections. Our servers never see your files or edits, which maximizes your privacy and minimizes latency between you and your collaborators, regardless of your proximity to our data centers.</p>
<h3 id="editor-agnostic-client-library">Editor-agnostic client library</h3>
<p>The <a href="//github.com/atom/teletype">Teletype Atom package</a> implements UI components and Atom-specific integration code, but most of the logic lives in an editor-agnostic library called <code class="highlighter-rouge">teletype-client</code>. Our protocols and API may churn for a while as we develop the system, but it should be possible to integrate <code class="highlighter-rouge">teletype-client</code> into any web-based application or even package it in an Electron-based server to talk to it from native editors. Supporting inter-operation between different text editors is definitely part of our long term vision.</p>
<h3 id="carriage-return-line-feed">Carriage return, line feed</h3>
<p>For now, Teletype only transmits text, so it’s a good idea to combine it with an application for voice communication. Traditional screen sharing can also be helpful for sharing the state of applications outside of Atom. Ultimately, we want to incorporate these kinds of features directly into the package along with a long list of other improvements.</p>
<p>But rather than waiting for perfection, we are releasing a beta version of this package now, because we think it’s useful today. We’ve been using Teletype to build Teletype for a few months now, happily working together across two continents and three time zones. Daily teletyping has made us happier and more productive, and we hope it will do the same for you and your teammates.</p>
<p>Visit <a href="//teletype.atom.io/">teletype.atom.io</a> to start coding together in Atom today.</p>yashumittalWriting code with another programmer is a great way to absorb knowledge, challenge yourself with new perspectives, and ultimately write better software. It can also be a fulfilling way to get to know the mind of another human being. Unfortunately, the logistics of writing code with another programmer can be such a hassle that many people don’t bother. Here are some of the common obstacles:
https://cdn.codecarrot.net/images/original-teletype.jpg
How to Create a Google Drive Backup of Your WordPress Website2017-11-16T07:21:00+00:002017-11-16T07:21:00+00:00https://blog.codecarrot.net/how-to-create-a-google-drive-backup-of-your-wordpress-website<p>Keeping an updated backup is one of the most important things you can do for your website. Disaster can hit at any time and having that backup can make the difference of getting your site back to running quickly or not at all. Just as crucial is where you store your backups. In this article we’ll step through how to perform a Google Drive backup.</p>
<p>Lots of backup solutions allow you to store your backups on your server. Many of them do this by default. Although it is possible to store your backups on your server it’s not a good idea. Servers can crash or get hacked. If your backup is only on your server then you won’t have a backup, which defeats the purpose of a backup in the first place.</p>
<p>A better solution is to store backups to a remote location that can be accessed easily from anywhere with an Internet connection. To be effective though, storing offline needs to be easy. Free doesn’t hurt either. Fortunately you can make and store backups easily, and for free, using Google Drive.</p>
<h2 id="what-is-google-drive">What is Google Drive</h2>
<p><img src="https://cdn.codecarrot.net/images/What-is-Google-Drive.png" alt="Google Drive Homepage website" /></p>
<p>Google Drive is Google’s free online storage service where you can store any type of file, including WordPress backup files. The free plan gives you 15 GB of storage and upgrades start at $1.99 per month for 100 GB. 1 TB is $9.99 per month, and 10 TB is $99.99 per month. The free version provides plenty of storage space for most sites.</p>
<h2 id="accessing-your-google-drive-account">Accessing Your Google Drive Account</h2>
<p><img src="https://cdn.codecarrot.net/images/Accessing-Your-Google-Drive-Account.png" alt="Accessing-Your-Google-Drive-Account.png" /></p>
<p>All that’s required to have access to Google Drive is to have a Google account. To see Google Drive, create or sign in to your Google account and select the square made up of dots in the upper right corner. It will open a window with lots of Google tools and services. <em>Click the Drive icon</em>.</p>
<p><img src="https://cdn.codecarrot.net/images/Accessing-Your-Google-Drive-Account-2.png" alt="Accessing-Your-Google-Drive-Account-2.png" /></p>
<p>You’ll see the welcome screen. If you’re using a plugin like UpdraftPlus your backups will be stored in a folder in the <em>My Drive tab</em>.</p>
<p>In order to store your backups in your Google Drive you’ll need to connect your WordPress website to your Google Drive account. To do this you’ll need a plugin.</p>
<h2 id="updraftplus">UpdraftPlus</h2>
<p><img src="https://cdn.codecarrot.net/images/UpdraftPlus.png" alt="UpdraftPlus.png" /></p>
<p>There are several excellent plugins to connect WordPress to your Google Drive account. With over a million active installs, UpdraftPlus is by far the most popular and it’s the one I like the most because Google Drive is included in the free edition. The free edition also includes remote backup to several other storage services.</p>
<p>To install UpdraftPlus, go to Plugins, Add New in the dashboard and search for UpdraftPlus. Click Install and then Activate.</p>
<p><img src="https://cdn.codecarrot.net/images/UpdraftPlus-2.png" alt="UpdraftPlus-2.png" /></p>
<p>Once UpdraftPlus is activated you’ll find it has been added to the dashboard under Settings and in the top bar. Click UpdraftPlus Backups and then select the Settings tab. Click Google Drive.</p>
<p><img src="https://cdn.codecarrot.net/images/UpdraftPlus-3.png" alt="UpdraftPlus-3.png" /></p>
<p>Under the storage options you’ll see the Google Drive settings. You’ll need your Client ID and Client Secret. To create these, go to the <a href="//code.google.com/apis/console/">API Console</a>. The instructions are provided in the two links (“For longer help…” or “Follow this link…” and create the API. I followed the instructions from the first link.</p>
<h2 id="creating-client-id-and-client-secret">Creating Client ID and Client Secret</h2>
<p><img src="https://cdn.codecarrot.net/images/Creating-Client-ID-and-Client-Secret.png" alt="Creating-Client-ID-and-Client-Secret.png" /></p>
<p>The API Console provides a list of your API projects. At the top of the screen select Create Project.</p>
<p><img src="https://cdn.codecarrot.net/images/Creating-Client-ID-and-Client-Secret-2.png" alt="Creating-Client-ID-and-Client-Secret-2.png" /></p>
<p>Enter a name for the project and select Create. Once the project is completed (the notification in the upper right will let you know), click the Google APIs logo to go to the API File Manager.</p>
<p><img src="https://cdn.codecarrot.net/images/Creating-Client-ID-and-Client-Secret-3.png" alt="Creating-Client-ID-and-Client-Secret-3.png" /></p>
<p>Here, click on Drive API. Alternately you can search for it and click on it when it comes up.</p>
<p><img src="https://cdn.codecarrot.net/images/Creating-Client-ID-and-Client-Secret-4.png" alt="Creating-Client-ID-and-Client-Secret-4.png" /></p>
<p>Click Enable at the top of the screen.</p>
<p><img src="https://cdn.codecarrot.net/images/Creating-Client-ID-and-Client-Secret-5.png" alt="Creating-Client-ID-and-Client-Secret-5.png" /></p>
<p>Select Credentials and then choose OAuth content screen. Fill in the fields and click Save.</p>
<p><img src="https://cdn.codecarrot.net/images/Creating-Client-ID-and-Client-Secret-6.png" alt="Creating-Client-ID-and-Client-Secret-6.png" /></p>
<p>Once you’ve completed the instructions you’ll be given your Client ID and Client Secret codes. Paste them into the fields. Choose which files to store, and save your settings.</p>
<p><img src="https://cdn.codecarrot.net/images/Creating-Client-ID-and-Client-Secret-7.png" alt="Creating-Client-ID-and-Client-Secret-7.png" /></p>
<p>You’ll see a message to authorize access to your Google Drive account. Click on the link. If you’ve completed the steps you’ll get another screen that asked you to authorize the connection. If you get an error, you might have to add the URL that it gives you in the error to the link it provides.</p>
<h2 id="backing-up-to-google-drive">Backing Up to Google Drive</h2>
<p><img src="https://cdn.codecarrot.net/images/Backing-Up-to-Google-Drive.png" alt="Backing-Up-to-Google-Drive.png" /></p>
<p>Now it’s time to create the backup. In the UpdraftPlus settings, select the Current Status tab. Here’s where you can make backups manually. You can automate them in the Settings tab. The backup works the same. Click Backup Now.</p>
<p><img src="https://cdn.codecarrot.net/images/Backing-Up-to-Google-Drive-2.png" alt="Backing-Up-to-Google-Drive-2.png" /></p>
<p>A modal with open where you can make a few selections. Make sure the option for backup storage is selected and click Backup Now.</p>
<p><img src="https://cdn.codecarrot.net/images/Backing-Up-to-Google-Drive-3.png" alt="Backing-Up-to-Google-Drive-3.png" /></p>
<p>The backup will start and show the progress. If your website doesn’t get enough traffic UpdraftPlus won’t have the resources it needs to create the backup. To help get around this and create the example for my test site I only backed up my plugins. Normally I would backup uploads, the database, and other files.</p>
<p><img src="https://cdn.codecarrot.net/images/Backing-Up-to-Google-Drive-4.png" alt="Backing-Up-to-Google-Drive-4.png" /></p>
<p>Once it’s completed you’ll see a message that says the backup apparently succeeded.</p>
<p><img src="https://cdn.codecarrot.net/images/Backing-Up-to-Google-Drive-5.png" alt="Backing-Up-to-Google-Drive-5.png" /></p>
<p>Selecting Existing Backups shows the backups you’ve created. If it’s stored on the Google Drive you’ll see the Google Drive icon under the date. In this example I have an old backup that’s stored on the server and a new backup (just of plugins) that’s stored on my Google Drive.</p>
<p><img src="https://cdn.codecarrot.net/images/Backing-Up-to-Google-Drive-6.png" alt="Backing-Up-to-Google-Drive-6.png" /></p>
<p>To see the see the backups in your Google Drive, go to your Google Drive account and select the UpdraftPlus folder.</p>
<p><img src="https://cdn.codecarrot.net/images/Backing-Up-to-Google-Drive-7.png" alt="Backing-Up-to-Google-Drive-7.png" /></p>
<p>Within the folder you’ll see your backups. You’ll notice that I have three backups but I’ve only saved one backup to my Google Drive in the example above. Two of these are from different websites. Multiple sites and backups can be saved in the same folder.</p>
<h2 id="restoring-from-google-drive">Restoring from Google Drive</h2>
<p><img src="https://cdn.codecarrot.net/images/Restoring-from-Google-Drive.png" alt="Restoring-from-Google-Drive.png" /></p>
<p>Restoring a backup from Google Drive is the same process as restoring from your server. Simply select Restore and UpdraftPlus works as normal. The types of files that are available will show in the list and you can choose specific files.</p>
<p>For example, I’ve only backed up my plugins, but I could also backup themes, the database, and uploads.</p>
<p><img src="https://cdn.codecarrot.net/images/Restoring-from-Google-Drive-2.png" alt="Restoring-from-Google-Drive-2.png" /></p>
<p>Choose what you want to restore from the list. If I had backed up other files they would appear in this list. Click Restore.</p>
<p><img src="https://cdn.codecarrot.net/images/Restoring-from-Google-Drive-3.png" alt="Restoring-from-Google-Drive-3.png" /></p>
<p>UpdraftPlus will retrieve the files. This might take a few seconds or a few minutes. Once the files are processed you’ll have to click Restore again.</p>
<p><img src="https://cdn.codecarrot.net/images/Restoring-from-Google-Drive-4.png" alt="Restoring-from-Google-Drive-4.png" /></p>
<p>You’ll see another message that tells you the restore has started. Do not stop the restore or close your browser.</p>
<p><img src="https://cdn.codecarrot.net/images/Restoring-from-Google-Drive-5.png" alt="Restoring-from-Google-Drive-5.png" /></p>
<p>When the restore is complete you’ll see a message that shows what was restored.</p>
<h2 id="final-thoughts">Final Thoughts</h2>
<p>Google Drive is an excellent choice to store your WordPress backups remotely and UpdraftPlus makes the task easy. As important as recent backups are, and considering that Google Drive and UpdraftPlus automates the task of storing them in a remote location for free, there’s no reason not to have a recent backup.</p>
<p><strong>We want to hear from you! Do you use Google Drive for your WordPress backups? Let us know about your experience in the comments.</strong></p>yashumittalKeeping an updated backup is one of the most important things you can do for your website. Disaster can hit at any time and having that backup can make the difference of getting your site back to running quickly or not at all. Just as crucial is where you store your backups. In this article we’ll step through how to perform a Google Drive backup.
https://cdn.codecarrot.net/images/shutterstock_234298681-960.jpg
25 Programming Books for the Aspiring Developer2017-11-16T00:05:00+00:002017-11-16T00:05:00+00:00https://blog.codecarrot.net/25-programming-books-for-the-aspiring-developer<p>Whether you’re learning to code online, at a bootcamp, or in-person, there’s one supplementary resource that we recommend to accompany your learning: books. But with so many programming books to choose from (a Google search brings up over 12 million related results) how do you know which ones to choose?</p>
<p>We decided to do some crowdsourcing and asked our awesome community on Facebook and Twitter: If there was one programming book you’d recommended, what would it be? We got lots of great responses and after sorting through them pulled together the top 25 <em>(listed in no particular order)</em>.</p>
<h2 id="general-programming">General Programming</h2>
<ol>
<li>
<p><strong>Clean Code: A Handbook of Agile Software Craftsmanship</strong> by Robert C. Martin</p>
</li>
<li>
<p><strong>Code Complete: A Practical Handbook of Software Construction</strong> by Steve McConnell</p>
</li>
<li>
<p><strong>Think Like a Programmer: An Introduction to Creative Problem Solving</strong> by V. Anton Spraul</p>
</li>
<li>
<p><strong>Code: The Hidden Language of Computer Hardware & Software</strong> by Charles Petzold</p>
</li>
<li>
<p><strong>Starting Out with Programming Logic & Design</strong> by Tony Gaddis</p>
</li>
<li>
<p><strong>Beginning Programming All-In-One Desk Reference For Dummies</strong> by Wallace Wang</p>
</li>
<li>
<p><strong>Cracking the Coding Interview: 189 Programming Questions & Solutions</strong> by Gayle Laakmann McDowell</p>
</li>
<li>
<p><strong>Head first book series</strong> (Java, Python, Design Patterns, JavaScript, C#, WordPress, Rails)</p>
</li>
</ol>
<p>HTML & CSS</p>
<ol>
<li>
<p><strong>HTML and CSS: Design & Build Websites</strong> by Jon Duckett</p>
</li>
<li>
<p><strong>Head First HTML and CSS: A Learner’s Guide to Creating Standards-Based Web Pages</strong> by Elisabeth Robson</p>
</li>
</ol>
<h2 id="javascript--jquery">JavaScript & jQuery</h2>
<ol>
<li>
<p><strong>You Don’t Know JS: Up & Going</strong> by Kyle Simpson</p>
</li>
<li>
<p><strong>Eloquent JavaScript: A Modern Introduction to Programming</strong> by Marjin Haverbeke</p>
</li>
<li>
<p><strong>Head First JavaScript Programming: A Brain-Friendly Guide</strong> by Eric T. Freeman</p>
</li>
<li>
<p><strong>JavaScript & jQuery: Interactive Front-End Web Development</strong> by Jon Duckett</p>
</li>
<li>
<p><strong>Professional JavaScript for Web Developers</strong> by Nicholas C. Zakas</p>
</li>
<li>
<p><strong>Secrets of the JavaScript Ninja</strong> by John Resig</p>
</li>
<li>
<p><strong>JavaScript: JavaScript Programming The Ultimate Beginners Guide</strong> by Dennis Hutten</p>
</li>
</ol>
<h2 id="python">Python</h2>
<ol>
<li>
<p><strong>Learn Python 3 The Hard Way: A Very Simple Introduction to the Terrifyingly Beautiful World of Computers and Code</strong> by Zed A. Shaw</p>
</li>
<li>
<p><strong>Fluent Python: Clear, Concise, and Effective Programming</strong> by Luciano Ramalho</p>
</li>
<li>
<p><strong>Python Crash Course: A Hands-On, Project-Based Introduction to Programming</strong> by Eric Matthes</p>
</li>
<li>
<p><strong>Automate The Boring Stuff with Python: Practical Programming for Total Beginners</strong> by Al Sweigart</p>
</li>
</ol>
<h2 id="-more">& More</h2>
<ol>
<li>
<p><strong>The Pragmatic Programmer: From Journeyman to Master</strong> by Andrew Hunt</p>
</li>
<li>
<p><strong>iOS Programming: The Big Nerd Ranch Guide</strong> by Christian Keur</p>
</li>
<li>
<p><strong>Java How to Program, Early Objects</strong> by Paul J. Deitel</p>
</li>
<li>
<p><strong>Algorithms to Live By: The Computer Science of Human Decisions</strong> by Brian Christian and Tom Griffiths</p>
</li>
</ol>
<p><em>This is definitely not an exhaustive list, so we’d love to hear from you. What programming books would you add to the list?</em></p>yashumittalWhether you’re learning to code online, at a bootcamp, or in-person, there’s one supplementary resource that we recommend to accompany your learning: books. But with so many programming books to choose from (a Google search brings up over 12 million related results) how do you know which ones to choose?
https://cdn.codecarrot.net/images/Programming-books-2.png
A/B Testing - A Basic Guide with Examples and Tools2017-11-15T23:55:49+00:002017-11-15T23:55:49+00:00https://blog.codecarrot.net/ab-testing-a-basic-guide-with-examples-and-tools<p>Have you ever tried eating a dosa with different chutneys? You may like one chutney more than the other. Ever thought of applying this dosa-chutney scenario to your website? A/B testing is just that. Applying this to your website, online store or any other landing page/social media ad can help you get more traffic and achieve great conversion rates.</p>
<h2 id="understanding-ab-testing">Understanding A/B testing</h2>
<p>Did you know you are probably being A/B tested on every fourth website you visit in a day? Social media websites like Facebook do that too!</p>
<p>The basic concept of A/B testing is to make different iterations of an online element and choose which iteration is doing better than the other. It may be something as big as a landing page or just something as minor as a call-to-action button.</p>
<p>Who doesn’t like options, right! You can test absolutely anything: a form or the placement of it, the amount of text, buttons, icons, design or just the URL structure. You can also test copies for social media and Google ads!</p>
<p><strong>Check out this A/B testing example:</strong></p>
<p><img src="https://i.imgur.com/cn8u4Xu.png" alt="ab-testing.png" /></p>
<p>From the above image, it is clear that <strong>Version A</strong> had 23% lower Control as compare to <strong>Version B</strong>.</p>
<h2 id="why-should-you-do-ab-testing">Why should you do A/B testing</h2>
<p>A/B testing can do several things for your online store or website. Here are just a few pointers on why you should consider testing your options:</p>
<ul>
<li><strong>Better customer engagement:</strong> Testing different versions can help gauge your customers’ engagement and keep them on your website longer</li>
<li><strong>Improve traffic and conversion rates:</strong> Research showed that A/B testing a website improved conversion rates by at least 15%.</li>
<li><strong>Reduce cart abandonment:</strong> Performing an A/B test can help reduce dropoffs from your website and retain your customers. Testing a different version can also help you significantly reduce your bounce rates.</li>
<li><strong>Cut out junk leads:</strong> Examples show A/B tests that had longer steps involved, attracted quality leads.</li>
<li><strong>Test anything:</strong> You can test absolutely anything – right from a high-risk project to a simple button – without having to forego on customers or scare them away with drastic changes.</li>
<li><strong>Save money:</strong> Testing versions can help you reduce costs and save on your budget.</li>
<li><strong>Analyse easily:</strong> Analysing your A/B tests are easy with online tools. Your results are measurable in numbers and percentages that can help you decide which version is doing better.</li>
</ul>
<h2 id="how-to-do-ab-testing">How to do A/B testing</h2>
<p>There are several tools that you can perform A/B tests with. Most of them require a bit of code-embedding and it’s not difficult. Here are a few easy tools that can help you start testing on your website immediately:</p>
<h3 id="1-google-analytics">1. Google Analytics</h3>
<p>If you are familiar with Google Analytics, you can easily perform A/B tests. Google offers something called “Content Experiment” that allows you to perform split tests and multi-page tests as well. <a href="/step-by-step-guide-to-ab-testing-with-google-analytics">Check out this guide to testing with Google Analytics</a>.</p>
<h3 id="2-five-second-test">2. Five-Second Test</h3>
<p>This is a tool that allows you to upload your design and run a five-second test on your users. Almost like a memory game, your customers will be shown a certain page and a word cloud after five seconds and will be asked to choose what they register or remember about the page they just saw. <a href="https://fivesecondtest.com">Try the tool here</a>.</p>
<h3 id="3-optimizely">3. Optimizely</h3>
<p>In this tool, all you need to do is copy the embed code for tracking different goals of your website and paste it into your website’s HTML code. <a href="https://www.youtube.com/watch?v=pJnpNgd-UdY">Here’s an easy guide to start using Optimizely</a>.</p>
<p>Don’t have a website yet? Don’t worry, you can <a href="https://www.codecarrot.net">get with CodeCarrot</a>. You can not only track who visits your website but also get detailed insights and test with the Google Analytics app. <strong>Sell your products/services</strong> directly from your website, <strong>accept payments</strong> and lot more.</p>yashumittalHave you ever tried eating a dosa with different chutneys? You may like one chutney more than the other. Ever thought of applying this dosa-chutney scenario to your website? A/B testing is just that. Applying this to your website, online store or any other landing page/social media ad can help you get more traffic and achieve great conversion rates.
https://i.imgur.com/3ijeiD1.png
Why Ruby is Awesome2017-11-15T21:10:35+00:002017-11-15T21:10:35+00:00https://blog.codecarrot.net/why-ruby-is-awesome<p>I’ve been through a few programming languages over the years, and I can say without hesitation that Ruby is my favorite. Not the “best” (there is no “best” programming language), but my favorite.</p>
<p>Here’s why:</p>
<ul>
<li>You can get the same things done in less code</li>
<li>It’s got lots of useful features built-in</li>
</ul>
<h2 id="write-less-code">Write Less Code</h2>
<p>Here’s the classic “Hello, world” example in Java:</p>
<div class="highlighter-rouge"><div class="highlight"><pre class="highlight"><code>public class HelloWorld {
public static void main(String[] args) {
System.out.println("Hello, world");
}
}
</code></pre></div></div>
<p>Now, here’s a single line of Ruby code that does the same thing:</p>
<div class="language-rb highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="nb">puts</span> <span class="s2">"Hello, world"</span>
</code></pre></div></div>
<p>Here’s a list of symbols you’d have to understand in order to write the Java sample: <code class="highlighter-rouge">public</code>, <code class="highlighter-rouge">class</code>, <code class="highlighter-rouge">{}</code>, <code class="highlighter-rouge">static</code>, <code class="highlighter-rouge">void</code>, <code class="highlighter-rouge">main</code>, <code class="highlighter-rouge">()</code>, <code class="highlighter-rouge">String[]</code>, <code class="highlighter-rouge">System.out</code>, <code class="highlighter-rouge">println</code>, <code class="highlighter-rouge">;</code></p>
<p>Here’s what you have to understand in order to write the Ruby code: <code class="highlighter-rouge">puts</code> (it’s the name of a method that prints stuff to the terminal), and <code class="highlighter-rouge">"Hello, world"</code> (it’s a string, a snippet of text).</p>
<p>Much simpler, right? I don’t want to suggest that every Java program is 6 times as big as an equivalent Ruby program, but Ruby programs are generally less verbose.</p>
<h2 id="useful-features">Useful Features</h2>
<p>This code:</p>
<div class="language-rb highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="nb">puts</span><span class="p">(</span><span class="s2">"delta alpha victor mike sierra"</span><span class="p">.</span><span class="nf">split</span><span class="p">.</span><span class="nf">sort</span><span class="p">.</span><span class="nf">map</span><span class="p">{</span><span class="o">|</span><span class="n">word</span><span class="o">|</span> <span class="n">word</span><span class="p">.</span><span class="nf">capitalize</span><span class="p">})</span>
</code></pre></div></div>
<p>Produces this output:</p>
<div class="highlighter-rouge"><div class="highlight"><pre class="highlight"><code>Alpha
Delta
Mike
Sierra
Victor
</code></pre></div></div>
<p>Don’t worry if you don’t understand all that; it takes at least a few weeks of studying Ruby in order to learn how to write code like that. The main thing I want to show you is how much you can accomplish in a single line of code.</p>
<p>How can we make such a huge transformation using so little code? Because Ruby objects have lots of useful features built-in:</p>
<ul>
<li>Ruby strings (like <code class="highlighter-rouge">"delta bravo victor mike sierra"</code>) all have <a href="//ruby-doc.org/core-2.4.0/String.html#method-i-split">a</a> <code class="highlighter-rouge">split</code> <a href="//ruby-doc.org/core-2.4.0/String.html#method-i-split">method</a> that lets you split a string into an array (collection) of substrings. You can specify the character the split should happen on, but by default, it uses spaces, which is just what we need in this case. (Convenient, right?)</li>
<li>Now we have an array (collection) of individual words. Arrays all have <a href="//ruby-doc.org/core-2.4.0/Array.html#method-i-sort">a</a> <code class="highlighter-rouge">sort</code> <a href="//ruby-doc.org/core-2.4.0/Array.html#method-i-sort">method</a> that lets you sort their members. You can sort strings in reverse order, or by length, or any other way you want, but by default it sorts in alphabetical order. (Again, convenient, right?)</li>
<li>Now we have a sorted array of words. The last thing we do is call <a href="//ruby-doc.org/core-2.4.0/Array.html#method-i-map">the</a> <code class="highlighter-rouge">map</code> <a href="//ruby-doc.org/core-2.4.0/Array.html#method-i-map">method</a> (which, again, all arrays have) to apply some code to each word in the array and give us a new array with the results. That code is provided in a block (that’s the <code class="highlighter-rouge">{|word| word.capitalize}</code>). This particular block capitalizes each word.</li>
</ul>
<p>And voila, we have a split, sorted, capitalized list of words, again using only one line of code!</p>
<p>That trick with the <code class="highlighter-rouge">{|word| word.capitalize}</code> block is particularly awesome, and is a unique feature of Ruby. You can do anything you want with the words in the array. For example, if I replaced <code class="highlighter-rouge">capitalize</code> with <code class="highlighter-rouge">reverse</code>, we’d get:</p>
<div class="highlighter-rouge"><div class="highlight"><pre class="highlight"><code>ahpla
atled
ekim
arreis
rotciv
</code></pre></div></div>
<p>If I replaced <code class="highlighter-rouge">capitalize</code> with <code class="highlighter-rouge">sub('e', '#')</code>, we’d get:</p>
<div class="highlighter-rouge"><div class="highlight"><pre class="highlight"><code>alpha
d#lta
mik#
si#rra
victor
</code></pre></div></div>
<p>That’s a lot of power for a single line of code!</p>
<h2 id="but-wait-theres-more-much-much-more">But Wait, There’s More! (Much, much more!)</h2>
<p>What I’ve shown you here is just a tiny fraction of the useful methods on strings and arrays. And we haven’t even talked about hashes, or classes, and I’ve barely explained blocks… All of these features and more can be combined in any way you want. Ruby gives you expressive power that many other languages just don’t have.</p>
<p>No wonder Ruby is the language behind the massively powerful <a href="http://rubyonrails.org/">Ruby on Rails framework</a>! Creating code to handle complex tasks (like running a website) is just easier when you’re using Ruby.</p>yashumittalI’ve been through a few programming languages over the years, and I can say without hesitation that Ruby is my favorite. Not the “best” (there is no “best” programming language), but my favorite.
https://cdn.codecarrot.net/images/Ruby-1.jpg
5 Things You Can Do With Your UPI VPA2017-11-15T20:30:00+00:002017-11-15T20:30:00+00:00https://blog.codecarrot.net/5-things-you-can-do-with-your-upi-vpa<p>Have you tried using the Unified Payment Interface (UPI) yet? This superfast method of payment can not just help you get instant money in your bank account but can also help you grow your business. Here are 5 things you can do with your UPI VPA (Virtual Payment Address).</p>
<h2 id="understanding-upi-vpa">Understanding UPI VPA</h2>
<p>The UPI is developed by the <strong>NPCI</strong> <em>(National Payments Council of India)</em> – a government body that is into banking and payments innovation. It is built on the <strong>IMPS</strong> <em>(Immediate Payments Service)</em>. While IMPS is chargeable, UPI for P2P is currently FREE of cost!</p>
<p>To be able to pay via UPI, you will need to create a VPA – an email id or a virtual address for your money.</p>
<p>A typical VPA looks like <em>“yashu@upi”</em> or <em>“yashu@icici”</em>.</p>
<h2 id="5-things-you-can-do-with-your-upi-vpa">5 things you can do with your UPI VPA</h2>
<p>There are several things (with regards to payments) that you can do with your UPI VPA. Here are some basic things to know:</p>
<h3 id="1-link-your-bank-account">1. Link Your Bank Account</h3>
<p>When creating your VPA, you can link a primary bank account. Whenever someone attempts to pay you or you pay someone, you can directly transact via your primary bank account. While the BHIM app allows you to link only one VPA to one address, some banks allow you to have multiple VPAs linked to a single bank account. You can also delete and add multiple VPAs.</p>
<h3 id="2-make-payments-via-upi">2. Make Payments via UPI</h3>
<p>Making a payment with your VPA is as simple as 1-2-3. You can use your VPA to pay to another VPA or an account number. You can manage your beneficiaries or receivers in your bank app or any other UPI app like BHIM. All you have to do is enter their VPA or choose their account number, punch in the amount you want to transfer and you’re done.</p>
<p>The payment is done immediately and the receiver gets the money directly in their bank account.</p>
<h3 id="3-recieve-payments-via-vpa">3. Recieve Payments via VPA</h3>
<p>To receive payments with UPI, all you need to do is share your VPA with anyone that wants to make a payment to you. The money is directly transferred into your account.</p>
<h3 id="4-request-payments-with-vpa">4. Request Payments with VPA</h3>
<p>You can also request a payment via UPI. Just enter the person’s VPA, punch in the amount and hit submit to send a request. If you don’t have the person’s VPA, you can select the person’s contact number on your phone and send them a request. They will receive an SMS or an app notification.</p>
<p><strong>Please Note:</strong> The payment will be complete only if the person receiving the request authorizes the payment.</p>
<h3 id="5-sharing-your-vpa">5. Sharing your VPA</h3>
<p>You can share your VPA with anybody just like sharing your email ID. Should you be worried about security? Absolutely not. The UPI mode of payment is one of the most secure modes of payment than any other mode you are using today. None can steal money from your account just using the VPA.</p>
<p>To log into a UPI app, you will need to use an M-PIN or a biometrics parameter, which makes it as secure as any other mode of payment.</p>
<p>Failed payments are one of the biggest reasons contributing to lost sales in the Indian e-commerce sector. Why lose sales when you can capture every payment?</p>
<p>Make your <a href="https://www.codecarrot.net">business online with CodeCarrot</a>! You can increase the reach of your business across globe and sell your product and services, directly from your website. <a href="https://www.codecarrot.net">Get started in five minutes</a> with CodeCarrot.</p>yashumittalHave you tried using the Unified Payment Interface (UPI) yet? This superfast method of payment can not just help you get instant money in your bank account but can also help you grow your business. Here are 5 things you can do with your UPI VPA (Virtual Payment Address).
https://i.imgur.com/4nwlRdD.png
Savings Account vs Current Account - For Your Small Business2017-11-15T16:11:00+00:002017-11-15T16:11:00+00:00https://blog.codecarrot.net/savings-account-vs-current-account-for-your-small-business<p>Wondering if you should open a savings bank account or a current account for your small business? Let us help you understand what these account types are and what account is most suitable for your business type. Here is a complete explanation on Savings account vs Current account.</p>
<h2 id="what-is-savings-bank-account">What is Savings Bank Account?</h2>
<p>A savings bank account is pretty much what the word means – a bank account that you can use to save money. Several small scale businesses use a savings account as their primary business account because their earnings and transactions may be limited.</p>
<h3 id="features-of-a-savings-bank-account">Features of a Savings Bank Account:</h3>
<ul>
<li>Requires you to maintain a minimum balance.</li>
<li>Offers you an annual interest on the minimum balance that ranges between 4% and 6%.</li>
<li>A cap on the number of free transactions (about 3-5 in a month).</li>
<li>Services like a chequebook or deposit are chargeable in a savings bank account. You can only issue 30 free cheques in a year with a Savings bank account.</li>
</ul>
<h3 id="documents-required-to-open-a-savings-bank-account">Documents Required to Open a Savings Bank Account:</h3>
<ul>
<li>Proof of Identity (Aadhaar Card, Voter ID, Driving License etc).</li>
<li>A recent colour photograph.</li>
<li>Proof of Address (Electricity bill, rental agreement, LPG/Gas bill).</li>
</ul>
<p><img src="https://i.imgur.com/G4iirqS.gif" alt="money-animated-gif-12.gif" /></p>
<h2 id="what-is-a-current-account">What is a Current Account?</h2>
<p>A current account is designed especially for businesses transacting regularly. There are several features that make it a popular alternative for anyone that has more than 10 transactions to make in a month.</p>
<h3 id="features-of-a-current-account">Features of a Current Account:</h3>
<ul>
<li>Requires you to maintain a relatively higher minimum balance.</li>
<li>No interest offered on minimum balance.</li>
<li>No cap on the number of free transactions.</li>
<li>Overdraft facility available. You can withdraw money from the account even if you have zero balance. The bank will treat it as a loan. This is important for working capital for businesses.</li>
<li>Other banking services like cheque books, deposits etc., are free.</li>
</ul>
<h3 id="documents-required-for-opening-a-current-account">Documents required for opening a Current account:</h3>
<ul>
<li>Different business types require different documents to open a current account. If you are an individual that wants to open one for business purposes, you will need to furnish:</li>
<li>Proof of Identity</li>
<li>Proof of Address</li>
<li>Recent colour photograph</li>
<li>PAN Form 49/ Form 60 if you have applied for a PAN</li>
<li>A cheque from an existing savings bank account / current account.</li>
</ul>
<h2 id="savings-account-vs-current-account">Savings Account vs Current Account:</h2>
<p>As an individual small business ( a freelancer or a consultant), a savings bank account may be perfect for you. However, there can be problems if the number of transactions in your Savings bank account increase. The savings account comes directly under the scanner of the bank’s vigil department and may attract suspicion of fraud on your account if you are not declaring your income correctly.</p>
<p>If you are an organization or a small business employing at least 4 people, getting a current account is recommended. It is more flexible and offers several services like on-demand statements, pick-up, and delivery of cash etc.</p>
<p>Ready to make your business online and start selling product and services? <a href="https://www.codecarrot.net">You’re just a step away from online business</a>! Have you contact CodeCarrot for your website designing and development yet?</p>yashumittalWondering if you should open a savings bank account or a current account for your small business? Let us help you understand what these account types are and what account is most suitable for your business type. Here is a complete explanation on Savings account vs Current account.
https://i.imgur.com/6IWVE3C.png
5 FREE WhatsApp Tools for Businesses to Grow Online2017-11-15T09:58:10+00:002017-11-15T09:58:10+00:00https://blog.codecarrot.net/5-free-whatsapp-tools-for-businesses-to-grow-online<p>Are you a WhatsApp seller? There are many ways you can use the Facebook-owned messaging service. We have put together a list of free WhatsApp tools for businesses that you can use to grow online.</p>
<p>WhatsApp may have rolled out its <a href="//faq.whatsapp.com/general/26000052">Business version</a> for a select number of users but you can turn your WhatsApp into a business version with these add-on tools and features. Check these out:</p>
<h2 id="whatsapp-broadcastgroup-messages">WhatsApp Broadcast/Group Messages</h2>
<p>Whatsapp groups are a great place to promote your services or products. You can form your own online sellers’ group or join one with an invite link. Think of it as a networking platform where you can not only post links to your service or product but also exchange business insights. Instamojo has an active group of small businesses on WhatsApp. You can join us here.</p>
<p>Want to send a personal message to everyone but don’t want to copy+paste it multiple times? Use WhatsApp Broadcast lists to send messages in bulk. Reach a big number of people with just one feature. <a href="//faq.whatsapp.com/en/bb/20996916">See how you can use WhatsApp Broadcast here</a>.</p>
<h2 id="whatsapp-agent">WhatsApp Agent</h2>
<p>This is an add-on app for WhatsApp that can act as your analytics assistant for all your WhatsApp activity and contacts. With this app, you can track the following activities in beautiful graphs and charts:</p>
<ul>
<li>The number of times a user logged in or out of Whatsapp and how long they were online.</li>
<li>Notifications of when a customer is online.</li>
<li>Time your customers are generally online.</li>
<li>Export data to an excel sheet and more.</li>
</ul>
<p>This app can help you create new customer lists and help you send messages to customers by segmenting them on their availability. <a href="//play.google.com/store/apps/details?id=com.wa.whatsagent">You can download the app here</a>.</p>
<h2 id="whatsapp-auto-responder">WhatsApp Auto-responder</h2>
<p>With WhatsApp, you can not just optimize the time you send your messages to customers but also attend to them even during offline hours. Communicate with your customers with this WhatsApp auto-responder app <a href="//play.google.com/store/apps/details?id=tkstudio.wachatbotlite&hl=en">available for free on Google Play Store</a>. With this app you can:</p>
<ul>
<li>Automate and customize your messages and response.</li>
<li>Choose when to respond by detecting keywords in customer’s message.</li>
<li>Choose contacts you want to respond to.</li>
<li>Add replacements to current templates and more.</li>
</ul>
<h2 id="whatsapp-social-status-update">WhatsApp Social Status Update</h2>
<p>Wouldn’t it be awesome if you could just update your status on WhatsApp and let the same update on all your social media like Facebook, Twitter etc? With this app, you can not only find ready-made, automated business status updates for your small business but also update the same on your other social media accounts. <a href="//play.google.com/store/apps/details?id=com.nxccontrol.whatsapp">Get this app</a> to share your customized statuses across the web.</p>
<h2 id="export-contacts-from-whatsapp">Export Contacts from WhatsApp</h2>
<p>With <a href="//play.google.com/store/apps/details?id=com.ebizzinfotech.whatsappCE">this app</a>, you can export contacts from WhatsApp into excel files and use them for SMS or <a href="/beginners-guide-to-starting-an-email-list">email marketing</a>. This app allows you to directly filter your phone contacts that use WhatsApp and creates a single file that you can use to upload in your SMS or email marketing campaign <em>(Check out <a href="/email-power-tips">email power tips</a>)</em>. The app is compatible on all your devices – phones and desktop versions.</p>
<p>Whatspp is just a tool for communicating with people, to make your business outshine and showoff your product and services, get a <a href="//www.codecarrot.net">website with CodeCarrot</a>.</p>yashumittalAre you a WhatsApp seller? There are many ways you can use the Facebook-owned messaging service. We have put together a list of free WhatsApp tools for businesses that you can use to grow online.
https://cdn.codecarrot.net/images/Whatsapp-tools-1.png
Smart Skill Distribution in Project Teams – Taking the Machine Learning Approach2017-11-15T09:58:10+00:002017-11-15T09:58:10+00:00https://blog.codecarrot.net/smart-skill-distribution-in-project-teams-taking-the-machine-learning-approach<p>At CodeCarrot, we’re continuously trying to optimise our internal processes. One of our processes consists in balancing the skills of individual employees when composing project teams, which ranks rather high on the headaches-per-hour scale.</p>
<p>As such, we needed to get smart about it. I conducted a little experiment, taking advantage of our internal People app. The app is essentially a directory of all CodeCarrot employees, containing information on the skills they have, how good they are at them and what projects they are currently working on. I am only playing with data and searching for the right solution. For now.My goal is to:</p>
<ul>
<li>Take advantage of the fact that our internal apps store interesting data that can easily be fetched and processed.</li>
<li>See that Machine Learning is not so hard. It will become easy as pie when you look at my code :)</li>
<li>Learn about k-means clustering and how to naively postprocess the results of clustering.</li>
</ul>
<h2 id="mission-statement">Mission Statement</h2>
<p>I will show you how to use the k-means algorithm to cluster all CodeCarrot’s tech employees into data-driven teams based on their skills from the People app. We will try not only to use the algorithm, which is based on a gem, obviously, but also learn something from our data and better understand the results that machine learning algorithms produce.</p>
<h2 id="dataset">Dataset</h2>
<p>I downloaded the People production database to my localhost and created a simple service object that fetched the users and their skills to save it to CSV.</p>
<div class="language-rb highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="nb">require</span> <span class="s1">'csv'</span>
<span class="k">class</span> <span class="nc">SaveToCsv</span>
<span class="k">def</span> <span class="nf">initialize</span> <span class="n">filename</span>
<span class="vi">@filename</span> <span class="o">=</span> <span class="n">filename</span>
<span class="k">end</span>
<span class="k">def</span> <span class="nf">call</span>
<span class="n">save_to_file</span>
<span class="k">end</span>
<span class="kp">private</span>
<span class="k">def</span> <span class="nf">save_to_file</span>
<span class="no">CSV</span><span class="p">.</span><span class="nf">open</span><span class="p">(</span><span class="vi">@filename</span><span class="p">,</span> <span class="s2">"wb"</span><span class="p">)</span> <span class="k">do</span> <span class="o">|</span><span class="n">csv</span><span class="o">|</span>
<span class="n">csv</span> <span class="o"><<</span> <span class="p">[</span><span class="s2">"user_id"</span><span class="p">,</span> <span class="s2">"user_name"</span><span class="p">]</span> <span class="o">+</span> <span class="n">write_skills</span>
<span class="no">User</span><span class="p">.</span><span class="nf">all</span><span class="p">.</span><span class="nf">technical</span><span class="p">.</span><span class="nf">active</span><span class="p">.</span><span class="nf">each</span> <span class="k">do</span> <span class="o">|</span><span class="n">user</span><span class="o">|</span>
<span class="nb">puts</span> <span class="s2">"Processing </span><span class="si">#{</span><span class="n">user</span><span class="p">.</span><span class="nf">first_name</span><span class="si">}</span><span class="s2"> </span><span class="si">#{</span><span class="n">user</span><span class="p">.</span><span class="nf">last_name</span><span class="si">}</span><span class="s2">..."</span>
<span class="n">columns</span> <span class="o">=</span> <span class="p">[</span><span class="n">user</span><span class="p">.</span><span class="nf">id</span><span class="p">,</span> <span class="s2">"</span><span class="si">#{</span><span class="n">user</span><span class="p">.</span><span class="nf">first_name</span><span class="si">}</span><span class="s2"> </span><span class="si">#{</span><span class="n">user</span><span class="p">.</span><span class="nf">last_name</span><span class="si">}</span><span class="s2">"</span><span class="p">]</span>
<span class="n">rates</span> <span class="o">=</span> <span class="n">skill_rates</span><span class="p">(</span><span class="n">user</span><span class="p">)</span>
<span class="n">skills</span><span class="p">.</span><span class="nf">each</span> <span class="k">do</span> <span class="o">|</span><span class="n">skill</span><span class="o">|</span>
<span class="n">skill_rate</span> <span class="o">=</span> <span class="n">rates</span><span class="p">.</span><span class="nf">select</span> <span class="p">{</span> <span class="o">|</span><span class="n">skill_rate</span><span class="o">|</span> <span class="n">skill_rate</span><span class="p">[</span><span class="ss">:skill_id</span><span class="p">]</span> <span class="o">==</span> <span class="n">skill</span><span class="p">.</span><span class="nf">id</span> <span class="p">}</span>
<span class="p">.</span><span class="nf">map</span> <span class="p">{</span> <span class="o">|</span><span class="n">skill_rate</span><span class="o">|</span> <span class="n">skill_rate</span><span class="p">[</span><span class="ss">:content</span><span class="p">]</span> <span class="p">?</span> <span class="n">skill_rate</span><span class="p">[</span><span class="ss">:content</span><span class="p">].</span><span class="nf">rate</span> <span class="p">:</span> <span class="mi">0</span> <span class="p">}</span>
<span class="k">if</span> <span class="n">skill_rate</span><span class="p">.</span><span class="nf">length</span>
<span class="n">columns</span> <span class="o"><<</span> <span class="p">(</span><span class="n">skill_rate</span><span class="p">.</span><span class="nf">first</span> <span class="o">==</span> <span class="mi">1</span> <span class="p">?</span> <span class="mi">0</span> <span class="p">:</span> <span class="n">skill_rate</span><span class="p">.</span><span class="nf">first</span><span class="p">)</span>
<span class="k">else</span>
<span class="n">columns</span> <span class="o"><<</span> <span class="s2">"0"</span>
<span class="k">end</span>
<span class="k">end</span>
<span class="n">columns</span> <span class="o"><<</span> <span class="s1">'\n'</span>
<span class="n">csv</span> <span class="o"><<</span> <span class="n">columns</span>
<span class="k">end</span>
<span class="k">end</span>
<span class="k">end</span>
<span class="k">def</span> <span class="nf">write_skills</span>
<span class="n">skills</span><span class="p">.</span><span class="nf">map</span> <span class="p">{</span> <span class="o">|</span><span class="n">skill</span><span class="o">|</span> <span class="n">skill</span><span class="p">.</span><span class="nf">name</span> <span class="p">}</span>
<span class="k">end</span>
<span class="k">def</span> <span class="nf">skill_rates</span><span class="p">(</span><span class="n">user</span><span class="p">)</span>
<span class="no">UserSkillRate</span><span class="p">.</span><span class="nf">where</span><span class="p">(</span><span class="ss">user: </span><span class="n">user</span><span class="p">).</span><span class="nf">includes</span><span class="p">(</span><span class="ss">:contents</span><span class="p">).</span><span class="nf">map</span> <span class="k">do</span> <span class="o">|</span><span class="n">skill_rate</span><span class="o">|</span>
<span class="p">{</span> <span class="ss">skill_id: </span><span class="n">skill_rate</span><span class="p">.</span><span class="nf">skill_id</span><span class="p">,</span> <span class="ss">content: </span><span class="n">skill_rate</span><span class="p">.</span><span class="nf">contents</span><span class="p">.</span><span class="nf">last</span> <span class="p">}</span>
<span class="k">end</span>
<span class="k">end</span>
<span class="k">def</span> <span class="nf">skills</span>
<span class="vi">@skills</span> <span class="o">||=</span> <span class="no">Skill</span><span class="p">.</span><span class="nf">where</span><span class="p">(</span><span class="ss">rate_type: </span><span class="s1">'range'</span><span class="p">).</span><span class="nf">to_a</span>
<span class="k">end</span>
<span class="k">end</span>
</code></pre></div></div>
<p>Our dataset consists of rows that represent users and columns that represent skills:</p>
<table>
<tbody>
<tr>
<td>user_id</td>
<td>user_name</td>
<td>Ruby on Rails</td>
<td>Sinatra</td>
<td>Grape</td>
<td>Spree</td>
<td>…</td>
</tr>
<tr>
<td>138</td>
<td>Yashu Mittal</td>
<td>3</td>
<td>2</td>
<td>3</td>
<td>0</td>
<td>…</td>
</tr>
<tr>
<td>90</td>
<td>Yogesh Metha</td>
<td>3</td>
<td>2</td>
<td>2</td>
<td>0</td>
<td>…</td>
</tr>
</tbody>
</table>
<p>Our dataset needs to have a digital representation of skill mastery across all columns. I intentionally skipped all boolean skills to avoid the problem of non-unified representation (integers vs. boolean).</p>
<h2 id="the-k-means-algorithm">The k-means Algorithm</h2>
<p>We are going to use the popular k-means clustering algorithm to cluster CodeCarrot’s employees. I won’t describe how the algorithm works in detail, but you can <a href="https://en.wikipedia.org/wiki/K-means_clustering">read about it here</a>. Simply put, k-means works by randomly selecting k points (called centroids, where k is the number of our teams) in an n-dimensional space (where n stands for our skill mastery). After this, each iteration of the algorithm:</p>
<ul>
<li>Assigns each employee to the nearest centroid;</li>
<li>Recalculates the position of each centroid to match the mean position of all employees assigned to this centroid.</li>
</ul>
<p>At some point in this very simple two-step algorithm, there will be no more change between iterations, which will mean that the employees are clustered.We have to bear in mind that we should always analyse our dataset in terms of the characteristics of machine learning algorithms to understand the results we obtain. K-means has some key points to remember:</p>
<ul>
<li>When the number of dimensions is much bigger than the number of clusters, the clusters might be a little bit random (we have 15 teams and over 120 skills – not good);</li>
<li>K-means clustering works heuristically, and it starts with a random number of centroids, which will yield fresults in each run;</li>
<li>The algorithm clusters data points in non-equal clusters, which means that outliers will probably be clustered in individual single-datapoint groups; on the other hand, clustering into equally sized groups is NP-hard.</li>
</ul>
<p>We will try to address these points in next steps.</p>
<h2 id="postprocessing-data">Postprocessing Data</h2>
<p>To address the problem of having a much bigger number of skills than the number of teams, we can easily get rid of some of the skills we think are not so important for the clustering.</p>
<h2 id="clustering">Clustering</h2>
<p>I performed the clustering with the <a href="https://github.com/gbuesing/kmeans-clusterer">k-means-clusterer</a> gem. It turns out that it’s much simpler than you’d think. Check it out in this code below.</p>
<div class="language-rb highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="nb">require</span> <span class="s1">'csv'</span>
<span class="k">class</span> <span class="nc">ClusterUsers</span>
<span class="k">def</span> <span class="nf">initialize</span><span class="p">(</span><span class="n">filename</span><span class="p">)</span>
<span class="vi">@filename</span> <span class="o">=</span> <span class="n">filename</span>
<span class="k">end</span>
<span class="k">def</span> <span class="nf">call</span>
<span class="n">cluster_users</span>
<span class="k">end</span>
<span class="kp">private</span>
<span class="nb">attr_reader</span> <span class="ss">:data</span><span class="p">,</span> <span class="ss">:labels</span>
<span class="k">def</span> <span class="nf">cluster_users</span>
<span class="vi">@data</span> <span class="o">=</span> <span class="p">[]</span>
<span class="vi">@labels</span> <span class="o">=</span> <span class="p">[]</span>
<span class="no">CSV</span><span class="p">.</span><span class="nf">foreach</span><span class="p">(</span><span class="vi">@filename</span><span class="p">,</span> <span class="ss">headers: </span><span class="kp">true</span><span class="p">)</span> <span class="k">do</span> <span class="o">|</span><span class="n">row</span><span class="o">|</span>
<span class="n">labels</span> <span class="o"><<</span> <span class="n">row</span><span class="p">[</span><span class="mi">1</span><span class="p">]</span>
<span class="n">data</span> <span class="o"><<</span> <span class="n">row</span><span class="p">[</span><span class="mi">2</span><span class="o">..</span><span class="p">(</span><span class="n">row</span><span class="p">.</span><span class="nf">length</span> <span class="o">-</span> <span class="mi">1</span><span class="p">)].</span><span class="nf">map</span> <span class="p">{</span> <span class="o">|</span><span class="n">rate</span><span class="o">|</span> <span class="n">rate</span><span class="p">.</span><span class="nf">to_f</span> <span class="p">}</span>
<span class="k">end</span>
<span class="n">k</span> <span class="o">=</span> <span class="n">labels</span><span class="p">.</span><span class="nf">size</span> <span class="o">/</span> <span class="mi">8</span>
<span class="n">kmeans</span> <span class="o">=</span> <span class="no">KMeansClusterer</span><span class="p">.</span><span class="nf">run</span> <span class="n">k</span><span class="p">,</span> <span class="n">data</span><span class="p">,</span> <span class="ss">labels: </span><span class="n">labels</span><span class="p">,</span> <span class="ss">runs: </span><span class="mi">5</span>
<span class="n">kmeans</span><span class="p">.</span><span class="nf">clusters</span>
<span class="k">end</span>
<span class="k">def</span> <span class="nf">render_clusters</span><span class="p">(</span><span class="n">clusters</span><span class="p">)</span>
<span class="n">clusters</span><span class="p">.</span><span class="nf">each_with_index</span> <span class="k">do</span> <span class="o">|</span><span class="n">cluster</span><span class="p">,</span> <span class="n">index</span><span class="o">|</span>
<span class="nb">puts</span> <span class="s2">"Team </span><span class="si">#{</span><span class="n">index</span><span class="si">}</span><span class="s2">: "</span>
<span class="n">cluster</span><span class="p">.</span><span class="nf">sorted_points</span><span class="p">.</span><span class="nf">map</span><span class="p">(</span><span class="o">&</span><span class="ss">:label</span><span class="p">).</span><span class="nf">each</span> <span class="k">do</span> <span class="o">|</span><span class="nb">name</span><span class="o">|</span>
<span class="nb">puts</span> <span class="s2">"</span><span class="se">\t</span><span class="si">#{</span><span class="nb">name</span><span class="si">}</span><span class="s2">"</span>
<span class="k">end</span>
<span class="nb">puts</span> <span class="s2">"</span><span class="se">\n</span><span class="s2">"</span>
<span class="k">end</span>
<span class="k">end</span>
<span class="k">end</span>
</code></pre></div></div>
<h2 id="conclusions-from-clustering">Conclusions from Clustering</h2>
<p>What can we learn from automated data-driven clustering of our employees’ skills? Well, there are multiple situations in which you might take advantage of the results. Think about using these clusters to make better matches when building teams for the upcoming projects. It could also be very interesting to apply labels based on an employee’s role in the company (e.g. junior, regular and senior developer) to check if there are some patterns, for example, all senior employees should be in one cluster. If you find some regular employees there, it might be a good time to promote them – data don’t lie!That said, we should also take a few things into consideration when trying to make decisions based on data. First of all, not everyone understands the skill representation in the same way. I am sure that a lot of people have some skills ranked too high, while others have them ranked too low. Also, if we represent skills on a scale from 0 to 4, going from 3 to 4 is much harder than going from 0 to 1. This makes the differences not equal in reality, but we must assume they are when we calculate distances in a Euclidean space.</p>
<p>Machine learning and data science are absolutely amazing and will definitely shape the future of every business in the world. We need to bear in mind, though, that to make smart decisions we need to understand the foundations and origins of our data, know its limits and take a step back when analysing the results. Curious about what it’s like to be a developer at CodeCarrot and work on projects like this one? Find out <a href="/recruitment-infopack-for-developers">here</a>.</p>yashumittalAt CodeCarrot, we’re continuously trying to optimise our internal processes. One of our processes consists in balancing the skills of individual employees when composing project teams, which ranks rather high on the headaches-per-hour scale.
https://i.imgur.com/zPqq2I1.jpg
How to Not Suck at Coding - Part 12017-11-15T08:47:40+00:002017-11-15T08:47:40+00:00https://blog.codecarrot.net/how-to-not-suck-at-coding-part-1<h2 id="coding-is-damn-hard">Coding is damn hard.</h2>
<p>When you’re just starting out, coding is hard as hell.</p>
<p>There’s just a lot of stuff to learn in web development. Front-end or back-end? React, Angular, Ruby, .NET? AJAX, JSON, SQL, MySQL, noSQL??</p>
<p>You may feel at times that you’re drowning in technobabble.</p>
<p><img src="https://i.imgur.com/hebZ5qT.gif" alt="11S00bVViOB6a4.gif" /></p>
<p>The good news is, you can get good at coding. The bad news is, you are not going to master it in 12 weeks. Sorry if you’ve been told otherwise. Now, you can certainly pick up some of the basics in that time. But it will take years of practice and hard work before you become an expert.</p>
<p>So, how do you maximize your learning?</p>
<p>The strategies listed here cover both areas. These are tricks that I’ve picked up since I started out my own coding career, seven years ago. And believe me, frustration was my closest friend during those first couple of years.</p>
<p>My hope is that I can make your journey up that steep learning curve a little less painful and a little more fun.</p>
<p>Let’s go!</p>
<h2 id="learning-and-remembering">Learning and Remembering</h2>
<h3 id="dont-learn-the-same-thing-twice">Don’t Learn the Same Thing Twice</h3>
<p>When you learn something in coding, you want to be as efficient as possible. If you can grasp a concept with a minimum of time and effort, you’ll progress more quickly.</p>
<p>As a basic example, let’s say you want to center some text on a website. You start out, like all good web developers, by punching a “how to” search into Google.</p>
<p>That leads you to a StackOverflow post, where you discover that you can center text by adding a CSS style, text-align: center. Nice! Copy that, paste it into your file, reload the page and you’re gold, all in under 5 minutes!</p>
<p>That was easy.</p>
<p>Now, let’s say the next week you have to center some more text, and you don’t quite remember how you did it the last time. So it’s back to Google, and after copying and pasting again, you’re done. Still easy, right? Sure.</p>
<p>The problem is, you repeated the exact action you did last time. That’s inefficient. <strong>It’s one of the main principles of good coding, actually: don’t write something twice if you could just write it once.</strong></p>
<p>Your problems will take more time to solve as you get to more complicated concepts. I’ve spent hours trying to figure out how to get something to work. And the second time that that exact problem comes up again? If I have to completely start over to research and test all over again… that. is. torturous.</p>
<p><em>If only I remembered how I did it the first time!</em></p>
<p>If you could remember how to solve a programming issue after the first time, imagine how much time you would save! It would be minutes or hours for every subsequent time you had to use that bit of code.
The problem here, of course, is that it’s quite difficult to perfectly remember something after only seeing it once.</p>
<p><strong>What you need is a memory proxy. A way to quickly remind yourself of the solution the next time it comes up.</strong></p>
<p>You need to write down that solution in a place where you’ll be able to go back and reference it. It doesn’t have to be in a 3-ring binder like in middle school. It could be in a Word doc, a Google doc, or even a paper notebook.</p>
<p><img src="https://i.imgur.com/5gH3VN1.gif" alt="xkmQfH1TB0dLW.gif" /></p>
<h2 id="understand-the-why">Understand the Why</h2>
<p>In addition to keeping good notes, you have to understand why some piece of code works. Otherwise, you’ll be learning the same concept over and over again, and your notebook will just be a magic spellbook that you can’t live without.</p>
<p><strong>Don’t just copy and paste mechanically. Engage your brain!</strong></p>
<p>When you’re looking through code snippets on StackOverflow or GitHub, really look at the code.</p>
<p>Try to understand how that small bit of functionality does what it does, and how it fits into the greater picture of web development.</p>
<p>Going back to the text centering example, once you see the text-align attribute, you might be curious what that’s all about. If you do some further research, you’ll see that you can not only set the text to center, but you can align it to the left, right, and even justify it.</p>
<p>Aha! You’ve now gotten to a better understanding of aligning text on websites.</p>
<p>Some people recommend never copying and pasting, and just manually typing out any code solutions. This is a good method that forces you to think and remember the syntax of the code.</p>
<p>The key here is to look beyond finding a short-term solution for your current problem. <strong>Your long-term goal isn’t just to fix this one bug, but to add it to your knowledge bank.</strong></p>
<h2 id="learn-coding-by-doing">Learn Coding By Doing</h2>
<p>One slight pitfall in this method of learning is that it’s completely reliant on whatever problems just happen to come up. And if you don’t encounter that same issue for several weeks or months, it will quickly fade from your memory.</p>
<p>In order for a new idea to really stick, you have to be exposed to it multiple times. <strong>This is the principle of spaced repetition systems, often used in language learning.</strong></p>
<p>The idea is that you learn one thing, and then right when it’s about to drop from your short-term memory, you re-test yourself to retrieve the memory. Over time, that concept will eventually make its way to your long-term memory.</p>
<p>Learning coding is a bit different from picking up new vocabulary words, but you can still make yourself go back to a specific concept and practice it again.</p>
<p>Here’s an example:</p>
<p>If you’re trying to figure out how to embed a custom Google map into your site, you could follow these steps:</p>
<ol>
<li>Do research on custom Google maps, test, and get the solution to work.</li>
<li>Take good notes, with step by step instructions and links to references you used.</li>
<li>Then a few days later, try to make another custom Google map without looking at your previous code.</li>
<li>If you don’t remember something, refer back to your notes.</li>
<li>Keep track of where the gaps in your memory are, and spend more time trying to understand the concepts behind them.</li>
<li>Repeat these steps until you feel pretty confident that you understand how to make the map from scratch.</li>
</ol>
<p>It can get a bit tedious redoing work, especially when there are a million other cool things you could be building. You don’t have to do this with every single new coding fact.</p>
<p>But for those concepts that seem to be important, it might be worth it. <strong>Spending extra time on it now will save you time later down the line.</strong> Especially if you think that you will encounter the same problem again in the near future.</p>
<p>Taking notes, understanding core concepts, and practicing coding are all things that have helped me in my own coding journey. I do want to emphasize that you need to think in the long term when it comes to learning how to code.</p>
<p>You can learn a lot from a good coding bootcamp or from online courses. But it’ll take time before all the concepts form a larger coherent image in your brain of how web development works.</p>
<p>Try to be patient. It’s like learning a language by living overseas. The more you immerse yourself and surround yourself in it, the more it will start to make sense. You’ll start making connections, and one day you’ll look back and realize that you just <em>get it</em>, in a way that you didn’t before.</p>
<p><img src="https://i.imgur.com/oOJX9Ty.gif" alt="3o7btNhMBytxAM6YBa.gif" /></p>
<p>This is the first installment of a two-part series about how to not suck at coding. The <a href="/how-to-not-suck-at-coding-part-2">next part</a> addresses problem-solving techniques.</p>yashumittalCoding is damn hard.
https://i.imgur.com/epqWDUh.jpg
Ideas That Make a Great Freelancer2017-11-15T06:35:10+00:002017-11-15T06:35:10+00:00https://blog.codecarrot.net/ideas-that-make-a-great-freelancer<p>Being a freelancer is synonymous to being your own boss, working on your own terms and conditions flexible working hours etc. Being a freelancer also means working without the backing of an HR team, on multiple projects under various bosses, chasing deadlines, dealing with different clients, erratic work hours and making sure there is enough work in the kitty that keeps the money coming.</p>
<p>Here are a few pointers that will help freelancers organize and make the most out of their freelancing jobs.</p>
<h2 id="be-the-ceo">Be the CEO</h2>
<p>A lot of people think being a freelancer is for the non-committed, who cannot work in a formal office under a boss. This does not stand true all the time. A freelancer has to be extremely entrepreneurial.</p>
<p>A freelancer is the heart and soul of his business, he is the one to get the clients, work on the projects, follow up with the clients and makes sure his payments are credited to his account in time. He is the one making sure that he makes enough money every month to pay his bills and save a certain amount too.</p>
<p>Being a full-time freelancer is more like being the CEO of your own startup, which makes you responsible for everything that goes into making your work a success. Initially, you should try to get some clients and work on their projects satisfactorily, market your services on various social media channels to create a buzz about yourself and your services. If the services you offer are of the optimum quality, word of mouth should do the rest of the trick.</p>
<h2 id="the-creative-edge">The Creative Edge</h2>
<p>If you have chosen to freelance as your career, you have chosen to compete with tonnes of them out there. To excel in this market you must offer something unique and creative to your client. Try to offer your client innovative ideas that could help his as well as your business grow. It is all about your talent and how you utilize it.</p>
<h2 id="determination-is-the-key">Determination is The Key</h2>
<p><em>‘Slow and steady wins the race.’</em></p>
<p>Start small, one step at a time – make sure you are determined disciplined and consistent in what you do. There might be times when you face rejection and do not fetch enough work, don’t let such times disappoint you. Make the most of your free time by sharpening your skills and improving the quality of your work. Market your services well. Constant and steady growth is the key to success as a freelancer.</p>
<h2 id="keep-good-company">Keep Good Company</h2>
<p>Join a group of freelancers and stay in touch with them. You can exchange tips that you learned along the way through experience. Freelancers would best understand the challenges faced in the world of freelancing and offer solutions too. Don’t forget to spend some good time with your family and friends they would be able to provide you the best support when you need it.</p>
<h2 id="take-a-break-when-you-feel-like-it">Take a Break when You Feel Like It</h2>
<p>Giving up your traditional job and working as a freelancer can be very challenging, especially in the first few weeks when you are trying your best to market your services, generate and follow leads and get some good work in your kitty.</p>
<p>Working in isolation as a freelancer could also have its repercussions. We suggest you take a break. It could be a 15- minute coffee break, a board game with your family or a relaxing weekend spent with friends. Pick what you like and just relax while you are away from work, so you can spring right back in action after your break.
Do what you love, love what you do. Be bold and experiment. Give your best to each and every assignment you take up. Just rock it as a freelancer.</p>
<p>Give your projects the power of online presence. Make an online presence with CodeCarrot and show off your skills, work, projects and much more, to your clients.</p>
<p>Get started in just <a href="//www.codecarrot.net">five-minutes with CodeCarrot</a>.</p>yashumittalBeing a freelancer is synonymous to being your own boss, working on your own terms and conditions flexible working hours etc. Being a freelancer also means working without the backing of an HR team, on multiple projects under various bosses, chasing deadlines, dealing with different clients, erratic work hours and making sure there is enough work in the kitty that keeps the money coming.
https://cdn.codecarrot.net/images/creative-ideas.png
Should You Use Chatbots for Your Small Business?2017-11-15T05:30:00+00:002017-11-15T05:30:00+00:00https://blog.codecarrot.net/should-you-use-chatbots-for-your-small-business<p>Wouldn’t it be nice to have an assistant help us with our daily tasks? A chatbot could do that and more for you. Here are a few ways you can use chatbots for your small business or on your website.</p>
<h2 id="whats-a-chatbot">What’s a Chatbot?</h2>
<p>A chatbot or “chatter bot” is a computer/software robot that uses a set of rules or Artificial Intelligence to communicate and execute tasks on your website, app or social media account. They have audio and text abilities that can mimic human conversations. This can help take off the burden off you or your employees to be available to take queries from your customers all the time.</p>
<h2 id="what-can-chatbots-do-for-me">What can Chatbots do for me?</h2>
<p>Chatbots can do a range of things for your business. Here is a list of things:</p>
<ul>
<li>Manage your budget</li>
<li>Make that perfect investor pitch</li>
<li>Communicate and solve customer queries</li>
<li>Help with accounting and analytics</li>
<li>Check and suggest changes in legal contracts and more.</li>
</ul>
<h2 id="why-should-i-consider-using-a-chatbot-for-my-small-business">Why should I consider using a Chatbot for my small business?</h2>
<p>When we tell you chatbots are a wise investment, don’t believe us. Believe the numbers instead. A recent study conducted by Forrester Consulting found that 93% of online consumers interact with bots today. Put that in perspective with this graph:</p>
<p><img src="https://i.imgur.com/uYRw9pH.png" alt="1_7yz2oL1diR_jm6JIB1ugTg.png" /></p>
<h2 id="other-reasons-you-should-get-a-chatbot-for-your-business">Other reasons you should get a chatbot for your business</h2>
<p>As per Juniper Research, chatbots will help companies save up to $20 million in 2017. This could grow to $8 billion by 2022. Chatbots are not only easy to integrate but are also a good investment for your small business.</p>
<ul>
<li><strong>Increase Engagement</strong></li>
</ul>
<p>Using chatbots on your support or social media pages can greatly enhance your customer’s experience with you. The chatbot can not only help understand and solve initial queries of your client but can also gather data about each customer for you to work upon later and personalize responses the next time around.</p>
<ul>
<li><strong>Find and Create Leads</strong></li>
</ul>
<p>Chatbots can help you reach out to new people and convert them into potential leads for your small business.</p>
<ul>
<li><strong>Improve Sales</strong></li>
</ul>
<p>If you are an e-commerce website that sells a product, a chatbot can help turn a browsing customer into a buying one. It can help take the customer around and suggest purchase options. It can also take your customer’s order. Also, it can take a payment from the customer.</p>
<ul>
<li><strong>Communicate and advertise</strong></li>
</ul>
<p>If your customer is looking for a specific service, your chatbot can help them find it. In a way, they are a conversational advertising tool. Plug in your new product feature and let your chatbot market them for you to your customers.</p>
<h2 id="5-chatbots-to-use-for-your-small-business">5 Chatbots to Use for your small business:</h2>
<ol>
<li><strong><a href="https://flowxo.com/">FlowXO</a>:</strong> This is a ready-made, ready-to-use chatbot that has flexible integrations and some great features that allow you to drive traffic to your website and social media. It’s also FREE!</li>
<li><strong><a href="https://chatfuel.com/">Chatfuel</a>:</strong> Are you a developer that wants to build a chatbot? This one allows you to launch a full-fledged chatbot in about 7 minutes!</li>
<li><strong><a href="https://growthbot.org/">GrowthBot</a>:</strong> Want to grow your business? Growthbot helps you discover growth hacks for your business. It’s available on Facebook, Twitter and Slack.</li>
<li><strong><a href="https://napoleoncat.com/">Napoleon Cat</a>:</strong> This bot allows you to keep your customers on social media, engaged. It responds to queries and tracks your audience. It’s a great way to increase followers on social media.</li>
<li><strong><a href="https://niki.ai/">Niki.ai</a>:</strong> Niki.ai is a shopping-assistant bot that can help your customer shop, take payments and keep communicating order details from time-to-time.</li>
</ol>
<p>Give your customers the freedom to pay with any mode of payment they want to. <a href="https://www.codecarrot.net">Get started with CodeCarrot</a> and get a website for your small business and make your business outshine in the online world – with or without chatbots.</p>yashumittalWouldn’t it be nice to have an assistant help us with our daily tasks? A chatbot could do that and more for you. Here are a few ways you can use chatbots for your small business or on your website.
https://i.imgur.com/wRzhZzy.png
Ruby on Rails in Machine Learning - Yay or Nay?2017-11-12T09:28:45+00:002017-11-12T09:28:45+00:00https://blog.codecarrot.net/ruby-on-rails-in-machine-learning-yay-or-nay<p>Machine Learning is a trending field of Computer Science turning computer’s computations into a new level and giving a number of unique opportunities. It’s getting more and more popular, and it’s common for modern web application as well as services, such as Netflix, Spotify, Amazon.com and Facebook. Machine Learning is a good solution for apps based on recommendations or some kind of predictions. If you want to build such apps, you will need an efficient backend technology to support it. Is Ruby on Rails the right choice?</p>
<h2 id="whats-machine-learning">What’s Machine Learning?</h2>
<p>The most famous definition of Machine Learning is <em>the subfield of computer science giving computers the ability to learn without being explicitly programmed</em>.</p>
<p>In fact, it gives a nice clue of what it is all about. <a href="/smart-skill-distribution-in-project-teams-taking-the-machine-learning-approach">Machine Learning is a part of data science</a>. It is used when we want to use computers to predict unknown results based on related bulky data sources. It is a good way to discover any kind of uncertainty, such as recommendations, predictions or detections of described situations. We don’t need to plan and implement any algorithms. We say that a computer gains the ability to be smart and learn new things.</p>
<h2 id="how-does-it-work">How Does It Work?</h2>
<p>We don’t need to specifically instruct a computer on what to do. If you want to be smart and predict uncertain values applications, use specific structures and tools, e.g. neural nets. These technologies learn new facts and make predictions in a way which is similar to that of the human brain. For example, neural nets are composed of layers of units called neurons. We see a clear analogy of how it could work.</p>
<h2 id="what-do-we-need">What Do We Need?</h2>
<p>As Machine Learning is a part of Data Science, it is a composition of various mathematical computations. It means that an application uses the technology needs to provide complex calculation fast. Since it’s not a trivial software problem, we need to take care of the best tool choices.</p>
<h2 id="is-ruby-on-rails-a-good-choice-for-machine-learning">Is Ruby on Rails a Good Choice for Machine Learning?</h2>
<p><a href="/pros-cons-ruby-on-rails">Ruby is an elegant programming language</a> which found its role in the web development and scripts. With the help of Ruby and Rails framework, developers can build MVPs in a way which is both fast and stable. This is thanks to the availability of various packages called gems, which helps solving diverse problems speedily.</p>
<p>However, looking for the Machine Learning gems, we can conclude that the choice is not that rich. Going deeper, the described solutions are not documented enough. The reason is that they do not provide efficient computation speed and gather a too small community around. All these factors attest to the fact that there are more risks than advantages of using Ruby gems as Machine Learning solutions, and it is not the best choice after all.
Moreover, tools and packages are as useful as the language of development. Ruby is definitely one of the most interesting programming languages. It has many proved purposes, but fast computing is not one of them. Ruby does not match Machine Learning, and we need to look into something better.</p>
<h2 id="whats-the-alternative">What’s the Alternative?</h2>
<p>Python is also a popular programming language which is often used in Data Science projects because:</p>
<ul>
<li>It has numerous packages for Machine Learning and other computations. The prime examples are <em>numpy, pandas, keras, tensorflow</em>. These packages are well-documented, which is helpful in starting with new projects and solutions. It also speeds up the process of fixing bugs.</li>
<li>Its libraries are simply powerful. It means that they comprise many features helpful in complex computations. The development is fast, efficient and stable. It is also common that they use a range of computation speed improvements. All of these advantages make these tools mature and reliable.</li>
<li>Another important advantage of using Python libraries is a considerable support from the community as the developers can easily find tutorials and tips valuable in a development process. A stable community makes the start threshold lower - it is easier to use new technologies from scratch.</li>
<li>Python is a developer-friendly language which is easier to start with for Ruby on Rails developers comparing to other, lower-level programming languages. The syntax is intuitive, and it parallels the one in Ruby more than other popular languages.</li>
</ul>
<h2 id="tensorflow">Tensorflow</h2>
<p>We need to choose the best Python library for the Machine Learning purposes. We recommend using Tensorflow, a popular and powerful tool from Google. It provides stable implementation for Python, C++ and many other programming languages. We decide to use Tensorflow for the benefits it provides:</p>
<ul>
<li>it has an excellent documentation, a bunch of helpful tutorials and howtos, which helps developers go deep into the Machine Learning solutions;</li>
<li>it performs all complex calculations “behind” Python - it uses a unique computational engine and leaves Python free of heavy operations;</li>
<li>it allows building neural nets and other Machine Learning structures like graphs and chains of single operation blocks;</li>
<li>it allows using Graphics Processing Unit for a much better performance.</li>
</ul>
<h2 id="ror-as-a-web-application-for-ml">RoR as a Web Application for ML</h2>
<p>Ruby on Rails is a perfect choice for web development. It gives developers the possibility to kick off a stable MVP really fast. However, it does not guarantee the best performance and the quality of complex and heavy computations.</p>
<p>Based on the above, it is a good idea to connect the brilliance of Ruby on Rails framework with Python as a microservice performing Machine Learning computations. This architecture gives us the mix of the best computation efficiency and web application development stability. It minimises the time of building a prototype and provides the best quality of usage.</p>
<p>What are the main benefits of such a combination?</p>
<ul>
<li>It’s easy and convenient to connect our app with other microservices. The Rails framework provides many reliable ways of communication between different services. It does not break the integrity with the core services.</li>
<li>Rails is great for building MVPs. Developers can build a web application fast and pitch it to investors.</li>
<li>It is a stable solution with a really good documentation. Moreover, there are many famous companies which trusted this framework and built efficient software.</li>
<li>Active community support also makes this choice smart.</li>
<li>With the help of gems, Rails packages, developers can quickly build more complex parts of an application.</li>
</ul>
<h2 id="how-to-connect-microservices-in-python-with-ror">How to Connect Microservices in Python with RoR</h2>
<p>So, we chose Ruby on Rails as a web application framework and Python with Tensorflow as a Machine Learning microservice. Great! The very last element of our technology chain is the efficient connection between these two endpoints. It is important to choose connection technology carefully. Let’s compare two most common options:</p>
<h2 id="http-communication">HTTP Communication</h2>
<p>The first option is the <em>HTTP communication</em>. It is definitely the most popular way of connecting the two services. The most popular one may not be the best. HTTP protocol is getting older and older. There are still some boilerplates, issues and difficulties on our way. Moreover, it is said that the protocol does not provide the best speed in all cases. We are looking for the best efficiency in each step of development, so it is worth finding something better.</p>
<p>Secondly, this type of communication needs lots of effort in Rails and Python. It results in more time needed to build a stable communication solution. In the case of Ruby on Rails, it is quite straightforward, but we also need an endpoint in Python. If we chose HTTP, we would have to use an additional tool to build it on the Python side. It breaks Single Responsibility Principle which we are aware of.</p>
<p>Overall, HTTP is quite complex itself. We need a really simple and efficient way.</p>
<h2 id="rabbitmq">RabbitMQ</h2>
<p>The second option is a tool called RabbitMQ. It is stable, fast and it is growing in popularity among developers. The communication model is simpler and faster than the HTTP protocol. An outstanding documentation and examples ensure that developers easily start using this tool. Another important advantage is the presence of truly solid Ruby and Python libraries providing RabbitMQ communication in these languages. It makes the usage really easy and stable.</p>
<p>Using RabbitMQ is a good choice for connecting the Rails web application and Python microservice.</p>
<h2 id="wrap-up">Wrap-up</h2>
<p>The proposed architecture of web application using Machine Learning features has both its strong and weak sides. Web application development is stable, and it’s possible to use <a href="/top-10-ruby-on-rails-gems-to-make-ruby-devs-life-easier">Ruby gems</a> to build a web application fast. It ensures great efficiency of Machine Learning computations thanks to the Python and Tensorflow library. Finally, the connection between both services is fast and safe.</p>
<p>On the other hand, you should consider the downsides as well. It has a bit more complex architecture model at the cost of creating an almost perfect solution.</p>
<p>In the case of Machine Learning ecosystem, it is better to mix different technologies and select the best tools to support them than rely on standalone choices which are not always as good as they seem.</p>yashumittalMachine Learning is a trending field of Computer Science turning computer’s computations into a new level and giving a number of unique opportunities. It’s getting more and more popular, and it’s common for modern web application as well as services, such as Netflix, Spotify, Amazon.com and Facebook. Machine Learning is a good solution for apps based on recommendations or some kind of predictions. If you want to build such apps, you will need an efficient backend technology to support it. Is Ruby on Rails the right choice?
https://cdn.codecarrot.net/images/dominik-scythe-414905.jpg
Marionette.js and backbone, a perfect match?2017-11-12T09:00:00+00:002017-11-12T09:00:00+00:00https://blog.codecarrot.net/marionette-js-and-backbone-a-perfect-match<p>Despite its popularity, backbone.js has many drawbacks. With a steep learning curve, shortage of opinionated patterns, lots of boilerplate code, and poor memory management/cleanup strategies, backbone usage can be discouraging. In this article, I will focus on how to refactor a backbone application using marionette.js —a framework that can mitigate many of backbone’s shortcomings.</p>
<p><img src="https://cdn.codecarrot.net/images/1425999034-tumblr_inline_mr7fhuo3u61qz4rgp.png" alt="1425999034-tumblr_inline_mr7fhuo3u61qz4rgp.png" /></p>
<p>Despite its popularity, <a href="//backbonejs.org/">backbone.js</a> has many drawbacks. With a steep learning curve, shortage of opinionated patterns, lots of boilerplate code, and poor memory management/cleanup strategies, backbone usage can be discouraging. In this article, I will focus on how to refactor a backbone application using <a href="//marionettejs.com/">marionette.js</a> — a framework that can mitigate many of backbone’s shortcomings.</p>
<h2 id="refactoring">Refactoring</h2>
<p>The best thing about marionette is that it builds on top of backbone. This means that many of its components extend backbone classes, which makes refactoring incredibly easy.</p>
<h2 id="get-better-views-with-marionette">Get better Views with marionette</h2>
<p>Views are the most abused component of backbone apps, where the bulk of ugly/boilerplate code gets thrown in. While backbone only has the Backbone.View class, marionette extends this class with 4 types of specialized views: ItemView, CollectionView, CompositeView and Layout.</p>
<p>Let’s see how we can apply each of these to improve our code.</p>
<h2 id="itemview">ItemView</h2>
<p>ItemView is typically initialized with a model and is shown in the DOM. Let’s compare it to backbone (using coffeescript in the following examples).</p>
<div class="language-js highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="err">#</span> <span class="nx">backbone</span>
<span class="kd">class</span> <span class="nx">PostView</span> <span class="kd">extends</span> <span class="nx">Backbone</span><span class="p">.</span><span class="nx">View</span>
<span class="nx">className</span><span class="p">:</span> <span class="dl">'</span><span class="s1">post</span><span class="dl">'</span>
<span class="nx">initialize</span><span class="p">:</span> <span class="o">-></span>
<span class="p">@</span><span class="nd">model</span><span class="p">.</span><span class="nx">on</span><span class="p">(</span><span class="dl">'</span><span class="s1">change:rating</span><span class="dl">'</span><span class="p">,</span> <span class="p">@</span><span class="nd">ratingChanged</span><span class="p">)</span>
<span class="nx">teardown</span><span class="p">:</span> <span class="o">-></span>
<span class="p">@</span><span class="nd">model</span><span class="p">.</span><span class="nx">off</span><span class="p">(</span><span class="dl">'</span><span class="s1">change:rating</span><span class="dl">'</span><span class="p">)</span>
<span class="err">#</span> <span class="nx">custom</span> <span class="nx">plugin</span> <span class="nx">cleanup</span> <span class="nx">here</span>
<span class="p">@</span><span class="nd">remove</span><span class="p">()</span>
<span class="nx">render</span><span class="p">:</span> <span class="o">-></span>
<span class="p">@</span><span class="nx">$el</span><span class="p">.</span><span class="nx">empty</span><span class="p">()</span>
<span class="p">@</span><span class="nx">$el</span><span class="p">.</span><span class="nx">html</span><span class="p">(</span><span class="nx">JST</span><span class="p">[</span><span class="dl">'</span><span class="s1">post</span><span class="dl">'</span><span class="p">](@</span><span class="nd">model</span><span class="p">.</span><span class="nx">asJSON</span><span class="p">()))</span>
<span class="err">#</span> <span class="nx">custom</span> <span class="nx">plugin</span> <span class="nx">initialization</span> <span class="nx">here</span>
<span class="p">@</span>
<span class="nx">ratingChanged</span><span class="p">:</span> <span class="o">-></span>
<span class="nx">console</span><span class="p">.</span><span class="nx">log</span><span class="p">(</span><span class="err">“</span><span class="nx">rating</span> <span class="nx">is</span> <span class="nx">now</span> <span class="err">#</span><span class="p">{@</span><span class="nd">model</span><span class="p">.</span><span class="kd">get</span><span class="p">(</span><span class="err">‘</span><span class="nx">rating</span><span class="err">’</span><span class="p">)}</span><span class="err">”</span><span class="p">)</span>
<span class="err">#</span> <span class="nx">marionette</span>
<span class="kd">class</span> <span class="nx">PostView</span> <span class="kd">extends</span> <span class="nx">Marionette</span><span class="p">.</span><span class="nx">ItemView</span>
<span class="nx">className</span><span class="p">:</span> <span class="dl">'</span><span class="s1">post</span><span class="dl">'</span>
<span class="nx">template</span><span class="p">:</span> <span class="nx">JST</span><span class="p">[</span><span class="dl">'</span><span class="s1">post</span><span class="dl">'</span><span class="p">]</span>
<span class="nx">modelEvents</span><span class="p">:</span>
<span class="dl">'</span><span class="s1">change:rating</span><span class="dl">'</span><span class="p">:</span> <span class="dl">'</span><span class="s1">ratingChanged</span><span class="dl">'</span>
<span class="nx">ratingChanged</span><span class="p">:</span> <span class="o">-></span>
<span class="nx">console</span><span class="p">.</span><span class="nx">log</span><span class="p">(</span><span class="err">“</span><span class="nx">rating</span> <span class="nx">is</span> <span class="nx">now</span> <span class="err">#</span><span class="p">{@</span><span class="nd">model</span><span class="p">.</span><span class="kd">get</span><span class="p">(</span><span class="err">‘</span><span class="nx">rating</span><span class="err">’</span><span class="p">)}</span><span class="err">”</span><span class="p">)</span>
<span class="nx">onRender</span><span class="p">:</span> <span class="o">-></span>
<span class="err">#</span> <span class="nx">custom</span> <span class="nx">plugin</span> <span class="nx">initialization</span> <span class="nx">here</span>
<span class="nx">onClose</span><span class="p">:</span> <span class="o">-></span>
<span class="err">#</span> <span class="nx">custom</span> <span class="nx">plugin</span> <span class="nx">cleanup</span> <span class="nx">here</span>
</code></pre></div></div>
<p>You can see how marionette conventions improved our code:</p>
<ul>
<li>There’s no need to bind and unbind events from the model to avoid memory leaks: modelEvents does it for you.</li>
<li>The render function is gone; marionette handles the rendering, provided you define a template.</li>
<li>There are conventional hook methods to fire code to a specific point of the view lifecycle (onRender - after DOM is inserted into, onClose after DOM elements are removed)</li>
<li>Our custom code (which is the most important thing here) is immediately visible; marionette handles all the common details.</li>
</ul>
<p>The ItemView refactoring is the simplest one to perform, and you don’t even need to initialize marionette’s higher-level facilities to use it. You can then just go over your views one at the time.</p>
<p>Couple of things to watch out for are:</p>
<ul>
<li>conventional names of functions used for closing views (in my example it was ‘teardown’ while marionette uses ‘close’ by convention).</li>
<li>if you were following a convention to return ‘this’ from ‘render’ methods, you should be good to mix the marionette ItemViews with the rest of your app. If you were lazy and return @$el instead, it can cause your marionette views to insert as blanks in the DOM.
<div class="language-js highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="nx">$</span><span class="p">(</span><span class="dl">'</span><span class="s1">#region</span><span class="dl">'</span><span class="p">).</span><span class="nx">html</span><span class="p">((</span><span class="k">new</span> <span class="nx">PostView</span><span class="p">(</span><span class="nx">model</span><span class="p">:</span> <span class="nx">model</span><span class="p">)).</span><span class="nx">render</span><span class="p">())</span> <span class="err">#</span> <span class="o">=></span> <span class="nx">will</span> <span class="nx">render</span> <span class="nx">blank</span> <span class="k">in</span> <span class="nx">marionette</span>
<span class="nx">$</span><span class="p">(</span><span class="dl">'</span><span class="s1">#region</span><span class="dl">'</span><span class="p">).</span><span class="nx">html</span><span class="p">((</span><span class="k">new</span> <span class="nx">PostView</span><span class="p">(</span><span class="nx">model</span><span class="p">:</span> <span class="nx">model</span><span class="p">)).</span><span class="nx">render</span><span class="p">().</span><span class="nx">$el</span><span class="p">)</span> <span class="err">#</span> <span class="o">=></span> <span class="nx">OK</span>
</code></pre></div> </div>
</li>
</ul>
<p>We’re going to look at better approach to view management later on.</p>
<h2 id="collectionview--compositeview">CollectionView / CompositeView</h2>
<p>Another common view use-case is displaying a collection of similar sub-views. Marionette really shines here with CollectionView and CompositeView:</p>
<div class="language-js highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="err">#</span> <span class="nx">backbone</span>
<span class="kd">class</span> <span class="nx">PostsView</span> <span class="kd">extends</span> <span class="nx">Backbone</span><span class="p">.</span><span class="nx">View</span>
<span class="nx">initialize</span><span class="p">:</span> <span class="o">-></span>
<span class="p">@</span><span class="nd">collection</span><span class="p">.</span><span class="nx">on</span><span class="p">(</span><span class="dl">'</span><span class="s1">reset add remove</span><span class="dl">'</span><span class="p">,</span> <span class="p">@</span><span class="nd">render</span><span class="p">)</span>
<span class="p">@</span><span class="nd">collection</span><span class="p">.</span><span class="nx">on</span><span class="p">(</span><span class="dl">'</span><span class="s1">request</span><span class="dl">'</span><span class="p">,</span> <span class="p">@</span><span class="nd">startFetch</span><span class="p">)</span>
<span class="nx">teardown</span><span class="p">:</span> <span class="o">-></span>
<span class="p">@</span><span class="nd">collection</span><span class="p">.</span><span class="nx">off</span><span class="p">(</span><span class="dl">'</span><span class="s1">reset add remove</span><span class="dl">'</span><span class="p">,</span> <span class="p">@</span><span class="nd">render</span><span class="p">)</span>
<span class="p">@</span><span class="nd">collection</span><span class="p">.</span><span class="nx">off</span><span class="p">(</span><span class="dl">'</span><span class="s1">request</span><span class="dl">'</span> <span class="p">@</span><span class="nd">startFetch</span><span class="p">)</span>
<span class="nx">render</span><span class="p">:</span> <span class="o">-></span>
<span class="nx">$</span><span class="p">@</span><span class="nd">el</span><span class="p">.</span><span class="nx">empty</span><span class="p">()</span>
<span class="nx">_</span><span class="p">.</span><span class="nx">each</span> <span class="p">@</span><span class="nd">models</span><span class="p">,</span> <span class="p">(</span><span class="nx">model</span><span class="p">)</span><span class="o">-></span>
<span class="p">@</span><span class="nx">$el</span><span class="p">.</span><span class="nx">append</span><span class="p">((</span><span class="k">new</span> <span class="nx">PostView</span><span class="p">(</span><span class="nx">model</span><span class="p">:</span> <span class="nx">model</span><span class="p">)).</span><span class="nx">render</span><span class="p">().</span><span class="nx">$el</span><span class="p">)</span>
<span class="k">if</span> <span class="p">@</span><span class="nd">models</span><span class="p">.</span><span class="nx">length</span> <span class="o">==</span> <span class="mi">0</span>
<span class="p">@</span><span class="nx">$el</span><span class="p">.</span><span class="nx">append</span><span class="p">(</span><span class="k">new</span> <span class="nx">NoPostsView</span><span class="p">)</span>
<span class="p">@</span>
<span class="nx">startFetch</span><span class="p">:</span> <span class="o">-></span>
<span class="err">#</span> <span class="k">this</span> <span class="kd">function</span> <span class="nx">executes</span> <span class="nx">when</span> <span class="nx">request</span> <span class="nx">to</span> <span class="nx">server</span> <span class="nx">is</span> <span class="nx">initiated</span>
<span class="err">#</span> <span class="nx">marionette</span>
<span class="kd">class</span> <span class="nx">PostsView</span> <span class="kd">extends</span> <span class="nx">Marionette</span><span class="p">.</span><span class="nx">CollectionView</span>
<span class="nx">itemView</span><span class="p">:</span> <span class="nx">PostView</span>
<span class="nx">emptyView</span><span class="p">:</span> <span class="nx">NoPostsView</span>
<span class="nx">collectionEvents</span><span class="p">:</span>
<span class="dl">'</span><span class="s1">request</span><span class="dl">'</span><span class="p">:</span> <span class="dl">'</span><span class="s1">startFetch</span><span class="dl">'</span>
<span class="nx">startFetch</span><span class="p">:</span> <span class="o">-></span>
<span class="err">#</span> <span class="k">this</span> <span class="kd">function</span> <span class="nx">executes</span> <span class="nx">when</span> <span class="nx">request</span> <span class="nx">to</span> <span class="nx">server</span> <span class="nx">is</span> <span class="nx">initiated</span>
</code></pre></div></div>
<p>Benefits of using CollectionView include:</p>
<ul>
<li>Boilerplate code handling all collection changes are gone.</li>
<li>Closing of sub-views is taken care of behind the scenes. Say goodbye to zombie objects and memory leaks.</li>
<li>with the emptyView option, you don’t have to put if-statements in order to display a message for empty content. A separate view will be rendered automatically when the collection is empty.</li>
<li>collectionEvents works similarly to modelEvents on ItemView.</li>
</ul>
<p>CompositeView extends CollectionView allowing for custom templates and adding elements besides sub-views (e.g. pagination or table headers.)</p>
<div class="language-js highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="kd">class</span> <span class="nx">PostsWithPaginationView</span> <span class="kd">extends</span> <span class="nx">Marionette</span><span class="p">.</span><span class="nx">CompositeView</span>
<span class="nx">itemView</span><span class="p">:</span> <span class="nx">PostView</span>
<span class="nx">emptyView</span><span class="p">:</span> <span class="nx">NoPostsView</span>
<span class="nx">itemViewContainer</span><span class="p">:</span> <span class="dl">'</span><span class="s1">.items</span><span class="dl">'</span>
<span class="nx">template</span><span class="p">:</span> <span class="o">-></span> <span class="dl">"</span><span class="s2"><div class='items'></div><div class='pagination'></span><span class="dl">"</span>
<span class="nx">onRender</span><span class="p">:</span> <span class="o">-></span>
<span class="err">#</span> <span class="nx">initialize</span> <span class="nx">pagination</span> <span class="nx">plugin</span>
</code></pre></div></div>
<p>Finding locations suitable for CollectionView/CompositeView refactoring is easy—just grep your codebase for looping over the collection in render method.</p>
<p>Remember, these classes extend from Marionette.View which in turn extends from Backbone.View. If you need to leave backbone stuff, you can still do it.</p>
<h2 id="layout--regions">Layout / Regions</h2>
<p>This is my personal favourite feature of marionette. Layout is a specialized view all about managing views in separate regions. It takes care of closing the previous view if the region was occupied, too. The process is better illustrated with a code sample:</p>
<div class="language-js highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="kd">class</span> <span class="nx">PostDashboardView</span> <span class="kd">extends</span> <span class="nx">Marionette</span><span class="p">.</span><span class="nx">Layout</span>
<span class="nx">template</span><span class="p">:</span> <span class="o">-></span> <span class="dl">"</span><span class="s2"><div id='posts-region'></div><div id='new-post-region'></div></span><span class="dl">"</span>
<span class="nx">regions</span><span class="p">:</span>
<span class="nx">postsRegion</span><span class="p">:</span> <span class="dl">'</span><span class="s1">#posts-region</span><span class="dl">'</span>
<span class="nx">newPostRegion</span><span class="p">:</span> <span class="dl">'</span><span class="s1">#new-post-region</span><span class="dl">'</span>
<span class="nx">layout</span> <span class="o">=</span> <span class="k">new</span> <span class="nx">PostDashboardView</span>
<span class="nx">postsView</span> <span class="o">=</span> <span class="k">new</span> <span class="nx">PostsView</span><span class="p">(</span><span class="nx">collection</span><span class="p">:</span> <span class="k">new</span> <span class="nx">Posts</span><span class="p">)</span>
<span class="nx">newPostView</span> <span class="o">=</span> <span class="k">new</span> <span class="nx">NewPostView</span>
<span class="nx">layout</span><span class="p">.</span><span class="nx">render</span><span class="p">()</span>
<span class="nx">layout</span><span class="p">.</span><span class="nx">postsRegion</span><span class="p">.</span><span class="nx">show</span><span class="p">(</span><span class="nx">postsView</span><span class="p">)</span> <span class="err">#</span> <span class="nx">backbone</span><span class="p">:</span> <span class="p">@</span><span class="nx">$</span><span class="p">(</span><span class="dl">'</span><span class="s1">#posts-region</span><span class="dl">'</span><span class="p">).</span><span class="nx">html</span><span class="p">(</span><span class="nx">postsView</span><span class="p">.</span><span class="nx">render</span><span class="p">().</span><span class="nx">$el</span><span class="p">)</span>
<span class="nx">layout</span><span class="p">.</span><span class="nx">newPostRegion</span><span class="p">.</span><span class="nx">show</span><span class="p">(</span><span class="nx">newPostView</span><span class="p">)</span>
<span class="nx">layout</span><span class="p">.</span><span class="nx">postsRegion</span><span class="p">.</span><span class="nx">close</span><span class="p">()</span> <span class="err">#</span> <span class="nx">backbone</span><span class="p">:</span> <span class="nx">postsView</span><span class="p">.</span><span class="nx">remove</span><span class="p">()</span>
<span class="nx">layout</span><span class="p">.</span><span class="nx">newPostRegion</span><span class="p">.</span><span class="nx">show</span><span class="p">(</span><span class="k">new</span> <span class="nx">SomeOtherView</span><span class="p">)</span> <span class="err">#</span> <span class="nx">closes</span> <span class="nx">newPostView</span> <span class="nx">and</span> <span class="nx">renders</span> <span class="nx">SomeOtherView</span>
</code></pre></div></div>
<p>You might see how view management with Layout is more about showing views in regions rather than inserting HTML into the DOM.</p>
<p>For refactoring, I’d first add a MainLayout class with one mainRegion, render it to a page</p>
<p>after initialization, and then insert specific views (which should be marionette classes by now) into the mainRegion, when needed (typically in backbone router).</p>
<div class="language-js highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="kd">class</span> <span class="nx">MainLayout</span> <span class="kd">extends</span> <span class="nx">Marionette</span><span class="p">.</span><span class="nx">Layout</span>
<span class="nx">template</span><span class="p">:</span> <span class="o">-></span> <span class="dl">"</span><span class="s2"><div id='main-region'></div></span><span class="dl">"</span>
<span class="nx">regions</span><span class="p">:</span>
<span class="nx">mainRegion</span><span class="p">:</span> <span class="dl">'</span><span class="s1">#main-region</span><span class="dl">'</span>
<span class="err">#</span> <span class="nx">application</span> <span class="nx">startup</span>
<span class="nx">App</span><span class="p">.</span><span class="nx">mainLayout</span> <span class="o">=</span> <span class="k">new</span> <span class="nx">MainLayout</span>
<span class="nx">$</span><span class="p">(</span><span class="dl">"</span><span class="s2">body</span><span class="dl">"</span><span class="p">).</span><span class="nx">html</span><span class="p">(@</span><span class="nd">mainLayout</span><span class="p">.</span><span class="nx">render</span><span class="p">().</span><span class="nx">$el</span><span class="p">)</span>
<span class="err">#</span> <span class="nx">somewhere</span> <span class="k">in</span> <span class="nx">a</span> <span class="nx">router</span>
<span class="nx">App</span><span class="p">.</span><span class="nx">mainLayout</span><span class="p">.</span><span class="nx">mainRegion</span><span class="p">.</span><span class="nx">show</span><span class="p">(</span><span class="k">new</span> <span class="nx">OtherView</span><span class="p">)</span> <span class="err">#</span> <span class="nx">renders</span> <span class="nx">OtherView</span> <span class="k">in</span> <span class="nx">html</span> <span class="nx">body</span><span class="p">,</span> <span class="nx">closing</span> <span class="nx">previous</span> <span class="nx">view</span> <span class="k">if</span> <span class="nx">exists</span>
</code></pre></div></div>
<p>Then, I’d recommend to look for large ItemViews which initialize multiple other views and render it into the DOM, and convert them into Layouts (yes, Layout extends ItemView too). A typical example would be a Layout with 3 regions: header, content and footer. Because layout acts as a view, you can even show Layouts inside a region of another Layout, creating nested structures if needed.</p>
<h2 id="adding-higher-level-components">Adding higher-level components</h2>
<p>So far so good; We greatly improved our views without changing the app’s global architecture. The next steps are a little more complicated, as they involve adding controllers and routers.</p>
<p>In backbone, it’s a bit weird to place setup code for entities (e.g. models, collections), or invoke higher-level operations in router events or a view. Marionette provides a controller object to solve this.</p>
<p>The first step of refactoring involves adding a global marionette Application object.
Application = new Marionette.Application</p>
<div class="language-js highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="err">#</span> <span class="k">this</span> <span class="nx">will</span> <span class="nx">replace</span> <span class="nx">your</span> <span class="nx">mainLayout</span>
<span class="nx">Application</span><span class="p">.</span><span class="nx">addRegions</span>
<span class="nx">mainRegion</span><span class="p">:</span> <span class="dl">'</span><span class="s1">body</span><span class="dl">'</span>
<span class="nx">Application</span><span class="p">.</span><span class="nx">on</span> <span class="dl">'</span><span class="s1">initialize:after</span><span class="dl">'</span><span class="p">,</span> <span class="o">-></span>
<span class="nx">Backbone</span><span class="p">.</span><span class="nx">history</span><span class="p">.</span><span class="nx">start</span><span class="p">()</span>
<span class="err">#</span> <span class="nx">OtherView</span> <span class="nx">definition</span>
<span class="nx">Application</span><span class="p">.</span><span class="nx">module</span> <span class="dl">'</span><span class="s1">Views.Submodule</span><span class="dl">'</span><span class="p">,</span> <span class="p">(</span><span class="nx">Submodule</span><span class="p">,</span> <span class="nx">Application</span><span class="p">,</span> <span class="nx">Backbone</span><span class="p">,</span> <span class="nx">Marionete</span><span class="p">,</span> <span class="nx">$</span><span class="p">,</span> <span class="nx">_</span><span class="p">)</span> <span class="o">-></span>
<span class="kd">class</span> <span class="nx">Submodule</span><span class="p">.</span><span class="nx">OtherView</span> <span class="kd">extends</span> <span class="nx">Marionette</span><span class="p">.</span><span class="nx">ItemView</span>
<span class="nx">Application</span><span class="p">.</span><span class="nx">start</span><span class="p">()</span>
<span class="err">#</span> <span class="nx">somewhere</span> <span class="k">in</span> <span class="nx">a</span> <span class="nx">router</span>
<span class="nx">Application</span><span class="p">.</span><span class="nx">mainRegion</span><span class="p">.</span><span class="nx">show</span><span class="p">(</span><span class="k">new</span> <span class="nx">Application</span><span class="p">.</span><span class="nx">Submodule</span><span class="p">.</span><span class="nx">OtherView</span><span class="p">)</span>
</code></pre></div></div>
<p>Notice marionette’s pattern for initializing components, the module name, which can include sub-modules which are automatically created, and a function that takes 6 arguments: the module object, application object, backbone, marionette, jQuery and underscore.</p>
<p>It’s a good idea to change the definition of all the other components to the new way now.</p>
<p>When our Application object is defined, further refactoring would break up existing routers into controller/router tuples, living in their modules:</p>
<div class="language-js highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="nx">Application</span><span class="p">.</span><span class="nx">module</span> <span class="dl">'</span><span class="s1">Posts</span><span class="dl">'</span><span class="p">,</span> <span class="p">(</span><span class="nx">Posts</span><span class="p">,</span> <span class="nx">Application</span><span class="p">,</span> <span class="nx">Backbone</span><span class="p">,</span> <span class="nx">Marionete</span><span class="p">,</span> <span class="nx">$</span><span class="p">,</span> <span class="nx">_</span><span class="p">)</span> <span class="o">-></span>
<span class="nx">Posts</span><span class="p">.</span><span class="nx">Router</span> <span class="o">=</span> <span class="nx">Marionette</span><span class="p">.</span><span class="nx">AppRouter</span><span class="p">.</span><span class="nx">extend</span>
<span class="nx">appRoutes</span><span class="p">:</span>
<span class="dl">'</span><span class="s1">post/:id</span><span class="dl">'</span><span class="p">:</span> <span class="dl">'</span><span class="s1">show</span><span class="dl">'</span>
<span class="kd">class</span> <span class="nx">Posts</span><span class="p">.</span><span class="nx">Controller</span>
<span class="nx">show</span><span class="p">:</span> <span class="p">(</span><span class="nx">id</span><span class="p">)</span><span class="o">-></span>
<span class="nx">post</span> <span class="o">=</span> <span class="k">new</span> <span class="nx">Post</span><span class="p">(</span><span class="nx">id</span><span class="p">:</span> <span class="nx">id</span><span class="p">)</span>
<span class="nx">view</span> <span class="o">=</span> <span class="k">new</span> <span class="nx">Posts</span><span class="p">.</span><span class="nx">Views</span><span class="p">.</span><span class="nx">Post</span><span class="p">(</span><span class="nx">model</span><span class="p">:</span> <span class="nx">post</span><span class="p">)</span>
<span class="nx">Application</span><span class="p">.</span><span class="nx">mainRegion</span><span class="p">.</span><span class="nx">show</span><span class="p">(</span><span class="nx">view</span><span class="p">)</span>
<span class="nx">post</span><span class="p">.</span><span class="nx">fetch</span><span class="p">()</span>
<span class="nx">Game</span><span class="p">.</span><span class="nx">addInitializer</span> <span class="o">-></span>
<span class="k">new</span> <span class="nx">Game</span><span class="p">.</span><span class="nx">Router</span>
<span class="nx">controller</span><span class="p">:</span> <span class="k">new</span> <span class="nx">Game</span><span class="p">.</span><span class="nx">Controller</span>
</code></pre></div></div>
<p>The Router defines a map of route-functions which a Controller implements. A good indication of a potential controller is a backbone route-function which initializes a large view (especially a Layout).</p>
<h2 id="inter-component-communication">Inter-component communication</h2>
<p>So, we have all these controllers and views, but how do they communicate with each other? Marionette solves this with patterns which help clean up the application, resulting in clean, modular code.</p>
<h2 id="request-response">Request-Response</h2>
<p>We can define a request-response handler to abstract some of the common initialization code (e.g. getting view instances or model instances). In this case, the caller cares about the return value.</p>
<div class="language-js highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="err">#</span> <span class="nx">define</span> <span class="nx">responses</span>
<span class="nx">Application</span><span class="p">.</span><span class="nx">reqres</span><span class="p">.</span><span class="nx">setHandler</span> <span class="dl">"</span><span class="s2">post:new</span><span class="dl">"</span><span class="p">,</span> <span class="o">-></span>
<span class="k">new</span> <span class="nx">Post</span>
<span class="nx">Application</span><span class="p">.</span><span class="nx">reqres</span><span class="p">.</span><span class="nx">setHandler</span> <span class="dl">"</span><span class="s2">post:get</span><span class="dl">"</span><span class="p">,</span> <span class="p">(</span><span class="nx">id</span><span class="p">)</span> <span class="o">-></span>
<span class="nx">post</span> <span class="o">=</span> <span class="k">new</span> <span class="nx">Post</span><span class="p">(</span><span class="nx">id</span><span class="p">:</span> <span class="nx">id</span><span class="p">)</span>
<span class="nx">post</span><span class="p">.</span><span class="nx">fetch</span><span class="p">()</span>
<span class="nx">post</span>
<span class="err">#</span> <span class="nx">request</span> <span class="nx">a</span> <span class="nx">response</span>
<span class="nx">Application</span><span class="p">.</span><span class="nx">request</span><span class="p">(</span><span class="dl">"</span><span class="s2">post:get</span><span class="dl">"</span><span class="p">,</span> <span class="mi">10</span><span class="p">)</span>
</code></pre></div></div>
<h2 id="commands">Commands</h2>
<p>The command pattern differs from request-response in that we don’t care about the return value. The component just invokes the command and lets the application handle it. While sometimes useful, I’d recommend having as little of them as possible. This is because commands tend to become bags of code that don’t really belong anywhere else. An example of a command would be ‘logout’ or ‘navigate’ event.</p>
<div class="language-js highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="nx">Application</span><span class="p">.</span><span class="nx">commands</span><span class="p">.</span><span class="nx">setHandler</span> <span class="dl">'</span><span class="s1">logout</span><span class="dl">'</span><span class="p">,</span> <span class="o">-></span>
<span class="nx">Application</span><span class="p">.</span><span class="nx">currentUser</span> <span class="o">=</span> <span class="kc">null</span>
<span class="nx">Application</span><span class="p">.</span><span class="nx">mainRegion</span><span class="p">.</span><span class="nx">show</span><span class="p">(</span><span class="k">new</span> <span class="nx">HomepageView</span><span class="p">)</span>
<span class="nx">Application</span><span class="p">.</span><span class="nx">execute</span><span class="p">(</span><span class="dl">'</span><span class="s1">navigate</span><span class="dl">'</span> <span class="dl">'</span><span class="s1">/</span><span class="dl">'</span><span class="p">)</span>
<span class="nx">Application</span><span class="p">.</span><span class="nx">commands</span><span class="p">.</span><span class="nx">setHandler</span> <span class="dl">'</span><span class="s1">navigate</span><span class="dl">'</span><span class="p">,</span> <span class="p">(</span><span class="nx">path</span><span class="p">)</span> <span class="o">-></span>
<span class="nx">Backbone</span><span class="p">.</span><span class="nx">history</span><span class="p">.</span><span class="nx">navigate</span><span class="p">(</span><span class="nx">path</span><span class="p">)</span>
<span class="nx">Application</span><span class="p">.</span><span class="nx">execute</span><span class="p">(</span><span class="dl">'</span><span class="s1">logout</span><span class="dl">'</span><span class="p">)</span>
</code></pre></div></div>
<p>Marionette provides a global messaging bus (called a vent) where components can subscribe to or publish events. This is useful because it separates the event source from the reaction to it. One component can trigger an event, and multiple other components can react in different ways.</p>
<div class="language-js highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="err">#</span> <span class="nx">defined</span> <span class="k">in</span> <span class="nx">component</span> <span class="mi">1</span>
<span class="p">@</span><span class="nd">listenTo</span> <span class="nx">Application</span><span class="p">.</span><span class="nx">vent</span><span class="p">,</span> <span class="dl">"</span><span class="s2">someevent</span><span class="dl">"</span><span class="p">,</span> <span class="p">(</span><span class="nx">argument</span><span class="p">)</span><span class="o">-></span>
<span class="err">#</span> <span class="k">do</span> <span class="nx">something</span> <span class="kd">with</span> <span class="nx">argument</span>
<span class="err">#</span> <span class="nx">defined</span> <span class="k">in</span> <span class="nx">component</span> <span class="mi">2</span>
<span class="p">@</span><span class="nd">listenTo</span> <span class="nx">Application</span><span class="p">.</span><span class="nx">vent</span><span class="p">,</span> <span class="dl">"</span><span class="s2">someevent</span><span class="dl">"</span><span class="p">,</span> <span class="p">(</span><span class="nx">argument</span><span class="p">)</span><span class="o">-></span>
<span class="err">#</span> <span class="k">do</span> <span class="nx">something</span> <span class="k">else</span> <span class="kd">with</span> <span class="nx">argument</span>
<span class="err">#</span> <span class="nx">defined</span> <span class="k">in</span> <span class="nx">component</span> <span class="mi">3</span>
<span class="nx">Application</span><span class="p">.</span><span class="nx">vent</span><span class="p">.</span><span class="nx">trigger</span><span class="p">(</span><span class="dl">"</span><span class="s2">someevent</span><span class="dl">"</span><span class="p">,</span> <span class="dl">"</span><span class="s2">foo</span><span class="dl">"</span><span class="p">)</span>
</code></pre></div></div>
<h2 id="conclusion">Conclusion</h2>
<p>As I’ve hopefully demonstrated, the process of refactoring backbone applications to marionette is a continuous one. It can be nicely broken into phases, so even a large application can be converted with ease. You can also decide to not take full advantage of marionette’s power and stop at the VIew step, where the codebase will still be greatly improved.</p>
<p>Comparing the two applications reveals obvious benefits, like greater conventions in the code and reduced boilerplate (deleting unneeded code always feels great!). Non-visible benefits include better memory management.</p>
<p>Notice that I didn’t touch upon models or collections; Marionette does not improve upon on them, meaning you can use your existing backbone plugins and extensions, which is great!</p>yashumittalDespite its popularity, backbone.js has many drawbacks. With a steep learning curve, shortage of opinionated patterns, lots of boilerplate code, and poor memory management/cleanup strategies, backbone usage can be discouraging. In this article, I will focus on how to refactor a backbone application using marionette.js —a framework that can mitigate many of backbone’s shortcomings.
https://cdn.codecarrot.net/images/harli-marten-135841.jpg
React Component Patterns2017-11-12T08:25:00+00:002017-11-12T08:25:00+00:00https://blog.codecarrot.net/react-component-patterns<p>It’s been a while since I’ve been working with <a href="//facebook.github.io/react/">React</a> — a Facebook library to build user interfaces using JavaScript — and there are a few concepts I wish I knew when I was just starting. This text is an attempt to summarize some patterns I learned during my experience so far — and also may be useful for developers who are just about to enter this awesome component-based world.</p>
<p><img src="https://cdn.codecarrot.net/images/1_mPL5M-XhGpDuXLniVRCthw.png" alt="1_mPL5M-XhGpDuXLniVRCthw.png" /></p>
<h2 id="stateful-x-stateless-components">Stateful x Stateless Components</h2>
<p>Just as Stateful and Stateless web services, React components can also hold and manipulate state during application usage (<strong>Stateful</strong>) — or just be a simple component that takes the input props and returns what to display (<strong>Stateless</strong>).</p>
<p>A simple <strong>Stateless</strong> button component that depends on props only:</p>
<p><img src="https://cdn.codecarrot.net/images/1_fgZOSwpdU7MMNxltRcXAcQ.png" alt="1_fgZOSwpdU7MMNxltRcXAcQ.png" /></p>
<p>And a <strong>Stateful</strong> counter component example (using <code class="highlighter-rouge">Button</code> component):</p>
<p><img src="https://cdn.codecarrot.net/images/1_TYPgsZUZMoo7lW7xv4gxYw.png" alt="1_TYPgsZUZMoo7lW7xv4gxYw.png" /></p>
<p>As you can see, the last one’s constructor holds a component state, while the first one is a simple component that renders a text via props. This separation of concerns may look simple but makes <code class="highlighter-rouge">Button</code> component highly reusable.</p>
<h2 id="container-x-presentational-components">Container x Presentational Components</h2>
<p>When working with external data, we can divide components into this two new categories. <code class="highlighter-rouge">Containers</code> are responsible to reach data that lives outside React scope, like connecting to Redux or Relay — while <code class="highlighter-rouge">Presentational</code> components are free of dependencies from the rest of the app, depending only on its own state or props received. Let’s take a users list as a <code class="highlighter-rouge">Presentational</code> component example:</p>
<p><img src="https://cdn.codecarrot.net/images/1_wbih6jbxJiIgNOXgRpcROA.png" alt="1_wbih6jbxJiIgNOXgRpcROA.png" /></p>
<p>This list can be updated using our <code class="highlighter-rouge">Container</code> component:</p>
<p><img src="https://cdn.codecarrot.net/images/1_TJxCVhawM2e99dZsxu11oA.png" alt="1_TJxCVhawM2e99dZsxu11oA.png" /></p>
<p>This approach divides data-fetching from rendering and also makes <code class="highlighter-rouge">UserList</code> reusable.</p>
<h2 id="higher-order-components">Higher-Order Components</h2>
<p>Higher-Order Components — or just <strong>HOCs</strong> — are useful when you want to reuse a component logic. They are JavaScript functions that take a component as an argument and returns a new component.</p>
<p>Let’s say you need to build an expandable menu component that shows some children content when user clicks on it. So, instead of controlling the state on its parent component, you can simply create a generic <strong>HOC</strong> to handle it:</p>
<p><img src="https://cdn.codecarrot.net/images/1_qchJXtrHlR46phKFDDJeeQ.png" alt="1_qchJXtrHlR46phKFDDJeeQ.png" /></p>
<p>This approach allows us to apply our logic to our <code class="highlighter-rouge">ToggleableMenu</code> component using the JavaScript <em>decorator</em> syntax:</p>
<p><img src="https://cdn.codecarrot.net/images/1_RQuGzKKbT7R9OIDBzhO8gg.png" alt="1_RQuGzKKbT7R9OIDBzhO8gg.png" /></p>
<p>Now we can pass any children to <code class="highlighter-rouge">ToggleableMenu</code> component:</p>
<p><img src="https://cdn.codecarrot.net/images/1_rWCZQqL0Rbizbrw_yjgxgA.png" alt="1_rWCZQqL0Rbizbrw_yjgxgA.png" /></p>
<p>If you’re familiar with <a href="//redux.js.org/">Redux’s</a> <code class="highlighter-rouge">connect</code> or <a href="//github.com/ReactTraining/react-router">React Router’s</a> <code class="highlighter-rouge">withRouter</code> functions, you’re already using <strong>HOCs!</strong></p>
<h2 id="render-callbacks">Render Callbacks</h2>
<p>Another great way to make a component logic reusable is by turning your component children into a function — that’s why <strong>Render Callbacks</strong> are also called <strong>Function as Child Components</strong>. We can take an example of our expandable menu <strong>HOC</strong> and rewrite it using the <strong>Render Callback</strong> pattern:</p>
<p><img src="https://cdn.codecarrot.net/images/1_Ul-ubPnaOFtY4mTeM5PW3A.png" alt="1_Ul-ubPnaOFtY4mTeM5PW3A.png" /></p>
<p>Now we can pass a function as our <code class="highlighter-rouge">Toggleable</code> component children:</p>
<p><img src="https://cdn.codecarrot.net/images/1_cwoZiIT3Gcau5lDwyCQzQw.png" alt="1_cwoZiIT3Gcau5lDwyCQzQw.png" /></p>
<p>The code above is already using a function as children, but, if we want to reuse it just as we did in our <strong>HOC</strong> example (multiple menus), we could simply create a new component that uses <code class="highlighter-rouge">Toggleable</code> logic:</p>
<p><img src="https://cdn.codecarrot.net/images/1_DVfPDwHw_eH9dUeX9w5GEg.png" alt="1_DVfPDwHw_eH9dUeX9w5GEg.png" /></p>
<p>Our brand new <code class="highlighter-rouge">ToggleableMenu</code> component is ready to be used:</p>
<p><img src="https://cdn.codecarrot.net/images/1_hzpuJMAMTRQZK_vKCK_jhQ.png" alt="1_hzpuJMAMTRQZK_vKCK_jhQ.png" /></p>
<p>Our <code class="highlighter-rouge">Menu</code> component looks exactly the same as our <strong>HOC</strong> example!</p>
<p>This approach is really useful when we want to change the rendered content itself regardless of <strong>state</strong> manipulation: as you can see, we’ve moved our <strong>render</strong> logic to our <code class="highlighter-rouge">ToggleableMenu</code> children function, but kept the <strong>state</strong> logic to our <code class="highlighter-rouge">Toggleable</code> component!</p>
<p>This post is written by <a href="//medium.com/@gmatheus">Gustavo Matheus</a>.</p>yashumittalIt’s been a while since I’ve been working with React — a Facebook library to build user interfaces using JavaScript — and there are a few concepts I wish I knew when I was just starting. This text is an attempt to summarize some patterns I learned during my experience so far — and also may be useful for developers who are just about to enter this awesome component-based world.
https://cdn.codecarrot.net/images/1_mPL5M-XhGpDuXLniVRCthw.png
How To Use Draper Gem In Your Ruby on Rails App2017-11-12T07:54:00+00:002017-11-12T07:54:00+00:00https://blog.codecarrot.net/how-to-use-draper-gem-in-your-ruby-on-rails-app<p>Draper adds an object-oriented layer of presentation logic to your Rails application.</p>
<p>Without Draper, this functionality might have been tangled up in procedural helpers or adding bulk to your models. With Draper decorators, you can wrap your models with presentation-related logic to organise - and test - this layer of your app much more effectively.</p>
<h2 id="what-we-will-use">What we will use</h2>
<ul>
<li>Draper gem (<a href="//github.com/drapergem/draper">//github.com/drapergem/draper</a>)</li>
<li>Decorator Pattern</li>
</ul>
<p>Decorator Pattern is a design pattern which allows a developer to add an extra functionality to an object or collection of objects. It is possible to do because a decorator class wraps a decorated model and deals only with presentational issues. Also, it allows moving methods which are not related to a model strictly to separated classes make them cleaner. One of the common application is using it inside views but can be treated like an another layer of abstraction.</p>
<p>Draper is working on a model - view line but the idea of decorator pattern is not limited by any model or view. It is possible to decorate any class whatever you want.</p>
<ul>
<li>Forwardable</li>
</ul>
<p>The <a href="//ruby-doc.org/stdlib-2.3.0/libdoc/forwardable/rdoc/Forwardable.html">Forwardable</a> module provides delegation of specified methods to a designated object, using the methods <a href="//ruby-doc.org/stdlib-2.3.0/libdoc/forwardable/rdoc/Forwardable.html#method-i-def_delegator">def_delegator</a> and <a href="//ruby-doc.org/stdlib-2.3.0/libdoc/forwardable/rdoc/Forwardable.html#method-i-def_delegators">def_delegators</a>. - from the documentation (//ruby-doc.org/stdlib-2.3.0/libdoc/forwardable/rdoc/Forwardable.html)</p>
<p>IMO the syntax is not clear enough but in some situation has a huge potential and could be used instead of Draper because it is a part of std-lib of ruby and easily accessible.</p>
<h2 id="pros">Pros</h2>
<ul>
<li>Decorate an object as well as collection of objects</li>
<li>Draper’s methods are not visible in a global scope</li>
<li>Dividing methods into smaller files</li>
</ul>
<h2 id="cons">Cons</h2>
<ul>
<li>The complexity of an app is increasing because we add an extra gem (but IMHO it is worth its price because we receive a cleaner design of an app).</li>
<li>It requires working the activemodel-serializers-XML which was removed from Rails 5</li>
<li>Now (09.05.2016), there is a lot of problems with Rails 5.0-pre</li>
<li>A lack of maintainer in the project so it can cause some problems in the future, especially when new bugs are found</li>
</ul>
<h2 id="how-draper-works">How Draper works</h2>
<p><code class="highlighter-rouge">delegate_all or delegate</code></p>
<ul>
<li>delegate_all allows a developer to decorate an object by all methods define inside a decorator but it is not always a good approach, in some cases better would be just the delegate method with a name of a method which allows a developer to increase a legible of code and there is a less amount of metaprogramming.</li>
<li>delegate_all <a href="//github.com/drapergem/draper#delegating-methods">github.com/drapergem/draper#delegating-methods</a></li>
</ul>
<h2 id="step-1">Step 1</h2>
<p>Add <code class="highlighter-rouge">draper gem</code> to Gemfile</p>
<h2 id="step-2">Step 2</h2>
<p>Add a decorator class to a given class</p>
<div class="language-rb highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="k">class</span> <span class="nc">ArticleDecorator</span> <span class="o"><</span> <span class="no">Draper</span><span class="o">::</span><span class="no">Decorator</span>
<span class="n">delegate_all</span>
<span class="k">def</span> <span class="nf">introduction</span>
<span class="n">object</span><span class="p">.</span><span class="nf">body</span><span class="p">.</span><span class="nf">split</span><span class="p">[</span><span class="mi">0</span><span class="o">..</span><span class="mi">16</span><span class="p">].</span><span class="nf">join</span><span class="p">(</span><span class="s1">' '</span><span class="p">)</span>
<span class="k">end</span>
<span class="k">end</span>
</code></pre></div></div>
<div class="language-rb highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="k">class</span> <span class="nc">AuthorDecorator</span> <span class="o"><</span> <span class="no">Draper</span><span class="o">::</span><span class="no">Decorator</span>
<span class="n">delegate_all</span>
<span class="k">def</span> <span class="nf">fullname</span>
<span class="n">object</span><span class="p">.</span><span class="nf">first_name</span> <span class="o">+</span> <span class="s2">" "</span> <span class="o">+</span> <span class="n">object</span><span class="p">.</span><span class="nf">last_name</span>
<span class="k">end</span>
<span class="k">def</span> <span class="nf">created_at</span>
<span class="n">object</span><span class="p">.</span><span class="nf">created_at</span><span class="p">.</span><span class="nf">strftime</span><span class="p">(</span><span class="s2">"%a %m/%d/%y"</span><span class="p">)</span>
<span class="k">end</span>
<span class="k">end</span>
</code></pre></div></div>
<p>Use <code class="highlighter-rouge">object</code> in order to class an instance of a model which will be decorated by your methods.</p>
<h2 id="step-3">Step 3</h2>
<p>Do not forget about decorating your class in a controller by invoking <code class="highlighter-rouge">decorate</code> method on an instance of a model. Also, you can do it inside a view but it is not a good approach to a problem.</p>
<p><strong>See example below:</strong></p>
<div class="language-rb highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="k">class</span> <span class="nc">ArticlesPresenter</span> <span class="o"><</span> <span class="no">BasePresenter</span>
<span class="k">def</span> <span class="nf">initialize</span><span class="p">(</span><span class="n">model</span><span class="p">,</span> <span class="n">view</span><span class="p">)</span>
<span class="vi">@model</span><span class="p">,</span> <span class="vi">@view</span> <span class="o">=</span> <span class="n">model</span><span class="p">,</span> <span class="n">view</span>
<span class="k">end</span>
<span class="k">def</span> <span class="nf">h</span>
<span class="n">view</span>
<span class="k">end</span>
<span class="k">def</span> <span class="nf">decorate</span>
<span class="n">model</span><span class="p">.</span><span class="nf">map</span> <span class="p">{</span> <span class="o">|</span><span class="n">item</span><span class="o">|</span> <span class="n">item</span><span class="p">.</span><span class="nf">decorate</span> <span class="p">}</span>
<span class="k">end</span>
<span class="kp">private</span>
<span class="nb">attr_accessor</span> <span class="ss">:model</span><span class="p">,</span> <span class="ss">:view</span>
<span class="k">end</span>
</code></pre></div></div>
<p>I have decorated items in a presenter which allows me to do more with a data presentation in future but you can decorate an object in a controller.</p>
<h2 id="summary">Summary</h2>
<p>I think draper gem is mature and allows a developer to write methods which add extra functionality to its data. Actually, one of the biggest problem of draper gem is that it is not working with Rails 5 correctly and its team has got a problem with a lack of maintainer.</p>
<p>It is a powerful tool, especially when a developer uses it with the presenter pattern. These two things allow a developer to make thinner controllers and models and move a logic related to presenting data in a cleaner way.</p>yashumittalDraper adds an object-oriented layer of presentation logic to your Rails application.
https://cdn.codecarrot.net/images/9503a57339ac09104f7d44082834e709.jpg
A Guide to Automating & Scraping the Web with JavaScript (Chrome + Puppeteer + Node JS)2017-11-10T10:21:00+00:002017-11-10T10:21:00+00:00https://blog.codecarrot.net/a-guide-to-automating-scraping-the-web-with-javascript-chrome-puppeteer-node-js<h2 id="puppetter">Puppetter</h2>
<p>Learn to Automate and Scrape the web with Headless Chrome</p>
<p><img src="https://cdn.codecarrot.net/images/1_kk8ovQKB-45FsZ8TZM-vjg.png" alt="Puppeteer Logo" /></p>
<p><strong>What Will We Learn?</strong></p>
<p>In this tutorial you’ll learn how to automate and scrape the web with JavaScript. To do this, we’ll use Puppeteer. <em><a href="//github.com/GoogleChrome/puppeteer">Puppeteer</a></em> is a Node library API that allows us to control <em><a href="//developers.google.com/web/updates/2017/04/headless-chrome">headless Chrome</a></em>. Headless Chrome is a way to run the Chrome Browser without actually running Chrome.</p>
<p>If none of that makes any sense, all you really need to know is that we’ll be writing JavaScript code that will automate Google Chrome.</p>
<h2 id="before-starting">Before Starting</h2>
<p>Before starting you’ll need to have Node 8+ installed on your computer. You can install it <strong><a href="//nodejs.org/en/">here</a></strong>. Make sure to choose the “Current” version as it is 8+.</p>
<p>Once you have Node installed, create a new project folder and install Puppeteer. Puppeteer comes with a recent version of Chromium that is guaranteed to work with the API:</p>
<div class="highlighter-rouge"><div class="highlight"><pre class="highlight"><code>npm install --save puppeteer
</code></pre></div></div>
<h2 id="example-1--taking-a-screenshot">Example #1 — Taking a Screenshot</h2>
<p>Once you have Puppeteer installed, we’re going to walk through a simple example first. This example is straight from the Puppeteer documentation (with minor changes). The code we’ll walkthrough will take a screenshot of any website you tell it to.</p>
<p>To start out, create a file named <code class="highlighter-rouge">test.js</code> and copy in the below code:</p>
<div class="language-js highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="kd">const</span> <span class="nx">puppeteer</span> <span class="o">=</span> <span class="nx">require</span><span class="p">(</span><span class="dl">'</span><span class="s1">puppeteer</span><span class="dl">'</span><span class="p">);</span>
<span class="k">async</span> <span class="kd">function</span> <span class="nx">getPic</span><span class="p">()</span> <span class="p">{</span>
<span class="kd">const</span> <span class="nx">browser</span> <span class="o">=</span> <span class="k">await</span> <span class="nx">puppeteer</span><span class="p">.</span><span class="nx">launch</span><span class="p">();</span>
<span class="kd">const</span> <span class="nx">page</span> <span class="o">=</span> <span class="k">await</span> <span class="nx">browser</span><span class="p">.</span><span class="nx">newPage</span><span class="p">();</span>
<span class="k">await</span> <span class="nx">page</span><span class="p">.</span><span class="nx">goto</span><span class="p">(</span><span class="dl">'</span><span class="s1">//google.com</span><span class="dl">'</span><span class="p">);</span>
<span class="k">await</span> <span class="nx">page</span><span class="p">.</span><span class="nx">screenshot</span><span class="p">({</span><span class="na">path</span><span class="p">:</span> <span class="dl">'</span><span class="s1">google.png</span><span class="dl">'</span><span class="p">});</span>
<span class="k">await</span> <span class="nx">browser</span><span class="p">.</span><span class="nx">close</span><span class="p">();</span>
<span class="p">}</span>
<span class="nx">getPic</span><span class="p">();</span>
</code></pre></div></div>
<p>Let’s walk through this example line by line.</p>
<ul>
<li><strong>Line 1:</strong> We require our Puppeteer dependency that we installed earlier</li>
<li><strong>Line 3–10:</strong> This is our main function <code class="highlighter-rouge">getPic()</code>. This function will hold all of our automation code.</li>
<li><strong>Line 12:</strong> On line 12 we are invoking our <code class="highlighter-rouge">getPic()</code> function. <em>(Running the function)</em>.</li>
</ul>
<p>Something important to note is that our <code class="highlighter-rouge">getPic()</code> function is an <code class="highlighter-rouge">async</code> function and makes use of the new ES 2017 <code class="highlighter-rouge">async/await</code> features. Because this function is asynchronous, when it is called it returns a <code class="highlighter-rouge">Promise</code>. When the <code class="highlighter-rouge">async</code> function finally returns a value, the <code class="highlighter-rouge">Promise</code> will resolve (or <code class="highlighter-rouge">Reject</code> if there is an error).</p>
<p>Since we’re using an <code class="highlighter-rouge">async</code> function, we can use the <code class="highlighter-rouge">await</code> expression which will pause the function execution and wait for the <code class="highlighter-rouge">Promise</code> to resolve before moving on. <strong>It’s okay if none of this makes sense right now.</strong> It will become clearer as we continue with the tutorial.</p>
<p>Now that we’ve outlined our main function, lets dive into its inner workings:</p>
<ul>
<li><strong>Line 4:</strong></li>
</ul>
<div class="language-js highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="kd">const</span> <span class="nx">browser</span> <span class="o">=</span> <span class="k">await</span> <span class="nx">puppeteer</span><span class="p">.</span><span class="nx">launch</span><span class="p">();</span>
</code></pre></div></div>
<p>This is where we actually launch puppeteer. We’re essentially launching an instance of Chrome and setting it equal to our newly created <code class="highlighter-rouge">browser</code> variable. Because we’ve also used the <code class="highlighter-rouge">await</code> keyword, the function will pause here until our <code class="highlighter-rouge">Promise</code> resolves (until we either successfully created our instance of Chrome, or errored out)</p>
<ul>
<li><strong>Line 5:</strong></li>
</ul>
<div class="language-js highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="kd">const</span> <span class="nx">page</span> <span class="o">=</span> <span class="k">await</span> <span class="nx">browser</span><span class="p">.</span><span class="nx">newPage</span><span class="p">();</span>
</code></pre></div></div>
<p>Here we create a new page in our automated browser. We wait for the new <code class="highlighter-rouge">page</code> to open and save it to our page variable.</p>
<ul>
<li><strong>Line 6:</strong></li>
</ul>
<div class="language-js highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="k">await</span> <span class="nx">page</span><span class="p">.</span><span class="nx">goto</span><span class="p">(</span><span class="dl">'</span><span class="s1">//google.com</span><span class="dl">'</span><span class="p">);</span>
</code></pre></div></div>
<p>Using our page that we created in the last line of code, we can now tell our <code class="highlighter-rouge">page</code> to navigate to a URL. In this example, we’re navigating to google. Our code will pause until the <code class="highlighter-rouge">page</code> has loaded.</p>
<ul>
<li><strong>Line 7:</strong></li>
</ul>
<div class="language-js highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="k">await</span> <span class="nx">page</span><span class="p">.</span><span class="nx">screenshot</span><span class="p">({</span><span class="na">path</span><span class="p">:</span> <span class="dl">'</span><span class="s1">google.png</span><span class="dl">'</span><span class="p">});</span>
</code></pre></div></div>
<p>Now we’re telling Puppeteer to to take a <code class="highlighter-rouge">screenshot</code> of the current page. The <code class="highlighter-rouge">screenshot()</code> method takes an object as a parameter which is where we can customize the save location of our <code class="highlighter-rouge">.png</code> screenshot. Again, we’ve used the <code class="highlighter-rouge">await</code> keyword, so our code pauses while the action occurs.</p>
<ul>
<li><strong>Line 9:</strong></li>
</ul>
<div class="language-js highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="k">await</span> <span class="nx">browser</span><span class="p">.</span><span class="nx">close</span><span class="p">();</span>
</code></pre></div></div>
<p>Finally, we have reached the end of the <code class="highlighter-rouge">getPic()</code> function and we close down our <code class="highlighter-rouge">browser</code>.</p>
<h2 id="running-the-example">Running the Example</h2>
<p>You can run the sample code above with Node:</p>
<div class="language-js highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="nx">node</span> <span class="nx">test</span><span class="p">.</span><span class="nx">js</span>
</code></pre></div></div>
<p>And here’s the resulting screenshot:</p>
<p><img src="https://cdn.codecarrot.net/images/1_OHQ4myaGuBWxqkJ_G1hxoA.png" alt="1_OHQ4myaGuBWxqkJ_G1hxoA.png" /></p>
<p>Awesome! For added fun (and easier debugging) we can run our code in a non-headless manner.</p>
<p>What exactly does this mean? Try it out for yourself and see. Change line 4 of your code from this:</p>
<div class="language-js highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="kd">const</span> <span class="nx">browser</span> <span class="o">=</span> <span class="k">await</span> <span class="nx">puppeteer</span><span class="p">.</span><span class="nx">launch</span><span class="p">();</span>
</code></pre></div></div>
<p>to this:</p>
<div class="language-js highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="kd">const</span> <span class="nx">browser</span> <span class="o">=</span> <span class="k">await</span> <span class="nx">puppeteer</span><span class="p">.</span><span class="nx">launch</span><span class="p">({</span><span class="na">headless</span><span class="p">:</span> <span class="kc">false</span><span class="p">});</span>
</code></pre></div></div>
<p>And then run again with Node:</p>
<div class="language-js highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="nx">node</span> <span class="nx">test</span><span class="p">.</span><span class="nx">js</span>
</code></pre></div></div>
<p>Pretty cool huh? When we run with <code class="highlighter-rouge">{headless: false}</code> you can actually watch Google Chrome work as it navigates through your code.</p>
<p>We’re going to do one last thing with this code before moving on. Remember how our screenshot was a little off center? Well that’s because our page was a little small. We can change the size of our page by adding in this line of code:</p>
<div class="language-js highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="k">await</span> <span class="nx">page</span><span class="p">.</span><span class="nx">setViewport</span><span class="p">({</span><span class="na">width</span><span class="p">:</span> <span class="mi">1000</span><span class="p">,</span> <span class="na">height</span><span class="p">:</span> <span class="mi">500</span><span class="p">})</span>
</code></pre></div></div>
<p>Which results in this much nicer looking screenshot:</p>
<p><img src="https://cdn.codecarrot.net/images/1_5nobu4vdUesXZg1cgWlySg.png" alt="1_5nobu4vdUesXZg1cgWlySg.png" /></p>
<p>Here’s what our final code for this example looks like:</p>
<div class="language-js highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="kd">const</span> <span class="nx">puppeteer</span> <span class="o">=</span> <span class="nx">require</span><span class="p">(</span><span class="dl">'</span><span class="s1">puppeteer</span><span class="dl">'</span><span class="p">);</span>
<span class="k">async</span> <span class="kd">function</span> <span class="nx">getPic</span><span class="p">()</span> <span class="p">{</span>
<span class="kd">const</span> <span class="nx">browser</span> <span class="o">=</span> <span class="k">await</span> <span class="nx">puppeteer</span><span class="p">.</span><span class="nx">launch</span><span class="p">({</span><span class="na">headless</span><span class="p">:</span> <span class="kc">false</span><span class="p">});</span>
<span class="kd">const</span> <span class="nx">page</span> <span class="o">=</span> <span class="k">await</span> <span class="nx">browser</span><span class="p">.</span><span class="nx">newPage</span><span class="p">();</span>
<span class="k">await</span> <span class="nx">page</span><span class="p">.</span><span class="nx">goto</span><span class="p">(</span><span class="dl">'</span><span class="s1">//google.com</span><span class="dl">'</span><span class="p">);</span>
<span class="k">await</span> <span class="nx">page</span><span class="p">.</span><span class="nx">setViewport</span><span class="p">({</span><span class="na">width</span><span class="p">:</span> <span class="mi">1000</span><span class="p">,</span> <span class="na">height</span><span class="p">:</span> <span class="mi">500</span><span class="p">})</span>
<span class="k">await</span> <span class="nx">page</span><span class="p">.</span><span class="nx">screenshot</span><span class="p">({</span><span class="na">path</span><span class="p">:</span> <span class="dl">'</span><span class="s1">google.png</span><span class="dl">'</span><span class="p">});</span>
<span class="k">await</span> <span class="nx">browser</span><span class="p">.</span><span class="nx">close</span><span class="p">();</span>
<span class="p">}</span>
<span class="nx">getPic</span><span class="p">();</span>
</code></pre></div></div>
<h2 id="example-2--lets-scrape-some-data">Example #2 — Lets Scrape some Data</h2>
<p>Now that you know the basics of how Headless Chrome and Puppeteer Work, lets look at a more complex example where we actually get to scrape some data.</p>
<p>First, <a href="//github.com/GoogleChrome/puppeteer/blob/master/docs/api.md#">take a look at the API documentation for Puppeteer Here</a>. As you’ll see, there’s a TON of different methods we can use to not only click around on a website, but also to fill out forms, type things, and read data.</p>
<p>In this tutorial we’re going to scrape Books To Scrape, which is a fake bookstore specifically setup to help people practice scraping.</p>
<p>In the same directory create a file named <code class="highlighter-rouge">scrape.js</code> and insert the following boilerplate code:</p>
<div class="language-js highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="kd">const</span> <span class="nx">puppeteer</span> <span class="o">=</span> <span class="nx">require</span><span class="p">(</span><span class="dl">'</span><span class="s1">puppeteer</span><span class="dl">'</span><span class="p">);</span>
<span class="kd">let</span> <span class="nx">scrape</span> <span class="o">=</span> <span class="k">async</span> <span class="p">()</span> <span class="o">=></span> <span class="p">{</span>
<span class="c1">// Actual Scraping goes Here...</span>
<span class="c1">// Return a value</span>
<span class="p">};</span>
<span class="nx">scrape</span><span class="p">().</span><span class="nx">then</span><span class="p">((</span><span class="nx">value</span><span class="p">)</span> <span class="o">=></span> <span class="p">{</span>
<span class="nx">console</span><span class="p">.</span><span class="nx">log</span><span class="p">(</span><span class="nx">value</span><span class="p">);</span> <span class="c1">// Success!</span>
<span class="p">});</span>
</code></pre></div></div>
<p>Ideally the above code makes sense to you after going through the first example. If not, that’s ok!</p>
<p>All we’re doing above is requiring the previously installed <code class="highlighter-rouge">puppeteer</code> dependency. Then we have our <code class="highlighter-rouge">scrape()</code> function where we will input our scraping code. This function will return a value. Finally, we invoke our <code class="highlighter-rouge">scrape</code> function and handle the returned value (log it to the console).</p>
<p>We can test the above code by adding in a line of code to the scrape function. Try this out:</p>
<div class="language-js highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="kd">let</span> <span class="nx">scrape</span> <span class="o">=</span> <span class="k">async</span> <span class="p">()</span> <span class="o">=></span> <span class="p">{</span>
<span class="k">return</span> <span class="dl">'</span><span class="s1">test</span><span class="dl">'</span><span class="p">;</span>
<span class="p">};</span>
</code></pre></div></div>
<p>Now run node <code class="highlighter-rouge">scrape.js</code> in the console. You should get <code class="highlighter-rouge">test</code> returned! Perfect, our returned value is being logged to the console. Now we can get started filling out our <code class="highlighter-rouge">scrape</code> function.</p>
<h3 id="step-1-setup">Step 1: Setup</h3>
<p>First thing we need to do is create an instance of our browser, open up a new page, and navigate to a URL.</p>
<p>Here’s how we do that:</p>
<div class="language-js highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="kd">let</span> <span class="nx">scrape</span> <span class="o">=</span> <span class="k">async</span> <span class="p">()</span> <span class="o">=></span> <span class="p">{</span>
<span class="kd">const</span> <span class="nx">browser</span> <span class="o">=</span> <span class="k">await</span> <span class="nx">puppeteer</span><span class="p">.</span><span class="nx">launch</span><span class="p">({</span><span class="na">headless</span><span class="p">:</span> <span class="kc">false</span><span class="p">});</span>
<span class="kd">const</span> <span class="nx">page</span> <span class="o">=</span> <span class="k">await</span> <span class="nx">browser</span><span class="p">.</span><span class="nx">newPage</span><span class="p">();</span>
<span class="k">await</span> <span class="nx">page</span><span class="p">.</span><span class="nx">goto</span><span class="p">(</span><span class="dl">'</span><span class="s1">//books.toscrape.com/</span><span class="dl">'</span><span class="p">);</span>
<span class="k">await</span> <span class="nx">page</span><span class="p">.</span><span class="nx">waitFor</span><span class="p">(</span><span class="mi">1000</span><span class="p">);</span>
<span class="c1">// Scrape</span>
<span class="nx">browser</span><span class="p">.</span><span class="nx">close</span><span class="p">();</span>
<span class="k">return</span> <span class="nx">result</span><span class="p">;</span>
<span class="p">};</span>
</code></pre></div></div>
<p>Awesome! Lets break it down line by line:</p>
<p>First, we create our browser and set <code class="highlighter-rouge">headless</code> mode to <code class="highlighter-rouge">false</code>. This allows us to watch exactly what is going on:</p>
<div class="language-js highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="kd">const</span> <span class="nx">browser</span> <span class="o">=</span> <span class="k">await</span> <span class="nx">puppeteer</span><span class="p">.</span><span class="nx">launch</span><span class="p">({</span><span class="na">headless</span><span class="p">:</span> <span class="kc">false</span><span class="p">});</span>
</code></pre></div></div>
<p>Then, we create a new page in our browser:</p>
<div class="language-js highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="kd">const</span> <span class="nx">page</span> <span class="o">=</span> <span class="k">await</span> <span class="nx">browser</span><span class="p">.</span><span class="nx">newPage</span><span class="p">();</span>
</code></pre></div></div>
<p>Next, we go to the books.toscrape.com URL:</p>
<div class="language-js highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="k">await</span> <span class="nx">page</span><span class="p">.</span><span class="nx">goto</span><span class="p">(</span><span class="dl">'</span><span class="s1">//books.toscrape.com/</span><span class="dl">'</span><span class="p">);</span>
</code></pre></div></div>
<p>Optionally, I’ve added in a delay of <code class="highlighter-rouge">1000</code> milliseconds. While normally not necessary, this will ensure everything on the page loads:</p>
<div class="language-js highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="k">await</span> <span class="nx">page</span><span class="p">.</span><span class="nx">waitFor</span><span class="p">(</span><span class="mi">1000</span><span class="p">);</span>
</code></pre></div></div>
<p>Finally, after everything is done, we’ll close the browser and return our result.</p>
<div class="language-js highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="nx">browser</span><span class="p">.</span><span class="nx">close</span><span class="p">();</span>
<span class="k">return</span> <span class="nx">result</span><span class="p">;</span>
</code></pre></div></div>
<p>Setup is complete. Now, lets scrape!</p>
<h3 id="step-2-scraping">Step 2: Scraping</h3>
<p>As you’ve probably ascertained by now, Books to Scrape has a big library of real books and fake data on those books. What we’re going to do is select the first book on the page and return the title and price of that book. Here’s the homepage of Books to Scrape. I’m interested in clicking on the first book (outlined in red below)</p>
<p><img src="https://cdn.codecarrot.net/images/1_SJi9SPF1a7gGcZ_mEnScgg.png" alt="1_SJi9SPF1a7gGcZ_mEnScgg.png" /></p>
<p>Looking at the Puppeteer API we can find the method that allows us to click on a page:</p>
<p><strong>page.click(selector[, options])</strong></p>
<ul>
<li><code class="highlighter-rouge">selector</code> <string> A selector to search for element to click. If there are multiple elements satisfying the selector, the first will be clicked.</string></li>
</ul>
<p>Luckily, the Google Chrome Developer Tools make it very easy to determine the selector for a particular element. Simply right click on the image and select inspect:</p>
<p><img src="https://cdn.codecarrot.net/images/1_PSffzKaJrObAdfA1QRLCpg.png" alt="1_PSffzKaJrObAdfA1QRLCpg.png" /></p>
<p>This will open up the Elements Panel with the element highlighted. You can now click on the three dots on the left hand side, select copy, then select copy selector:</p>
<p><img src="https://cdn.codecarrot.net/images/1_fUXgbZ7LTGSvkqadYUPbAw.png" alt="1_fUXgbZ7LTGSvkqadYUPbAw.png" /></p>
<p>Awesome! We now have our selector copied and we can insert our click method into our program. Here’s what that looks like:</p>
<div class="language-js highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="k">await</span> <span class="nx">page</span><span class="p">.</span><span class="nx">click</span><span class="p">(</span><span class="dl">'</span><span class="s1">#default > div > div > div > div > section > div:nth-child(2) > ol > li:nth-child(1) > article > div.image_container > a > img</span><span class="dl">'</span><span class="p">);</span>
</code></pre></div></div>
<p>Our window will now click on the first product image and navigate to that product page!</p>
<p>On the new page, we’re interested in both the product title and product price — outlined below in red</p>
<p><img src="https://cdn.codecarrot.net/images/1_ccol1C8a4b1wGXUdV8qfTA.png" alt="1_ccol1C8a4b1wGXUdV8qfTA.png" /></p>
<p>In order to retrieve these values, we’ll use the <code class="highlighter-rouge">page.evaluate()</code> method. This method allows us to use built in DOM selectors like <code class="highlighter-rouge">querySelector()</code>.</p>
<p>First thing we’ll do is create our <code class="highlighter-rouge">page.evaluate()</code> function and save the returned value to a variable named <code class="highlighter-rouge">result</code>:</p>
<div class="language-js highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="kd">const</span> <span class="nx">result</span> <span class="o">=</span> <span class="k">await</span> <span class="nx">page</span><span class="p">.</span><span class="nx">evaluate</span><span class="p">(()</span> <span class="o">=></span> <span class="p">{</span>
<span class="c1">// return something</span>
<span class="p">});</span>
</code></pre></div></div>
<p>Within our function we can select the elements we desire. We’ll use the Google Developer Tools to figure this out again. Right click on title and select inspect:</p>
<p><img src="https://cdn.codecarrot.net/images/1_jzC0PnWrZsI_SF8t5PgGTA.png" alt="1_jzC0PnWrZsI_SF8t5PgGTA.png" /></p>
<p>As you’ll see in the elements panel, the title is simply an <code class="highlighter-rouge">h1</code> element. We can now select this element with the following code:</p>
<div class="language-js highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="kd">let</span> <span class="nx">title</span> <span class="o">=</span> <span class="nb">document</span><span class="p">.</span><span class="nx">querySelector</span><span class="p">(</span><span class="dl">'</span><span class="s1">h1</span><span class="dl">'</span><span class="p">);</span>
</code></pre></div></div>
<p>Since we want the text contained within this element, we need to add in <code class="highlighter-rouge">.innerText</code> — Here’s what the final code looks like:</p>
<div class="language-js highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="kd">let</span> <span class="nx">title</span> <span class="o">=</span> <span class="nb">document</span><span class="p">.</span><span class="nx">querySelector</span><span class="p">(</span><span class="dl">'</span><span class="s1">h1</span><span class="dl">'</span><span class="p">).</span><span class="nx">innerText</span><span class="p">;</span>
</code></pre></div></div>
<p>Similarly, we can select the price by right clicking and inspecting the element:</p>
<p><img src="https://cdn.codecarrot.net/images/1_dKX7qukRfMVfPP2kydD03w.png" alt="1_dKX7qukRfMVfPP2kydD03w.png" /></p>
<p>As you can see, our price has a class of <code class="highlighter-rouge">price_color</code>. We can use this class to select the element and its inner text. Here’s the code:</p>
<div class="language-js highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="kd">let</span> <span class="nx">price</span> <span class="o">=</span> <span class="nb">document</span><span class="p">.</span><span class="nx">querySelector</span><span class="p">(</span><span class="dl">'</span><span class="s1">.price_color</span><span class="dl">'</span><span class="p">).</span><span class="nx">innerText</span><span class="p">;</span>
</code></pre></div></div>
<p>Now that we have the text that we need, we can return it in an object:</p>
<div class="language-js highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="k">return</span> <span class="p">{</span>
<span class="nx">title</span><span class="p">,</span>
<span class="nx">price</span>
<span class="p">}</span>
</code></pre></div></div>
<p>Awesome! We’re now selecting the title and price, saving them to an object, and returning the value of that object to the <code class="highlighter-rouge">result</code> variable. Here’s what it looks like when it’s all put together:</p>
<div class="language-js highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="kd">const</span> <span class="nx">result</span> <span class="o">=</span> <span class="k">await</span> <span class="nx">page</span><span class="p">.</span><span class="nx">evaluate</span><span class="p">(()</span> <span class="o">=></span> <span class="p">{</span>
<span class="kd">let</span> <span class="nx">title</span> <span class="o">=</span> <span class="nb">document</span><span class="p">.</span><span class="nx">querySelector</span><span class="p">(</span><span class="dl">'</span><span class="s1">h1</span><span class="dl">'</span><span class="p">).</span><span class="nx">innerText</span><span class="p">;</span>
<span class="kd">let</span> <span class="nx">price</span> <span class="o">=</span> <span class="nb">document</span><span class="p">.</span><span class="nx">querySelector</span><span class="p">(</span><span class="dl">'</span><span class="s1">.price_color</span><span class="dl">'</span><span class="p">).</span><span class="nx">innerText</span><span class="p">;</span>
<span class="k">return</span> <span class="p">{</span>
<span class="nx">title</span><span class="p">,</span>
<span class="nx">price</span>
<span class="p">}</span>
<span class="p">});</span>
</code></pre></div></div>
<p>The only thing left to do is return our <code class="highlighter-rouge">result</code> so it can be logged to the console:</p>
<div class="language-js highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="k">return</span> <span class="nx">result</span><span class="p">;</span>
</code></pre></div></div>
<p>Here’s what your final code should look like:</p>
<div class="language-js highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="kd">const</span> <span class="nx">puppeteer</span> <span class="o">=</span> <span class="nx">require</span><span class="p">(</span><span class="dl">'</span><span class="s1">puppeteer</span><span class="dl">'</span><span class="p">);</span>
<span class="kd">let</span> <span class="nx">scrape</span> <span class="o">=</span> <span class="k">async</span> <span class="p">()</span> <span class="o">=></span> <span class="p">{</span>
<span class="kd">const</span> <span class="nx">browser</span> <span class="o">=</span> <span class="k">await</span> <span class="nx">puppeteer</span><span class="p">.</span><span class="nx">launch</span><span class="p">({</span><span class="na">headless</span><span class="p">:</span> <span class="kc">false</span><span class="p">});</span>
<span class="kd">const</span> <span class="nx">page</span> <span class="o">=</span> <span class="k">await</span> <span class="nx">browser</span><span class="p">.</span><span class="nx">newPage</span><span class="p">();</span>
<span class="k">await</span> <span class="nx">page</span><span class="p">.</span><span class="nx">goto</span><span class="p">(</span><span class="dl">'</span><span class="s1">//books.toscrape.com/</span><span class="dl">'</span><span class="p">);</span>
<span class="k">await</span> <span class="nx">page</span><span class="p">.</span><span class="nx">click</span><span class="p">(</span><span class="dl">'</span><span class="s1">#default > div > div > div > div > section > div:nth-child(2) > ol > li:nth-child(1) > article > div.image_container > a > img</span><span class="dl">'</span><span class="p">);</span>
<span class="k">await</span> <span class="nx">page</span><span class="p">.</span><span class="nx">waitFor</span><span class="p">(</span><span class="mi">1000</span><span class="p">);</span>
<span class="kd">const</span> <span class="nx">result</span> <span class="o">=</span> <span class="k">await</span> <span class="nx">page</span><span class="p">.</span><span class="nx">evaluate</span><span class="p">(()</span> <span class="o">=></span> <span class="p">{</span>
<span class="kd">let</span> <span class="nx">title</span> <span class="o">=</span> <span class="nb">document</span><span class="p">.</span><span class="nx">querySelector</span><span class="p">(</span><span class="dl">'</span><span class="s1">h1</span><span class="dl">'</span><span class="p">).</span><span class="nx">innerText</span><span class="p">;</span>
<span class="kd">let</span> <span class="nx">price</span> <span class="o">=</span> <span class="nb">document</span><span class="p">.</span><span class="nx">querySelector</span><span class="p">(</span><span class="dl">'</span><span class="s1">.price_color</span><span class="dl">'</span><span class="p">).</span><span class="nx">innerText</span><span class="p">;</span>
<span class="k">return</span> <span class="p">{</span>
<span class="nx">title</span><span class="p">,</span>
<span class="nx">price</span>
<span class="p">}</span>
<span class="p">});</span>
<span class="nx">browser</span><span class="p">.</span><span class="nx">close</span><span class="p">();</span>
<span class="k">return</span> <span class="nx">result</span><span class="p">;</span>
<span class="p">};</span>
<span class="nx">scrape</span><span class="p">().</span><span class="nx">then</span><span class="p">((</span><span class="nx">value</span><span class="p">)</span> <span class="o">=></span> <span class="p">{</span>
<span class="nx">console</span><span class="p">.</span><span class="nx">log</span><span class="p">(</span><span class="nx">value</span><span class="p">);</span> <span class="c1">// Success!</span>
<span class="p">});</span>
</code></pre></div></div>
<p>You can now run your Node file by typing the following into the console:</p>
<div class="language-js highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="nx">node</span> <span class="nx">scrape</span><span class="p">.</span><span class="nx">js</span>
<span class="c1">// { title: 'A Light in the Attic', price: '£51.77' }</span>
</code></pre></div></div>
<p>You should see the title and price of the selected book returned to the screen! You’ve just scraped the web!</p>
<h2 id="example-3--perfecting-it">Example #3 — Perfecting it</h2>
<p>Now you may be asking yourself, why did we click on the book when both the title and price were displayed on the homepage? Why not scrape them from there? And while we’re at it, why not scrape all the books titles and prices?</p>
<p>Because there are many ways to scrape a website! (Plus, if we stayed on the homepage, our titles would have been truncated). However, this provides the perfect opportunity for you to practice your new scraping skills!</p>
<p><strong>Challenge</strong></p>
<p>The Goal — to scrape all of the book titles and prices from the homepage, and return them in an array. Here’s what my final output looks like:</p>
<p><img src="https://cdn.codecarrot.net/images/1_w4YN9E40rzpdmQfwqM2Pcg.png" alt="1_w4YN9E40rzpdmQfwqM2Pcg.png" /></p>
<p>GO! See if you can accomplish this on your own. It’s very similar to the above program we just created. Scroll down if you get stuck…</p>
<hr />
<p><strong>Hint:</strong></p>
<p>The main difference between this challenge and the previous example is the need to loop through a bunch of results. Here’s how you might set up your code to do this:</p>
<div class="language-js highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="kd">const</span> <span class="nx">result</span> <span class="o">=</span> <span class="k">await</span> <span class="nx">page</span><span class="p">.</span><span class="nx">evaluate</span><span class="p">(()</span> <span class="o">=></span> <span class="p">{</span>
<span class="kd">let</span> <span class="nx">data</span> <span class="o">=</span> <span class="p">[];</span> <span class="c1">// Create an empty array</span>
<span class="kd">let</span> <span class="nx">elements</span> <span class="o">=</span> <span class="nb">document</span><span class="p">.</span><span class="nx">querySelectorAll</span><span class="p">(</span><span class="dl">'</span><span class="s1">xxx</span><span class="dl">'</span><span class="p">);</span> <span class="c1">// Select all</span>
<span class="c1">// Loop through each proudct</span>
<span class="c1">// Select the title</span>
<span class="c1">// Select the price</span>
<span class="nx">data</span><span class="p">.</span><span class="nx">push</span><span class="p">({</span><span class="nx">title</span><span class="p">,</span> <span class="nx">price</span><span class="p">});</span> <span class="c1">// Push the data to our array</span>
<span class="k">return</span> <span class="nx">data</span><span class="p">;</span> <span class="c1">// Return our data array</span>
<span class="p">});</span>
</code></pre></div></div>
<p>If you couldn’t figure it out, that’s OK! This was a tricky one… Here’s one possible solution. In a future article, I’ll dive more into this code and how it works. We’ll also look at more advanced scraping techniques.</p>
<p><strong>Solution</strong></p>
<div class="language-js highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="kd">const</span> <span class="nx">puppeteer</span> <span class="o">=</span> <span class="nx">require</span><span class="p">(</span><span class="dl">'</span><span class="s1">puppeteer</span><span class="dl">'</span><span class="p">);</span>
<span class="kd">let</span> <span class="nx">scrape</span> <span class="o">=</span> <span class="k">async</span> <span class="p">()</span> <span class="o">=></span> <span class="p">{</span>
<span class="kd">const</span> <span class="nx">browser</span> <span class="o">=</span> <span class="k">await</span> <span class="nx">puppeteer</span><span class="p">.</span><span class="nx">launch</span><span class="p">({</span><span class="na">headless</span><span class="p">:</span> <span class="kc">false</span><span class="p">});</span>
<span class="kd">const</span> <span class="nx">page</span> <span class="o">=</span> <span class="k">await</span> <span class="nx">browser</span><span class="p">.</span><span class="nx">newPage</span><span class="p">();</span>
<span class="k">await</span> <span class="nx">page</span><span class="p">.</span><span class="nx">goto</span><span class="p">(</span><span class="dl">'</span><span class="s1">//books.toscrape.com/</span><span class="dl">'</span><span class="p">);</span>
<span class="kd">const</span> <span class="nx">result</span> <span class="o">=</span> <span class="k">await</span> <span class="nx">page</span><span class="p">.</span><span class="nx">evaluate</span><span class="p">(()</span> <span class="o">=></span> <span class="p">{</span>
<span class="kd">let</span> <span class="nx">data</span> <span class="o">=</span> <span class="p">[];</span> <span class="c1">// Create an empty array that will store our data</span>
<span class="kd">let</span> <span class="nx">elements</span> <span class="o">=</span> <span class="nb">document</span><span class="p">.</span><span class="nx">querySelectorAll</span><span class="p">(</span><span class="dl">'</span><span class="s1">.product_pod</span><span class="dl">'</span><span class="p">);</span> <span class="c1">// Select all Products</span>
<span class="k">for</span> <span class="p">(</span><span class="kd">var</span> <span class="nx">element</span> <span class="k">of</span> <span class="nx">elements</span><span class="p">){</span> <span class="c1">// Loop through each proudct</span>
<span class="kd">let</span> <span class="nx">title</span> <span class="o">=</span> <span class="nx">element</span><span class="p">.</span><span class="nx">childNodes</span><span class="p">[</span><span class="mi">5</span><span class="p">].</span><span class="nx">innerText</span><span class="p">;</span> <span class="c1">// Select the title</span>
<span class="kd">let</span> <span class="nx">price</span> <span class="o">=</span> <span class="nx">element</span><span class="p">.</span><span class="nx">childNodes</span><span class="p">[</span><span class="mi">7</span><span class="p">].</span><span class="nx">children</span><span class="p">[</span><span class="mi">0</span><span class="p">].</span><span class="nx">innerText</span><span class="p">;</span> <span class="c1">// Select the price</span>
<span class="nx">data</span><span class="p">.</span><span class="nx">push</span><span class="p">({</span><span class="nx">title</span><span class="p">,</span> <span class="nx">price</span><span class="p">});</span> <span class="c1">// Push an object with the data onto our array</span>
<span class="p">}</span>
<span class="k">return</span> <span class="nx">data</span><span class="p">;</span> <span class="c1">// Return our data array</span>
<span class="p">});</span>
<span class="nx">browser</span><span class="p">.</span><span class="nx">close</span><span class="p">();</span>
<span class="k">return</span> <span class="nx">result</span><span class="p">;</span> <span class="c1">// Return the data</span>
<span class="p">};</span>
<span class="nx">scrape</span><span class="p">().</span><span class="nx">then</span><span class="p">((</span><span class="nx">value</span><span class="p">)</span> <span class="o">=></span> <span class="p">{</span>
<span class="nx">console</span><span class="p">.</span><span class="nx">log</span><span class="p">(</span><span class="nx">value</span><span class="p">);</span> <span class="c1">// Success!</span>
<span class="p">});</span>
</code></pre></div></div>yashumittalPuppetter
https://cdn.codecarrot.net/images/articleocw-599af35e5ad57.png
Developer’s Guide to Writing Effective Code2017-11-10T09:49:00+00:002017-11-10T09:49:00+00:00https://blog.codecarrot.net/developers-guide-to-write-an-effective-code<p>Without a doubt, coding is a tough job. Hell, a lot of things have been said about the ease of learning a programming language, but it’s a beast of a challenge when you actually implement that knowledge and understanding to a complex problem. If you had a look at some old code, it must have been messy, unclear or jumbled as if it was written while a developer was having a fight at his desk. And believe me, there is no place for such code now, especially because of the demand to be scalable.</p>
<p>Before going through the ways to write effective code, let us quickly look at the benefits of writing clean code:</p>
<p><strong>Makes it easier to solve problems.</strong> If you are an engineer, this one is for you. Imagine a situation where messy code is thrown at you and you are expected to make a functionality work in an hour’s time. Is it as easy as the client feels? I’m sure it is not!</p>
<p><strong>Saves time in maintenance.</strong> Clean code is easier to understand so if you have a maintenance task on hand, it will help you spend less time on identifying specific segments so that you can focus your energies on fixing or revising the code.</p>
<p><strong>Clear indications of the functionalities.</strong> A complex project is usually distributed among the team of developers and neat code allows each one of them to identify the idea behind a particular code and do the rest.</p>
<p>So, how should you begin writing clean and effective code?</p>
<h2 id="use-conventions">Use Conventions</h2>
<p>The great way to get started is to use naming conventions. It keeps things clear and allows you to know what you are working with. It also means you won’t accidentally try to use a string of text in a math equation.</p>
<p>A naming convention means you decide to call variables by names that are self-explanatory and does not confuse anybody, including you.</p>
<h2 id="use-comments">Use Comments</h2>
<p>This is absolutely straightforward, though I understand that some coders hate taking extra time to add comments. Comments are also important so that if your or another programmer comes back to the code for modifications in future, the code is easily understood.</p>
<p>This simply explains everything. If code has comments, it helps you in identifying the problem easier, and fix the code in less time.</p>
<h2 id="use-whitespace">Use Whitespace</h2>
<p>White space makes the code longer but readable, this is what everyone, including the coder, fellow programmers, and the client wants. Using whitespace, though, can add a few kilobytes to the file size.</p>
<p>So in general, if you are writing lots of things together in one block, it is normally advisable to break it into a logical chunk.</p>
<p>These things help a programmer to deliver bug-free, clear, and performant code.</p>yashumittalWithout a doubt, coding is a tough job. Hell, a lot of things have been said about the ease of learning a programming language, but it’s a beast of a challenge when you actually implement that knowledge and understanding to a complex problem. If you had a look at some old code, it must have been messy, unclear or jumbled as if it was written while a developer was having a fight at his desk. And believe me, there is no place for such code now, especially because of the demand to be scalable.
https://cdn.codecarrot.net/images/christopher-gower-291246.jpg
Patterns that Will Help You Be a Better Developer2017-11-09T19:47:40+00:002017-11-09T19:47:40+00:00https://blog.codecarrot.net/patterns-that-will-help-you-be-a-better-developer<p>In today’s fast moving world deadlines can be a real nightmare, especially for devs who have to focus on the code they’re writing to keep its quality high. One solution to help devs deal with time pressure, while keeping the code clear of bugs and easy to test, is to use patterns: methodologies for creating code that solve the most common problems in development. In this article we describe the ones we use and see the most.</p>
<h2 id="why-do-you-need-to-use-patterns">Why do you need to use patterns?</h2>
<p>Writing code is not really hard. However writing code which is easy to read, easy to maintain, easy to extend and performance-friendly is something that every developer struggles to achieve. Patterns exist to help you quickly deal with problems that almost every developer encounters.</p>
<h2 id="patterns-that-we-work-with-the-most">Patterns that we work with the most</h2>
<h3 id="repositories-pattern">Repositories pattern</h3>
<p>In the world of Ruby on Rails, Active Record - as a default ORM library - is used so widely, that sometimes it’s hard, especially for new developers, to think beyond it. However, if you’ve ever found yourself in a situation where there’s more than one source of truth - and by that i mean more than one database where you store the data - be it another database from external api, XML/JSON documents, CSV files, etc…</p>
<p>As it is, ActiveRecord is certainly a great library that will do its job for the early stages of an application’s life (or even longer). However as the time passes and a more customized approach on the data storage level becomes necessary, this is where this pattern comes in handy.</p>
<p><img src="https://cdn.codecarrot.net/images/78ihjr64-Untitled_drawing_2.png" alt="Untitled_drawing_2.png" /></p>
<p>Thanks to this division, we can easily manage business logic without mixing it with the data persistence layer. If there are any changes involving where we store our data, then we can change it without worrying about how to deal with ActiveRecord.</p>
<p>Another advantage is better quality of SQL queries. It’s lovely how ActiveRecord helps us easily write only ruby code which is translated directly to SQL. However there are places where it might not meet our expectations. If they’re more specific than simply returning a row or creating a new one, then it’s likely that they can be optimized.</p>
<h2 id="view-objects">View objects</h2>
<p>Simple and very helpful, view objects are for cleaning up models and views with unnecessary functions/complex code, which are only meant for display. It’s worth using in places with heavy views where you need to add a lot of new functions to cover that specific page. Dashboard would be a good example:</p>
<div class="language-rb highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="k">def</span> <span class="nf">DashboardViewObject</span>
<span class="k">def</span> <span class="nf">initialize</span><span class="p">(</span><span class="n">project</span><span class="p">,</span> <span class="n">raports</span><span class="p">)</span>
<span class="vi">@project</span> <span class="o">=</span> <span class="n">project</span>
<span class="vi">@raports</span> <span class="o">=</span> <span class="n">raports</span>
<span class="k">end</span>
<span class="k">def</span> <span class="nf">raports_available?</span>
<span class="vi">@raports</span><span class="p">.</span><span class="nf">recent</span><span class="p">.</span><span class="nf">any?</span>
<span class="k">end</span>
<span class="k">def</span> <span class="nf">projects_with_people</span>
<span class="vi">@project_with_users</span> <span class="o">||=</span> <span class="s2">"</span><span class="si">#{</span><span class="n">project</span><span class="p">.</span><span class="nf">name</span><span class="si">}</span><span class="s2"> owned by </span><span class="si">#{</span><span class="n">project</span><span class="p">.</span><span class="nf">owner</span><span class="si">}</span><span class="s2">"</span>
<span class="k">end</span>
<span class="k">def</span> <span class="nf">due_raports</span>
<span class="vi">@due_raports</span> <span class="o">||=</span> <span class="s2">"Due date passed </span><span class="si">#{</span><span class="p">(</span><span class="n">raports</span><span class="p">.</span><span class="nf">due_date</span> <span class="o">-</span> <span class="no">Date</span><span class="p">.</span><span class="nf">today</span><span class="p">).</span><span class="nf">to_i</span><span class="si">}</span><span class="s2"> days ago"</span>
<span class="k">end</span>
<span class="k">end</span>
</code></pre></div></div>
<p>Instead of writing complex views, you can handle the logic meant only for this specific part of a view. You can reduce the amount of IF’s in the page and easily stub the data for these classes in the tests to run them fast.</p>
<h2 id="form-objects">Form objects</h2>
<p>Whenever you’re dealing with complicated forms, you need to create a lot of nested attributes from the form data or you have one model which should have different validations on specific pages - this is the perfect place to use a form object pattern. It’s basically replacing the model instance in a form with a specially crafted object that represents the object, but is not directly it. This way we can easily customize every form, even if they’re for the same model.</p>
<p>There are 3 common approaches for Form Object creation:</p>
<ul>
<li>Using the <a href="//github.com/apotonick/reform">reform gem</a></li>
<li>Using the <a href="//github.com/solnic/virtus">virtus gem</a></li>
<li>Creating a class with <code class="highlighter-rouge">ActiveModel::Model</code> included
This is another great way to extract business logic from views and controllers. You can use these objects as you would use ActiveRecord models and still gain the advantage of available customizations and better readability.</li>
</ul>
<h1 id="query-objects">#Query objects</h1>
<p>Another simple yet very useful pattern. If you ever find yourself in situations where you need to retrieve a lot of related/nested data with a single query and a 5th method in a scope still doesn’t solve your issue - then think of writing pure SQL wrapped in a PORO (plain old ruby object). This way you can optimize the call in terms of speed and easily perform a more customized approach. There are some great posts covering these topics in detail in our blog that I highly encourage you to read: <a href="/why-i-went-back-to-thinking-in-sql">thinking in sql</a> and more about <a href="/sql-query-result-model-part-2">query objects</a>.</p>
<h2 id="service-objects">Service Objects</h2>
<p>Service objects are crafted with solely one thing in mind - to execute one thing, a specific part of business logic, to keep controllers and models nice and clean. Instead of adding yet another method to your already fat model or extending your controller method which you need to scroll to find a place where you can fit it in - move that business logic inside a new poro object and simply execute it from within the desired place. There’s a great blogpost from Tomasz Pewiński regarding service objects that I highly recommend. <a href="/service-objects-in-rails-will-help-you-design-clean-and-maintainable-code-heres-how">Check out this blog</a> on How service objects in Rails will help you design clean and maintainable code?</p>
<h2 id="wrapping-up">Wrapping up</h2>
<p>In summary, patterns are not the holy grail of problem solving. They’re only good if used well. The Rails Way™ is , of course, great - it can help us develop apps blazingly fast. But when an app grows to the point where it’s becoming messy, correct patterns are often a must. It will surely help you maintain the app, make writing tests easier, and help you develop your application in a confident way.</p>yashumittalIn today’s fast moving world deadlines can be a real nightmare, especially for devs who have to focus on the code they’re writing to keep its quality high. One solution to help devs deal with time pressure, while keeping the code clear of bugs and easy to test, is to use patterns: methodologies for creating code that solve the most common problems in development. In this article we describe the ones we use and see the most.
https://cdn.codecarrot.net/images/stairpath-565865-edited.jpg
Mastering The Developer Tools Console2017-11-09T18:49:00+00:002017-11-09T18:49:00+00:00https://blog.codecarrot.net/mastering-developer-tools-console<p>The developer tools console is one of the most powerful tools available to you when it comes to debugging your front-end web applications. The console has an API that provides a number of methods that make debugging easier. It’s not uncommon to see developers using <code class="highlighter-rouge">console.log()</code> or <code class="highlighter-rouge">console.dir()</code> to investigate problems; but the developer tools console has a lot more to offer.</p>
<p>In this blog post you’re going to learn how to debug your web applications using the methods provided by the <code class="highlighter-rouge">console</code> API. Some browsers support more functionality than others so I’ll be pointing out any compatibility issues as we go.</p>
<p>Lets get started!</p>
<h2 id="using-the-developer-tools-console">Using the Developer Tools Console</h2>
<p>If you haven’t used the developer tools console before, don’t worry. In this section I’m going to show you how to access and use the console. If you’re already familiar this, feel free to skip to the next section.</p>
<p>There are a number of different ways that you can open your browser’s developer tools. The simplest is to just right-click somewhere on the page and then select ‘Inspect Element’ in the context-menu that appears.</p>
<p>You can also launch the developer tools using a keyboard shortcut. The shortcut for most browsers on Mac is <code class="highlighter-rouge">Alt</code> + <code class="highlighter-rouge">Command</code> + <code class="highlighter-rouge">I</code>, for Windows you can use <code class="highlighter-rouge">Ctrl</code> + <code class="highlighter-rouge">Shift</code> + <code class="highlighter-rouge">I</code>.</p>
<p><img src="https://cdn.codecarrot.net/images/34FDerf3-dev-tools-console.png" alt="The developer tools console in Chrome" /></p>
<p><em>The developer tools console in Chrome.</em></p>
<p>Once you have the developer tools open you can switch to the console by clicking the <strong>Console</strong> tab at the top of the window.</p>
<p><img src="https://cdn.codecarrot.net/images/34rDSFewf-dev-tools-icon.png" alt="The 'Elements' tab with a console pane at the bottom." /></p>
<p><em>The ‘Elements’ tab with a console pane at the bottom.</em></p>
<p>In Chrome, you can also launch a console below any of the other tabs by clicking on the console icon in the top right of the developer tools window.</p>
<hr />
<p><strong>Note:</strong> In this article we will be using the default developer tools that ship with browsers. There are many great browser extensions that can provide similar tools. Firefox users may wish to install <a href="//getfirebug.com/">Firebug</a>, as the Firebug console supports some methods that the default Firefox console does not.</p>
<hr />
<p>Now that you’ve got the console open, lets execute a simple statement.</p>
<p>Type the following into the console and press <strong>Enter</strong>:</p>
<div class="highlighter-rouge"><div class="highlight"><pre class="highlight"><code>console.log('Hello World!');
</code></pre></div></div>
<p>You should see that the test <em>Hello World!</em> is printed in the console <em>(as shown below)</em>.</p>
<p><img src="https://cdn.codecarrot.net/images/43DSFdsfsdf34-console-log-hello-world.png" alt="Using console.log() in the Chrome Dev Tools Console" /></p>
<p><em>Using console.log() in the Chrome Dev Tools Console</em></p>
<p>Great! Now that you’re up-to-speed with how to use the <code class="highlighter-rouge">console</code>, lets take a look at all the console methods that you can use to debug your applications.</p>
<h2 id="consolelogobject--object-">console.log(object [, object, …])</h2>
<p>Lets start by looking at one of the most commonly used <code class="highlighter-rouge">console</code> methods, <code class="highlighter-rouge">console.log()</code>. This method simply outputs an object to the console.</p>
<div class="language-js highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="nx">console</span><span class="p">.</span><span class="nx">log</span><span class="p">(</span><span class="dl">'</span><span class="s1">Hello CodeCarrot</span><span class="dl">'</span><span class="p">);</span>
</code></pre></div></div>
<p>If you list multiple objects they will be concatenated into a single, space-delimited string, which is then output to the console.</p>
<div class="language-js highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="nx">console</span><span class="p">.</span><span class="nx">log</span><span class="p">(</span><span class="dl">'</span><span class="s1">This is a string</span><span class="dl">'</span><span class="p">,</span> <span class="p">{</span> <span class="na">foo</span><span class="p">:</span> <span class="dl">'</span><span class="s1">bar</span><span class="dl">'</span> <span class="p">},</span> <span class="p">{</span> <span class="na">bar</span><span class="p">:</span> <span class="dl">'</span><span class="s1">foo</span><span class="dl">'</span> <span class="p">});</span>
</code></pre></div></div>
<p><img src="https://cdn.codecarrot.net/images/34fsdFW34R-console-log-multi-object.png" alt="Using console.log() with multiple objects" /></p>
<p><em>Using console.log() with multiple objects</em></p>
<p>The first parameter can contain <em>format specifiers</em> that allow you to define the format and positioning, of the subsequent objects.</p>
<div class="language-js highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="kd">var</span> <span class="nx">number</span> <span class="o">=</span> <span class="mi">11</span> <span class="o">*</span> <span class="mi">9</span><span class="p">;</span>
<span class="kd">var</span> <span class="nx">color</span> <span class="o">=</span> <span class="dl">'</span><span class="s1">red</span><span class="dl">'</span><span class="p">;</span>
<span class="nx">console</span><span class="p">.</span><span class="nx">log</span><span class="p">(</span><span class="dl">'</span><span class="s1">%d %s balloons</span><span class="dl">'</span><span class="p">,</span> <span class="nx">number</span><span class="p">,</span> <span class="nx">color</span><span class="p">);</span>
</code></pre></div></div>
<p><img src="https://cdn.codecarrot.net/images/43SDFsdfe3-console-log-format-specifiers.png" alt="Using console.log() with format specifiers" /></p>
<p><em>Using console.log() with format specifiers</em></p>
<p>The following format specifiers are supported in the dev tools console.</p>
<table>
<tbody>
<tr>
<td>FORMAT SPECIFIER</td>
<td>DESCRIPTION</td>
</tr>
<tr>
<td><code class="highlighter-rouge">%s</code></td>
<td>String</td>
</tr>
<tr>
<td><code class="highlighter-rouge">%d</code> or <code class="highlighter-rouge">%i</code></td>
<td>Integer</td>
</tr>
<tr>
<td><code class="highlighter-rouge">%f</code></td>
<td>Floating point value</td>
</tr>
<tr>
<td><code class="highlighter-rouge">%o</code></td>
<td>Expandable DOM element (as displayed in the ‘Elements’ tab of the dev tools)</td>
</tr>
<tr>
<td><code class="highlighter-rouge">%O</code></td>
<td>Expandable JavaScript object</td>
</tr>
<tr>
<td><code class="highlighter-rouge">%c</code></td>
<td>Formats the output using the CSS style you provide</td>
</tr>
</tbody>
</table>
<p>Using the <code class="highlighter-rouge">%c</code> format specifier allows you to style the console output.</p>
<div class="language-js highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="nx">console</span><span class="p">.</span><span class="nx">log</span><span class="p">(</span><span class="dl">'</span><span class="s1">%cThis text is styled!</span><span class="dl">'</span><span class="p">,</span> <span class="dl">'</span><span class="s1">color: #86CC00; background-color: blue; font-size: 20px; padding: 3px;</span><span class="dl">'</span><span class="p">)</span>
</code></pre></div></div>
<p><img src="https://cdn.codecarrot.net/images/34sdfDSF43w-console-log-styled.png" alt="Using console.log() with styled output" /></p>
<p><em>Using console.log() with styled output</em></p>
<h2 id="consoleassertexpression-object">console.assert(expression, object)</h2>
<p>The <code class="highlighter-rouge">console.assert()</code> method takes two parameters, a boolean expression, and an object. If the result of the expression is <code class="highlighter-rouge">false</code> the object will be printed in the console.</p>
<p>You will usually want to use a string object as the second parameter but the method will work with any valid JavaScript object.</p>
<div class="language-js highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="kd">var</span> <span class="nx">count</span> <span class="o">=</span> <span class="mi">5</span><span class="p">;</span>
<span class="nx">console</span><span class="p">.</span><span class="nx">assert</span><span class="p">(</span><span class="nx">count</span> <span class="o">></span> <span class="mi">10</span><span class="p">,</span> <span class="dl">'</span><span class="s1">count is not larger than 10</span><span class="dl">'</span><span class="p">);</span>
</code></pre></div></div>
<p>The expression here checks to see if the <code class="highlighter-rouge">count</code> variable is larger than 10. If it’s not, the message ‘count is not larger than 10’ is printed in the console.</p>
<p><img src="https://cdn.codecarrot.net/images/34DF34rsd-console-assert.png" alt="Using console.assert()" /></p>
<p><em>Using console.assert()</em></p>
<h2 id="consoleclear">console.clear()</h2>
<p>The <code class="highlighter-rouge">console.clear()</code> method clears any output in the console window.</p>
<hr />
<p><strong>Note:</strong> This method is not supported by the default Firefox developer tools, but is supported in the Firebug console.</p>
<hr />
<h2 id="consolecountlabel">console.count(label)</h2>
<p>The <code class="highlighter-rouge">console.count()</code> method will output the number of times that the count() method has been called. You will only get an accurate count if this method is called at the same line, with the same label each time.</p>
<p>This method can be useful for finding out how many times a function is being called in your code.</p>
<div class="language-js highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="kd">function</span> <span class="nx">clickHandler</span><span class="p">()</span> <span class="p">{</span>
<span class="nx">console</span><span class="p">.</span><span class="nx">count</span><span class="p">(</span><span class="dl">'</span><span class="s1">Click handler called</span><span class="dl">'</span><span class="p">);</span>
<span class="p">...</span>
<span class="p">}</span>
</code></pre></div></div>
<hr />
<p><strong>ProTip!</strong> You can enter multi-line expressions in the console by using <code class="highlighter-rouge">Shift</code> + <code class="highlighter-rouge">Enter</code> to create a new line.</p>
<hr />
<p>You can test that this works by using a for loop in the console.</p>
<div class="language-js highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="k">for</span> <span class="p">(</span><span class="kd">var</span> <span class="nx">i</span> <span class="o">=</span> <span class="mi">0</span><span class="p">;</span> <span class="nx">i</span> <span class="o"><</span> <span class="mi">3</span><span class="p">;</span> <span class="nx">i</span><span class="o">++</span><span class="p">)</span> <span class="p">{</span>
<span class="nx">clickHandler</span><span class="p">();</span>
<span class="p">}</span>
</code></pre></div></div>
<p>This code will call the <code class="highlighter-rouge">clickHandler()</code> method three times.</p>
<p><img src="https://cdn.codecarrot.net/images/34dsRr43-console-count.png" alt="Using console.count() to count function calls" /></p>
<p><em>Using console.count() to count function calls</em></p>
<hr />
<p><strong>Note:</strong> This method is not supported by the default Firefox developer tools. Instead use the Firebug console.</p>
<hr />
<h2 id="consoledirobject">console.dir(object)</h2>
<p>The <code class="highlighter-rouge">console.dir()</code> method will print a JavaScript representation of the supplied object to the console. This method is especially useful for examining HTML elements, as it will display the DOM representation of the element rather than the XML representation displayed when using <code class="highlighter-rouge">console.log()</code>.</p>
<div class="language-js highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="nx">console</span><span class="p">.</span><span class="nx">dir</span><span class="p">(</span><span class="nb">document</span><span class="p">.</span><span class="nx">body</span><span class="p">);</span>
</code></pre></div></div>
<p><img src="https://cdn.codecarrot.net/images/3Ded23-console-dir.png" alt="Using console.dir() to examine an HTML element" /></p>
<p><em>Using console.dir() to examine an HTML element</em></p>
<h2 id="consoledirxmlobject">console.dirxml(object)</h2>
<p>The <code class="highlighter-rouge">console.dirxml()</code> method prints the XML representation of on a object.</p>
<div class="language-js highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="nx">console</span><span class="p">.</span><span class="nx">dirxml</span><span class="p">(</span><span class="nb">document</span><span class="p">.</span><span class="nx">body</span><span class="p">);</span>
</code></pre></div></div>
<p>When used with a HTML element, the output is equivalent to using <code class="highlighter-rouge">console.log()</code>.</p>
<p><img src="https://cdn.codecarrot.net/images/3SDfds34-console-dirxml.png" alt="Using console.dirxml()" /></p>
<p><em>Using console.dirxml()</em></p>
<hr />
<p><strong>Note:</strong> This method is not supported by the default Firefox developer tools. Instead use the Firebug console.</p>
<hr />
<h2 id="consoleerrorobject--object-">console.error(object [, object, …])</h2>
<p>The <code class="highlighter-rouge">console.error()</code> method takes one or more objects and prints them to the console. This method is similar to <code class="highlighter-rouge">console.log()</code> however <code class="highlighter-rouge">console.error()</code> will also print a stack trace from where the method was called. The output will also be flagged as an error in the console.</p>
<div class="language-js highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="nx">console</span><span class="p">.</span><span class="nx">error</span><span class="p">(</span><span class="dl">'</span><span class="s1">Page not found (404)</span><span class="dl">'</span><span class="p">);</span>
</code></pre></div></div>
<p>This method is really useful when writing error handlers.</p>
<p><img src="https://cdn.codecarrot.net/images/3DSwer3-console-error.png" alt="Logging console errors with console.error()" /></p>
<p><em>Logging console errors with console.error()</em></p>
<h2 id="consolegroupobject-object---consolegroupend">console.group(object[, object, …]) & console.groupEnd()</h2>
<p>The <code class="highlighter-rouge">console.group()</code> method is used to group together a series of log messages. Once this method is called, any further log messages will be added to the group until <code class="highlighter-rouge">console.groupEnd()</code> is executed to close the group.</p>
<p>You can specify an optional title to make it easier to find the group in the console.</p>
<div class="language-js highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="nx">console</span><span class="p">.</span><span class="nx">group</span><span class="p">(</span><span class="dl">'</span><span class="s1">Fetching Data</span><span class="dl">'</span><span class="p">);</span>
</code></pre></div></div>
<p><img src="https://cdn.codecarrot.net/images/23sSD3-console-group.png" alt="Grouping console messages with console.group()" /></p>
<p><em>Grouping console messages with console.group()</em></p>
<p>It is possible to nest multiple groups within one another.</p>
<div class="language-js highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="nx">console</span><span class="p">.</span><span class="nx">group</span><span class="p">(</span><span class="dl">'</span><span class="s1">Group One</span><span class="dl">'</span><span class="p">);</span>
<span class="nx">console</span><span class="p">.</span><span class="nx">group</span><span class="p">(</span><span class="dl">'</span><span class="s1">Group Two</span><span class="dl">'</span><span class="p">);</span>
<span class="p">...</span>
<span class="nx">console</span><span class="p">.</span><span class="nx">groupEnd</span><span class="p">();</span> <span class="c1">// Close group two</span>
<span class="nx">console</span><span class="p">.</span><span class="nx">groupEnd</span><span class="p">();</span> <span class="c1">// Close group one</span>
</code></pre></div></div>
<h2 id="consolegroupcollapsedobject-object-">console.groupCollapsed(object[, object, …])</h2>
<p>The <code class="highlighter-rouge">console.groupCollapsed()</code> method is essentially the same as <code class="highlighter-rouge">console.group()</code> except that the group is initially displayed collapsed rather than open in the console.</p>
<div class="highlighter-rouge"><div class="highlight"><pre class="highlight"><code>console.groupCollapsed('Fetching Data');
console.log('Request Sent');
console.error('Error: Server not responding (500)');
console.groupEnd();
console.log('Continuing...');
</code></pre></div></div>
<p><img src="https://cdn.codecarrot.net/images/23DSF32we-console-group-collapsed.png" alt="Grouping log messages with console.groupCollapsed()" /></p>
<p><em>Grouping log messages with console.groupCollapsed()</em></p>
<h2 id="consoleinfoobject--object-">console.info(object [, object, …])</h2>
<p>The <code class="highlighter-rouge">console.info()</code> method functions in the same way as <code class="highlighter-rouge">console.log()</code> with the exception that log messages are given the <code class="highlighter-rouge">info</code> flag. This can be handy as the developer tools console has a feature that allows you to filter log messages using flags.</p>
<div class="language-js highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="nx">console</span><span class="p">.</span><span class="nx">info</span><span class="p">(</span><span class="dl">'</span><span class="s1">Hello CodeCarrot</span><span class="dl">'</span><span class="p">);</span>
</code></pre></div></div>
<p>Note the blue info icon to the left of the log message in the image below.</p>
<p><img src="https://cdn.codecarrot.net/images/sdf23FSD-console-info.png" alt="Logging info messages with console.info()" /></p>
<p><em>Logging info messages with console.info()</em></p>
<h2 id="consoleprofileprofile--consoleprofileend">console.profile([profile]) & console.profileEnd()</h2>
<p>The <code class="highlighter-rouge">console.profile()</code> method will start a new JavaScript CPU profile if the developer tools are open. You have the option to specify a label for the profile if you wish.</p>
<p>The <code class="highlighter-rouge">console.profileEnd()</code> method will complete the profile.</p>
<div class="language-js highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="kd">function</span> <span class="nx">animationUI</span><span class="p">()</span> <span class="p">{</span>
<span class="nx">console</span><span class="p">.</span><span class="nx">profile</span><span class="p">(</span><span class="dl">'</span><span class="s1">Animating</span><span class="dl">'</span><span class="p">);</span>
<span class="c1">// Animate something...</span>
<span class="nx">console</span><span class="p">.</span><span class="nx">profileEnd</span><span class="p">();</span>
<span class="p">}</span>
</code></pre></div></div>
<p>This example shows how you might use the <code class="highlighter-rouge">profile()</code> method to create a new CPU profile for the <code class="highlighter-rouge">animateUI()</code> function.</p>
<p><img src="https://cdn.codecarrot.net/images/dsf324DS3-console-profile.png" alt="Creating a JavaScript CPU Profile with console.profile()" /></p>
<p><em>Creating a JavaScript CPU Profile with console.profile()</em></p>
<h2 id="consoletabledata">console.table(data)</h2>
<p>The <code class="highlighter-rouge">console.table()</code> method allows you to output structured data as an interactive table in the console.</p>
<div class="language-js highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="kd">var</span> <span class="nx">data</span> <span class="o">=</span> <span class="p">[</span>
<span class="p">{</span><span class="na">first_name</span><span class="p">:</span> <span class="dl">'</span><span class="s1">Matt</span><span class="dl">'</span><span class="p">,</span> <span class="na">last_name</span><span class="p">:</span> <span class="dl">'</span><span class="s1">West</span><span class="dl">'</span><span class="p">,</span> <span class="na">occupation</span><span class="p">:</span> <span class="dl">'</span><span class="s1">Programmer</span><span class="dl">'</span><span class="p">},</span>
<span class="p">{</span><span class="na">first_name</span><span class="p">:</span> <span class="dl">'</span><span class="s1">Vince</span><span class="dl">'</span><span class="p">,</span> <span class="na">last_name</span><span class="p">:</span> <span class="dl">'</span><span class="s1">Vaughn</span><span class="dl">'</span><span class="p">,</span> <span class="na">occupation</span><span class="p">:</span> <span class="dl">'</span><span class="s1">Actor</span><span class="dl">'</span><span class="p">},</span>
<span class="p">{</span><span class="na">first_name</span><span class="p">:</span> <span class="dl">'</span><span class="s1">Larry</span><span class="dl">'</span><span class="p">,</span> <span class="na">last_name</span><span class="p">:</span> <span class="dl">'</span><span class="s1">Page</span><span class="dl">'</span><span class="p">,</span> <span class="na">occupation</span><span class="p">:</span> <span class="dl">'</span><span class="s1">CEO</span><span class="dl">'</span><span class="p">}</span>
<span class="p">];</span>
<span class="nx">console</span><span class="p">.</span><span class="nx">table</span><span class="p">(</span><span class="nx">data</span><span class="p">);</span>
</code></pre></div></div>
<p><img src="https://cdn.codecarrot.net/images/34DSFwwe32-console-table.png" alt="Creating interactive tables with console.table()" /></p>
<p><em>Creating interactive tables with console.table()</em></p>
<p>This method can be really handy for examining data returned by an AJAX call.</p>
<hr />
<p><strong>Note:</strong> This method is not supported by the default Firefox developer tools. Instead use the Firebug console.</p>
<hr />
<h2 id="consoletimelabel--consoletimeendlabel">console.time(label) & console.timeEnd(label)</h2>
<p>The <code class="highlighter-rouge">console.time()</code> and <code class="highlighter-rouge">console.timeEnd()</code> methods give you a way of timing how long it takes for a piece of code to execute. Both the <code class="highlighter-rouge">time()</code> and <code class="highlighter-rouge">timeEnd()</code> methods should be passed the same <code class="highlighter-rouge">label</code> parameter.</p>
<div class="language-js highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="nx">console</span><span class="p">.</span><span class="nx">time</span><span class="p">(</span><span class="dl">'</span><span class="s1">Draw frame</span><span class="dl">'</span><span class="p">);</span>
<span class="c1">// Execute some code...</span>
<span class="nx">console</span><span class="p">.</span><span class="nx">timeEnd</span><span class="p">(</span><span class="dl">'</span><span class="s1">Draw frame</span><span class="dl">'</span><span class="p">);</span>
</code></pre></div></div>
<p><img src="https://cdn.codecarrot.net/images/34DSFwf253-console-time.png" alt="Timing code execution with console.time()" /></p>
<p><em>Timing code execution with console.time()</em></p>
<h2 id="consoletimelinelabel--consoletimelineendlabel">console.timeline(label) & console.timelineEnd(label)</h2>
<p>The <code class="highlighter-rouge">console.timeline()</code> and <code class="highlighter-rouge">console.timelineEnd()</code> methods allow you to make a new timeline recording in the Chrome developer tools.</p>
<p>You have the option to specify a label for the new timeline. As with <code class="highlighter-rouge">console.time()</code>, this label must be the same in the calls to <code class="highlighter-rouge">console.timeline()</code> and <code class="highlighter-rouge">console.timelineEnd()</code>.</p>
<div class="language-js highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="nx">console</span><span class="p">.</span><span class="nx">timeline</span><span class="p">(</span><span class="dl">'</span><span class="s1">Google Search</span><span class="dl">'</span><span class="p">);</span>
<span class="c1">// Do some work.</span>
<span class="nx">console</span><span class="p">.</span><span class="nx">timelineEnd</span><span class="p">(</span><span class="dl">'</span><span class="s1">Google Search</span><span class="dl">'</span><span class="p">);</span>
</code></pre></div></div>
<p><img src="https://cdn.codecarrot.net/images/34ef78ijg-console-timeline.png" alt="Creating timelines in Chrome with console.timeline()" /></p>
<p><em>Creating timelines in Chrome with console.timeline()</em></p>
<hr />
<p><strong>Note:</strong> The timeline methods are only available in the Chrome developer tools.</p>
<hr />
<h2 id="consoletimestamplabel">console.timeStamp(label)</h2>
<p>You can manually add events to the timeline using the <code class="highlighter-rouge">console.timeStamp()</code> method. This method can be passed a label to help you identify the marker in the developer tools.</p>
<p><img src="https://cdn.codecarrot.net/images/fgh67JH6-console-timestamp.png" alt="Creating timeline markers with console.timeStamp()" /></p>
<p><em>Creating timeline markers with console.timeStamp()</em></p>
<hr />
<p><strong>Note:</strong> This method is only supported in Chrome. It was previously called <code class="highlighter-rouge">console.markTimeline()</code>.</p>
<hr />
<h2 id="consoletrace">console.trace()</h2>
<p>The <code class="highlighter-rouge">console.trace()</code> method will print a stack trace for the point at which the method was called.</p>
<div class="language-js highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="nx">console</span><span class="p">.</span><span class="nx">trace</span><span class="p">();</span>
</code></pre></div></div>
<p><img src="https://cdn.codecarrot.net/images/87jhjJYu67-console-trace.png" alt="Using console.trace() to print a stack trace" /></p>
<p><em>Using console.trace() to print a stack trace</em></p>
<h2 id="consolewarnobject--object-">console.warn(object [, object, …])</h2>
<p>Finally, the <code class="highlighter-rouge">console.warn()</code> method will log a message to the console with a warning flag.</p>
<div class="language-js highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="nx">console</span><span class="p">.</span><span class="nx">warn</span><span class="p">(</span><span class="err">‘</span><span class="nx">This</span> <span class="nx">is</span> <span class="nx">a</span> <span class="nx">warning</span><span class="p">.</span><span class="err">’</span><span class="p">);</span>
</code></pre></div></div>
<p><img src="https://cdn.codecarrot.net/images/67uygjYTu6-console-warn.png" alt="Logging warning messages with console.warn()" /></p>
<p><em>Logging warning messages with console.warn()</em></p>
<h2 id="summary">Summary</h2>
<p>In this post you’ve learned about the various <code class="highlighter-rouge">console</code> methods that you can use to debug your web applications. You’ll find that you use some of these methods more than others, but it’s certainly useful to understand what can be achieved through the developer tools console.</p>
<p>I recommend that you check out some of the links in the Further Reading section below, especially <a href="//developers.google.com/chrome-developer-tools/docs/tips-and-tricks">dev tools tips and tricks</a> from the Google Developers website.</p>
<p>What tools do you like to use when debugging your front-end web applications? Share your favorites in the comments below.</p>
<h2 id="further-reading">Further Reading</h2>
<ul>
<li><a href="//developer.mozilla.org/en-US/docs/Web/API/console"><strong>MDN:</strong> Console Documentation</a></li>
<li><a href="//developers.google.com/chrome-developer-tools/docs/console-api"><strong>Google Developers:</strong> Console API Reference</a></li>
<li><a href="//developers.google.com/chrome-developer-tools/docs/tips-and-tricks"><strong>Google Developers:</strong> Dev Tools Tips and Tricks</a></li>
</ul>yashumittalThe developer tools console is one of the most powerful tools available to you when it comes to debugging your front-end web applications. The console has an API that provides a number of methods that make debugging easier. It’s not uncommon to see developers using console.log() or console.dir() to investigate problems; but the developer tools console has a lot more to offer.
https://cdn.codecarrot.net/images/alessandro_pilastrini_terminal_icon.png
How RuboCop can ease your code review pains2017-11-09T17:49:40+00:002017-11-09T17:49:40+00:00https://blog.codecarrot.net/how-rubocop-can-ease-your-code-review-pains<p>If you are a coder trying to adhere to the style of your colleagues’ code, or if you occasionally find yourself overlooking an obvious syntactic error, Rubocop —a static code analysis tool—is here to help.</p>
<p>Among the skills that constitute a decent Ruby coder, there is one key understanding that all coders share: <strong>your code is not only interpreted by a machine, but by fellow programmers as well.</strong> From this understanding, style guides were born to make interpreting subsequent lines of code easier (for humans).</p>
<p>Style guides are a bit like accents in spoken languages—everyone understands each other better if each person understands the small nuances and styles within their team.</p>
<p>If you are a coder trying to adhere to the style of your colleagues’ code, or if you occasionally find yourself overlooking an obvious syntactic error, <a href="//github.com/bbatsov/rubocop">Rubocop</a> —a static code analysis tool—is here to help.</p>
<h2 id="benefits">Benefits:</h2>
<p>There are at least <strong>two advantages that RuboCop offers</strong> when writing code:</p>
<ul>
<li>you can <strong>track silly errors quickly</strong> without burrowing through many lines of the error stack</li>
<li>you can <strong>aid your review process by smashing all the errors and style deficiencies before they get pushed to a remote branch</strong>. This helps to avoid warnings and complaints from <a href="//github.com/thoughtbot/hound">Hound</a>, or a colleague with an eye for detail.</li>
</ul>
<h2 id="installation--configuration">Installation & configuration:</h2>
<p>Rubocop can be added to specific project gemfiles, but assuming you want to have it at your service anytime with your standard gemset, let’s just go for:</p>
<p><code class="highlighter-rouge">gem install rubocop</code></p>
<p>Now, if you can see something in your destination directory like <strong>rubocop (0.26.1)</strong> in your gem list, you can get RuboCop to run with:</p>
<p><code class="highlighter-rouge">rubocop</code></p>
<p>The program will look down the directory tree and for specific file formats. Then, using a list of rules known as ‘cops’ it’ll point out any inconsistencies or unwelcomed practices present in your code. A typical ‘offense’ might look like:</p>
<div class="highlighter-rouge"><div class="highlight"><pre class="highlight"><code><code> booksellers/spec/models/story_spec.rb:10:24: C: Avoid using {...} for multi-line blocks. Story.stub(:all) {[ ^ </code>
</code></pre></div></div>
<p>You can also <strong>look at specific files or subdirectories</strong> with:</p>
<p><code class="highlighter-rouge">rubocop [file/direcotory name]</code></p>
<p>RuboCop offers some <strong>additional options to run in the command line</strong>. Those who use Rails may opt for additional cops to be run with:</p>
<p><code class="highlighter-rouge">rubocop --rails</code></p>
<p>There is also <strong>an experimental feature which corrects some errors automatically</strong>. However, use it with caution. RuboCop judgement may not always be 100% accurate and the corrected code might be contrary to what is desired:</p>
<p><code class="highlighter-rouge">rubocop --auto-correct</code></p>
<p>Unless otherwise specified, RuboCop uses a default list of rules based on <a href="//github.com/bbatsov/rails-style-guide">this style guide</a>. Of course, if you or your team has its own prerogatives, these are usually held in <code class="highlighter-rouge">.rubocop.yml</code> file. If you want your own rules to be used throughout all the apps just place the correctly formatted .rubocop.yml file into your home directory.</p>
<p>By having a rules file (with a line like the one below), it will overwrite the default setting of maximum 80 characters per line, and limit it to 99 instead:</p>
<p><code class="highlighter-rouge">Style/LineLength: Max: 99</code></p>
<p>As you work with different developers on different projects, the rules to adhere to may vary, and it’s possible to add application-specific rules inside the application root directory or in the ‘app/config’ directory. Therefore, you can set layers of different rules to apply starting from the defaults, to machine-wide, and ultimately project-specific rules.</p>
<h2 id="integration-with-text-editors">Integration with text editors</h2>
<p>Undoubtedly, one cool feature of RuboCop is that it allows integration with the most popular text editors such as <a href="//github.com/ngmy/vim-rubocop">Vim</a> or <a href="//github.com/pderichs/sublime_rubocop">Sublime Text</a>.</p>
<p>After <strong>adding the plugin in Sublime Text</strong> and restarting the editor, subsequent requests to save the file will automatically start RuboCop. If there are any code offenders, you’ll see it nicely highlighted with the description provided at the bottom bar of the editor.</p>
<p>Be aware that although these might turn out to be helpful features, RuboCop running in the background will significantly slow your editor down when saving changes. However, if this becomes a nuisance and you still want to keep the process automated, you might choose integrating RuboCop with <a href="//github.com/yujinakayama/guard-rubocop">Guard as a healthy alternative</a>.</p>
<p><img src="https://cdn.codecarrot.net/images/1425999553-1412162922-rubocop-blogpost-obrazek.png" alt="sublime text 3 robocop" /></p>
<p>Thats it! With RuboCop you can nip these silly errors and style issues in the bud before any bad habits can sink in. RuboCop is here to enforce your code and style rules, so that you don’t have a second thought to your code review.</p>yashumittalIf you are a coder trying to adhere to the style of your colleagues’ code, or if you occasionally find yourself overlooking an obvious syntactic error, Rubocop —a static code analysis tool—is here to help.
https://cdn.codecarrot.net/images/66385f42-smush-1412165757-robo.jpg
How to write code that speaks for itself2017-11-09T16:57:40+00:002017-11-09T16:57:40+00:00https://blog.codecarrot.net/how-to-write-code-that-speaks-for-itself<p>The very real danger with commenting code is that it becomes outdated while the codebase rapidly evolves. And out of date comments are far worse than no comments. So what’s the alternative?</p>
<p>At CodeCarrot we aim for fast iterations as part of that goal we’ve come to the opinion that comments in code are not worthwhile. That’s not to say we never comment code, but it’s a guideline to write code that is easy to read.</p>
<p>The very real danger with commenting code is that it becomes outdated while the codebase rapidly evolves. And out of date comments are far worse than no comments. So what’s the alternative?</p>
<p><strong>Self documenting code is code that speaks for itself.</strong> The code becomes an understandable piece of text that tells stories about business objects that interact with each other in various contexts.</p>
<p>We’ve gathered our team’s thoughts about how to make readable code:</p>
<h2 id="write-short-methods">Write short methods</h2>
<p>If you find methods starting to get longer than 5 lines it’s doing too much. Try to shorten it down.</p>
<div class="highlighter-rouge"><div class="highlight"><pre class="highlight"><code>def process_payment(payment)
charge_service = ChargeCustomerService.new(payment).call
if charge_service.success?
PaymentsMailer.notify_order_complete(payment.user)
else
redirect_to new_payment_url, alert: charge_service.error
end
end
# becomes:
def process_payment(payment)
charge_service = ChargeCustomerService.new(payment).call
charge_service.success? ? success(payment) : error(charge_service.error)
end
def success(payment)
PaymentsMailer.notify_order_complete(payment.user)
end
def error(error)
redirect_to new_payment_url, alert: error
end
</code></pre></div></div>
<h2 id="carefully-choosing-method-names">Carefully choosing method names</h2>
<p>A method like #inspect is short and simple and perfectly describes what it does. Ruby is full of these kinds of methods: <code class="highlighter-rouge">Time.now</code>, <code class="highlighter-rouge">each</code>, <code class="highlighter-rouge">upcase</code>, <code class="highlighter-rouge">is_a?</code>, <code class="highlighter-rouge">instance_of</code>?</p>
<p>We’ve already established (step 1) that the method will do one thing, so name it by what it does. Short and sweet is the goal… Examples: <code class="highlighter-rouge">authorize_user</code>, <code class="highlighter-rouge">save_in_background</code>. If a method takes arguments it is possible to take this into account: <code class="highlighter-rouge">authorize(user)</code>, <code class="highlighter-rouge">json_for(product)</code>.</p>
<p>In ruby adding a <code class="highlighter-rouge">!</code> to a method tells you the method will modify the object it is called on.</p>
<div class="highlighter-rouge"><div class="highlight"><pre class="highlight"><code>title = 'Ruby Ruby Ruby Ruby!'
title.downcase!
title # => 'ruby ruby ruby ruby!'
</code></pre></div></div>
<p>Add a <code class="highlighter-rouge">?</code> to any method that returns true or false.</p>
<div class="highlighter-rouge"><div class="highlight"><pre class="highlight"><code>nil.present? # => false
nil.nil? # => true
</code></pre></div></div>
<h2 id="variable-naming">Variable naming</h2>
<p>Variables are a way to cheat if you weren’t able to find a good name for the method. <code class="highlighter-rouge">@user = GoogleAuthService.call(security_token)</code> Finding the perfect name for a variable is difficult. But it will pay off the next time someone looks into the code.</p>
<h2 id="use-common-design-idioms">Use common design idioms</h2>
<h2 id="use-rubys-opinions-on-method-naming">Use Ruby’s opinions on method naming</h2>
<p>Reuse method names like call and to_s that developers already understand from ruby. Ruby uses the call method for an executable block of code. That’s why it’s good practice to use the call method in a service. That way if someone comes along and sees a call method, they can already guess how it works.</p>
<h2 id="service-objects">Service Objects</h2>
<p><a href="/service-objects-in-rails-will-help-you-design-clean-and-maintainable-code-Heres-how">Services are a great place to group logical pieces of functionality.</a> In fact, inspecting the services folder of an application should tell the programmer what the application really does, which is not always obvious when looking at controllers or models.</p>
<h2 id="decorators">Decorators</h2>
<p>Decorators let you create methods on objects that return data in only the contexts they are needed. The most common place to use a decorator is in the view.</p>
<div class="highlighter-rouge"><div class="highlight"><pre class="highlight"><code>class ProductDecorator < Draper::Decorator
def short_title
object.title.truncate_words(5)
end
end
</code></pre></div></div>
<h2 id="readability--optimization">Readability > Optimization</h2>
<p>Optimization is great. In databases and other places where it actually makes a difference to response times. Premature optimization: you don’t know if it will actually make a difference. Skipping a more verbal series of steps for a few shortcuts might shave off some milliseconds, but it adds minutes to the next time you try debug what you wrote.</p>
<h2 id="writing-specs">Writing specs</h2>
<p>Testing code properly will be a guide to future developers when they approach your codebase. They’ll get an overview of the flow of the application. The same ideas with improving code readability apply to writing specs!</p>
<p>Focus on contexts in tests. They are useful for separating specific behaviors and conditions in the program’s flow.</p>
<div class="highlighter-rouge"><div class="highlight"><pre class="highlight"><code>describe "Admin dashboard" do
let(:admin) { create :user, :admin }
context "with a new notification" do
let(:notification) { create :notification }
it "displays the notice" do
log_in_admin
visit admin_root_path
expect(page).to have_content 'New notification'
expect(page).to have_content notification.title
end
end
end
</code></pre></div></div>
<p>The naming in each block is important. When the test fails it will read in a way that makes sense: Failed: Admin dashboard with a new notification displays the notice.</p>
<h2 id="use-language-style-guides">Use language style guides</h2>
<p>At <a href="//www.codecarrot.net/">CodeCarrot</a> we use automated checking of our style with <a href="/how-rubocop-can-ease-your-code-review-pains">Thoughtbot’s hound which uses rubocop</a>. If that wasn’t enough our code reviews not only check code quality but also code readability.</p>
<p>There are style guides for:</p>
<ul>
<li><a href="//github.com/polarmobile/coffeescript-style-guide">coffeescript</a></li>
<li><a href="//betterspecs.org/">rspec</a></li>
<li><a href="//github.com/styleguide/css">css/sass</a></li>
<li><a href="//blog.rivalfox.com/haml-best-practices/">haml</a></li>
<li><a href="//www.caliban.org/ruby/rubyguide.shtml">ruby</a></li>
</ul>yashumittalThe very real danger with commenting code is that it becomes outdated while the codebase rapidly evolves. And out of date comments are far worse than no comments. So what’s the alternative?
https://cdn.codecarrot.net/images/1425999552-1412068618.jpg
How Developing SPA Influenced Me & My Code2017-11-09T16:17:40+00:002017-11-09T16:17:40+00:00https://blog.codecarrot.net/how-developing-spa-influenced-me-and-my-code<p>I’d like to share my thoughts about what’s different (the good and the not-so-good) in SPA’s and why as a web developer, you should care about it. Of course, YMMV, so I encourage you to share your opinions in the comments!</p>
<h2 id="background">Background</h2>
<p>For the past 8 months or so, I’ve worked exclusively on something known as a <strong>Single Page Application</strong>. It’s essentially front-end written entirely in JavaScript, using a SPA framework, with a REST API written in rails (as opposed to traditional rails-way applications). This experience has considerably changed my views on web-development in general.</p>
<p>In this blog post, I’d like to share my thoughts about what’s different (the good and the not-so-good) in SPA’s and why as a web developer, you should care about it. Of course, YMMV, so I encourage you to share your opinions in the comments!</p>
<h2 id="the-case-for-single-page-applications">The Case For Single-Page Applications</h2>
<p>The world is changing fast. People’s behaviors change more rapidly and today we use increasingly more and more cloud-based apps, accessible from devices that aren’t necessarily opened with a web browser or native desktop apps. We expect lower response times, snappy, intuitive interfaces and near-100% availability.</p>
<p>How can we, as developers deliver that?</p>
<p>Well, there’s a rule that states, <strong>“use the right tool for the job.”</strong> I believe applying this rule to web-dev results in Single-Page, API-based applications.</p>
<p>We’ve all seen terrible rails code bases. Models coupled to views, views littered by conditionals, tons of JS glue code to stitch pieces of HTML together to form a user interface. It doesn’t have to be that way. There exists several techniques which help decoupling presentation from the domain: <a href="//github.com/drapergem/draper">Decorators / View Objects</a> for instance, encapsulate code which deals with presentation in another class.</p>
<p>This however, does not solve the underlying problem: <strong>The frontend (browser) and backend (rails) are radically different environments, and thus require different tools.</strong></p>
<p>Backend is a simple pipeline: a request comes in, the application does something, and a response comes back. But frontend is event-driven: multiple things happen simultaneously, hovering, clicking, scrolling, loading etc. Frontend is a user interface, dynamic, adapting, changing. By spitting back HTML from a rails pipeline, a lot of hacks and ugly JS code is required to emulate the responsiveness.</p>
<p>Luckily, many tools have been developed which alleviate this problem. JavaScript frameworks like <a href="//marionettejs.com/">marionette</a>, <a href="//angularjs.org/">angular</a> or <a href="//emberjs.com/">ember</a>. These tools were created with the dynamic environment of the browser in mind. When using them, typically the role of the backend is reduced to accepting and returning JSON, being a REST API after all.</p>
<p>Decoupling domain and presentation has many advantages too: the API that powers a web-application can be used for native mobile apps as well. Every successful product will need to enter the mobile market sooner or later, so you might as well be prepared for it. It results in snappier interactions so that the page doesn’t need to be reloaded in order to see the result of an action. Since the API transfers raw JSON data, the amount of traffic can be reduced and caching is also easier and more effective. The biggest difference, however, is in the quality of code.</p>
<h2 id="how-developing-spa-influenced-me--my-code">How Developing SPA Influenced Me & My Code</h2>
<h3 id="the-good">The Good</h3>
<p>Working on this kind of project was a peculiar experience for me. A lot of things suddenly felt right for a dynamic web app. I didn’t need so many hacks and glue code to pass HTML around. There were less bugs in js code. Front-end coding started to be pleasant!</p>
<p>How often do you test your rails controllers? What about views? Testing is hard because things are jammed together in the rails world. You can design your application around small components, with little dependencies and small responsibilities. The framework I used - marionette - encourages that. Rails? Not so much! Testing and maintenance become much easier.</p>
<p>On the rails side, controllers become smaller. All presentation-related code goes away. It’s a big deal conceptually, as you only have to care about how to consume and deliver JSON data. Combine that with other handy patterns (service objects, form objects) and you have a big win.</p>
<p>I started thinking more about designing applications well, rather than following hard-beaten rails-way. No more working around fits-it-all framework to achieve the goal.</p>
<h3 id="the-bad">The Bad</h3>
<p>Of course, it wasn’t always pretty and shiny. In the past, I was skeptical about SPAs. The argument of productivity in rails appealed to me. I must admit, the new way of doing things and learning a javascript framework has been a steep learning curve. You won’t be moving as fast as with rails in the beginning. JavaScript can feel less familiar than ruby and testing can be awkward: they are different tools, created for different environments and purposes.</p>
<p>The change of paradigm also brings a whole suite of new challenges. For example, the lifecycle of a page is longer: you can expect the user to have an application open in a tab for hours! That’s why you need to be extra careful about memory management by removing references and bindings to unused objects, so that JavaScript’s GC can sweep them. Memory leaks can cause deterioration of responsiveness or even crash the browser tab.</p>
<p>The back button is a common trouble spot in SPAs. You need to make sure it works as expected (check if the framework can handle it for you). Moreover, in most cases, refreshing the page should bring up the same view (this applies to links shared with others too).</p>
<h3 id="final-opinion">Final opinion</h3>
<p>In hindsight, it was absolutely worth it. Once you’re up-to-speed with front-end skills, you can be just as productive as when you’re using an all-rails stack. Plus, your code is a lot better. When you’re working in a team, it’s great too, as people can focus on only one side of the application, delivering better results.</p>
<p>What was surprising was that the switch really helped me advance in other areas of web development. By having focusing on both frontend or backend simultaneously, I learned to code each one a little better. This was a big step for me, and since then, I’ve been motivated to learn as much as I can about frontend (the area I’ve had less experience with).</p>
<p>Note that I’ve only used one technology (backbone + marionette as you’ll see) to develop simple applications. It would be interesting to know if the set of advantages and disadvantages is perhaps particular for this technology (I think I’ll be trying angular in the future).</p>
<h2 id="the-development-stack">The Development Stack</h2>
<p>In the past, we’ve had experience with <a href="//backbonejs.org/">backbone.js</a>, and we’ve used that for our projects. But backbone is not a fully-fledged framework. That’s where <a href="//marionettejs.com/">marionette</a> comes in.</p>
<p>Marionette complements backbone beautifully, by adding useful components, module management, conventions, and composite architecture. That last element is most important: marionette applications consists of modules that form hierarchies, which in turn comprise the whole interface. It also features ways for modules to communicate with each other in different ways to avoid coupled, spaghetti code. And lastly, everything in marionette revolves around events which are emitted by entities (models), views and controllers, fitting nicely in the browser environment. If you have a backbone application and are looking to make it better, you can check out this blog post, <a href="/marionette-js-and-backbone-a-perfect-match">“Marionette.js and Backbone - a perfect match?”</a>.</p>
<p>For JS templating we’ve used battle-proven <a href="//handlebarsjs.com/">handlebars</a>, but there are nice alternatives like <a href="//github.com/netzpirat/haml_coffee_assets">haml-coffee-assets</a> that let you use HAML for JavaScript templates (How cool :)).</p>
<p>Testing JavaScript code is done using <a href="//github.com/jfirebaugh/konacha">konacha</a>.</p>
<p>On the backend side we’ve used <a href="//github.com/rails/jbuilder">jbuilder</a> templates to render JSON (<a href="//github.com/rails-api/active_model_serializers">activemodel-serializers</a> seems like a popular alternative). Caching is built-in with rails, so that’s a plus.</p>
<h2 id="conclusion">Conclusion</h2>
<p>The benefits of SPAs that I’ve seen are enormous, and I encourage every rails developer who hasn’t looked into them yet to do so.</p>
<p>You can start by choosing a JS framework and implementing your test app with it. Try to make all of the controllers return JSON, and see how slim they become. If you’re feeling adventurous, try coding frontend and backend in different repositories. The context-switching will be painful at first, but eventually it’ll become natural and reinforce the focus on the decoupling of domain, API and user interface.</p>
<p>For a really hardcore challenge, try implementing the API in different web framework. Anything that spits out JSON is fine (I’ve been experimenting a lot with <a href="//www.scala-lang.org/">Scala</a> and <a href="//www.playframework.com/">Play Framework</a>, personally). This exercise will open your mind to different approaches to the problem, and ultimately, help you become a better developer.</p>
<h2 id="resources">Resources</h2>
<p><a href="//backbonejs.org/">backbone.js</a>
<a href="//marionettejs.com/">marionette.js</a>
<a href="//www.backbonerails.com/">backbonerails</a>
<a href="//github.com/netguru/js_stack">js_stack</a></p>yashumittalI’d like to share my thoughts about what’s different (the good and the not-so-good) in SPA’s and why as a web developer, you should care about it. Of course, YMMV, so I encourage you to share your opinions in the comments!
https://cdn.codecarrot.net/images/1425999341-bulb.jpg
How to Outsource Effectively and Earn Back Your Time2017-11-09T15:01:45+00:002017-11-09T15:01:45+00:00https://blog.codecarrot.net/how-to-outsource-effectively-and-earn-back-your-time<p>As an entrepreneur, you wear several hats. Some of them might even look good on you.</p>
<p>But there will inevitably be some parts of starting and running a business that fall outside your expertise.</p>
<p>On top of that, you’re one person: You’ve only got 2 hands and 24 hours in a day.</p>
<p>Just because you carry the weight of your business on your shoulders, doesn’t mean you need to shoulder all the responsibility alone.</p>
<p>Delegating responsibilities to other capable hands frees you up to focus on your vision and the things only you can do, whether it’s growing your business or even spending more time with your family.</p>
<blockquote>
When it comes to creating time and finding talent, 'outsourcing' is an essential practice for efficient entrepreneurs.
</blockquote>
<h2 id="the-pros-and-cons-of-outsourcing">The Pros and Cons of Outsourcing</h2>
<p>Contrary to some definitions, outsourcing doesn’t necessarily mean contracting work out to someone in another country. Instead, look at it as handing off or “farming out” work to a third party that specializes in its execution.</p>
<p>It’s easy to become a control freak (in a good way) when you care deeply about your business, but that can make it hard to let go of aspects of your business in fear that someone else won’t do as good a job as you or won’t execute your vision exactly as you see it.</p>
<p>On the flip side, delegating too much or for the wrong price can increase your operating costs unnecessarily.</p>
<p>Effective outsourcing gives you back the time and energy you need to focus on higher impact things and maintain a good balance between life and work.</p>
<p>When contracting out a role or task you’ll need to consider:</p>
<ul>
<li><strong>Essential vs. nonessential tasks:</strong> Perhaps the most important thing to consider is whether what you’re outsourcing demands your attention and if that attention could be better spent on more essential tasks elsewhere (e.g. business development activities like creating strategic partnerships)</li>
<li><strong>Long-term relationships vs. one-time needs:</strong> Outsourcing a process in the long-term requires that you build a good relationship with the contractor or agency you’re working with, so that they know your business enough to work better with you over time.</li>
<li><strong>Your personal expertise and workflow:</strong> Look at outsourcing essential tasks where you don’t have the expertise to ensure quality work and find ways to offload nonessential tasks that consume a big chunk of your workday.</li>
<li><strong>Look at automation and “botsourcing” first:</strong> Some things are far cheaper and more efficient to automate than to outsource (more on that later).</li>
<li><strong>Costs:</strong> In many cases, you’ll choose outsourcing because it’s a cheaper alternative to hiring an employee full or part time. But consider whether you have the cash flow to support outsourcing costs and the potential return on investment (more revenue or time to focus on other things) that justifies it.</li>
</ul>
<p><strong>When in doubt, ask yourself how much your time is really worth</strong>. The simplest way to calculate the value of your time is based on the total number of hours you dedicate to work divided by the income you generate per hour you work. Then ask yourself if it’s worth paying someone to have that time back and what you would invest it on instead.</p>
<hr />
<h2 id="delegating-an-essential-skill-for-every-endeavour">Delegating: An Essential Skill for Every Endeavour</h2>
<p>Here are some tips for effective delegation:</p>
<ul>
<li><strong>Define a clear outcome:</strong> Describe the result you want (and don’t want). If it’s a measurable result, then agree upon a way to quantify it. Make sure your requirements are clear and, if relevant, that your instructions account for obstacles (“If this happens, then do this instead…”).</li>
<li><strong>Over-communicate:</strong> Explain <em>why</em> you want it done and what your venture is about. There’s no such thing as too much context or information around a task, so make sure you’re both on the same page.</li>
<li><strong>Set deadlines:</strong> If there’s a clear deliverable at the end (e.g. a logo design) make sure both you and the contractor are clear about when it’s expected. If you specify a date but no time, the assumption is that it’s due at the end of that day (midnight). For creative tasks, be sure you leave enough time to account for revisions.</li>
<li><strong>Be wary of time zone differences:</strong> When you’re working with remote help, it’s important to be aware of differences in working hours when establishing deadlines or meetings.</li>
<li><strong>Establish a line of communication:</strong> Make it easy for both you and the contractor to get in touch with one another if the need arises. Email is usually fine for communicating, but consider using Skype or Google Hangouts since they let you send instant messages, make calls and share what’s on your screen. For more complex, long-term remote teams, employ a tool like Trello or Slack to better facilitate the flow of necessary information.</li>
</ul>yashumittalAs an entrepreneur, you wear several hats. Some of them might even look good on you.
https://cdn.codecarrot.net/images/rawpixel-com-310778.jpg
Enhancing Sublime Text Context Menus on Windows2017-11-09T14:52:30+00:002017-11-09T14:52:30+00:00https://blog.codecarrot.net/enhancing-sublime-text-context-menus-on-windows<p>It’s a great code editor. It can be an IDE if you want it to be, but at it’s heart it’s a highly extensible text editor. But still it lacks behind one important feature to open project in Sublime Text from menus.</p>
<p>Sublime Text, by default, will give you the option to add Open with Sublime Text to the context menu when right-clicking any file. This is great and I use it a lot, make sure you’ve selected it during the install before starting this.</p>
<p><img src="https://cdn.codecarrot.net/images/open-as-sublime-project.png" alt="Open as Sublime Project" /></p>
<p>One thing that I have trouble with is that I do have other context menu enhancements and the Open with Sublime Text doesn’t always jump out at me. So one thing we’re going to do is add the Sublime Text icon to the existing context menu option. The other thing we’re going to do is add an <strong>Open Directory with Sublime Text</strong> action to the context menu when we right-click on a directory. All it takes is creating a .reg file to update your registry.</p>
<h2 id="1-create-a-file-on-your-desktop">1. Create a file on your desktop</h2>
<ol>
<li>Right-click on the desktop</li>
<li>Click New > Text Document</li>
<li>Name it “SublimeContext.reg” make sure to drop the .txt extension</li>
</ol>
<h2 id="2-open-in-notepad-or-sublime-text">2. Open in Notepad (or Sublime Text)</h2>
<ol>
<li>Make note of your installation directory of Sublime Text. I’m running Windows 8.1 with Sublime Text 3 in the default location. so for me, it is <code class="highlighter-rouge">C:\Program Files\Sublime Text 3\sublime_text.exe</code></li>
<li>If your’s is the same, no need to do anything, otherwise you’ll have to edit the block below with your default installation.</li>
<li>Copy and paste the following block into your file.
```
Windows Registry Editor Version 5.00</li>
</ol>
<p>[HKEY_CLASSES_ROOT*\shell\Open with Sublime Text]
“Icon”=”C:\Program Files\Sublime Text 3\sublime_text.exe”
[HKEY_CLASSES_ROOT*\shell\Open with Sublime Text\command]
@=”C:\Program Files\Sublime Text 3\sublime_text.exe "%1"”</p>
<p>[HKEY_CLASSES_ROOT\Directory\Background\shell\Sublime Text]
@=”Open Directory with Sublime Text”
“Icon”=”C:\Program Files\Sublime Text 3\sublime_text.exe”
[HKEY_CLASSES_ROOT\Directory\Background\shell\Sublime Text\command]
@=”C:\Program Files\Sublime Text 3\sublime_text.exe "%V"”</p>
<p>[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Directory\shell\Sublime Text]
@=”Open Directory with Sublime Text”
“Icon”=”C:\Program Files\Sublime Text 3\sublime_text.exe”
[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Directory\shell\Sublime Text\command]
@=”C:\Program Files\Sublime Text 3\sublime_text.exe "%V"”</p>
<div class="highlighter-rouge"><div class="highlight"><pre class="highlight"><code>4. Save and close your file.
5. Double-click on it and say yes, you want to add it to the registry.
## What's it doing?
I know I'm suspicious of modifying the registry, so let's walk through each line.
***
</code></pre></div></div>
<p>[HKEY_CLASSES_ROOT*\shell\Open with Sublime Text]
“Icon”=”C:\Program Files\Sublime Text 3\sublime_text.exe”
[HKEY_CLASSES_ROOT*\shell\Open with Sublime Text\command]
@=”C:\Program Files\Sublime Text 3\sublime_text.exe "%1"”</p>
<div class="highlighter-rouge"><div class="highlight"><pre class="highlight"><code>
These two are merely updating an existing key. The first `HKEY` is ensuring that you have the *Open with Sublime Text* context menu. The `Icon String Value` is a new one we're adding. It's simply adding the Sublime Text icon to the context menu. The second `HKEY` was an existing key that executes the command of opening the file you right-click in Sublime Text.
***
</code></pre></div></div>
<p>[HKEY_CLASSES_ROOT\Directory\Background\shell\Sublime Text]
@=”Open Directory with Sublime Text”
“Icon”=”C:\Program Files\Sublime Text 3\sublime_text.exe”
[HKEY_CLASSES_ROOT\Directory\Background\shell\Sublime Text\command]
@=”C:\Program Files\Sublime Text 3\sublime_text.exe "%V"”</p>
<div class="highlighter-rouge"><div class="highlight"><pre class="highlight"><code>
These two add the new Open Directory with Sublime Text to the background context menu, we'll cover each line specifically below which adds to the right-click context menu in the same way.
***
</code></pre></div></div>
<p>[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Directory\shell\Sublime Text]
@=”Open Directory with Sublime Text”
“Icon”=”C:\Program Files\Sublime Text 3\sublime_text.exe”
[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Directory\shell\Sublime Text\command]
@=”C:\Program Files\Sublime Text 3\sublime_text.exe "%V"”
```</p>
<p>These two are completely new. This is what adds <em>Open Directory with Sublime Text</em> to the right-click context menu. The first <code class="highlighter-rouge">HKEY</code> adds the text to the context menu and the Icon. The second <code class="highlighter-rouge">HKEY</code> adds the command of opening the directory you right-clicked in Sublime Text.</p>
<p>It’s not much, but it adds a nice little touch to an amazing product. Have fun with it!</p>yashumittalIt’s a great code editor. It can be an IDE if you want it to be, but at it’s heart it’s a highly extensible text editor. But still it lacks behind one important feature to open project in Sublime Text from menus.
https://cdn.codecarrot.net/images/open-as-sublime-project.png
Getting React and ES6 Syntax Highlighting in Sublime Text2017-11-07T18:00:00+00:002017-11-07T18:00:00+00:00https://blog.codecarrot.net/getting-react-and-es6-syntax-highlighting-in-sublime-text<p>Lately I’ve been writing a lot of React in Sublime and one of the most difficult aspects to deal with has been the improper syntax highlighting. When writing React components the basic JavaScript syntax highlighting that I was using would consistently highlight parts of my code incorrectly, as it didn’t know how to deal with the JSX. Specifically it would have issues when I closed my HTML tag on a separate line as seen in the image below.</p>
<p><img src="https://cdn.codecarrot.net/images/01_basic_javascript_without_syntax_highlighting.png" alt="Without using Syntax highlighting" /></p>
<p>Fortunately my issue was solved when I read through the <a href="//www.babeljs.com/">BabelJS page</a> today and discovered their <a href="//packagecontrol.io/packages/Babel%20Snippets">babel snipppet</a> package! I immediately transitioned over to Sublime and installed the package using the following steps:</p>
<ol>
<li>Open the “Command Palete…” via <code class="highlighter-rouge">cmd + shft + p</code>.</li>
<li>Select the <code class="highlighter-rouge">Package Control: Install Package</code> option, which can be found by typing “install”.</li>
<li>Type in “Babel” and select the “Babel” package to install.</li>
</ol>
<p>After the babel-sublime package is installed there are still a couple of options to configure. Specifically I set Babel as my default syntax highlighter for <code class="highlighter-rouge">.js</code> and <code class="highlighter-rouge">.jsx</code> files by performing the following steps.</p>
<ol>
<li>Open a file with the .js or .jsx extension.</li>
<li>Select <code class="highlighter-rouge">View -> Syntax -> Open all with current extension as... -> Babel -> JavaScript (Babel)</code>.
<img src="https://cdn.codecarrot.net/images/list-of-different-js-syntax-highlighting-option.png" alt="list-of-different-js-syntax-highlighting-option" /></li>
<li>Repeat these steps for other file extensions.</li>
</ol>
<p>The babel-sublime package also comes with two color themes to choose from as well. It has a “Monokai Phoenix” theme, as well as a “Next” theme which can both be seen below in that order. Both images show the updated syntax highlighting which gracefully handles the closing HTML tag correctly. Coding in React and ES6 never looked better!</p>
<p><img src="https://cdn.codecarrot.net/images/01_basic_javascript_syntax_highlighting-1.png" alt="Using Syntax highlighting" /></p>yashumittalLately I’ve been writing a lot of React in Sublime and one of the most difficult aspects to deal with has been the improper syntax highlighting. When writing React components the basic JavaScript syntax highlighting that I was using would consistently highlight parts of my code incorrectly, as it didn’t know how to deal with the JSX. Specifically it would have issues when I closed my HTML tag on a separate line as seen in the image below.
https://cdn.codecarrot.net/images/01_basic_javascript_syntax_highlighting-1.png
Top 5 CSS Frameworks That You Should Pay Attention TO2017-11-04T14:24:00+00:002017-11-04T14:24:00+00:00https://blog.codecarrot.net/top-5-css-frameworks-that-you-should-pay-attention-to<p>CSS frameworks are gaining a lot of popularity these days and to be honest, it’s hard to imagine a website without using them. As all development tools, CSS frameworks are in a constant state of evolution and improvement and thus we highly recommend that you keep an eye on the modern trends. To make it easier for you, we’ve come up with top-5 most popular CSS frameworks of 2017 that you may want to deploy (if you are not using them already).</p>
<h2 id="1-bootstrap">1. Bootstrap</h2>
<p><img src="https://cdn.codecarrot.net/images/bootstrap-website-screenshot.png" alt="Bootstrap website screenshot" /></p>
<p><a href="//getbootstrap.com/">This framework</a> is one of the GitHub stars and is considered the best responsive CSS framework. Designed for front-end development specifically, it helps to build web design concepts, mobile first projects, grid systems, typography, buttons, and so on.</p>
<p>Bootstrap doesn’t have any extras but there are third-party plugins available and in addition to regular HTML elements Bootstrap also has other common UI elements. Its core principles are RWD and mobile first.</p>
<p>Bootstrap version 3 supports a variety of browsers (their latest versions) and since Bootstrap 2 the framework has supported responsive web design. Bootstrap 4 version is currently in development.</p>
<p><strong>Conclusion:</strong> Bootstrap is incredibly popular but it may not be better than other frameworks. However, the majority of people use it due to its popularity and thanks to that, there are a lot of resources available (such as tutorials, extra plugins, etc.) that make work with Bootstrap even easier.</p>
<h2 id="2-foundation">2. Foundation</h2>
<p><img src="https://cdn.codecarrot.net/images/zurb-foundation-website-screenshot.png" alt="Zurb Foundation" /></p>
<p><a href="//foundation.zurb.com/">Foundation</a> is an open-source project and another very strong player in the world of CSS frameworks. It is well-known by being incredibly smooth and responsive and can be used for many purposes: building websites, creating email templates, building mobile and web apps.</p>
<p>This framework is also very user-friendly as it offers training, support, and consultation. It has some unique components (Keystrokes, Joyride, Flex Video, etc.) and a number of add-ons. Its core principles, in addition to RWD and mobile first, also include semantic.</p>
<p><strong>Conclusion:</strong> Foundation has claimed a stake for itself with perfect workflow and great support for developers. It is a very professional framework and with a lot of available tutorials, you will be able to learn Foundation in no time.</p>
<h2 id="3-bulma">3. Bulma</h2>
<p><img src="https://cdn.codecarrot.net/images/bulma-website-screenshot.png" alt="Bulma Website Screenshot" /></p>
<p><a href="//bulma.io/">This open source and free framework</a> is great in terms of saving your time and energy and it’s gaining quite a lot of popularity recently since it’s very simple to learn and use.</p>
<p>Firstly, Bulma contains great UI components, like tabs, navigation bar, boxes, panel and much more because this framework is designed to provide you with clear and attractive UI. Secondly, Bulma is incredibly modular meaning you can import only those features that are needed and you can start your work. Finally, this framework has very readable classes, which again may be a huge advantage for some developers.</p>
<p><strong>Conclusion:</strong> Bulma is easy to understand and simple to use and at the same time it has all the necessary features to help you create great and efficient products.</p>
<h2 id="4-ulkit">4. Ulkit</h2>
<p><img src="https://cdn.codecarrot.net/images/ulkit-website-screenshot.png" alt="Ulkit Website screenshot" /></p>
<p>Not many people know (and use) <a href="//getuikit.com/">this framework</a> but it has the same functionality as other similar frameworks and should definitely be paid attention to.</p>
<p>This framework is lightweight and modular and is used for creating fast but powerful web interfaces. Ulkit is basically a collection of easily customized components and it has an HTML Editor, Flex, and other add-ons and unique components. Its core principles are RWD and mobile first, and Ulkit is widely used in a lot of WordPress themes.</p>
<p><strong>Conclusion:</strong> This framework enables you with a flexible mechanism for manual customization and can be really helpful depending on your requirements.</p>
<h2 id="5-semantic-ui">5. Semantic UI</h2>
<p><img src="https://cdn.codecarrot.net/images/sematic-website-screenshot.png" alt="Sematic UI Website Screenshot" /></p>
<p>As you can guess from the name, <a href="//semantic-ui.com/">Semantic UI</a> is aimed at making the website building process more semantic. Its core feature is utilizing natural language principles thus making the code more readable and easier to understand.</p>
<p>Its core principles are tag ambivalence, semantics, and responsiveness. This framework is treating words and classes as exchangeable components and stands out with intuitive JS and simple debugging.</p>
<p>What is also nice about Semantic UI is the fact that it offers well-organized documentation and a website with guides on how to get started. In short, it has over 3000 theming variables, over 50 UI components, and more than 5000 commits. Definitely worth a try.</p>
<p><strong>Conclusion:</strong> Good choice for those who want to create beautiful and responsive websites.</p>
<h2 id="wrapping-it-up">Wrapping It Up</h2>
<p><img src="https://cdn.codecarrot.net/images/css-framework-nfographic.png" alt="CSS Frameworks" /></p>
<p>That’s our top-5 CSS frameworks that I find interesting enough to use and try. Comment if you’ve already tried them or want to suggest something new.</p>yashumittalCSS frameworks are gaining a lot of popularity these days and to be honest, it’s hard to imagine a website without using them. As all development tools, CSS frameworks are in a constant state of evolution and improvement and thus we highly recommend that you keep an eye on the modern trends. To make it easier for you, we’ve come up with top-5 most popular CSS frameworks of 2017 that you may want to deploy (if you are not using them already).
https://cdn.codecarrot.net/images/Foundation-and-Bootstrap-modified.png
React Native FAQ - All you want to know about React Native but you were afraid to ask2017-11-04T13:25:00+00:002017-11-04T13:25:00+00:00https://blog.codecarrot.net/react-native-faq-all-you-want-to-know-about-react-native-but-you-were-afraid-to-ask<p>Still on the fence about choosing <a href="/react-native-can-slash-your-mobile-development-costs-by-30-percent">React Native as the framework for your next mobile app</a>? We’ve got you covered. We selected and answered the most common questions that pop up when people consider using React Native in a project. We hope this short guide will make things much clearer.</p>
<h2 id="1-whats-the-difference-between-react-and-react-native">1. What’s the difference between React and React Native?</h2>
<p>React Native is not a different version of React. React Native uses React. Essentially, React Native is a custom renderer for React, just like ReactDOM on Web. Apart from transforming React code to work on iOS and Android, React Native also gives access to the features that these platforms offer.</p>
<h2 id="2-will-my-react-app-work-on-mobile-will-my-react-native-app-work-on-web">2. Will my React app work on mobile? Will my React Native app work on Web?</h2>
<p>Unfortunately, no. Most of the React code for Web relies on features available in Web browsers, so it will not work on mobile and vice versa – React Native code relies on the features available on a given mobile platform. The good news is that we can still reuse some code between the mobile and web apps, and the ability to reuse the code will improve in the future.</p>
<h2 id="3-will-react-native-make-my-app-look-and-run-the-same-way-on-ios-and-android">3. Will React Native make my app look and run the same way on iOS and Android?</h2>
<p>iOS and Android offer different sets of features, and it’s not React Native’s responsibility to make these environments equal. React Native is only a way of accessing the native components in iOS and Android. I would say that most of the time – with some effort – we can make apps on both platforms look the same, but we shouldn’t. We should stick to platform guidelines when it comes to user interface. Luckily, React Native provides us with an easy way to adapt the UI to the given platform’s needs.</p>
<h2 id="4-should-i-choose-react-native-or-native-separate-ios-and-android">4. Should I choose React Native or native (separate iOS and Android)?</h2>
<p><a href="/4-kinds-of-applications-to-build-with-react-native">React Native is great for most apps that rely heavily on the user interface</a>, because with little effort, we can get the UI to work on both iOS and Android, and, most importantly, we can share the business logic. Apart from that, React Native uses flexbox for layout, which works the same way on iOS, Android and Web, so we can transfer our experience from Web instead of learning more different engines. On the other hand, a native app is great when we consider using all the features that a platform offers, including such modules as video/audio processing or multithreading. Since React Native focuses on the User Interface only, it can be less efficient for applications with many native features.</p>
<h2 id="5-is-every-react-developer-also-a-react-native-developer">5. Is every React developer also a React Native developer?</h2>
<p>Most of the time when developing a React Native project, we write React code, which does not really differ from the code known from React for Web, but we should be aware of the unique properties of mobile platforms – some things might not be that obvious. React developers are not React Native developers by default. That said, we can transform React developers into React Native developers in a short period of time by giving them an opportunity to gain experience in React Native.</p>
<h2 id="6-does-react-native-mean-we-dont-need-native-developers">6. Does React Native mean we don’t need native developers?</h2>
<p>No, native developers are still needed. They have massive experience when it comes to configuring mobile continues integration services such as Bitrise, services for automatic builds such as HockeyApp, configuring certificates in XCode and so on. Apart from that, React Native does not easily offer every feature that is available on iOS and Android, and native developers can make those features available by creating a custom module that exposes a native feature to Javascript. In the future, having native developers work with React Native teams will not be that necessary, because React Native will become a more mature platform. By then, most of the use cases will have been solved, and packages for pretty much everything will be available.</p>
<p>React Native apps still have some parts written in native code, and this is okay.</p>
<h2 id="7-have-a-question-leave-a-comment-or-ping-us-at-contactcodecarrotnet">7. Have a question? Leave a comment or ping us at <a href="mailto:contact@codecarrot.net">contact@codecarrot.net</a>.</h2>
<blockquote>
“React Native does not mean we should use Javascript for everything, React Native does not mean we shouldn't use Native for anything” Leland Richardson, Airbnb, React Conf 2017
</blockquote>
<p>The future is bright and it belongs to React and <a href="//www.codecarrot.net/services/react-native">React Native</a> <code class="highlighter-rouge">;)</code>.</p>yashumittalStill on the fence about choosing React Native as the framework for your next mobile app? We’ve got you covered. We selected and answered the most common questions that pop up when people consider using React Native in a project. We hope this short guide will make things much clearer.
https://cdn.codecarrot.net/images/pexels-photo-92028-548588-edited.jpeg
Why You Should Migrate Your App From Ionic, Cordova, or PhoneGap to React Native2017-11-04T13:13:00+00:002017-11-04T13:13:00+00:00https://blog.codecarrot.net/why-you-should-migrate-your-app-from-ionic-cordova-or-phonegap-to-react-native<p>A few years back, hybrid apps built with Ionic, Cordova or PhoneGap were a perfect and cost-effective alternative to native development. However, with the technology moving forward, they might not meet users’ expectations anymore. <a href="//www.codecarrot.net/services/react-native">React Native</a> is a good alternative that can save your app from going under.</p>
<h2 id="differences-between-ionic-cordova-phonegap-and-react-native">Differences Between Ionic, Cordova, PhoneGap, and React Native</h2>
<p><strong>Ionic, Cordova and PhoneGap</strong> are hybrid apps. Cordova is a framework which runs a JavaScript app in a WebView that has additional native extensions, which is the definition of a hybrid app. Ionic is based on Cordova and comes with Angular. It has set of standard controls that mimic native controls. PhoneGap is a distribution of Cordova with a few custom packages and tweaks.</p>
<p>They are all essentially websites embedded in a mobile app through what we call a WebView, whereas apps built with React Native are not mobile web apps, HTML5 apps, or hybrid apps. They are written in JavaScript but are rendered using native components, which means that the user experience will generally be closer to other native apps, because they will conform to the standards imposed by the operating system. React Native comes with better performance and smoother animations. <a href="/4-kinds-of-applications-to-build-with-react-native">Using React, we can build truly mobile apps</a> indistinguishable from apps built using Objective-C (native iOS apps) or Java (native Android apps).</p>
<h2 id="risks-related-to-staying-with-ionic-cordova-or-phonegap">Risks related to staying with Ionic, Cordova or PhoneGap</h2>
<p>The biggest problem with hybrid apps is their performance. The web was originally built for web pages, not the complex apps we produce today. Hybrid apps are going to run just fine on high-end phones but still not as smoothly as you would want. Low-end phones are where the biggest problem lies.</p>
<p>Most smartphone owners spend the majority of their time using only a few apps, and they expect any new app they try to be as polished as Facebook, YouTube, or Uber. With high user expectations, hybrid apps can’t live up to such benchmarks. They offer poorer user experience with slower animations, lack of platform-specific gesture recognition, and keyboard misbehaviour.</p>
<p>Another problem is that building a hybrid app, you automatically inherit all the issues that the web has. This means bugs that only appear in one or more browsers or styles working differently across different browsers.
Another thing that the popularity of hybrid apps is on the decline. Both <a href="//phonegap.com/app/">PhoneGap’s</a> and <a href="//showcase.ionicframework.com/apps/top">Ionic’s</a> showcases demonstrate a noticeable shortcoming in premier apps. In contrast, the <a href="/9-great-apps-written-with-react-native">list of apps</a> that have migrated from hybrid/native to React Native is long. The list includes Facebook, Airbnb, Instagram, Skype, and many others. It would be quite challenging to find a high-end app that has moved from native to hybrid.</p>
<h2 id="main-benefits-of-rn-over-ioniccordovaphonegap">Main benefits of RN over Ionic/Cordova/PhoneGap</h2>
<p><a href="/react-native-pros-and-cons-of-facebook-framework">The biggest benefit that React Native</a> offers is its much better performance than in the case of hybrid apps. In React Native, all views are Native, so apart from higher efficiency, you get the Native feel with super smooth animations. On top of that, the hardware functionalities are processed by the specific platform and not by Cordova. React Native renders native views without using Webview, so you don’t have to worry about any problems with browser compatibility. Finally, React Native is based on React, a framework with much better support – both from Facebook and the community. Thanks to the ongoing support, React Native stays up-to-date, offers higher reliability, and gives you a superior knowledge base, where you will be able to find out how to develop apps and solve problems.</p>
<p><strong>See also:</strong> <a href="/react-native-faq-all-you-want-to-know-about-react-native-but-you-were-afraid-to-ask">React Native FAQ</a></p>
<h2 id="wrap-up">Wrap-up</h2>
<p>React Native gives you the advantage of hybrid apps – that is cost-effective multiplatform development – but doesn’t bring along their disadvantages such as sluggish performance or poor user experience. <a href="/9-great-apps-written-with-react-native">React Native has already been adopted by many big players such as Uber, Airbnb or Instagram</a>, which is a social proof for its reliability. Nowadays, a successful mobile application should be fast and highly responsive. Otherwise, users will abandon it.</p>
<p>Building hybrid apps was good in the past, when we had limited resources and the technology wasn’t mature enough yet, but now, in 2017, when we have React Native, I wouldn’t take the risk of developing an app in Ionic/Cordova/PhoneGap and would move my app to React Native instead. We can help you do this!</p>yashumittalA few years back, hybrid apps built with Ionic, Cordova or PhoneGap were a perfect and cost-effective alternative to native development. However, with the technology moving forward, they might not meet users’ expectations anymore. React Native is a good alternative that can save your app from going under.
https://cdn.codecarrot.net/images/shripal-daphtary-278736.jpg
6 Ways to Improve The Speed of Your Web App2017-11-04T12:59:40+00:002017-11-04T12:59:40+00:00https://blog.codecarrot.net/6-ways-improve-the-speed-of-your-web-app<p><a href="/9-seo-tips-improve-website-performance-drive-traffic">Speed of a web app is one of the most crucial things that influence SEO, conversion rate</a> or user experience. It is something you should be concerned with when it comes to user retention. According to an Aberden Group Report, a 1-second delay in page load time equals 11% fewer page views, a 16% decrease in customer satisfaction, and 7% loss in conversions. Moreover, according to Gomez.com, increase in page response time from 2 to 10 seconds increased page abandonment rates by 38%.</p>
<p>Reaching top page load speeds can be very hard. It depends a lot on both your frontend and backend. In this article, we want to focus on quick wins to speed up your web app on the frontend side. With this easy checklist you will substantially improve the result!</p>
<h2 id="how-to-measure">How to measure?</h2>
<p>Before you start implementing improvements you should first verify your current web app speed. The easiest way to do it is to use one of the tools that provide you with a brief summary of key performance indicators. Such tools give you insights about crucial areas of page load speed and help you identify ways for improvement. On our side we can recommend GTmetrix and Google Page Speed. Both provide extensive statistics on performance and useful tips for improving your results.</p>
<h2 id="improving-web-app-speed---checklist">Improving Web App Speed - Checklist</h2>
<h3 id="1-optimised-images">1. Optimised images</h3>
<p>When it comes to images, there is much you can improve. Firstly, you should make sure you use PNGs only when it’s necessary - for logos, images with a lot of straight lines or high contrast. In most of cases, you should stick to JPEGs, that are much less heavy, rather than PNGs.</p>
<p>Secondly, use proper resolutions for the images. Don’t upload a 10MB image of your logo if it’s scaled to 120px width. Make sure your images are exactly the resolution you need them to be.</p>
<p>Behind every image there’s much unnecessary data that slows down your app. You can use tools such as Kraken.io to remove metadata from your images. It can save up to 70% of the size.</p>
<p>Finally, you can leverage SVGs for graphics. SVGs are vectorized images that are perfect for icons or logos. SVGs describe perfect quality images in all resolutions, and they are still lightweight. However, it is not possible store all images using this format.</p>
<h3 id="2-stylesheets-and-javascript">2. Stylesheets and Javascript</h3>
<p>Stylesheet is an essential basis for app maintainanability, accessability, customisation, consistency, portability and naturally speed. Using non-blocking assets and allowing your user to fetch and render HTML markup before the CSS is downloaded and parsed can significantly increase web app speed. It goes the same for JavaScripts. On top of that, you should definitely minimize your CSS and JS files. Don’t forget to gzip them afterwards. The resulting file can be even multiple times smaller than originally!</p>
<h3 id="3-caching">3. Caching</h3>
<p>Remember to define caching strategies for the client’s browser. Browsers try hard to manage caching, but from their perspective it is much safer to avoid caching your resource by default than cache it without your consent. That’s why you should try to configure caching for all of your assets declaratively.</p>
<h3 id="4-cdns">4. CDNs</h3>
<p>Content Delivery Network (CDN) is a globally distributed network of proxy servers deployed in multiple data centers. Its goal is to serve content to end-users with high availability and high performance. What’s important, CDNs can substantially improve response times to your assets for users all around the world.</p>
<h3 id="5-non-bloated-and-mobile-first-css">5. Non-bloated and mobile-first CSS</h3>
<p>This is not a quick win, but it can have a huge impact especially on older devices. Non-bloated CSS are stylesheets that reuse as much as possible across classes to minimize the amount of code parsed by the browser.</p>
<p>Mobile-first CSS is based on the idea that developers should wrap all the desktop CSS into media queries and leave the mobile as default. Thus, the mobile device browser won’t even parse the code in media queries which means that it would render faster.</p>
<h3 id="6-server-side-rendering-in-your-single-page-applications">6. Server side rendering in your Single Page Applications.</h3>
<p>Not every JavaScript solution is ready to enhance server side rendering. However most of the mature ones, like Ember, React or Angular2, can already do it. If you didn’t think about that from the very beginning it might demand quite a lot of refactor, but is definitely worth it! Especially because of the fact that it also boost your SEO.</p>
<h2 id="summary">Summary</h2>
<p>If you are continuously developing your application and introducing updates, you should track your page speed periodically using mentioned tools. You can also integrate some SaaS tools to budget and measure your page sizes. Go with this checklist yourself. Remember that page speed is important!</p>yashumittalSpeed of a web app is one of the most crucial things that influence SEO, conversion rate or user experience. It is something you should be concerned with when it comes to user retention. According to an Aberden Group Report, a 1-second delay in page load time equals 11% fewer page views, a 16% decrease in customer satisfaction, and 7% loss in conversions. Moreover, according to Gomez.com, increase in page response time from 2 to 10 seconds increased page abandonment rates by 38%.
https://cdn.codecarrot.net/images/traffic-car-vehicle-black.jpg
4 Secrets to Becoming a Developer2017-11-04T11:59:40+00:002017-11-04T11:59:40+00:00https://blog.codecarrot.net/4-secrets-to-becoming-a-developer<p>We all arrive new to coding with expectations. You know it won’t be easy and you’ll have to work hard. You’re prepared to spend a lot of time at your keyboard with the goal of being able to create something awesome. But what are some aspects of learning to code that you might not expect?</p>
<p>Below are the 4 that we think every aspiring developer should keep in mind when they’re new to coding.</p>
<h2 id="youre-going-to-be-a-lifelong-learner">You’re going to be a lifelong learner</h2>
<p>You’re a student learning to code right now, but you also need to get used to being a learner as you move forward with your career as a developer. Technology is constantly evolving, which is what makes the industry so fascinating to be a part of. Programming languages will update, new ones will be released, what you can achieve with code will expand infinitely. But all of this happens at a fast pace, and to be competitive in the tech industry, you need to stay ahead. The way to do that is to constantly set yourself new learning goals and keep growing your coding skills.</p>
<blockquote>
Intellectual growth should commence at birth and cease only at death. - Albert Einstein
</blockquote>
<h2 id="get-comfortable-with-breaking-things">Get comfortable with breaking things</h2>
<p>As a developer, you’ll build things, but you’ll also break thing (<a href="/dont-be-afraid-to-break-your-code-everyone-does">don’t worry, every developer does</a>). There will be PLENTY of times when everything will be running smoothly and then suddenly there’s an error in your code. When that happens, don’t panic! Rest assured bugs and errors happen to developers at every stage of experience, even the experts. Instead, you’ll need to learn to embrace the problem-solving side of coding. Rise to the challenge and embrace the rewarding feeling when you successfully debug your code. Every time you overcome one of these situations, you’ll learn something new and grow your knowledge.</p>
<blockquote>
Learning is a journey. View every misstep as an opportunity to learn and move forward. - Emily Schweiss
</blockquote>
<h2 id="dont-learn-in-a-silo">Don’t learn in a silo</h2>
<p>If you’re learning online, it can sometimes feel like your learning experience is isolated, especially when you’re new to coding and struggling with the dreaded <a href="/slaying-the-dragon-imposter-syndrome">imposter syndrome</a>. From the start, it’s important to know that the tech community stretches across the globe and is overflowing with support for one another. With so many others learning alongside you and talented individuals out there willing to help, it’s important to embrace the opportunities to connect with them. Whether it’s in online community like the <a href="//developer-community.flock.co/">Developer Chat Community</a>, or local in-person Meetups, make time to talk to other developers, ask questions or for help, and build your network. Then, when you’re the expert, pay-it-back by helping the next wave of aspiring developers (there’s also a lot that can be <a href="/how-to-learn-code-by-teaching">learned about coding by helping others</a>).</p>
<blockquote>
The expert at anything was once a beginner. - Helen Hayes
</blockquote>
<h2 id="be-dedicated-to-your-learning">Be dedicated to your learning</h2>
<p>As you make your way down your learning path, some parts will be easier than others. There will be times when you’re overwhelmed and frustrated, and honestly, you’ll just want to quit. When you feel that way, try some of these tips to help get you back on track. If you stick with it and make coding a part of your daily life before you know it those frustrations will be much more manageable to overcome. Dedication to your learning will also help you progress towards your career aspirations faster and once you’re officially calling yourself a developer, you’ll agree it was well worth all the effort.</p>
<blockquote>
There will be days when you will have no motivation or inspiration to code anything. You will start to doubt yourself when your progress stalls, but when that happens just remember why you started this journey in the first place.
</blockquote>
<p>*Those are just a few of the aspects of coding we think are important to share, but we’d love to hear your thoughts! What would you add to the list? *</p>yashumittalWe all arrive new to coding with expectations. You know it won’t be easy and you’ll have to work hard. You’re prepared to spend a lot of time at your keyboard with the goal of being able to create something awesome. But what are some aspects of learning to code that you might not expect?
https://cdn.codecarrot.net/images/secrets.png
The Four P’s to Problem Solving2017-11-04T09:44:20+00:002017-11-04T09:44:20+00:00https://blog.codecarrot.net/the-four-ps-of-problem-solving<h2 id="the-four-ps-to-problem-solving">The Four P’s to Problem Solving</h2>
<h3 id="prep-plan-perform--perfect">Prep, Plan, Perform & Perfect</h3>
<p>Being a great designer means you’re able to solve great problems. In more cases than one a client will present you with a problem and your job is to solve that problem using your tools. If you’re a digital designer the tools might be the elements and principles of art and design as well as a graphics application.</p>
<blockquote>
All problems need their own specific solutions. We can’t use a generic solution for everything. However we can use the same process, we can approach every project with the same step by step process.
</blockquote>
<p>Before we take a look at the process let’s first understand why we think the way we think.</p>
<hr />
<h2 id="cognitive-thinking">Cognitive Thinking</h2>
<p>What I’m about to go over has a lot to do with Psychology however it plays a very valid role in visual communication and the design process. When I say the word Psychology I’m simply referring to an explanation of <strong>why we do what we do</strong>.</p>
<p>In Psychology we have a term called Cognition or more specifically Cognitive Thinking. Which basically means our mental process or the order in which we think. Cognition is always active, it never stops, even in our subconscious. <strong>Problem solving is a form of cognition</strong>. Please take note that there are many different ways to solve problems using different techniques and principles.</p>
<p>The process I’m going to share with you is one I have put together over the years of designing and creating. I have broken the process down into the four “P’s” of problem solving.</p>
<hr />
<h2 id="the-problem-solving-process">The Problem Solving Process</h2>
<ol>
<li>The first step is <strong>prep</strong>, this is where we understand and diagnose the problem.</li>
<li>Then our next step is <strong>plan</strong>. This is where we organize everything before acting.</li>
<li>The third step is <strong>perform</strong>. We simply put the plan into action.</li>
<li>Then our final step is <strong>perfect</strong>. This is when we check to see if our end goal has fulfilled the problem. If not we can go back, review and rework the solution.</li>
</ol>
<p><img src="https://i.imgur.com/2OBT37F.png" alt="Prep" /></p>
<h2 id="prep">Prep</h2>
<p>Every Solution derives from a problem. How one gets to that solution is a process. Lets take a look at a typical problem a designer might face and how it might be solved. We simply want to understand how a designer would go about solving a design problem.</p>
<blockquote>
We will walk through the process with the story of Marty the designer and his work for Lou’s Cafe.
</blockquote>
<p><strong>Prep</strong>, is short for <strong>preparation</strong>. In the preparation phase we simply want to do two things. First understand, and second Diagnose the project.</p>
<p>A well defined problem is understanding the nature of the problem and what information is needed to solve it.</p>
<p>The exact opposite of a well defined problem is an ill defined problem. This is when you know there is a problem but you just don’t understand it.</p>
<p>This is why it’s so crucial for us to clearly understand the problem before moving forward. If you’re not prepared how can you get the right solution?</p>
<p>In this particular project the problem appears to be predefined. The client in this case Lou has asked Marty for a website. Now just because Lou asked for this doesn’t mean that’s the problem. Lou simply assumed this because his sales were down and everyone else on the block has a website.</p>
<p>For Marty to understand the root of the problem he had to contact Lou and ask him a couple questions before moving forward.</p>
<p>Marty called Lou and set up an appointment to meet with him. They planned to meet the very next day at the cafe. Marty has had meetings with clients many times before as he has been doing this for over ten years.</p>
<p>On the phone Marty always keeps his conversations light and asks key questions without directly asking factual questions, like: “Who are your regular customers?” instead of “What’s your target market?”. Marty really tries to get inside clients mind and thought process with his business to fully understand what the problem might be.</p>
<p>When Marty read that Lou wanted a website he was curious what made him come to this conclusion?</p>
<p>The next day Marty had trouble finding the cafe so he showed up a little later than expected. When Marty opened the door his nostrils filled with the most amazing desert aroma. He was greeted by Lou who had an iconic mustache, slicked hair and spoke as if he known him forever. Lou made Marty feel at home as he offered him a slice of his signature peanut butter pie.</p>
<p>Marty and Lou sat at a table as Marty drove the conversation. Lou explained that his regular customers were gone as most of them have passed or moved. Also the neighborhood isn’t what it used to be. Lou said he feels disconnected from his community now and he really needs help as the business is failing. Marty assured Lou that he would do everything he could and would help out. He said he needed some time to construct a plan and he will get back to him within a weeks time.</p>
<p>After that meeting Marty had a clear understanding of what the problems were. He also understood what he needed to do. Marty then wrote down the problems he identified.</p>
<h3 id="identifiable-problems">Identifiable problems</h3>
<ol>
<li>The Cafe is hard to find</li>
<li>There is absolutely no brand identity</li>
<li>Need to bring the experience to the people</li>
</ol>
<h3 id="initial-diagnosis-for-the-problems">Initial diagnosis for the problems</h3>
<ol>
<li>Make the Cafe more visible</li>
<li>Develop a brand identity for the Cafe</li>
<li>Convey the Cafe’s personality to the community through print and digital mediums</li>
</ol>
<p>Marty was now ready to move onto his next step, the planning stage.</p>
<hr />
<p><img src="https://i.imgur.com/EDQoV2u.png" alt="Plan" /></p>
<h2 id="plan">Plan</h2>
<p>The second step of the problem solving process for a designer is planning. We know what the problem is and what the diagnoses is, we now just need to plan for a solution.</p>
<p>In the planning phase you simply want to list what you think you need to do to carry out a great solution to the problem or in this case problems.</p>
<p><strong>The planning process is nothing more than an educated guess or if you want to get all scientific; the hypothesis</strong>. Lets take a look at how this pans out in our story</p>
<p>Marty knows what the problems are and he’s diagnosed them. He needs to put together an educated guess on how to solve the problems. In the design world this documenting of the educated guess might be know as a <strong>proposal</strong>.</p>
<p>A proposal is what, in our case Marty is to present to the Lou the Client, on how he plans to fix the problems. The proposal basically lists the diagnosed problems and a list of solutions Marty feels will solve these problems. These are the proposed solutions Marty listed for Lou:</p>
<ul>
<li>Make the Cafe more visible using signage signage and listing the cafe on Google Maps.</li>
<li>Develop a brand identity for the Cafe</li>
<li>Convey the experience of the cafe through print and digital mediums</li>
</ul>
<p>Marty then presents the proposal to Lou. Lou is a little hesitant at first but feels confident with Marty and trusts his expertise.
Now the planning stage is read for action we’re ready to move onto the next step, Performing.</p>
<hr />
<p><img src="https://i.imgur.com/1buKuob.png" alt="Perform" /></p>
<h2 id="perform">Perform</h2>
<p>We are onto our third step in the problem solving process, Performing. This is where we put our design skills to the test. We use the design elements and principles of design to perform solutions for our problems at hand.
In this particular case Marty will start the design process and start to form his solution for Lou’s Cafe. Lets take a look at his steps to success.
Marty’s process varies from project to project. However he seems to have the same approach when he’s in the performance stage. Marty works quick and focused, with all of his attention dialed in on solving the problem.
Carrying out this step didn’t always come easy to Marty, or any designer for that matter. There are always things that hold us back especially in this step. The perform step is the most difficult and stressful. At the same time it’s the most rewarding when completed.</p>
<h3 id="here-are-a-couple-of-tips-when-performing">Here are a couple of tips when performing:</h3>
<ul>
<li>You must be passionate and talk yourself through the problems</li>
<li>It’s always a good idea to break project down into steps or sprints for quick wins</li>
<li>Positivity is key, always be positive</li>
<li>Avoid all distractions, turn the phone off, avoid social media and email</li>
<li>Keep it simple and clear, always remind yourself the problem you’re solving</li>
<li>Always go with your gut feeling</li>
<li>Be confident about your work, own it.</li>
</ul>
<p>Let’s get back to the story. This is how Marty executed his performance.</p>
<ul>
<li>He did some research and gathered inspiration</li>
<li>He took a look at Lou’s competitors to see how he could make Lou’s stand out from the rest</li>
<li>He designed a style guide for Lou’s Cafe</li>
<li>Then designed he designed all the mediums for the Cafe, from signage to a website to packaging, etc…</li>
<li>Next got quotes on everything and then organized it for Lou to look over.</li>
</ul>
<p>Marty then went to show Lou all that he had done. Lou was estatic but surprised at the cost. Marty emphasized the importance of design and how it will speak quality to his business. Lou agreed.</p>
<p>Marty then went back to his studio and finished up all his design work for Lou. He then sent everything to print and finished building everything out for the site. He also listed Lou’s Cafe on a few online applications to help the community find and rate the Cafe.</p>
<p>When he was finished Marty felt great, he felt rewarded. He knew this was going to be a huge impact for Lou and his business.</p>
<p>As you can see the performance part of the problem solving process can be quite stressful and tedious. However it’s the most rewarding of them all.</p>
<p>Now that we understand the performance stage lets take a look at the final stage in the problem solving process.</p>
<p><img src="https://i.imgur.com/d2dH6gr.png" alt="Perfect" /></p>
<h2 id="perfect">Perfect</h2>
<p>The last step in the problem solving process is the perfection stage. This is where we <strong>reevaluate</strong> everything and see if we need to go back and change anything.</p>
<p>I don’t want you to think the third step we just went over is a rough draft of some sort, it’s not at all. You should deliver a finalized product that you feel best solves the problem or problems at hand in that step.</p>
<p>However with that said there is always room for improvement, always. Especially when it comes to dealing with web applications and design.</p>
<p>In the perfection stage the first thing we want to do is define the initial problem and look at it with a fresh set of eyes. Here are the original problems:</p>
<ul>
<li>The Cafe was hard to find</li>
<li>No brand identity</li>
<li>Need to bring the experience to the people</li>
</ul>
<p>Now let’s evaluate our approach and solutions to those problems</p>
<ul>
<li>Did we design a solution to make the Cafe more visible? <strong>Yes</strong></li>
<li>Is the brand consistent? <strong>Yes</strong></li>
<li>Did we bring the experience to the people? <strong>Yes</strong></li>
</ul>
<p>Everything appeared to have worked out well for Lou’s Cafe, until about a year later. Two things happened:</p>
<ol>
<li>The local health committee was currently fighting obesity amongst the community and cracked down on Lou’s specialty pies.</li>
<li>Because of the uproar someone had vandalized the signage pointing to the shop.</li>
</ol>
<p>Lou didn’t know what to do so he called up Marty who had originally solved these problems and asked him for help.</p>
<p>You might be asking yourself why would Lou call Marty about these issues they have nothing to do with design aesthetics or code development. You’re forgetting one thing, <strong>Lou doesn’t look at Marty as a designer or a developer he looks at him as a problem solver</strong>.</p>
<p>Once Lou told Marty about his problem, Marty assured Lou he would help out and get back to him as soon as possible.</p>
<p>This is what the Perfection stage is all about. You simple reevaluate the problems and cycle through the process over and over until its currently perfected.</p>
<p>Take note though. This process is never really perfected, as there are so many variables to deal with. The only thing we can do is, prep, plan, perform over and over.</p>
<p>This process is the same with any other industry. Take the automotive industry for example. Every year they put out a new car that is better than the last. How much better?… not much. They just solve problems as they come along. Take for example when the following happened…</p>
<ol>
<li>Cars are reaching high speeds and drivers are being tossed around in collisions — Hence the design for the seat belt came along</li>
<li>Having a hard time seeing when it’s raining? — The birth of windshield wipers</li>
<li>Need more environmentally safe fueling options — The birth of the electric car</li>
</ol>
<p>In design there is always room for perfection, even more so there is always room for problem solvers like Marty.
In Marty’s case he processed Lou’s problems like any other:</p>
<h3 id="preparation">Preparation</h3>
<p>Understand and diagnose the problem. In this case the community and city wasn’t happy with the high calorie food Lou was serving.</p>
<h3 id="martys-plan">Marty’s Plan</h3>
<ol>
<li>Call Lou and ensure him everything is going to be fine, he has a solution</li>
<li>Create a recipe for a healthier menu. Also share your recipe with the public to show you care about their health. This will have this published in the paper as well.</li>
<li>Apply a new sign higher so vandals cannot reach it as easily. Also add a tagline to the sign saying “Lou’s Cafe” — <em>A hometown healthy choice. Stop in for our famous recipe</em>. Then have the recipe nicely printed and ready for them at the door when they walk in.</li>
</ol>
<p>Lou immediately responded with I can’t give away my secret recipe like that, it will ruin my business.
Marty replied “Lou no one can bake like you” Even if they try as hard as they can, they won’t be able to perfect your skill without years of training” They will come buy it from you as your the best at it. Lou smiled and hugged Marty.</p>
<h2 id="perform-1">Perform</h2>
<p>Lou and Marty put the plan into action. Everything went so well Lou was given a key to the city for helping out his community. To this day the signage and tagline hangs high above the street where people are guided into the shop for Lou’s one of a kind healthy recipe.</p>
<p>Until this day the problem has been solved, as its current status is — Perfected.</p>
<h2 id="follow-the-process--discover-the-solution">Follow the Process & Discover the Solution</h2>
<p>As you can see the problem solving process is a cycle; prep, plan, perform and perfect. You must use your steps wisely and always focus on clearly fulfilling the problem with a solution.</p>
<p>Being a great problem solver takes time and practice. You must stay humble and positive when crafting a solution. Always be ready for critiques and don’t let your ego get the best of you.</p>
<p>Simply follow these steps and you are well on your way to becoming not only a great designer but a great problem solver.</p>
<p>This article is written by <a href="https://wwww.medium.com/@MatHelme">Mat Helme</a>.</p>yashumittalThe Four P’s to Problem Solving
https://i.imgur.com/tx7XV3O.png
Why You Should Consider React Native For Your Mobile App2017-11-03T22:13:00+00:002017-11-03T22:13:00+00:00https://blog.codecarrot.net/why-you-should-consider-react-native-for-your-mobile-app<p>The first time when we saw that we could use react, our go-to front-end library, for building native applications, we were thrilled. The promise that you will be able to learn react’s paradigm and write applications for everything is so crazy that only a fool would choose to build new stuff the old way. There is some truth in that statement. Indeed <a href="//www.codecarrot.net/services/react-native">React Native</a> creates a wide spectrum of new possibilities in building well performant iOS and Android apps. However, you should also be aware of the restrictions that it might have. In this article we want to present our perspective on React Native which we have derived from CodeCarrot’s projects.</p>
<h2 id="what-is-react-native">What is React Native</h2>
<p>React Native is a framework developed by Facebook which enables building mobile apps using JavaScript. It uses the same design as React, letting you compose a rich mobile UI from declarative components. It allows developers to reuse code across the web and on mobile and through different operating systems. With React Native you don’t have to build the same app for iOS and for Android separately from scratch. On top of that, thanks to instant reloading, instead of recompiling you can build apps much faster.</p>
<p><img src="https://cdn.codecarrot.net/images/ipad-samsung-music-play-39630.jpeg" alt="ipad-samsung-music-play-39630.jpeg" /></p>
<h2 id="why-to-use-react-native">Why to Use React Native</h2>
<p><a href="/4-kinds-of-applications-to-build-with-react-native">React Native creates declarative high level API for building native applications</a>. Each React Native UI component corresponds to the native UI component of iOS and Android. There is a very high possibility that you will be able to reuse most of your code between platforms and many parts will ‘just work’.</p>
<p>There is also a big chance that someday we will be able to target another device and reuse our codebase to create apps that will reach other platforms and even more users. It happened once with android. Initially React Native was a solution for iOS only, but now it’s also available on different operating systems, slowly expanding to VR and Universal Windows Platform.</p>
<p>On top of that, when it’s not required to use custom modules, you will be able to deliver high quality applications for Android and iOS using a fraction of the resources it could take with the native approach. At CodeCarrot, we recognised this opportunity to create apps concurrently for both operating systems, so we decided to see React Native in action in a few of our projects.</p>
<p>So far we have built applications that were quite simple. They fetch data and show it on the screen. React Native is just perfect for such projects. Even if you want to have a real native feel on both platforms with different designs, react native is a better choice, as most of the code that will power your application is already embedded in its business logic. It doesn’t change too much between Android and iOS even though it might look way different.</p>
<p><img src="https://cdn.codecarrot.net/images/skyline-buildings-new-york-skyscrapers.jpg" alt="skyline-buildings-new-york-skyscrapers.jpg" /></p>
<h2 id="challenges-you-might-face-with-react-native">Challenges You Might Face with React Native</h2>
<p>Unfortunately React Native may not be as easy as it might seem. There are a few things that you should consider before rolling with it.</p>
<p>What if the functionality that you need is not available in React Native? What if you were required to use a library that was made for development on specific platform? React native gives you an awesome tool – Native Modules – as response to these issues. In many cases there is a ready npm package waiting for you to solve your problems. They are not always perfect and some of them won’t even work. In that case you will have to build the required module yourself.</p>
<p>Exposing native API is quite simple and the future is bright because there is a finite number of native APIs. Some day there will be a module for each of them. Exposing the whole library may be a bit tricky. There will be cases in which google will not help you and help of a native developer will be required.</p>
<p>Finally, React Native is still build on Android 6.0 and we can see many new updates coming up to the operating system already. For instance, version 7.1 offers application shortcuts to specific actions in the app. They let users quickly start common or recommended tasks within the app, improving the overall experience. Also full support for multi-window mode and image keyboard support have been introduced in the latest Android versions. However, with React Native those functionalities are not supported. Not just yet. In the case of Apple you can observe a delay in updates of React Native for iOS versions as well.</p>
<p><a href="/9-great-apps-written-with-react-native"><img src="https://cdn.codecarrot.net/images/instagram-also-use-react.png" alt="Instagram users React Native too" /></a></p>
<p>What if your app is not performant enough? Quick glimpse into the inner workings of this framework exposes some problems. While the native platform and JavaScript Core are really fast the communication between them is not.</p>
<p>Let’s say that you want to implement an efficient custom view displaying real time data and reacting to user input. In such scenario, you’ll need to go back to native implementations. Depending on the functionality that you need to export, bridging them through react native might have negative impact on performance and end user experience. You might end up doing strange hacks just to bypass the react native bridge and still never reach full native performance.</p>
<p>What’s more, you will have to do that for every platform you want to support. That will decrease reusability of code between platforms.</p>
<h2 id="wrap-up">Wrap-up</h2>
<p>React native isn’t just a way for web developers to dip their feet into native applications. It is a powerful tool, but not for every solution. Remember that complex apps will require more native solutions and as a result more native developers. That might cause communication problems and actually slow down the development process. However, React Native is a way to go for applications with less complicated logic. You will get <a href="/react-native-can-slash-your-mobile-development-costs-by-30-percent">a well performant app with less resources spent</a>.</p>yashumittalThe first time when we saw that we could use react, our go-to front-end library, for building native applications, we were thrilled. The promise that you will be able to learn react’s paradigm and write applications for everything is so crazy that only a fool would choose to build new stuff the old way. There is some truth in that statement. Indeed React Native creates a wide spectrum of new possibilities in building well performant iOS and Android apps. However, you should also be aware of the restrictions that it might have. In this article we want to present our perspective on React Native which we have derived from CodeCarrot’s projects.
https://cdn.codecarrot.net/images/pexels-photo-89955.jpeg
React Native - Pros and Cons Of Facebook’s Framework2017-11-01T15:59:00+00:002017-11-01T15:59:00+00:00https://blog.codecarrot.net/react-native-pros-and-cons-of-facebook-framework<p>When we first heard about <a href="//www.codecarrot.net/services/react-native">React Native</a>, a framework that enables building an app for multiple platforms, we were thrilled. One team, one codebase and the potential to scale an app for iOS and Android using a fracture of resources required in native development is a great promise. But how does it stack up with reality?</p>
<p>Until a few years ago, developing an app for iOS and Android separately was a necessity if we aimed at both markets. Having two different teams generates more costs, especially when we think about constant upgrades and regular introduction of new features. A few years ago, <a href="/why-you-should-consider-react-native-for-your-mobile-app">Facebook officially announced React Native, a powerful framework with the promise of cross-platform compatibility</a>. RN has matured since its premiere, and we had a chance to test it in the battle. We have built a couple of apps for both commercial and internal projects, and now we can weigh up the pros and cons of React Native. Is it really worth your attention?</p>
<table>
<thead>
<tr>
<th style="text-align: right">Pros</th>
<th style="text-align: left">Cons</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align: right">Faster Build</td>
<td style="text-align: left"> </td>
</tr>
<tr>
<td style="text-align: right">Multiple Platform</td>
<td style="text-align: left">Less Smooth Navigation</td>
</tr>
<tr>
<td style="text-align: right">Hot Reloading</td>
<td style="text-align: left">Lack of some Custom Modules</td>
</tr>
<tr>
<td style="text-align: right">Small Teams</td>
<td style="text-align: left">Native Developers Still Needed</td>
</tr>
<tr>
<td style="text-align: right">Fast Applications</td>
<td style="text-align: left">Facebook Rules</td>
</tr>
<tr>
<td style="text-align: right">Simplified UI</td>
<td style="text-align: left"> </td>
</tr>
</tbody>
</table>
<h2 id="pros-of-react-native">Pros of React Native</h2>
<h3 id="1-faster-to-build">1. Faster to Build</h3>
<p>The major selling point of React Native is shorter development time. It provides numerous ready-to-apply components that can accelerate the process. React Native still lacks some solutions, so you would probably have to build them from scratch. However, with the existing base of packages, you can save much time and it will only get better. As the RN community is growing and Facebook regularly introduces new updates, one day we may find a ready component for most of the solutions we need.</p>
<h3 id="2-one-framework-multiple-platforms">2. One Framework, Multiple Platforms</h3>
<p>React Native enables copying the codebase (or just a part of it) between iOS and Android. In practice, full cross-platform development is possible to some extent, depending on how many native modules you use in your application. Some features will be available in apt packages, but others need to be written from scratch. It will only get better, though. React Native community actively supports the framework adding new tools to open source.</p>
<h3 id="3-hot-reloading">3. Hot Reloading</h3>
<p>Thanks to hot reloading, a developer can keep the app running while implementing new versions and tweaking the UI. It makes changes in the app instantly visible without the need for the developer to save them. It is a major benefit for developers. Not only do they save time on the compilation, but also they don’t lose any state of an app while making changes. It boosts productivity and, in effect, the whole development time decreases.</p>
<h3 id="4-smaller-teams">4. Smaller Teams</h3>
<p>Native development requires two separate teams for Android and iOS. It can hamper communication between developers and, accordingly, slow down the development. If you choose React Native, you will mostly need JavaScript developer who can write the code for both platforms. Obviously, apps with more native features will require help from native developers as well. Notwithstanding this fact, in most cases, the team will be smaller in size, and thus, easier to manage.</p>
<h3 id="5-fast-applications">5. Fast Applications</h3>
<p>Many argue that React Native code might hinder app performance. JavaScript won’t be as fast as native code, but in most cases, you won’t see the difference. We conducted a test and compared a simple application written in both React Native and Swift. Differences in performance were slight, almost unnoticeable to an average user. In the case of more complex applications, the framework might be less effective, but you can always transfer some code to a native module, and it is no longer an issue.</p>
<h3 id="6-simplified-ui">6. Simplified UI</h3>
<p>React Native is solidly based on creating a mobile UI. In native development, it is necessary to create a sequence of actions in the application, whereas RN employs declarative programming in which such an order of implementing an action is obsolete. As a result, it is much easier to detect bugs on the paths a user can take.</p>
<h2 id="cons-of-react-native">Cons of React Native</h2>
<h3 id="1-less-smooth-navigation">1. Less Smooth Navigation</h3>
<p>React Native still lacks navigation components to provide users with seamless UX. There is no ideal solution in RN for navigation between displays. It will be getting better and better, but probably it will never be as good and smooth as native navigation.</p>
<h3 id="2-lack-of-some-custom-modules">2. Lack of Some Custom Modules</h3>
<p>Despite its maturity, React Native still lacks some components. Others, in turn, are underdeveloped. The chances are you won’t have a problem with that, as the majority of custom modules you need are available, well-documented and working properly. However, it may happen that you will have to build your solution from scratch or try to hack the existing one.</p>
<h3 id="3-native-developers-still-needed">3. Native Developers Still Needed</h3>
<p>Implementing some native features and modules necessitates detailed knowledge of a particular platform. React Native does offer custom modules that you can refactor across operating systems, but things such as access to device sensors, camera or push-notifications require help from iOS and Android developers. Their input depends on the complexity of your project, but you need to bargain for them when kicking off with React Native.</p>
<h3 id="4-facebook-rules">4. Facebook Rules</h3>
<p>Facebook puts a lot of resources to ensure React Native’s reliability and also to guarantee a constant development of the platform. It is unlikely that Facebook kills the framework overnight. But you still operate on Facebook’s license and, at the end of the day, you’re always dependent on them. Finally, Facebook has a right to revoke the licence (BSD) to use React and React Native if you get into a patent-related dispute with them.</p>
<h2 id="wrap-up">Wrap-up</h2>
<p>These advantages and disadvantages are worth considering before kicking off with React Native. To get a full picture of the framework, check out our ultimate FAQ list. Share your experience with React Native in the comments!</p>yashumittalWhen we first heard about React Native, a framework that enables building an app for multiple platforms, we were thrilled. One team, one codebase and the potential to scale an app for iOS and Android using a fracture of resources required in native development is a great promise. But how does it stack up with reality?
https://cdn.codecarrot.net/images/pexels-photo-171947.jpeg
What is a Progressive Web App and When You Should Go for It?2017-11-01T14:40:00+00:002017-11-01T14:40:00+00:00https://blog.codecarrot.net/what-is-a-progressive-web-app-and-when-you-should-go-for-it<p>Are <a href="//www.codecarrot.net/services/progressive-web-apps">Progressive Web Apps</a> (or PWA for short) the future of web development? Their main selling point is a smooth performance on any device and the technology based on the idea of treating the web browser as an operating system. Should you get excited? Is this technology for you? Let’s find out.</p>
<h2 id="pwa-explained">PWA Explained</h2>
<p>They have been one of the hottest trends in tech for years. I believe that we will eventually get rid of the term progressive web apps in favor of just web apps. They will be the standard for web development, incorporated everywhere.</p>
<p>What do they do? They deliver value to your user from their very first contact with your app. The user’s Internet broadband or smartphone specs make no difference. The experience is exactly as it should be, regardless the circumstances.</p>
<p>How is that possible? There’s a lot of technology involved in delivering the content (a.k.a. the experience) faster than usual.</p>
<p>PWA are built on progressive enhancements of your application. Each web page starts with HTML, and this is the most basic layer that can bring the value. It’s responsible for text and basic positioning. A page based on pure HTML would be black and white. In most cases, this is enough to deliver the value: the news, the item description in your ecommerce, or friends updates. Each layer after that - CSS styles, JavaScript, push notifications, geolocalisation, and so on - brings progressive enhancement.</p>
<p>You can keep the value from the first layer no matter the circumstances because the browser is the new operating system. In the world of iOS, when we build a native application, Apple pushes to implement features like 3D touch. 3D touch is available only on iPhone 6S and up. We need to make sure the app is still useful and user-friendly on iPhone 6 and older devices. This is also an example of progressive enhancement - we add experiences when the opportunity occurs, but diminish it when it doesn’t.</p>
<p>No single code snippet can make your web app progressive. It’s a shift in design, in development, and in testing that will soon become a standard in web development. There are good reasons why you shouldn’t stay behind.</p>
<h2 id="pwa-and-your-business">PWA and Your Business</h2>
<p><strong>Cheaper native experience based on native APIs in modern browsers.</strong></p>
<p>Progressive web apps are no more expensive than native applications, and they can be used by every possible smartphone user in the world - doesn’t matter if their system of choice is iOS or Android.</p>
<p><strong>High conversion rates, unique active users, higher retention and lower bounce rate.</strong></p>
<p>These metrics are strictly correlated with an app speed. Progressive web apps are focused on speed and delivery to every user.</p>
<h2 id="do-you-need-a-social-proof">Do you need a social proof?</h2>
<p>Flipkart - an Indian ecommerce company - released their progressive web app and reported an increase of 300% in time spent by users in the web app, a 40% higher re-engagement rate, 70% greater conversion rate and a 30% lower data usage.</p>
<p>AliExpress released their new progressive web app and reported an increased conversion rate for new users by 104%. They doubled the customers base on mobile!</p>
<p><strong>You can find out more about practical examples of Progressive Web Apps in this article:</strong> <a href="/10-popular-companies-that-do-progressive-web-apps">10 Popular Companies that Do Progressive Web Apps</a>.</p>
<h2 id="when-do-you-need-pwa">When Do You Need PWA?</h2>
<p>I’m convinced that everyone should focus on progressive web apps. But there are a few application types that I can’t imagine not being developed as a progressive web app - it would be a great loss for your business if you took any other approach.</p>
<p><strong>If you are creating an e-commerce platform.</strong></p>
<p>Definitely focus on PWA. It will have a direct impact on your revenue.</p>
<p><strong>If you are targeting users from developing countries.</strong></p>
<p>Remember that if you live and create your business in a developed country, you will always be spoiled by your 4G connection, widely available WiFi and the newest iPhone 7 or Samsung Galaxy S7 in your hand. If you target Africa, use and test your app on an older smartphone with a 2G connection. Then you’ll see how important it is to make your app progressive.</p>
<p><strong>If you’re building a web app and expect to have a lot of mobile users.</strong></p>
<p>Make life easier for your users. Implement the state-of-the-art technologies designed for progressive web apps like service workers and push notifications. It will make your web app feel more native, faster and will keep your users engaged.</p>
<h2 id="whats-the-verdict">What’s the Verdict?</h2>
<p>Progressive web apps are changing the web before our eyes. You can check out amazing case studies from big companies showing what a great impact progressive web apps have on their business and revenue.</p>
<p>This trend will make the web user the first class citizen of mobile devices. Native APIs in browsers will eventually reach the potential of native applications (or be very close to it). It won’t be worth developing a native application unless it’s written into your business model (like for Snapchat, Uber or Instagram).</p>
<p>Still wondering if your business can take advantage of the progressive web apps technology? We can do a diagnosis for you. Just drop us a line somewhere.</p>yashumittalAre Progressive Web Apps (or PWA for short) the future of web development? Their main selling point is a smooth performance on any device and the technology based on the idea of treating the web browser as an operating system. Should you get excited? Is this technology for you? Let’s find out.
https://cdn.codecarrot.net/images/pexels-photo-356056.jpeg
If You’re Building Any of these 4 Types of Apps, You Need Progressive Web Apps2017-11-01T14:05:12+00:002017-11-01T14:05:12+00:00https://blog.codecarrot.net/if-youre-building-any-of-these-4-types-of-apps-you-need-progressive-web-apps<p>Progressive Web Apps is a concept in web development that focuses on making web apps fast, reliable, and engaging for all users, regardless of what device they own and how well their internet connection works. But can all businesses benefit from PWAs? What criteria should you meet before investing in this technology?</p>
<p>Find out what 4 types of apps can benefit the most from being built as Progressive Web Apps.</p>
<h2 id="pwas-what-are-they">PWAs? What Are They?</h2>
<p>PWAs respond quickly to user gestures and behaviours. They are reliable regardless of broadband speed, e.g. in developing countries broadband with 2G. They engage users through state-of-the-art native-like experiences on mobile devices. This is what Progressive Web Apps are all about.</p>
<p>The technology you choose can have a significant impact on your business. Case studies by large companies (e.g. Flipkart and Twitter) show large upticks in user retention, user acquisition, and conversion rates for PWAs.</p>
<h2 id="4-types-of-apps-that-should-be-progressive-web-apps">4 Types of Apps that Should Be Progressive Web Apps.</h2>
<h3 id="1-e-commerce">1. E-commerce</h3>
<p>E-commerce is an industry where profit margins are low, and every increase in the sales pipeline has a substantial impact on revenue. After implementing a Progressive Web App, Alibaba noted 76-percent higher conversion rates across different browsers, a 14-percent increase in the number of monthly active users on iOS, and a 30-percent increase on Android. These are millions of dollars gained as a result of a fairly small investment.</p>
<h3 id="2-marketplaces">2. Marketplaces</h3>
<p>Marketplace apps have one major problem: who is more important? You need to focus on both sellers and buyers. And that’s why it’s crucial to increase metrics that have an impact on both of them. Housing.com introduced their site as a PWA and reported a 40-percent lower bounce rate, 38 percent more conversions and a 10-percent longer average session. Now, Housing.com is one of the leading online real estate platforms in India.</p>
<h3 id="3-apps-targeted-to-developing-countries">3. Apps targeted to developing countries</h3>
<p>Africa is growing pretty fast in the fields of technology and entrepreneurship. Jumia, an e-commerce platform, is one of the big players aimed at the African market. After they had incorporated the Progressive Web App approach, they saw a 33-percent increase in conversion rates, a 50-percent lower bounce rate and over 1200 percent more users on their mobile web app than on both the iOS and Android platforms!</p>
<h3 id="4-more-rarely-used-mobile-apps">4. More rarely used mobile apps</h3>
<p>There are some apps that you use quite often but not every day – Uber is a good example. You might use it a few times a week, but definitely not as much as you check your Facebook feed. Uber’s competitor, Ola (a cab aggregator), built a Progressive Web App for its users and noted a 68-percent increase in mobile traffic. It also reported that the data usage for the Progressive Web App is over 300 times lower than for their native application (including the downloading step for the native app). By the way, Uber is also into PWA – you can read about how they approached it in <a href="//eng.uber.com/m-uber/">this blog post</a>. Uber has not shared the metrics as of now.</p>
<h2 id="the-take-home-message">The Take-Home Message</h2>
<p>Progressive Web Apps are spreading like wildfire and gaining traction around the world. You’ve seen a few real-world examples of PWAs significantly improving key business metrics and the revenue of various businesses. This is not a fad to scoff at.</p>
<p>I believe PWAs will eventually make the mobile web world fresh. It will feel native and be comparable to native platform experiences.</p>
<p>Don’t waste money on building native apps for small groups of users. Build an exceptional web app that will feel native on mobile and work great on a desktop. It’s much cheaper and will boost your key metrics, just like it did for the early adopters mentioned above.</p>yashumittalProgressive Web Apps is a concept in web development that focuses on making web apps fast, reliable, and engaging for all users, regardless of what device they own and how well their internet connection works. But can all businesses benefit from PWAs? What criteria should you meet before investing in this technology?
https://cdn.codecarrot.net/images/phone-on-city-332031-edited.jpeg
10 Popular Companies that Do Progressive Web Apps2017-11-01T13:40:00+00:002017-11-01T13:40:00+00:00https://blog.codecarrot.net/10-popular-companies-that-do-progressive-web-apps<p>76% increase in conversions, 30% speed gain, 88% performance improvement, five times lower data usage, and 23% increase in the number of mobile searches. These benefits have been enjoyed by the major players in the global digital economy, including Twitter, Washington Post, Forbes and Virgin America. How? They adopted PWAs in their applications.</p>
<p>PWA stands for an app which can be installed in your system. It uses the data cached during your previous interactions with it to enable working offline or without a stable internet connection.</p>
<p>Progressive Web Apps (PWAs) are transforming the practices and standards of the mobile web into native app-like experiences capable of accelerating transaction processing for mobile shoppers, site searches, and service delivery to levels that consistently outperform even the most responsive legacy sites.</p>
<h2 id="alibaba">Alibaba</h2>
<p><img src="https://cdn.codecarrot.net/images/Alibaba.jpg" alt="Alibaba.jpg" /></p>
<p>With 635,091 buyers from more than 150 countries trading on its platform and serving over 200 countries and regions, Alibaba is the world’s largest B2B marketplace catering for manufacturers, suppliers, importers, and exporters.</p>
<p>For Alibaba.com, a Progressive Web App was the most compelling bridge between the users of their native app and the mobile web. The PWA strategy resulted in a 76% increase in total conversions (direct contact with a supplier) across browsers.</p>
<p>Features such as “Add to HomeScreen” led to a monthly increase of active user rates by 14% on iOS and 30% on Android devices .</p>
<h2 id="fandango">Fandango</h2>
<p><img src="https://cdn.codecarrot.net/images/fandango_logo_detail.jpg" alt="fandango_logo_detail.jpg" /></p>
<p>Developers working for Fandango have a long history of agile development, continuous integration, and weekly releases. Moves toward mobile UX integration began with a scheme enabling Twitter users to buy tickets with one click. Moreover, the company is testing a system where a smartphone image can serve as a digital movie ticket.</p>
<p>The Fandango Progressive Web App achieves a 30% speed gain over the loading of its desktop website and a 50% increase over its native apps for Android and iOS. But the performance of its beta (around six months online) on the Lighthouse index could use some developer input, with a score of 17/100 for the delivery of its first interactive page. Granted, this is mainly due to the number of graphics (e.g. movie posters) PWA scores 100/100 for its text compression, WebP images, and the ability to avoid enormous network payloads.</p>
<h2 id="flipkart">Flipkart</h2>
<p><img src="https://cdn.codecarrot.net/images/1432819243-7411.jpg" alt="1432819243-7411.jpg" /></p>
<p>After adopting an app-only strategy in 2015, Flipkart (India’s biggest eCommerce site) turned to Progressive Web App technology as a way of enabling visitors to work offline, access the mobile web instantly, and increase their engagement.</p>
<p>Their Flipkart Lite app has three times lower data usage than its native mobile predecessor and has generated a 40% higher re-engagement rate among the first-time visitors.Compared to the previous mobile experience, the time spent on the site has tripled. Its “Add to Homescreen” icon has generated a 70% higher conversion rate..</p>
<h2 id="forbes">Forbes</h2>
<p><img src="https://cdn.codecarrot.net/images/Forbes_logo.svg.png" alt="Forbes_logo.svg.png" /></p>
<p>Known for its superfluous quotations, numerous ads and slow loading times, Forbes.com turned to Progressive Web Apps for its new mobile site which - Forbes says - is capable of loading in 0.8 seconds (compared to the 3-12 seconds of its previous mobile experience).</p>
<p>The Forbes site includes a new story format called Cards which is based on the layout of Snapchat Stories. Cards may be swiped through and can feature photographs, video, infographics or quizzes. Furthermore, Forbes developed Fluid, a new format for its in-house advertising designed for faster loading on mobile devices.</p>
<h2 id="jumia-travel">Jumia Travel</h2>
<p><img src="https://cdn.codecarrot.net/images/Jumia_Travel_logo.png" alt="Jumia_Travel_logo.png" /></p>
<p>Consistently one of the highest ranking PWAs for eCommerce, Jumia Travel primarily caters for vacationers and business travellers on the African continent. With around 95% of prospective travellers in Africa’s most populous nation, Nigeria, preferring a browser over a mobile app, a highly optimised Progressive Web App experience has reaped dividends for the company.</p>
<p>Jumia’s PWA uses five times less data than its native apps for iOS or Android and has reflected a twelve-fold increase in traffic. Conversion rates for PWA transactions have risen by 30%, and the bounce rate on Jumia Travel’s mobile site has dropped by 50%.</p>
<h2 id="lancôme">Lancôme</h2>
<p><img src="https://cdn.codecarrot.net/images/lancome_2_67419.jpg" alt="lancome_2_67419.jpg" /></p>
<p>Lancôme, one of the world’s leading luxury beauty product brands, felt the need to up its game for mobile users when its mobile web conversion rate topped out at only 15%, compared to 38% for shopping carts on its desktop site. This was primarily due to the slow access and transaction times for mobile visitors.</p>
<p>Lancôme launched a PWA with Mobify, which reduced the time for each page on the site to become active for mobile visitors by 84% and bounce rates by 15%. The number of mobile sessions on Lancôme’s site increased by 53% and conversion rates rose by 17%. Their PWA has a performance rating of 94/100 on Lighthouse, an automated tool for improving web page quality.</p>
<h2 id="ola">Ola</h2>
<p><img src="https://cdn.codecarrot.net/images/Ola_Cabs_logo.png" alt="Ola_Cabs_logo.png" /></p>
<p>With a cab service that drives mobility for a billion Indians, Ola offers a PWA which is allegedly 300 times smaller than downloading the Android app and 500 times smaller than downloading their iOS app. Repeat visits to the site consume as little as 10KB, and the app’s low data consumption translates to a 3.4-second first visit, and less than a second for repeat visits. It’s also available for Windows Phone.</p>
<h2 id="twitter">Twitter</h2>
<p><img src="https://cdn.codecarrot.net/images/twitter.png" alt="twitter.png" /></p>
<p>For its monthly global user base of 328 million (80% of them on mobile), Twitter Lite PWA became the default mobile web experience for all users in April 2017. The new app requires less than 3% of the device storage space needed by Twitter for Android.</p>
<p>Smaller media resources and cached data translated into reduced data consumption, which led to 75% increase in the number of Tweets, 65% increase in pages per session, and 20% decrease in bounce rates.</p>
<h2 id="virgin-america">Virgin America</h2>
<p><img src="https://cdn.codecarrot.net/images/download-1.png" alt="download-1.png" /></p>
<p>“Dedicated to making flying good again with brand-new planes, in-flight internet access, leather seats & award-winning service”, Virgin America waited until 2016 to enter the mobile app ecosystem in a marketplace where 47% of online travel shoppers routinely expect a web page to load in two seconds or less. Worse, 53% of customers polled by Google will abandon a mobile site if it takes more than three seconds to load, whereas the average mobile page takes 22 seconds.</p>
<p>Native apps for Android and iOS followed, and with the acquisition of the company by Alaska Airlines, Virgin America’s PWA mobile site went online five months ago, with speed gains in page loading of its mobile UX of around 30% and 50%, compared to its desktop site and mobile app performance, respectively. On the Lighthouse index, the Virgin America PWA (still officially in its beta phase) scores 81/100 in its time to deliver an interactive page, so there’s still some room for improvement.</p>
<h2 id="the-washington-post">The Washington Post</h2>
<p><img src="https://cdn.codecarrot.net/images/800px-The_Logo_of_The_Washington_Post_Newspaper.svg.png" alt="800px-The_Logo_of_The_Washington_Post_Newspaper.svg.png" /></p>
<p>In June 2015, The Washington Post with various other publishers and technology companies created the Accelerated Mobile Pages Project, a Progressive Web App development platform which enables The Post to publish over 1,000 articles each day, with average load times of 400 milliseconds - an 88% performance improvement over their traditional mobile website.</p>
<p>PWA technology has also seen a 23% increase in the number of mobile search users who return to the site within 7 days.</p>
<h2 id="its-not-just-them">It’s Not Just Them</h2>
<p>Progressive Web Apps are steadily gaining ground in the online marketplace. Companies as diverse as The Home Depot (home improvements, renovation, and tools), Pure Formulas (organic vitamins and health supplements), and 5 miles (the used item sales platform) are among the adopters.</p>
<p>If you’re still on the fence as to whether PWA might work for you, the technology’s pioneer, Google, hosts an <a href="//developers.google.com/web/showcase/">information resource and news forum</a> with case studies and the latest developments.</p>yashumittal76% increase in conversions, 30% speed gain, 88% performance improvement, five times lower data usage, and 23% increase in the number of mobile searches. These benefits have been enjoyed by the major players in the global digital economy, including Twitter, Washington Post, Forbes and Virgin America. How? They adopted PWAs in their applications.
https://cdn.codecarrot.net/images/pexels-photo-541522.jpeg
Is Node.js Good for E-commerce? - All You Should Know about Building Online Store with Node.js2017-11-01T13:22:00+00:002017-11-01T13:22:00+00:00https://blog.codecarrot.net/is-node-js-good-for-e-commerce-all-you-should-know-about-building-online-store-with-node-js<p>E-commerce platform is a complex system from a technical perspective. To make all the pieces work together, you need a reliable technology that will support it. <a href="/why-to-use-nodejs-pros-and-cons-of-choosing-nodejs-for-back-end-development">Node.js is fast and scalable</a>, but how to make sure it’s the right match for your platform?</p>
<h2 id="the-beauty-of-building-apps-with-nodejs">The Beauty of Building Apps with Node.js</h2>
<p>Node.js is a Javascript environment that lets you develop performant and scalable applications. It’s a perfect match for applications such as real-time collaboration tools, chats, streaming apps or other applications that deal with multiple I/O operations. However, it doesn’t cope well with CPU-heavy software as the long-running calculations block incoming requests, which can lead to a drop in performance.</p>
<h2 id="performance">Performance</h2>
<p>Node.js supports multitasking by giving better outcomes with lower costs. Comparing it to - say - PHP, it’s way more convenient. As the buyer’s journey at an e-commerce store involves numerous operations, such as adding things to the basket, changing product features, choosing payments etc., it’s crucial from the performance viewpoint that the technology serve such tasks efficiently. And <a href="/nodejs-vs-php-which-environment-to-choose-for-your-next-project">Node.js effectively handles different operations conducted at the same time</a>, which makes it a good choice for e-commerce.</p>
<h2 id="scalability">Scalability</h2>
<p>Node.js enables quick scalability. In a short period, your e-commerce store can grow substantially. It is an important factor to consider when choosing the technology. Node has an inbuilt mechanism that helps to manage scalability and adjust it to your individual needs.</p>
<h2 id="big-and-active-community">Big and Active Community</h2>
<p>The Node.js community is a very active and vibrant group of developers who contribute to the constant improvement of Node.js. Thanks to their cooperation, the framework is well-documented, up-to-date and continuously supported, which makes the development much easier and faster. They produce a ton of ready solutions, codes in Github, plugins, modules and many more possibilities. In addition, if a problem pops up, chances are you already have the answer on StackOverflow.</p>
<h2 id="many-plugins-and-packages-in-npm">Many Plugins and Packages in npm</h2>
<p>Node.js comes with a great deal of packages that can be easily implemented in your app. That way, developers don’t need to write everything from scratch but can leverage reliable open-source solutions. It significantly increases the speed of development. There are great packages available for e-commerce too.</p>
<h2 id="one-language-on-back--and-front-end">One Language on Back- and Front-end</h2>
<p>Node,js is a JavaScript-based environment, and many popular front-end frameworks (such as <a href="//www.codecarrot.net/react-js">React</a>, <a href="//www.codecarrot.net/ember-js">Ember</a>, <a href="//www.codecarrot.net/angular-js">Angular</a>) use the very same language. Therefore, you can create applications which are isomorphic that is written in one language. It streamlines the development process,the communication between front- and back-end teams is way easier, and they can understand both sides of the codebase much better. Potentially, you might have a smaller and more efficient team that is easier to manage. Finally, with no technological diversity recruiting new people in case of scaling up won’t be a problem.</p>
<h2 id="tips-and-things-to-remember">Tips and Things to Remember</h2>
<p>After you weigh up all the options and decide to go for Node.js, there are a few things to consider about the development.</p>
<h2 id="choose-the-right-solution">Choose the Right Solution</h2>
<p>Depending on your needs, the number of features and the complexity of an application, you will have a bunch of options to develop your e-commerce store. There are a few ready solutions to create such an app including platforms such as Prime Fusion, Reaction Commerce and Trader.io. Naturally, you can also build an app from scratch if your project requires unique characteristics. Let’s go through all of the options.</p>
<p><strong>1. Prime Fusion</strong></p>
<p>Prime Fusion is a product fully based on MEAN stack, a full-stack javascript framework that includes MongoDB, Express, AngularJS, Node.js as well as GraphQL, webpack, React, Gulp, Babel and Mocha. All the above mentioned databases and frameworks provide developers with a complete set of tools to build a stable e-commerce platform. Prime Fusion can be easily modified and doesn’t require special knowledge about creating a store - everything comes with the framework.</p>
<p><strong>2. Reaction Commerce</strong></p>
<p>Reaction Commerce is an open-source, real-time platform based on Meteor Framework. It is a fast, flexible and scalable solution that plays nicely with npm, Docker and React. The codebase is modular, so you can tailor the solution to fit your needs. Everything can be extended, overwritten or installed as a package. It also provides extensive real-time analytics to help you make better business decisions.</p>
<p><strong>3. Trader.io</strong></p>
<p>Trader.io is also built around MEAN stack. It offers a flexible, scalable API and all basic functionalities you will need in your e-commerce store. The solution was built by a team of developers who had previously created a lot of e-commerce applications and then decided to take that existing code and make it open-source.</p>
<p><strong>4. Own solution</strong></p>
<p>The last option is to code your own solution that would be fully in line with all your needs. Building it from scratch will give you much bigger flexibility. However, it will take more time and money to create it and require more experience from developers.</p>
<h2 id="consider-technology-coherence">Consider Technology Coherence</h2>
<p>Node.js serves only as a backend for your e-commerce store, and you also need to think about what technologies you will use for other parts of the application. It’s important that all the frameworks and solutions stay consistent. That’s why the best option is to use a ready package offered by e-commerce platforms mentioned in the previous section. That way, you will avoid many problems that may appear when developing the app.</p>
<h2 id="is-it-a-good-choice">Is It a Good Choice?</h2>
<p>In many cases, Node.js can give you higher performance than other technologies. It’s also proven that it’s a stable and fast solution for building e-commerce stores. It comes with a bunch of ready frameworks that make development easier and quicker. However, choosing stack is an individual case and depends on many factors. <a href="mailto:contact@codecarrot.net">Write to us</a>, and we’ll help you make the right decision.</p>
<p><strong>Read also:</strong> <a href="/ruby-on-rails-for-ecommerce">Ruby on Rails for Ecommerce</a>.</p>yashumittalE-commerce platform is a complex system from a technical perspective. To make all the pieces work together, you need a reliable technology that will support it. Node.js is fast and scalable, but how to make sure it’s the right match for your platform?
https://cdn.codecarrot.net/images/StockSnap_0K2OHEKTRH-154362-edited.jpg
Why to Use Node.js - Pros and Cons of Choosing Node.js for Back-end Development2017-11-01T11:22:00+00:002017-11-01T11:22:00+00:00https://blog.codecarrot.net/why-to-use-nodejs-pros-and-cons-of-choosing-nodejs-for-back-end-development<p>Choosing backend technology is one of the most important decisions that every CEO and CTO have to make. It determines how fast a product can be shipped to market, what is the total cost and how big pain maintenance will be.</p>
<p>JavaScript has been one of the most popular client-side programming languages and a commonly used front-end web development tool. However, it has also gained ground in different areas of application and on distinct platforms, such as React Native, Appcelerator Titanium, Apache Cordova/PhoneGap, NativeScript, and Node.js, which is totally different from other commonly used JavaScript frameworks.</p>
<p>Node.js is actually not a framework, but a runtime environment that allows to execute JavaScript on the server side. Even though it was originally written in 2009 it wasn’t widely adopted until recently. Currently, numerous thriving <a href="/10-top-companies-that-used-nodejs-in-production">companies have leveraged Node.js in developing their applications</a>, including Walmart, Netflix, Medium, LinkedIn or Groupon. Why so many big players chose Node.js to use at the back-end? Here are the top benefits of that environment, but also some drawbacks you should consider before you make the choice. Wrong decision may cost you money, so choose wisely.</p>
<h2 id="pros-of-using-nodejs-for-back-end-development">Pros of Using Node.js for Back-end Development</h2>
<h3 id="easy-to-learn">Easy to Learn</h3>
<p>According to <a href="//nodejs.org/static/documents/2016-survey-report.pdf">Node.js’s 2016 User Survey</a> Javascript is one of the most popular programming languages for front-end development. Nearly every front-end developer is familiar with this universal language. Therefore, it is much easier for them to switch to using Node.js at the back-end. It requires less effort and less time to learn and work with, even for a junior Javascript programmer.</p>
<p><img src="https://cdn.codecarrot.net/images/PowerPoint+Presentation+2017-11-01.png" alt="Node.js’s 2016 User Survey" /></p>
<h3 id="freedom-in-building-apps">Freedom in Building Apps</h3>
<p>While Ruby on Rails is a framework that imposes rules and guidelines of developing software in a particular way, Node.js gives you much more space and freedom in doing it your own way. Node.js is completely unopinionated, meaning you start building everything from scratch. It can execute basic tasks, but gives you only the bare minimum from a fresh install, making it less restricted.</p>
<h3 id="fullstack-js">Fullstack JS</h3>
<p>Before Node.js, Javascript was only used for client-side development. It was necessary to use a different server-side programming language. In practice, you had to hire separate devs for backend and for frontend. With a growing popularity of Node.js fullstack JavaScript became a reality. Nowadays it is possible to write both front-end and back-end of web applications in Javascript, making app deployment much easier and more efficient.</p>
<h3 id="active-community">Active Community</h3>
<p>The Node.js community is a very active and vibrant group of developers who contribute to constant improvement of Node.js. Thanks to the cooperation of JavaScript programmers and their input to the community you get access to a ton of ready solutions, codes in Github and many more possibilities. Even though, it is still at a relatively early stage of development, the community is dynamically evolving and its members go the extra mile to provide others with best and reliable solutions.</p>
<p><img src="https://cdn.codecarrot.net/images/pexels-photo-26135-132411-edited.jpg" alt="People enjoying at camp fire" /></p>
<h3 id="simultaneous-request-handling">Simultaneous Request Handling</h3>
<p>Node.js provides the non-blocking IO system that lets you process numerous requests concurrently. The system makes simultaneous request handling much better than in other languages like Ruby or Python. Incoming requests are queued up and executed sequentially in a fast manner. In effect your app will take up much less system RAM, achieve high scalability levels and in a result will be perform faster.</p>
<h2 id="cons-of-using-nodejs-for-your-back-end">Cons of Using Node.js for Your Back-end</h2>
<h3 id="unstable-api">Unstable API</h3>
<p>One of the biggest disadvantages of Node.js is that it lacks consistency. Node.js’ API changes frequently, and the changes are often backward-incompatible. When this happens, programmers are forced to make changes to the existing code base to make it compatible with the latest version of the Node.js API.</p>
<h3 id="more-development-time">More Development Time</h3>
<p>The fact that Node.js is unopinionated can also be seen as a drawback by some developers. Ruby on Rails provides you with a lot of directions from a fresh install and guides you into their way of doing things, but with Node.js you basically need to write everything from scratch. It might result in a decrease in productivity, slowing your work down. However, if you cooperate with an experienced team of programmers who have internally developed a good processes for developing and maintaining code, you do not have to worry about efficiency.</p>
<p><img src="https://cdn.codecarrot.net/images/negativespace1-18-029619-edited.jpg" alt="Telephone booth" /></p>
<h3 id="not-suitable-for-heavy-computing-apps">Not Suitable for Heavy-Computing Apps</h3>
<p>Node.js doesn’t support multi-threaded programming yet. It is able to serve way more complicated applications than Ruby, but it’s not suitable for performing long-running calculations. Heavy computations block the incoming requests, which can lead to decrease of performance . While Node.js is perfect for complex apps, in the case of software which requires some heavy-computing it might perform less effectively.</p>
<h3 id="immaturity-of-tools">Immaturity of Tools</h3>
<p>Even though, the core Node.js is stable, many packages in the npm registry (pre-installed node package manager that organises the installation and management of third-party Node.js programs) are still of poor quality or have not been properly documented. As it is mostly an open source ecosystem, numerous tools have not been supervised and so they might lack the quality and fail at meeting coding standards. The npm’s structure makes it harder to spot reliable packages. Therefore, you might need more experienced developers who can find tools that can be trusted.</p>
<h2 id="wrap-up">Wrap-up</h2>
<p>Node.js is still an immature environment in many aspects and it is likely that many programmers won’t find it useful in their projects yet. However, there are many cases in which Node.js might prove to be much more efficient. Numerous companies have trusted Node.js in production of their applications and they’ve already experienced positive results. It is definitely worth following their example and trying to identify which of the problems you have can be solved with Node.js. Effects might outgrow your expectations.</p>yashumittalChoosing backend technology is one of the most important decisions that every CEO and CTO have to make. It determines how fast a product can be shipped to market, what is the total cost and how big pain maintenance will be.
https://cdn.codecarrot.net/images/coding-924920_1280.jpg
Hosting a Ruby on Rails App - DevOps Solutions Comparison - AWS, Google Cloud Platform, Microsoft Azure, Heroku and Digital Ocean2017-11-01T09:51:00+00:002017-11-01T09:51:00+00:00https://blog.codecarrot.net/hosting-ruby-on-rails-app-devops-solutions-comparison-aws-google-cloud-microsoft-azure-heroku-digitalocean<p>At some point, you will have to decide where to host your amazing RoR application. Choosing between dozens of excellent hosting providers might not be so easy. Choosing each provider will have its own trade-offs in terms of price, deployment and configuration flexibility, and scalability to name a few. To make your choice easier, we have compared eight major RoR hosting providers. Depending on your application requirements and budget, you can make the right choice using our description of key strengths and weaknesses of these hosting providers.</p>
<h2 id="1-aws-amazon">1. AWS Amazon</h2>
<p>Amazon Web Services (AWS) support the automation of a RoR application deployment via Amazon Elastic Beanstalk, a service that manages and automatically handles capacity provisioning, load balancing, application dependencies, scaling, and health monitoring. The key prerequisites for launching your RoR application are running a virtual EC2 instance and having S3 disc storage. Amazon allows you to select the most affordable options (e.g. t2.micro with one CPU core and 0.5 GB of memory) and scale your application later. After you set up your cloud environment, you can automatically configure and deploy your RoR app using Amazon Elastic Beanstalk which comes for free. As an additional benefit, if you are a new user, you may be eligible for a one-year use of free-tier AWS services including instances, storage, elastic IPs, and more.</p>
<h3 id="pros">Pros</h3>
<ul>
<li>a very stable and scalable platform</li>
<li>a one-year provision of free-tier services</li>
<li>excellent support for RubyGems</li>
</ul>
<h3 id="cons">Cons</h3>
<ul>
<li>requires a good knowledge of Linux/Windows administration and DevOps</li>
<li>you should be cautious when relying on Amazon vendor standards and solutions such as S3 and Lambda, because it may lead to a vendor lock-in, and it might be difficult for you to move away to another hosting service.</li>
</ul>
<h2 id="2-google-cloud-platform">2. Google Cloud Platform</h2>
<p>Google offers three options for deploying and running your RoR applications on the Google Cloud Platform. If you want to have full control over the underlying virtual machines, you can opt for a Google App Engine, a Google cloud platform for the development and hosting of web applications. Google App Engine is accessible via free-tier and comes with pre-installed RubyGems, system libraries, custom Docker runtimes, and other useful tools for Rapid Application Development (RAD) with RoR. Using Google App Engine, you will be charged for network traffic, storage, and search queries.</p>
<p>The second alternative is deploying your RoR application with the standard Compute Engine similar to Amazon EC2 instances. It is essentially the same as using the IaaS (Infrastructure-as-a-service) model, in which you pay for computing power (CPUs) and storage and manually deploy your Ruby environment and application via standard development tools. This option has fewer automated features and requires deeper knowledge of the underlying Linux/Windows systems and tools for remote management of your RoR application (e.g. SSH).</p>
<p>Finally, Google Cloud Platform allows designing Ruby micro-services deployed via Google Container Service. This option is especially beneficial if you are looking to develop a complex application with a loosely coupled microservices architecture.</p>
<h3 id="pros-1">Pros</h3>
<ul>
<li>flexible pay-as-you-go model and easy scalability</li>
<li>supports several RoR deployment options</li>
<li>one-year provision of free-tier services</li>
</ul>
<h3 id="cons-1">Cons</h3>
<ul>
<li>similarly to Amazon AWS, vendor lock-in might be a problem when using Google Cloud Platform</li>
<li>once you leave the free tier, Google Cloud can get pretty expensive, especially if your application experiences traffic spikes.</li>
</ul>
<h2 id="3-microsoft-azure">3. Microsoft Azure</h2>
<p>Microsoft Azure is Microsoft’s cloud platform that lets developers rapidly build, deploy, and administer web applications built with RoR. To deploy a RoR app on Microsoft Azure, you should launch a Windows or Linux virtual machine pretty much the same way you would do in Google Cloud Platform or Amazon AWS. Microsoft Azure supports multiple OS images and instance types among which you can find the ones that fit your application’s requirements. The platform is highly configurable and flexible: you can configure ports, DNS, and other network features via an easy-to-use interface. Once your VM is up and running, you can easily upload your RoR code via SSH or any FTP client and launch it on your Azure’s server.</p>
<h3 id="pros-2">Pros</h3>
<ul>
<li>Azura has an excellent free plan that supports up to 10 apps on your virtual servers, 1 GB of disc space, FTP, security scanning, and other features.</li>
<li>It offers high availability (up to 99,9%) and easy scalability including the support for auto-scaling.</li>
</ul>
<h3 id="cons-2">Cons</h3>
<ul>
<li>You can’t use Microsoft Azure as a PaaS for your RoR application. This implies that you have to manually configure the RoR environment and upload your application via SSH or FTP, which requires a good expertise in Linux/Window system administration.</li>
<li>RoR deployments can be too slow, and it there’s no way to deploy your RoR application to an Azure cloud service from a Mac.</li>
</ul>
<h2 id="4-heroku">4. Heroku</h2>
<p>Being a “full service” PaaS (Platform-as-a-Service) solution, Heroku is a great choice for teams who do not wish or need to administer their own infrastructure (e.g. virtual machines, servers, hard drives etc.). Unlike Amazon AWS or Google Cloud Platform, Heroku ships all computing services (vCPUs, hard drives, etc.) in bundles called ‘dynos’. This means you don’t have to separately launch hard drives and virtual instances – everything required for your RoR application is provided by default.</p>
<p>In addition, Heroku has flexible pricing options. If you want your application running 24/7, you can opt for a “hobby” account priced at $7 per month. If your application is busy, you may want accounts with more “dynos” that are charged from $25 to $500 per dyno/month. After the account is launched, you can upload your RoR application from Git and deploy it in just 30 seconds. Since Heroku was purpose-built for deploying Rails apps, it’s not surprising how great the platform is optimized for Rails development.</p>
<h3 id="pros-3">Pros</h3>
<ul>
<li>Heroku is optimized for quick and efficient deployment of your RoR applications. Since Heroku is a PaaS system, you don’t have to deal with the underlying infrastructure and system configurations – everything you need to kick-start your RoR app is provided out-of-the-box.</li>
<li>There are no bandwidth limitations with Heroku. Therefore, you can quickly scale your app if the traffic increases knowing that Heroku won’t shut down your server and overcharge.</li>
</ul>
<h3 id="cons-3">Cons</h3>
<ul>
<li>With Heroku, you don’t have a full access to lower-level infrastructure (it’s a PaaS). This may be a problem for companies seeking to configure their virtual server environment, OS, firewalls, load balancing, network, and other deep-level system architectures.</li>
<li>Service charges tend to rise dramatically once you decide to handle more traffic.</li>
</ul>
<h2 id="5-digital-ocean">5. Digital Ocean</h2>
<p>Digital Ocean is a provider of Virtual Private Servers (VPS) designed as Droplets that offer the right amount of RAM, CPU, and local storage resources in a single bundle. This means you don’t need to launch different services (hard drives, instances) separately. The most basic Droplet will cost you $5 per month and will include 512MB RAM, 1 vCPU, 1TB traffic, and 20 Gb SSD. Unlike Amazon AWS or Google Cloud Platform, Digital Ocean does not provide a free-tier option for its hosted RoR solutions. Also, earlier you had an option to deploy your RoR environment as a one-click installation. This feature was removed recently. Now, to install your RoR on the Droplet, you can use command-line tools like rbenv or RVM (Ruby Version Manager) on Ubuntu.</p>
<h3 id="pros-4">Pros</h3>
<ul>
<li>Digital Ocean is easier to manage than IaaS platforms, e.g. Amazon AWS. All the necessary services (e.g. storage, computing) are provided in one bundle at a fixed price.</li>
<li>It is easier to migrate your RoR application from Digital Ocean because their model does not lock customers into their cloud services.</li>
</ul>
<h3 id="cons-4">Cons</h3>
<ul>
<li>Does not support free tier.</li>
<li>The platform imposes monthly bandwidth limits, so you’ll have to upgrade your system to a new plan if your app experiences sporadic traffic spikes.</li>
</ul>
<h2 id="6-other-alternatives">6. Other Alternatives</h2>
<p>Besides the large hosting companies mentioned above, there are a vast number of small VPS providers such as OVH, Aruba cloud, and Oktawave.</p>
<p>With OVH, you can launch your RoR application on a VPS (Virtual Private Server) or Dedicated Server depending on your application’s workload. In addition, you can manage your own private, public, or hybrid clouds, and have access to low-level system configurations and settings. OVH guarantees an excellent SLA and performance, since it’s one of the few companies that does not outsource its data center management to third parties.</p>
<p>If you want a cheap Cloud VPS solution for your RoR application, Aruba Cloud offers a $1/month plan that includes SSD disks, one IP address, and up to 25 TB/month data transfer. This is an excellent option for hosting lightweight RoR applications which can be, however, easily scaled with Aruba’s Cloud Pro and Private Cloud Plans.</p>
<p>Finally, a Polish cloud provider Oktawave offers a great way to autoscale your RoR applications. Once your RoR application is up and running, Oktawave Autoscaler will track the traffic dynamics and automatically change the class of your instance. In conjunction will the load balancing, Oktawave will ensure the stable operation of your RoR application at any scale.</p>
<h2 id="how-to-choose-the-right-hosting-for-ror-app">How to choose the right hosting for RoR App?</h2>
<p>So, what is the bottom line? If you want a fine-grained control over your RoR deployment, you should opt for IaaS providers such as Google Cloud Platform, Amazon AWS or Microsoft Azure which are all stable and scalable solutions. However, the trade-off is that using these hosting providers will require hiring a DevOps specialist for managing environment, containerization and deployment, and a team of professional Linux or Windows administrators to configure instances, storage, network, etc.</p>
<p>PaaS solutions, such as Heroku, are a better option if you want your RoR to go up and running as soon as possible. Being scalable and cheap, Heroku makes it easy to launch RoR applications by uploading them from your Git repository. The trade-off is that with such providers as Heroku you have less control over the underlying infrastructure.</p>
<p>Finally, Digital Ocean is excellent if you want to retain a higher level of control over your virtual servers, but do not want to separately manage different cloud services. Digital Ocean solves this problem for you by offering them all in bundles called Droplets.</p>
<p>When choosing between those hosting providers, you should also be thinking about potential traffic spikes in your application. For example, if you experience a traffic increase in the Digital Ocean, you will need to switch to a more costly Droplet, since Digital Ocean imposes traffic limitations in each plan. If you are using Amazon, Google, or Microsoft, you will be automatically billed monthly for additional traffic flow. However, in the case of IaaS providers, you should be in full control of the deployed services and their price to avoid unexpected charges. Fortunately, to adapt to rules and processes of IaaS hosting providers (Amazon AWS, Microsoft Azure, and Google Cloud Platform) you can opt for a one-year free tier to experiment with your RoR application. No matter which hosting option you select, your team should be extremely competent and experienced in the pricing of services and inner workings of underlying technologies to make your RoR application deployment efficient.</p>yashumittalAt some point, you will have to decide where to host your amazing RoR application. Choosing between dozens of excellent hosting providers might not be so easy. Choosing each provider will have its own trade-offs in terms of price, deployment and configuration flexibility, and scalability to name a few. To make your choice easier, we have compared eight major RoR hosting providers. Depending on your application requirements and budget, you can make the right choice using our description of key strengths and weaknesses of these hosting providers.
https://cdn.codecarrot.net/images/pexels-photo-265152.jpeg
When is PWA a Better Approach for Me Than Native Apps2017-11-01T08:40:00+00:002017-11-01T08:40:00+00:00https://blog.codecarrot.net/when-is-pwa-a-better-approach-for-me-than-native-apps<p><a href="//www.codecarrot.net/services/progressive-web-apps">Progressive Web Apps</a> have recently gained in popularity as they offer numerous benefits both in terms of user experience and business-wise. <a href="/10-popular-companies-that-do-progressive-web-apps">Many enterprises of all sizes and industries have successfully implemented PWAs, which triggered significant improvements in their businesses</a>. They’ve seen their bounce rates decrease, conversion rates shoot up and page speed improve. Should you follow their lead?</p>
<p>As a CEO or CTO, you probably have considered <a href="/what-is-a-progressive-web-app-and-when-you-should-go-for-it">PWAs</a> or at least heard about them. Naturally, <a href="/4-characteristics-good-progressive-web-app">PWA will enable you to substantially accelerate transaction processing for mobile shoppers, site searches, and service delivery</a>. In many cases, PWA can o utperform even the most responsive legacy sites. However, it might not be a perfect match for all kinds of applications. When is it worth investing in a new web application that addresses the Progressive Web Apps concept instead of mobile native?</p>
<p><strong>See also:</strong> <a href="/what-makes-a-web-app-progressive">What makes a web app progressive?</a></p>
<h2 id="how-to-verify-if-you-can-take-advantage-of-pwa-instead-of-native">How to Verify If You Can Take Advantage of PWA Instead of Native</h2>
<h3 id="understand-your-users-needs">Understand your users’ needs</h3>
<p>Are you sure that your users need a native mobile application? Maybe you became fixated on this idea in order to follow the crowd - in these times “everyone has a mobile app”. It’s not so straightforward! Even if a lot of businesses, even startups, invest money in native apps, the data shows that over 80% of time spent on mobile apps is spent using the three top apps! What is more, over 60% of Americans (people with the best smartphones in the world) install zero apps each month! There’s no point in building software that won’t be used, right?</p>
<p>The reasons for reluctance to install new apps are varied and hard to pigeonhole. Personally, I think it is useless to install a mobile native app that I use less often than at least every day. I use iPhone 6S with 16GB flash drive, and I really prefer to have apps on my dashboard that I actually use on a regular basis.</p>
<p>The next thing is that people use mobile devices basically everywhere, and the majority of this time is outside their home. This means that they are probably not having a WiFi connection and there must be a very strong demand for your app core value to sacrifice precious mobile broadband on a limited plan. Would you spend 300Mb out of 2GB of your broadband on your app? Think about that.</p>
<p>Figure out where your ### users are</p>
<p>If you build global applications, you must reach out to global users. And it turns out that the majority of Earth’s population does not have 3G, which means that using high-volume data is out of their possibilities. Twitter’s PWA accounts for only 3% of native mobile data usage and led to a 70% increase in the tweets sent.</p>
<h3 id="estimate-the-costs-and-prioritise">Estimate the costs and prioritise</h3>
<p>Why do most of the startup fail? Because they didn’t match the product with the market. But the real reason is that they basically didn’t make it as a result of burning all the money they had. As likely as not, a significant part of these companies would have made it if they had had a month, a quarter or a year more.</p>
<p>That’s why it is crucial to prioritise your costs and save money where possible and gain time for iterations and pivoting. Is it worth spending $200k on your iOS and Android application? Are you sure that the conversion rates will be high enough to get you paying customers?</p>
<p>Progressive Web App is a must-have web application, but it is focused on user experience. The costs of developing a fully PWA-compliant application might be a little bit higher than the regular web app, but it’s a small investment comparing to two separate native applications.</p>
<p><strong>See also:</strong> <a href="/if-youre-building-any-of-these-4-types-of-apps-you-need-progressive-web-apps">If You’re Building Any of these 4 Types of Apps, You Need Progressive Web Apps</a></p>
<h2 id="summary">Summary</h2>
<p>As a senior tech leader, I would always push for a wide discussion upon Progressive Web App instead of mobile native. From the business perspective, you are responsible for growing your company and spending money where it’s important and has signs of returns on these investments. Don’t follow the crowd and consider embracing a new trend on the web, Progressive Web App, which is the future of the Internet - no doubt about that.</p>yashumittalProgressive Web Apps have recently gained in popularity as they offer numerous benefits both in terms of user experience and business-wise. Many enterprises of all sizes and industries have successfully implemented PWAs, which triggered significant improvements in their businesses. They’ve seen their bounce rates decrease, conversion rates shoot up and page speed improve. Should you follow their lead?
https://cdn.codecarrot.net/images/pexels-photo-209726.jpeg
What Makes a Web App Progressive2017-11-01T08:20:00+00:002017-11-01T08:20:00+00:00https://blog.codecarrot.net/what-makes-a-web-app-progressive<p>Progressive Web Apps (PWAs) make the world of web dev evolve steadily. What are they? A fast growing trend in web development that is strongly pushed by Google across the world.</p>
<p>PWAs deliver value to users on all devices, bringing a near-native experience through web apps. I’m pretty sure they will be the next big thing after native mobile applications – a new life for web apps on mobile devices.</p>
<h2 id="what-it-means-to-be-progressive">What It Means to Be Progressive</h2>
<p>According to the Oxford Dictionary, progressive means:</p>
<ol>
<li>in favour of new ideas, modern methods, and change;</li>
<li>happening or developing steadily.</li>
</ol>
<p>We can say that being progressive means embracing change, implementing new solutions but not starting a revolution at the same time. Instead of causing a revolution, PWAs are bringing about evolution through steady improvements.</p>
<h2 id="building-a-progressive-web-app">Building a Progressive Web App</h2>
<p>The promise behind Progressive Web Apps is to provide the core value of web apps to every connected user in the world. Not only in the highly developed European countries or the US.</p>
<p>Every web app is built upon layers of abstraction – let’s call them enhancements. The minimal enhancement that makes a website is HTML. A Progressive Web App delivers the core value of your web app solely through HTML so as to make sure that users with a poor connection and an older smartphone will be able to get a seamless experience.</p>
<p>Each additional layer of enhancement – CSS styles, Javascript, geolocalization, push notifications, and so on – are layers that should provide more value if the user’s hardware supports them.</p>
<p>Thanks to this approach, we deliver core value very fast – using various techniques like server side rendering, content delivery networks, code splitting, etc. – and make our site accessible and useful for every connected user in the world. Because of the focus on speed and progressive enhancements, bounce rates fall, and conversion rates rise for users in developed countries.</p>
<p>If our customer base is focused on developed countries, progressive web apps are a perfect choice. We have 4G mobile internet (with 5G on its way) in Europe. We are surrounded by the web and various networks. But the 4G user is not a 4G user all the time. People have not yet solved the problem of Internet connection breakages in the London underground. That’s one of the best-developed cities in the world! When building your app, you can’t assume your users will always have state-of-the-art technology at their disposal.</p>
<h2 id="does-this-trend-have-a-future">Does this Trend Have a Future?</h2>
<p>Google has been pushing PWAs for around a year. They believe that they are the future of the web: fast, reliable and engaging web apps that provide a native experience without the need for building multiple native applications for different platforms.</p>
<p>I agree. There are dozens of native features in modern apps that you might not be aware of, but we are slowly dropping the legacy of desktop-focused design that has had enormous influence on mobile apps. The next step will be to move too fast applications native to the web. This means a new approach to design, development, and testing. I want to embrace it as it is happening.</p>
<h2 id="examples">Examples?</h2>
<p>Twitter’s mobile web app is a great example. It was rewritten to match every specification of PWA and is significantly faster than the native mobile application and the former web app. Twitter also admitted that it brought them a 75% increase in tweets sent and a 20% decrease in bounce rate – this correlates directly with revenue.</p>
<p>Nicolas Gallagher, the Engineering Lead for Twitter Lite, noted that “Twitter Lite is now the fastest, least expensive, and most reliable way to use Twitter. The web app rivals the performance of our native apps but requires less than 3% of the device storage space compared to Twitter for Android.”</p>
<h2 id="conclusions">Conclusions</h2>
<p>Progressive Web Applications are the future of the web. They are faster, lighter, and cheaper in development and maintenance than native applications. They provide value for everyone around the world. Even those with a 2G connection.</p>
<p>There is a very strong push for Progressive Web Apps in the development community. Hundreds of open source projects based on the major frameworks, including React and Ember, are focusing on improving the speed of development for PWAs.</p>
<p>This trend is going to change the web as we know it. We won’t be so dependent on platform-controlled application providers like the Appstore or Google Play. We’ll let our users experience our applications immediately, instead of them waiting for the apps to download and install. And we’ll reach users in regions of the world that have so far been beyond our reach.</p>
<p>Want to know if your business can get value from the PWA technology? We can help you find out. Drop us a line if you’re interested in a practical report based on your business goals and market reality.</p>yashumittalProgressive Web Apps (PWAs) make the world of web dev evolve steadily. What are they? A fast growing trend in web development that is strongly pushed by Google across the world.
https://cdn.codecarrot.net/images/phone-on-map-767838-edited.jpeg
4 Characteristics of a Good Progressive Web App2017-10-31T23:09:00+00:002017-10-31T23:09:00+00:00https://blog.codecarrot.net/4-characteristics-good-progressive-web-app<p>What separates a regular web app from a progressive web app might be the difference between the life or death of your business. If you have mobile users, you need to understand the value PWA can bring to your business. Basically, I want to help you understand why PWAs are awesome.</p>
<h2 id="rising-popularity-of-pwas">Rising Popularity of PWAs</h2>
<p>Progressive Web Apps offer a new approach to web design by the courtesy of Google. They put mobile device users on equal terms regardless of their hardware and internet connection. If you’d like to know more about PWA, read on!</p>
<p>PWAs is an emerging technology that’s been evolving rapidly regarding the possibility of new browsers. Each year we get more and more ready-to-use native features exposed via JavaScript. Google is far and away the key thought leader of PWAs for its investments both in technology and proper marketing around this concept. <a href="/10-popular-companies-that-do-progressive-web-apps">Numerous companies, such as Twitter, Washington Post, Forbes and Virgin America</a>, have adopted PWAs in their applications to provide their users with better performance and lower data usage. As a result, they improved conversions, increased the number of mobile searches and grew the number of returning visitors.</p>
<h2 id="key-characteristics-of-good-progressive-web-applications">Key Characteristics of Good Progressive Web Applications</h2>
<p>Google describes PWA in terms of features it should have and UX it should share with the user. If you ever wanted to check all the features of progressive web apps, you can use Google Chrome addon called <a href="//developers.google.com/web/tools/lighthouse/">Lighthouse</a>. Below you will find our opinionated list of the key features that make the technology worth your attention.</p>
<h2 id="mobile-first">Mobile-first</h2>
<p>I believe that design is the most important feature of Progressive Web Apps. It sounds really obvious - we’ve seen the mobile-first trend gaining importance for the last 10 years. Responsive Web Design is everywhere, but we might need much more. Not only should you make sure that your app looks good on the mobile device but also that it delivers the value to your user in the best possible way no matter the context - when walking down a busy street, driving a car or playing with kids. In all these situations people use their mobiles to access the web and your job is to make their experience as smooth as possible.</p>
<h2 id="fast">Fast</h2>
<p>A good progressive web app must be super fast. There are plenty of ways to improve the speed of your application that <a href="/6-ways-improve-the-speed-of-your-web-app">you can read about here</a>. The most important thing to remember about being fast is that it actually has <a href="/6-non-design-reasons-webpage-has-poor-conversion-rates">the most significant impact on your business</a> in terms of engineering.</p>
<h2 id="offline-first">Offline-first</h2>
<p>One of the hottest features in web for years. Thanks to service workers and the fairly new API in modern browsers, websites can be accessed and used even when the mobile device is off the network or when it is in Airplane mode. Building offline experience is a shift to native mobile app experience, and it demands a slightly different UI, similar to the one known from the native apps, i.e. <a href="//developers.google.com/web/fundamentals/architecture/app-shell">Google App Shell Model</a>.</p>
<h2 id="possible-to-add-to-homescreen">Possible to Add to Homescreen</h2>
<p>This is a trivial feature that allows your user to add the link to your web app to the homescreen on his or her mobile device. It works on both Android and iOS. Even if you can’t match the rest of the PWA features, I believe this is worth supporting and it takes only a few minutes of implementation.</p>
<h2 id="summary">Summary</h2>
<p>The list of all PWA characteristics is much wider. However, it’s not always a good idea to follow all the specifications. Sometimes due to your budget limitations or time pressure you will need to focus only on some part of the key features. In such a scenario, I recommend that you focus on three of them: good mobile design, speed, and - last but not least - support for the offline mode. With such a base you can create the application that provides users with the seamless user experience.</p>yashumittalWhat separates a regular web app from a progressive web app might be the difference between the life or death of your business. If you have mobile users, you need to understand the value PWA can bring to your business. Basically, I want to help you understand why PWAs are awesome.
https://cdn.codecarrot.net/images/pexels-photo-2.jpg
Ruby on Rails Refactoring - When Do You Need It and Why?2017-10-31T22:28:45+00:002017-10-31T22:28:45+00:00https://blog.codecarrot.net/ruby-on-rails-refactoring-when-do-you-need-it-and-why<p>Refactoring means, in simplest possible terms, improving existing code without changing its functionality. It’s all about code quality and optimisation, not product redesign. Users never see the changes. So why do it? Because ultimately, refactoring can prevent your app from generating huge upkeep costs and, as a result, make your business more successful.</p>
<h2 id="refactoring-ruby-on-rails-code">Refactoring Ruby on Rails Code</h2>
<p>The basic aim behind refactoring is as follows: to fix problems in the code but keep its current functionality. You modify and restructure what you or other developers on the team have written, but the product stays more or less the same. Refactoring is not about improving users’ interactions with the product - it’s about the developers’ interactions with the codebase. Refactoring makes the code more readable to the current (and, importantly, future) developers working on it. It’s then easier – and cheaper – for them to continue developing and maintaining the product.</p>
<p>A ‘refactor’ means a single change in the code. To make or do a refactor means to introduce a particular fix which, in accordance with the above definition, enhances the code’s quality. Here are some extra reasons to do it, if you weren’t convinced already.</p>
<h2 id="1-scouts-rule">1. Scout’s Rule</h2>
<p>If you think about it, making errors when coding is inevitable. Maybe there are geniuses out there who always write clean and flawless code, but if so, they are rare. You can’t expect super-human performance from your development team, and you have to accept that their mistakes will be part and parcel of the development process.</p>
<p>Just like refactoring, fixing those mistakes is a part of the process.</p>
<p>If you see a code fragment that could have been written better, improve it. Immediately. If you don’t do it often enough, your product will suffer as current risks lead to future problems.</p>
<h2 id="2-improved-understanding-of-the-product">2. Improved Understanding of the Product</h2>
<p>Refactoring helps developers understand how the product works and what it’s supposed to do. They are more engaged in the project, can easily delegate tasks to other developers (who should now have no trouble reading and working with more understandable code), and can take full advantage of others’ work thanks to, for instance, clearer methods. It’s best to put everything a developer needs to know into the code, so comments and remembering a lot of information become unnecessary.</p>
<h2 id="3-better-information-architecture">3. Better Information Architecture</h2>
<p>Clean code means that developers can easily see which fragments hold the most business value. Actually, clean code means developers can more easily spot separate elements in the code. You might think it should be obvious from the beginning which functionalities will matter most, but that’s a fallacy. It’s something you need to learn anew for every product you work on, because every product is different.</p>
<h2 id="4-lowering-costs">4. Lowering Costs</h2>
<p>Projects get really expensive when you need to fix legacy code months or years down the line. With regular refactoring, developers find bugs more easily, which means a smaller QA budget and fewer hours spent on scrutinising the code by developers themselves. There will be no need to constantly go back and fix something that has become a blocker. By preventing problems from occurring rather than reacting to them, you will be able to achieve faster development. And obviously, the development work is the most expensive part of building a digital product.</p>
<h2 id="5-experts-say-you-should-do-it">5. Experts Say You Should Do It</h2>
<p>Martin Fowler is a proponent of refactoring, and he knows what he’s talking about, because he’s been doing this for years. Fowler and other experts agree that building a product without any refactoring is a massive risk. Here, have some quotes:</p>
<ul>
<li>“I’d always been inclined to clean code, but I’d never considered it to be that important.” - Martin Fowler</li>
<li>“When you feel the need to write a comment, first try to refactor the code so that any comment becomes superfluous” - Martin Fowler</li>
<li>“Almost all the time the problems come from methods that are too long” - Martin Fowler</li>
<li>“If extracting (a method) improves the clarity, do it, even if the name is longer than the code you have extracted” - Martin Fowler</li>
<li>“It is not enough for code to work” - Robert C. Martin (Uncle Bob)</li>
<li>“So if you want to go fast, if you want to get done quickly, if you want your code to be easy to write, make it easy to read.” - Robert C. Martin (Uncle Bob)</li>
<li>“Clean code always looks like it was written by someone who cares.” - Robert C. Martin (Uncle Bob)</li>
<li>“Of course bad code can be cleaned up. But it’s very expensive.” - Robert C. Martin (Uncle Bob)</li>
<li>“No matter how slow you are writing clean code, you will always be slower if you make a mess.” - Robert C. Martin (Uncle Bob)</li>
<li>“Don’t make more versions of your source code. Rather than add more code bases, fix the underlying design problem that is preventing you from running from a single code base.” - Kent Beck</li>
<li>“Any fool can write code that a computer can understand. Good programmers write code that humans can understand.” - Martin Fowler</li>
</ul>
<h2 id="quick-guide-to-ruby-on-rails-refactoring">Quick Guide to Ruby on Rails Refactoring</h2>
<p>All right, now that we’ve established that your project needs regular refactoring, how should you go about it?</p>
<p>Before you even start thinking about it, make sure the code under scrutiny has been tested. Extensively. Never refactor before you’ve written tests, that’s just asking for trouble. I mean it. Never. If you have no tests, write them. Then come back to the idea of refactoring.</p>
<h2 id="where-to-refactor">Where to Refactor</h2>
<p>Here’s a list of warning signs that almost always mean that particular fragment of code needs a refactor and some basic guidelines on what you can do with them:</p>
<ol>
<li><strong>Long methods:</strong> nobody likes to even touch methods that are 300 lines of code long. Write short, specific and understandable ones. They will be easier to test, explain and change in case that becomes necessary.</li>
<li><strong>Huge classes:</strong> avoid them if you can. It’s easier to deal with code that contains 50 classes, 200 lines of code each, than code with 5 classes, 2000 lines of code each.</li>
<li><strong>Code repetitions:</strong> if you see basically the same code in several different places, give some thought to the structure of your application. It might have some kinks that need ironing out.</li>
<li><strong>Long parameter lists:</strong> if an action or method takes 11 parameters, there has to be something wrong with it.</li>
<li><strong>Strange dependencies:</strong> if a change you make in one part of the code forces you to make changes in another 5 places, your code is not good code.</li>
<li><strong>Dozens of variables:</strong> if there’s a fragment of code where a lot of variables are created and handled, figure out why, and if there’s no good reason for it, refactor. A method with 15 local variables is the opposite of easy to understand.</li>
<li><strong>Weird code:</strong> developers like to show off sometimes. Or metaprogram. If you spot really strange solutions that are super hard to understand, try to simplify them.</li>
</ol>
<p>RoR is one of the favourite and most often used technologies at <a href="//codecarrot.net/">CodeCarrot</a>, so we’ve picked up a few tricks over the years and are always happy to share our knowledge. (On our blog, you can read articles about <a href="/service-objects-in-rails-will-help-you-design-clean-and-maintainable-code-heres-how">service objects</a>, <a href="/how-to-write-code-that-speaks-for-itself">writing good code</a> and <a href="/patterns-that-will-help-you-be-a-better-developer">being a better developer</a>, and many other subjects)</p>
<h2 id="refactoring-risks">Refactoring Risks</h2>
<p>Refactoring is a wonderful tool, as long as it’s done well. In some situations and without the necessary experience, it may do more harm than good. If you aren’t sure that refactoring will bring business value to your product, don’t do it.</p>
<p>Stakeholders will naturally view refactoring as a waste of time. They will usually be wrong, but it’s important for the product owner to establish what’s most important for the project at any given time. Should we focus on time to market or future refactoring debt? The latter may seem like a problem that can be taken care of later, but many people who have thought so, have suffered by adopting this approach.</p>
<p>Finally, refactoring should always have a clear goal: improving the code behind one functionality. If it’s about a very general value, such as efficiency, you will simply never reach your goal. It’s too big a task for a single refactor, and it can be a waste of resources. Moreover, without a clearly defined goal, you won’t even be able to tell whether you’ve achieved it or not.</p>
<h2 id="closing-remarks">Closing Remarks</h2>
<p>We’ve witnessed refactors doing wonders for projects, and we’ve witnessed refactors going really, really wrong. One example of the former is a project that involved generating reports from questionnaires. It used a really old gem that had had no support for 6 years. It took care of the whole functionality, but seriously complicated the code, which means that adding features to the product was pretty much a heroic feat. And expensive. We talked to the client and did a refactor, which resulted in dumping the prehistoric gem and building a custom solution with the same functionality. The database shrank from 15 to only 2 tables, a critical component of the app started working more quickly, and the behaviour of the whole product became more predictable. The code was, of course, easier and cheaper to maintain and develop further.</p>
<p>A less cheerful example is a client who wanted a refactoring for its own sake. The whole process wasn’t well thought out, we had too little information and instead of completing the refactor in 3 months, as we estimated, we laboured over it for half a year. During that time, no new code was produced, which obviously set the project back quite a bit. Eventually, we managed to get the development work going at full speed and the project is doing quite well, but doing the refactor was a waste of time and resources.</p>
<p>These stories show you that, while refactoring is crucial and should be an integral part of your process, there must a time and place for it. Refactoring comes with a risk that can be mitigated by an experienced team. So, if you are thinking about refactoring your project, feel free to contact us about any questions or doubts you might have, and we will be happy to share our knowledge and experience with you.</p>yashumittalRefactoring means, in simplest possible terms, improving existing code without changing its functionality. It’s all about code quality and optimisation, not product redesign. Users never see the changes. So why do it? Because ultimately, refactoring can prevent your app from generating huge upkeep costs and, as a result, make your business more successful.
https://cdn.codecarrot.net/images/hammer-and-nail-449257-edited.jpg
JavaScript vs CoffeeScript In Ruby on Rails Applications2017-10-31T22:28:45+00:002017-10-31T22:28:45+00:00https://blog.codecarrot.net/javascript-vs-coffeescript-in-ruby-on-rails-applications<p>At <a href="//www.codecarrot.net/">CodeCarrot</a> we regularly discuss technologies we use to make sure we are not lagging behind or lose newly emerged features in web development world. Here’s a short rundown of our discussions if we should use JavaScript or CoffeeScript in our projects (note that we are currently using CoffeeScript as default).</p>
<h2 id="javascript">JavaScript</h2>
<h3 id="pros">Pros</h3>
<ul>
<li>ES2015 and ES7 are currently state of the art web languages</li>
<li>Ember and React are extensively using ES2015 and ES7 (!) features in their core features</li>
<li>If we want to publish interesting content on either blog or Stack Overflow, we need to switch between Coffee and JS, as JS is a default way in modern work</li>
<li>Developing in JavaScript demands more knowledge and understandability of how the language works; it’s easier to obtain new knowledge by no need of transpiling and understanding both syntaxes</li>
<li>Even though some people say that JS syntax is worse, the reason might be lack of ES2015 knowledge which provides simplifications like arrow functions same as in Coffee</li>
<li>Better tools - we can easily add linters to our projects that are quite smart about JS code; ember has built in linter config that fails tests if our code is not proper; CodeClimate is supporting JS</li>
</ul>
<h3 id="cons">Cons</h3>
<ul>
<li>Some people say that JS syntax is worse than Coffee</li>
<li>It will provide confusion due to different syntax in different projects (older projects will stay in Coffee)
There is no easy and working transpiler between Coffee to JS (ES2015) and it demands simple transpiling to ES5 and changing by hand (error prone)</li>
<li>We will have to maintain old coffee projects and new JS projects</li>
</ul>
<h2 id="coffeescript">CoffeeScript</h2>
<h3 id="pros-1">Pros</h3>
<ul>
<li>It’s our default now and all of us are familiar with coffee</li>
<li>It’s easier to work with and maintain due to simple syntax</li>
<li>Staying with coffee won’t demand any change and confusion while switching between new and old projects</li>
</ul>
<h3 id="cons-1">Cons</h3>
<ul>
<li>It does not support ES2015 features</li>
<li>No support from CodeClimate or JSLint / ESLint, built in Ember as default tests part</li>
<li>Due to lack of ES2015 support, we can not use some of new features in Emberjs like: new computed property syntax using getters and setters, importing modules ES2015 style and others</li>
<li>It’s hard to work with the newest features and examples from Ember or React due to fact they are written in ES2015 and shown by JSBin that supports ES2015</li>
<li>Due to ease of sharing scope using fat arrow and no need to declare variables, it’s easy to forget about base concepts of JavaScript like scopes mechanism and why it works this way not another</li>
</ul>
<p>These pros and cons are highly opinionated and might be different for you, depending on projects you work on. Be aware that this list is <a href="//www.codecarrot.net/">Codecarrot</a>-oriented and you might have different opinions - feel free to comment below.</p>yashumittalAt CodeCarrot we regularly discuss technologies we use to make sure we are not lagging behind or lose newly emerged features in web development world. Here’s a short rundown of our discussions if we should use JavaScript or CoffeeScript in our projects (note that we are currently using CoffeeScript as default).
https://cdn.codecarrot.net/images/jsvscoffee.png
How To Use Rails Assets Directly In Your JS Files With RWR View Helpers2017-10-31T21:48:00+00:002017-10-31T21:48:00+00:00https://blog.codecarrot.net/how-to-use-rails-assets-directly-in-your-js-files-with-rwr-view-helpers<p>Here at <a href="//www.codecarrot.net/">CodeCarrot</a>, we love working with both Rails and React on our tech stack, and lately we’ve found ourselves using them more and more. But there has always been a problem with using image paths (rails adding digest hashes) in our React components - we had to pass it as a prop from views to redux containers and from there to our dumb components. That involves a lot of redundant steps, making it more likely that something will go wrong; this is why we came up with rwr-view-helpers, which makes it possible for developers to access Rails assets directly in javascript.</p>
<h2 id="1-how-does-it-work">1. How does it work?</h2>
<p>When we start our Rails server, the first request will generate a cache for rwr-view_helpers in the form of json & js files with hash mapping assets’ urls to urls with a generated digest-hash.</p>
<p>The <code class="highlighter-rouge">.gif, .jpg, .png</code> file extensions are supported by default. More can easily be added, according to the user’s needs.</p>
<h2 id="2-how-to-install-it">2. How to install it?</h2>
<p>The installation of helpers is really straightforward, all you have to do is:</p>
<ul>
<li>install it with npm:</li>
</ul>
<div class="highlighter-rouge"><div class="highlight"><pre class="highlight"><code>$ npm install --save rwr-view-helpers
</code></pre></div></div>
<ul>
<li>add the gem to your Gemfile:</li>
</ul>
<div class="highlighter-rouge"><div class="highlight"><pre class="highlight"><code>$ gem 'rwr-view_helpers'
</code></pre></div></div>
<ul>
<li>require the js file in application.js:</li>
</ul>
<div class="highlighter-rouge"><div class="highlight"><pre class="highlight"><code>//=require rwr_view_helpers`
</code></pre></div></div>
<h2 id="3-how-to-use-it">3. How to use it?</h2>
<p>Using helpers is extremely easy - they’re simply exported as a function from our node module:</p>
<div class="language-js highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="k">import</span> <span class="nx">React</span> <span class="k">from</span> <span class="dl">'</span><span class="s1">react</span><span class="dl">'</span><span class="p">;</span>
<span class="k">import</span> <span class="p">{</span> <span class="nx">imagePath</span> <span class="p">}</span> <span class="k">from</span> <span class="dl">'</span><span class="s1">rwr-view-helpers</span><span class="dl">'</span><span class="p">;</span>
<span class="k">import</span> <span class="p">{</span> <span class="nx">facebookIcon</span> <span class="p">}</span> <span class="k">from</span> <span class="dl">'</span><span class="s1">constants/icon-urls</span><span class="dl">'</span><span class="p">;</span>
<span class="k">export</span> <span class="k">default</span> <span class="p">({</span> <span class="nx">alt</span> <span class="p">})</span> <span class="o">=></span> <span class="p">(</span>
<span class="o"><</span><span class="nx">img</span> <span class="nx">alt</span><span class="o">=</span><span class="p">{</span><span class="nx">alt</span><span class="p">}</span> <span class="nx">src</span><span class="o">=</span><span class="p">{</span><span class="nx">imagePath</span><span class="p">(</span><span class="nx">facebookIcon</span><span class="p">)}</span> <span class="sr">/</span><span class="err">>
</span><span class="p">);</span>
</code></pre></div></div>
<p>The only thing you need to remember at this point is to generate a new cache by running the rake task each time you add new assets to your project and want to use them in your javascript files.</p>
<div class="highlighter-rouge"><div class="highlight"><pre class="highlight"><code>$ rake tmp:clear
</code></pre></div></div>yashumittalHere at CodeCarrot, we love working with both Rails and React on our tech stack, and lately we’ve found ourselves using them more and more. But there has always been a problem with using image paths (rails adding digest hashes) in our React components - we had to pass it as a prop from views to redux containers and from there to our dumb components. That involves a lot of redundant steps, making it more likely that something will go wrong; this is why we came up with rwr-view-helpers, which makes it possible for developers to access Rails assets directly in javascript.
https://cdn.codecarrot.net/images/rails-assets.png
Save Money Using Elixir - The Benefits of The Technology2017-10-31T20:55:00+00:002017-10-31T20:55:00+00:00https://blog.codecarrot.net/save-money-using-elixir-benefits-of-the-technology<p>Building an application that handles millions of users and performs thousands of concurrent operations can be expensive both to develop and maintain. Elixir, a new trending backend technology, promises to cut costs significantly by providing exceptional performance. The <a href="//www.codecarrot.net/">CodeCarrot</a> team have recently dug beneath the surface of Elixir to verify whether it delivers on its promises.</p>
<p>Elixir is a functional programming language and runs on Erlang’s battle-tested virtual machine. Compared to Ruby and its ecosystem, Elixir is fresh and small, but it’s growing rapidly with more and more developers running Elixir apps and more and more packages being developed each week.</p>
<p><strong>Elixir as a Ruby on Rails alternative – the case of BleacherReport</strong></p>
<p>BleacherReport is a sports-news website, which works real-time and sends over millions of notifications daily. They were initially running on Ruby on Rails, yet they came to the point they couldn’t scale up the application anymore. After struggling with provisioning more servers, they decided to find a different solution. One of the developers stumbled across Elixir, and after some consideration given to other choices such as Go or Node, Elixir was the way to go.</p>
<p>Rewriting the application took quite some time, but as Ben Marx says, the productivity and developers’ happiness during the process were high. The code was easier to understand, and the application came with much less technical debt than the previous version written in Rails.</p>
<h2 id="results-of-rewriting-the-app-from-ror-to-elixir">Results of Rewriting The App From RoR to Elixir</h2>
<p>One of the development highlights for BleacherReport was the night of the NFL Draft 2016, which is the busiest night of the year in sports. They didn’t have to scale the Elixir application, because it was handling concurrent connections really well. Ben Marx, the lead developer, said that it was “just another day for the Elixir application”. They sent over 200 million push notifications in the first five hours, which arrived on users’ devices virtually instantly, being fast no matter the load. The application was handling over 250,000 users at once.</p>
<p>Thanks to having migrated to Elixir, BleacherReport could also stop using third-party dependencies such as Redis and use Elixir’s built-in tools, e.g. GenServer. BleacherReport’s lead developer also said that they had switched from using around 150 servers on production, to using just five for Elixir. Now, they are still “probably over-provisioned” as Ben Marx says, and they would do fine with only two. Thanks to those steps, they could save a lot of money on tools and servers.</p>
<h2 id="what-are-the-benefits-of-using-elixir">What Are The Benefits of Using Elixir?</h2>
<p>Elixir works on top of a battle-tested technology that was created to handle high concurrency, which makes applications run fast. Compared to Ruby, Elixir is compiled, which yields a performance boost as well. Coming to Elixir from Ruby is easy, because Elixir’s creator, José Valim, also comes from the Ruby community, and Elixir’s syntax is heavily influenced by that of Ruby’s, so understanding code is much less troubling than switching to, for example, Golang.</p>
<p>Elixir comes with OTP, a set of tools to help us build fault-tolerant applications that have a lot of persistent connections at once. Ruby has gems like Celluloid or concurrent-ruby, yet with Ruby’s limitations, things can’t be processed efficiently in parallel – Elixir comes with those tools out of the box!</p>
<h2 id="is-elixir-good-for-all-applications">Is Elixir Good For All Applications?</h2>
<p>With Elixir, you can create all kinds of applications – from server command line apps to web applications using Phoenix, which is a productive, reliable and fast web framework for Elixir. If you know that your application will handle many concurrent connections, go for Elixir. If you need to prototype something small, create an MVP for your project, or you know your app won’t have to handle tonnes of connections, use Rails, which is perfect for fast development, which it has proved over the past couple of years</p>yashumittalBuilding an application that handles millions of users and performs thousands of concurrent operations can be expensive both to develop and maintain. Elixir, a new trending backend technology, promises to cut costs significantly by providing exceptional performance. The CodeCarrot team have recently dug beneath the surface of Elixir to verify whether it delivers on its promises.
https://cdn.codecarrot.net/images/pexels-photo-60500.jpeg
How To Setup Your Rails Backend For Pusher2017-10-31T20:48:00+00:002017-10-31T20:48:00+00:00https://blog.codecarrot.net/how-to-setup-your-rails-backend-for-pusher<p>Pusher.js is ready to use SaaS providing websockets in multiple technologies It may handle public, private and client events with authorization or not.</p>
<h2 id="what-you-will-use">What you will use:</h2>
<ul>
<li><a href="//github.com/pusher/pusher-http-ruby">pusher gem</a> - as server gem that is responsible for triggering events to clients (events may be triggered also between clients excluding server, but it demands more configuration that will be handled later)</li>
</ul>
<h2 id="pros">Pros:</h2>
<ul>
<li>Easy to set up</li>
<li>Support provided</li>
<li>Available for Ruby, iOS, Android and JavaScript</li>
</ul>
<h2 id="cons">Cons:</h2>
<p>Paid service (check out <a href="//pusher.com/pricing">pricing here</a>)</p>
<h2 id="step-1-setup-initializer">Step 1: Setup initializer</h2>
<p>Pusher will be available as global singleton object being set up in initializer. You need to add pusher.rb to your initializers that will simply define app credentials and enable encryption.</p>
<h2 id="step-2-create-pusherdispatcher-service-to-trigger-events">Step 2: Create Pusher::Dispatcher service to trigger events</h2>
<p>This step depends on your architecture of choice. I chose to have <code class="highlighter-rouge">Pusher::Dispatcher</code> class that will just trigger the Pusher singleton. Looks like overkill, but it’s a good place to e.g. calculate channel name based on some variables (like user id).</p>
<h2 id="step-3-add-authorization-endpoint">Step 3: Add authorization endpoint</h2>
<p>Authorization in Pusher is very simple:</p>
<ul>
<li>You provide endpoint for authorization to every client (e.g. on frontend side or iOS app)</li>
<li>When client wants to connect, it hits the endpoint with client-side defined params</li>
<li>Your endpoint should validate these params (e.g. checking the authorization token) and authenticate the connection via Pusher singleton object with params of your choice - e.g. more data about currently authorized user that will be shared between other clients connected to this channel.</li>
</ul>
<p>Each client can define its authorization endpoint during initialization. E.g. in frontend app or iOS app you can initialize Pusher with authorization endpoint pointed out to //myapp.com/api/pusher/auth.</p>
<p>Clients can also configure params that they are sending to that endpoint. E.g. you can send to your /api/pusher/auth endpoint current user ID and auth token that is being used in frontend application.</p>
<p>Let’s call our endpoint /api/pusher/auth.</p>
<p>Safe, easy and secure.</p>
<h2 id="step-4-debug-and-validate">Step 4: Debug and validate</h2>
<p>You can easily debug and validate your Pusher implementation without any frontend at all. In my app, where there is basically no business logic, I created simple endpoint that will trigger Pusher events on demand for testing.</p>
<p>Now I can simply trigger Pusher events by using CURL:</p>
<pre><code class="language-curl">curl http://localhost:3000/api/pusher/trigger?channel_name=test&event=myEvent
</code></pre>
<p>What is cool about Pusher is that it has excellent debug console available on web. What it means is that you don’t need to have frontend ready solution - work on backend till you’re ready!</p>
<p>Go to your’s app Debug Console in Pusher dashboard, restart your server and observe if Pusher is getting needed data!</p>
<h2 id="summary">Summary</h2>
<p>You have set up all you need to fully embrace Pusher base possibilities. You can handle public, private and presence channel (private and presence demands authorization). You can easily trigger events and you have reusable <code class="highlighter-rouge">Pusher::Dispatcher</code> class. And you learnt about Pusher Debug console which is must-have in your toolbelt. Good job!</p>yashumittalPusher.js is ready to use SaaS providing websockets in multiple technologies It may handle public, private and client events with authorization or not.
https://cdn.codecarrot.net/images/rails-backend-for-pusher.png
How to Install Node.js® and NPM on Windows2017-10-30T18:22:00+00:002017-10-30T18:22:00+00:00https://blog.codecarrot.net/how-to-install-nodejs-and-npm-on-windows<p>JavaScript is quickly becoming the go-to language for web developers. Front-end web developers use JavaScript to add user interface enhancements, add interactivity, and talk to back-end web services using AJAX. Web developers who work on the server-side are also flocking to JavaScript because of the efficiencies and speed offered by JavaScript’s event-driven, non-blocking nature.</p>
<p>In fact, concentrating on JavaScript as your language of choice offers the opportunity to master a single language while still being able to develop “full-stack” web applications. The key to this server-side JavaScript revolution is Node.js® — a version of Chrome’s V8 JavaScript runtime engine — which makes it possible to run JavaScript on the server-side.</p>
<p>Node.js is also used for developing desktop applications and for deploying tools that make developing web sites simpler. For example, by installing Node.js® on your desktop machine, you can quickly convert CoffeeScript to JavaScript, SASS to CSS, and shrink the size of your HTML, JavaScript and graphic files. Using NPM — a tool that makes installing and managing Node modules — it’s quite easy to add many useful tools to your web development toolkit.</p>
<h2 id="prerequisites">Prerequisites</h2>
<p>Node isn’t a program that you simply launch like Word or Photoshop: you won’t find it pinned to the taskbar or in your list of Apps. To use Node you must type command-line instructions, so you need to be comfortable with (or at least know how to start) a command-line tool like the Windows Command Prompt, PowerShell, <a href="//www.cygwin.com/">Cygwin</a>, or the Git shell (which is installed along with <a href="//windows.github.com/">Github for Windows</a>).</p>
<h2 id="installation-overview">Installation Overview</h2>
<p>Installing Node and NPM is pretty straightforward using the installer package available from the Node.js® web site.</p>
<h3 id="installation-steps">Installation Steps</h3>
<ol>
<li><strong>Download the Windows installer from the <a href="//nodejs.org/">Nodes.js® web site</a>.</strong></li>
<li><strong>Run the installer</strong> (the .msi file you downloaded in the previous step.)</li>
<li><strong>Follow the prompts in the installer</strong> (Accept the license agreement, click the NEXT button a bunch of times and accept the default installation settings).
<img src="https://cdn.codecarrot.net/images/node_installer.png" alt="node installer" /></li>
<li><strong>Restart your computer.</strong> You won’t be able to run Node.js® until you restart your computer.</li>
</ol>
<h3 id="test-it">Test it!</h3>
<p>Make sure you have Node and NPM installed by running simple commands to see what version of each is installed and to run a simple test program:</p>
<p><strong>Test Node.</strong> To see if Node is installed, open the Windows Command Prompt, Powershell or a similar command line tool, and type <code class="highlighter-rouge">node -v</code>. This should print a version number, so you’ll see something like this <code class="highlighter-rouge">v0.10.35</code>.
<strong>Test NPM.</strong> To see if NPM is installed, type <code class="highlighter-rouge">npm -v</code> in Terminal. This should print NPM’s version number so you’ll see something like this <code class="highlighter-rouge">1.4.28</code>.
<strong>Create a test file and run it.</strong> A simple way to test that node.js works is to create a JavaScript file: name it <code class="highlighter-rouge">hello.js</code>, and just add the code <code class="highlighter-rouge">console.log('Node is installed!');</code>. To run the code simply open your command line program, navigate to the folder where you save the file and type <code class="highlighter-rouge">node hello.js</code>. This will start Node and run the code in the <code class="highlighter-rouge">hello.js</code> file. You should see the output <code class="highlighter-rouge">Node is installed!</code>.</p>
<h2 id="how-to-update-node-and-npm">How to Update Node and NPM</h2>
<p>New versions of Node and NPM come out frequently. To install the updates, just <a href="//nodejs.org/download/">download the installer</a> from the Nodejs.org site and run it again. The new version of Node and NPM will replace the older versions.</p>
<h2 id="how-to-uninstall-node-and-npm">How to Uninstall Node and NPM</h2>
<p>You uninstall Node.js and NPM the same as you would most Windows software:</p>
<ol>
<li>Open the Windows Control Panel</li>
<li>Choose the “Programs and Features” option</li>
<li>Click the “Uninstall a program” option</li>
<li>Select Node.js, and click the Uninstall link.</li>
</ol>
<p>With Node.js and NPM installed you’ll soon be able to take advantage of the huge world of NPM modules that can help with a wide variety of tasks both on the web server and on your desktop (or laptop) machine. The NPM site lists all of the official Node packages making it easy to make the choice.</p>yashumittalJavaScript is quickly becoming the go-to language for web developers. Front-end web developers use JavaScript to add user interface enhancements, add interactivity, and talk to back-end web services using AJAX. Web developers who work on the server-side are also flocking to JavaScript because of the efficiencies and speed offered by JavaScript’s event-driven, non-blocking nature.
https://cdn.codecarrot.net/images/nodejs-installer-guide-on-windows.png
What’s the difference between JavaScript and ECMAScript?2017-10-29T14:15:10+00:002017-10-29T14:15:10+00:00https://blog.codecarrot.net/whats-the-difference-between-javascript-and-ecmascript<p>I’ve tried googling “the difference between JavaScript and ECMAScript.”</p>
<p>I ended up having to wade through a sea of ambiguous and seemingly conflicting results:</p>
<p>“ECMAScript is a standard.”</p>
<p>“JavaScript is a standard.”</p>
<p>“ECMAScript is a specification.”</p>
<p>“JavaScript is an implementation of the ECMAScript standard.”</p>
<p>“ECMAScript is standardized JavaScript.”</p>
<p>“ECMAScript is a language.”</p>
<p>“JavaScript is a dialect of ECMAScript.”</p>
<p>“ECMAScript is JavaScript.”</p>
<p><img src="https://cdn.codecarrot.net/images/0_2VBZNF_2sqpenWBm.gif" alt="urge to cry" /></p>
<p>Holding back the urge to cry, I bucked up and decided to commit to some painful yet productive research.</p>
<p>This article represents my current understanding of the differences between JavaScript and ECMAScript. It is geared towards people who are familiar with JavaScript but would like a clearer understanding of its relationship with ECMAScript, web browsers, <a href="//babeljs.io/">Babel</a>, and more. You will also learn about scripting languages, JavaScript engines, and JavaScript runtimes for good measure.</p>
<p>So get pumped.</p>
<h2 id="a-javascriptecmascript-glossary">A JavaScript/ECMAScript glossary</h2>
<p>Below is a list of definitions, designed with a focus on consistency and clarity. The definitions are not 100% complete. They are constructed in a way that provides a high-level understanding of the connection and relationship between JavaScript and ECMAScript.</p>
<p>Without further ado, let’s get started.</p>
<h2 id="ecma-international">Ecma International</h2>
<p><strong>An organization that creates standards for technologies.</strong></p>
<p><img src="https://cdn.codecarrot.net/images/0_Dz44AJquqzSujMVs.jpg" alt="Ecma International Logo" /></p>
<p>To illustrate an example of “standard” (though not one created by Ecma), think of all the keyboards you have ever used. Did the vast majority have letters in the same order, and a space bar, an Enter key, arrow keys, with numbers displayed in a row at the top? This is because most keyboard manufacturers base their keyboard design on the QWERTY layout standard.</p>
<h2 id="ecma-262">ECMA-262</h2>
<p><strong>This is a standard published by Ecma International. It contains the specification for a general purpose scripting language.</strong></p>
<p><img src="https://cdn.codecarrot.net/images/1_eE4lFIIFfSsSiI-oEWuo5g.png" alt="ECMA-262" /></p>
<p>ECMA-262 is a standard like QWERTY, but instead of representing a keyboard layout specification, it represents a scripting language specification called ECMAScript.</p>
<p>Think of ECMA-262 as ECMAScript’s reference number.</p>
<p><img src="https://cdn.codecarrot.net/images/1_MebPqniAeJqU6_JdvkHwPQ.png" alt="ECMA-260, ECMA-261, ECMA-262. There’s ECMAScript." /></p>
<p><em>ECMA-260, ECMA-261, ECMA-262. There’s ECMAScript.</em></p>
<h2 id="a-scripting-language">A scripting language</h2>
<p>A programming language designed specifically for acting on an existing entity or system</p>
<p>For a general idea of what makes a programming language a scripting language, consider the commands “walk”, “run”, and “jump.” These actions require something to carry them out, perhaps a person, a dog, or a video game character. Without an actor to perform these commands, “walk”, “run”, and “jump” wouldn’t make sense. This set of actions is analogous to a scripting language that focuses on manipulating an external entity.</p>
<h2 id="ecmascript">ECMAScript</h2>
<p><strong>The specification defined in ECMA-262 for creating a general purpose scripting language.</strong></p>
<p><strong>Synonym:</strong> ECMAScript specification</p>
<p><img src="https://cdn.codecarrot.net/images/0_QA6z7Rzw7HQ86C8A.png" alt="ECMAScript specification" /></p>
<p>While ECMA-262 is the name of the standard, it represents the scripting language specification ECMAScript.
ECMAScript provides the rules, details, and guidelines that a scripting language must observe to be considered ECMAScript compliant.</p>
<p><img src="https://cdn.codecarrot.net/images/1_NbO9I9ukUcpW4IiH1d54gQ.png" alt="An excerpt from the ECMAScript 2017 Language Specification. The document is only about 900 pages, if you are looking for a light read." /></p>
<p><em>An excerpt from the ECMAScript 2017 Language Specification. The document is only about 900 pages, if you are looking for a light read.</em></p>
<h2 id="javascript">JavaScript</h2>
<p><strong>A general purpose scripting language that conforms to the ECMAScript specification.</strong></p>
<p>It is a dialect of the ECMAScript language.</p>
<p><img src="https://cdn.codecarrot.net/images/0_zdzWJW4DiWkFjDnY.jpg" alt="Javascript" /></p>
<p>JavaScript is the coffee-flavored language with which I love to program. <a href="//www.ecma-international.org/publications/files/ECMA-ST/Ecma-262.pdf">ECMAScript is the specification</a> it’s based on. By reading the ECMAScript specification, you learn how to create a scripting language. By reading the <a href="//developer.mozilla.org/en-US/docs/Web/JavaScript">JavaScript documentation</a>, you learn how to use a scripting language.</p>
<p>When people call JavaScript a “dialect of the ECMAScript language,” they mean it in the same sense as when they refer to dialect to describe languages like English, French, or Chinese. A dialect derives most of its lexicon and syntax from its parent language, but deviates enough to deserve distinction.</p>
<p>JavaScript mostly implements the ECMAScript specification as described in ECMA-262, but a handful of differences do exist. Mozilla outlines JavaScript’s non-ECMAScript language features <a href="//developer.mozilla.org/en-US/docs/Web/JavaScript/New_in_JavaScript/ECMAScript_Next_support_in_Mozilla">here</a>:</p>
<p><img src="https://cdn.codecarrot.net/images/1_YjTRv0-RFD7BeLwB6g8XuQ.png" alt="A screenshot from September 3, 2017. It is a list of JavaScript’s experimental features that are not a part of ECMAScript (at least not yet)." /></p>
<p><em>A screenshot from September 3, 2017. It is a list of JavaScript’s experimental features that are not a part of ECMAScript (at least not yet).</em></p>
<h2 id="a-javascript-engine">A JavaScript engine</h2>
<p><strong>A program or interpreter that understands and executes JavaScript code.</strong></p>
<p><strong>Synonyms:</strong> JavaScript interpreter, JavaScript implementation</p>
<p><img src="https://cdn.codecarrot.net/images/0_SHZfEJM35akWZuQH.jpg" alt="A JavaScript engine" /></p>
<p>JavaScript engines are commonly found in web browsers, including V8 in Chrome, SpiderMonkey in Firefox, and Chakra in Edge. Each engine is like a language module for its application, allowing it to support a certain subset of the JavaScript language.</p>
<p>A JavaScript engine to a browser is like language comprehension to a person. If we re-visit our example of the actions “walk”, “run”, “jump”, a JavaScript engine is the part of an “entity” that actually understands what these actions mean.</p>
<p>This analogy helps to explain a few things about browsers:</p>
<p><img src="https://cdn.codecarrot.net/images/0_xEE0vGO6Wp0qIW5X.png" alt="This analogy helps to explain a few things about browsers" /></p>
<h2 id="differences-in-browser-performance">Differences in browser performance</h2>
<p>Two people may recognize the command “jump”, but one may react to the command faster because the person can understand and process the command faster than the other person. Similarly, two browsers can understand JavaScript code, but one runs it faster because its JavaScript engine is implemented more efficiently.</p>
<p><img src="https://cdn.codecarrot.net/images/0_bk4ewUjYJ_nmt0y3.png" alt="Different browser images" /></p>
<p>With regards to browser support, people usually talk about “ECMAScript compatibility” rather than “JavaScript compatibility,” even though JavaScript engines parse and execute… well, JavaScript. This can be a little confusing, but there is an explanation.</p>
<p><img src="https://cdn.codecarrot.net/images/1_vmmMpbNmE2PgWYOg1KjPjA.png" alt="This table is part of a browser support table in the ECMAScript Wikipedia page. JavaScript versions are not mentioned here." /></p>
<p><em>This table is part of a browser support table in the <a href="//en.wikipedia.org/wiki/ECMAScript">ECMAScript Wikipedia page</a>. JavaScript versions are not mentioned here.</em></p>
<p>If you will recall, ECMAScript is a specification for what a scripting language could look like. Releasing a new edition of ECMAScript does not mean that all JavaScript engines in existence suddenly have those new features. It is up to the groups or organizations who are responsible for JavaScript engines to be up-to-date about the latest ECMAScript specification, and to adopt its changes.</p>
<p>Therefore, developers tend to ask questions like, “What version of ECMAScript does this browser support?” or “Which ECMAScript features does this browser support?” They want to know if Google, Mozilla, and Microsoft have gotten around to updating their browsers’ JavaScript engines — for example <a href="//en.wikipedia.org/wiki/Chrome_V8">V8</a>, <a href="//en.wikipedia.org/wiki/Spider_monkey">SpiderMonkey</a>, and <a href="//en.wikipedia.org/wiki/Chakra_%28JScript_engine%29">Chakra</a>, respectively — with the features described in the latest ECMAScript.</p>
<p>The <a href="//kangax.github.io/compat-table/es6/">ECMAScript compatibility table</a> is a good resource for answering those questions.</p>
<p>If a new edition of ECMAScript comes out, JavaScript engines do not integrate the entire update at one go. They incorporate the new ECMAScript features incrementally, as seen in this excerpt from Firefox’s JavaScript changelog:</p>
<p><img src="https://cdn.codecarrot.net/images/1_SIR7uB-QF30Vmham-qgI0g.png" alt="In Firefox 50, pieces of ES2015 and ES2017 were both implemented in Firefox’s JavaScript engine, SpiderMonkey. Other pieces of ES2015 and ES2017 were implemented before, and will continue to be implemented in the future." /></p>
<p><em>In Firefox 50, pieces of ES2015 and ES2017 were both implemented in Firefox’s JavaScript engine, SpiderMonkey. Other pieces of ES2015 and ES2017 were implemented before, and will continue to be implemented in the future.</em></p>
<h2 id="a-javascript-runtime">A JavaScript runtime</h2>
<p><strong>The environment in which the JavaScript code runs and is interpreted by a JavaScript engine.The runtime provides the host objects that JavaScript can operate on and work with.</strong></p>
<p><strong>Synonyms:</strong> Host environment</p>
<p><img src="https://cdn.codecarrot.net/images/0_rN9T3WXOJVCcTsbi_.jpg" alt="Mario" /></p>
<p>The JavaScript runtime is the “existing entity or system” mentioned in the scripting language definition. Code passes through the JavaScript engine, and once parsed and understood, an entity or system performs the interpreted actions. A dog walks, a person runs, a video game character jumps (or in the case of the above image, wrecks).</p>
<p>Applications make themselves available to JavaScript scripting by providing “host objects” at runtime. For the client side, the JavaScript runtime would be the web browser, where host objects like windows and HTML documents are made available for manipulation.</p>
<p>Have you ever worked with the window or document host objects? The window and document objects are not actually a part of the core JavaScript language. They are Web APIs, objects provided by a browser acting as JavaScript’s host environment. For the server side, the JavaScript runtime is Node.js. Server-related host objects such as the file system, processes, and requests are provided in Node.js.</p>
<p>An interesting point: different JavaScript runtimes can share the same JavaScript engine. V8, for example, is the JavaScript engine used in both Google Chrome and Node.js - two very different environments.</p>
<h2 id="ecmascript-6">ECMAScript 6</h2>
<p><strong>It is the sixth edition of the ECMA-262 standard, and features major changes and improvements to the ECMAScript specification.</strong></p>
<p><strong>Synonyms:</strong> ES6, ES2015, and ECMAScript 2015</p>
<p><img src="https://cdn.codecarrot.net/images/0_k4bggYx2QbIYZgl8.PNG" alt="ECMAScript 6" /></p>
<p>This edition of ECMAScript changed its name from ES6 to ES2015 because in 2015 Ecma International decided to switch to annual releases of ECMAScript. Accordingly, Ecma International also started to name new editions of the ECMAScript specification based on the year they are released. In short, ES6 and ES2015 are two different names for the same thing.</p>
<h2 id="babel">Babel</h2>
<p><strong>A transpiler that can convert ES6 code to ES5 code.</strong></p>
<p><img src="https://cdn.codecarrot.net/images/0_pX_GIONhqYIHp58u_.png" alt="Babel" /></p>
<p>Developers can use the shiny new features that come with ES6, but may be concerned with cross-browser compatibility for their web apps. At the time of the writing of this article, Edge and Internet Explorer do not fully support features from the ES6 specification.</p>
<p>Concerned developers can use Babel to convert their codes using ES6, which converts it to a functionally equivalent version of ES5. All of the major browsers fully support ES5 features, so they can run the code without any issues.</p>
<hr />
<p>Developers can use the shiny new features that come with ES6, but may be concerned with cross-browser compatibility for their web apps. At the time of the writing of this article, Edge and Internet Explorer do not fully support features from the ES6 specification.</p>
<p>Concerned developers can use Babel to convert their codes using ES6, which converts it to a functionally equivalent version of ES5. All of the major browsers fully support ES5 features, so they can run the code without any issues.</p>yashumittalI’ve tried googling “the difference between JavaScript and ECMAScript.”
https://cdn.codecarrot.net/images/0_zdzWJW4DiWkFjDnY.jpg
Why You Should Commit to Learning with Open Source2017-10-28T20:59:40+00:002017-10-28T20:59:40+00:00https://blog.codecarrot.net/why-you-should-commit-to-learning-with-open-source<p>Chances are you’ve probably encountered the term “Open Source” before. Open Source Software, or OSS, is a kind of software that whose code is made available for everyone to read. Depending on the license, you can most likely reuse it in any of your applications.</p>
<p>Contributing to open source is a lot like volunteering You’re freely giving your time, thoughts, and skills. But like most things, getting started is usually the hardest hurdle. There are a lot of projects and choices. It can be overwhelming.</p>
<p>Have no fear. Stick with it. You’ll find your community.</p>
<p>If you’re just beginning to explore, here are a few quick ways to avoid the dreaded impostor syndrome and get committing:</p>
<p><strong>1. Read the contributor guidelines</strong></p>
<p>This is the single most important thing you can do. Most projects have a text based file right off the root directory called CONTRIBUTING. If not, check the readme file and see if there are instructions there. They’ll tell you what’s expected on both what style you should be writing your new code in and how to get your changes submitted. As long as you follow their contribution guidelines, any little bit you can contribute will be much appreciated.</p>
<p><strong>2. Correct or enhance documentation</strong></p>
<p>GitHub provides a very simple way to do this using an online text editor, and allows you to submit the request from the same page. After your first commit is accepted, you’ll be very proud about the change you made. Everyone will have the correct documentation, all thanks to you. It’ll feel good.</p>
<p><strong>3. Add tests</strong></p>
<p>Practicing writing tests will help you get ready to start diving in deeper and fixing issues. Most projects will ask that you provide a test showing that your fix or enhancement works and didn’t break other code.</p>
<p><strong>4. Be open-minded</strong></p>
<p>So what do you say? Wanna give it a try? If you’re looking to gain confidence that you can do this work when you set out on your coding journey and are ready to give OSS a whirl, check out Up For Grabs. This awesome site lists projects that embrace new contributors. It uses labels on GitHub issues, and is a great way to get started on your new favorite habit.</p>yashumittalChances are you’ve probably encountered the term “Open Source” before. Open Source Software, or OSS, is a kind of software that whose code is made available for everyone to read. Depending on the license, you can most likely reuse it in any of your applications.
https://cdn.codecarrot.net/images/share-open-connect.png
You’re Not an Impostor - Asking for Help2017-10-28T20:35:10+00:002017-10-28T20:35:10+00:00https://blog.codecarrot.net/youre-not-an-impostor-asking-for-help<p>A friend of mine messaged me the other day. Even though they’ve been in the technology industry for awhile, they just recently landed their first engineering job. So, with this first job, they’re feeling pressure to look like they know what they’re doing and they’re worried that, by asking questions, their coworkers will find them out and they’ll be told they should just leave the tech industry.</p>
<p><strong>Have you ever had this fear? I know I have.</strong> The times I’ve had this fear of being kicked out, of being ostracized, haven’t usually been about writing code but about things that around it: job interviews, giving talks, or teaching topics I’m not intimately familiar with. I’m going to be found out; someone will realize I’m just a self-taught faker and refuse to work with me. I’ve also experienced it in places that are outside of technology, as I’m sure you all have too. Oh no, what if my friend finds out I’m not as sushi savvy as they are?! Will they still want to be my friend?</p>
<p>Not knowing something doesn’t make you a bad programmer. It doesn’t mean you shouldn’t be in technology or writing code. And it absolutely doesn’t make you an impostor. But what can you do when you run into a wall, need help, but you’re still scared to ask questions? Here are some of my favorite ways to find solutions on my own.</p>
<div class="callout">
Not knowing something doesn’t make you a bad programmer. It doesn’t mean you shouldn’t be in technology or writing code. And it absolutely doesn’t make you an impostor.
</div>
<h2 id="the-chalts-checklist">The CHALTS Checklist</h2>
<p>Check these six conditions to make sure you’re in a good problem-solving mindset.</p>
<ul>
<li><strong>Cold</strong> – It’s hard to think when you’re physically uncomfortable. If you’re cold, put on a sweater or socks. If you’re hot, get a fan or go somewhere cooler. I’d say this applies to where you’re working and how you’re sitting or standing, too. Make sure you’re stressing yourself with pain or discomfort as little as possible.</li>
<li><strong>Hungry</strong> – Your brain needs calories to work. Get something to eat or drink, even something small, to give yourself a little boost of energy. I know I’ve had so many problems that I just couldn’t solve until I had a few nuts or some gummy bears (a guilty pleasure), and then the pieces slid together so much easier. Along with this, drink some water. Keeping yourself hydrated will help with reducing physical discomfort and help you keep your mind on the task at hand.</li>
<li><strong>Angry</strong> – Repeatedly running into brick walls will make even the most peaceful of us start to see red eventually. I know, personally, I start to see a problem I can’t solve as an enemy. I get, literally, mad at the function that won’t return the correct output or the sentence that I just can’t seem to get right. If your emotions have started to run away with you, you won’t be able to think your problem through. Take a break, do something fun, and get yourself centered.</li>
<li><strong>Lonely</strong> – This one might be a bit of stretch if you’re not wanting to ask questions of your coworkers and friends, but a bit of camaraderie goes a long way in getting our minds into a better state. I enjoy playing board games and I’ve found that, with a problem I can’t quite get through, that a half hour of Hanabi or Codenames helps to get me back to a place where I feel confident in myself again. Snuggles from pets, children, loved ones, or even stuffed animals can really help, too.</li>
<li><strong>Tired</strong> – Sometimes we’re just too tired to work our way through a problem right now. That’s fine! We’re all human, after all! Take a break, take a nap, or even go to bed for the night. You might even find that your brain worked out a new solution to the problem for you while you dozed or marathoned a Netflix show. With the proper rest, many big problems become minor annoyances.</li>
<li><strong>Substances</strong> – And, sometimes, you’re just not in the right mindset to solve problems. There’s a common saying from the writing world: “Write drunk, edit sober”. Programmers have created their own version: “Code drunk, debug sober”. Honestly, though, you’re better off not writing or coding, especially anything tricky, while under the influence. I also think this goes a bit further, too: even if you’re sober, check to make sure you’re not being influenced by other chemical imbalances. Have you had enough sunlight lately? Do you need a drink of water (again)? Is your blood sugar too low or too high? Check in on your physical and mental states.</li>
</ul>
<h2 id="talk-about-something-else">Talk about something else</h2>
<p>Part of CHALTS is “loneliness” and I suggested you talk to other people, get some social interaction. It really does do a lot for you, even if it’s not in-person. Texting a friend, posting in a forum, or hanging out on social media can all help to boost your self-esteem (well, maybe not social media) and bring you back to feeling like a part of society again.</p>
<p>The urge, though, is usually to talk about the problem you’re having. I think it’s better to talk about something completely different. Instead of asking Jim or Alisha about why your regular expression is only finding every other letter, ask Alisha to tell you about her last rollerderby game. Or find out your grandma’s best brownie recipe. Go ask the CEO about the last book she read. These all get your mind off of your problem and get you focusing on something else. And while you’re focused on a book recommendation, your brain is chipping away at the problem in the background.</p>
<h2 id="get-out-of-there">Get out of there!</h2>
<p>Sometimes you just don’t have the emotional capital required to talk to someone else. In these cases, I do whatever I can to change my surroundings. I go take a walk. I play a video game for a half hour or watch an episode of a favorite TV show or YouTube series. Or, and this goes back to the “angry” part of CHALTS, put on some favorite music and dance; the physical activity, combined with letting your mind rest for a bit, really helps to reset and repair mental batteries.</p>
<p>Changing your environment itself can help a lot, too. Clean up your work area, open or close a window, restart your computer and organize the windows better. Small distractions, like not being able to quickly reach over and jot down a note, can cause big setbacks and frustrations. Yes, you’re “wasting time” cleaning up your desk, but you’re setting your mind up for better focus just five minutes from now.</p>
<p>Once you’re focused and you’ve stamped down as many distractions as possible, give your problem another shot and see if it turns out to be a little more organized, too.</p>yashumittalA friend of mine messaged me the other day. Even though they’ve been in the technology industry for awhile, they just recently landed their first engineering job. So, with this first job, they’re feeling pressure to look like they know what they’re doing and they’re worried that, by asking questions, their coworkers will find them out and they’ll be told they should just leave the tech industry.
https://cdn.codecarrot.net/images/9ALGHAVFD6.jpg
Don’t be Afraid to Break Your Code (Everyone Does)2017-10-28T20:29:00+00:002017-10-28T20:29:00+00:00https://blog.codecarrot.net/dont-be-afraid-to-break-your-code-everyone-does<p>Our instinct tells us that things shouldn’t be broken, but when it comes to coding, reverse that thought process. Regardless of what type (and level) of developer you are, coding relies on using a programming language to solve a problem, so naturally problem-solving is the most valuable skill you can have. So what’s the best way to improve your problem-solving skills? Find out what does and doesn’t work. Put your ideas to the test. Break your code and put it back together. In the world of developers, that’s what everyone does.</p>
<blockquote>
Find out what does and doesn’t work. Put your ideas to the test. Break your code and put it back together. In the world of developers, that’s what everyone does.
</blockquote>
<p>So how should you approach solving a problem with code? Checkout this great article the <a href="/the-four-ps-of-problem-solving">Four P’s to problem-solving: Prep, Plan, Perform and Perfect</a>. I’d recommend spending some time reading through his article and putting them into practice. <em>(Hint: steps 3 and 4 are where you’ll break your code.)</em></p>
<ul>
<li><strong>Step 1:</strong> Prep. Assess the problem that you’re trying to solve and establish an initial, high-level solution.</li>
<li><strong>Step 2:</strong> Plan. Think about how you’re going to tackle the problem and the steps you’ll need to take to reach the solution.</li>
<li><strong>Step 3:</strong> Perform. This is when you’ll put your plan into action.</li>
<li><strong>Step 4:</strong> Perfect. Your initial plan may not give you the desired result, and that’s okay. Revisit your code, continue to iterate on your plan in different ways. Once you reach the solution you’ll be proud of what you’ve built.</li>
</ul>
<p>Something else to remember is what makes the problems you’re trying to solve more interesting is that there is often more than one way to solve them. Your solution may be different from another developer’s, and that’s okay. As a community, developers have a strong culture of collaboration. Think of <a href="/why-you-should-commit-to-learning-with-open-source">open source</a> software, which is everywhere.</p>
<p>Whether you’re new to coding or a veteran, by now you’ll also know that becoming a developer isn’t easy. It involves hard work, dedication and a commitment to being a lifelong problem-solver and learner. But, what’s also important is to back yourself and your coding knowledge.</p>
<p>And it absolutely doesn’t make you an <a href="/youre-not-an-impostor-asking-for-help">impostor</a>. Instead, know that you have the skills to solve the problem and that you’re part of a global community of programmers who experience the same challenges as you.</p>
<div class="callout">
Not knowing something doesn’t make you a bad programmer. It doesn’t mean you shouldn’t be in technology or writing code. And it absolutely doesn’t make you an impostor.
</div>
<p>In fact, next time you feel defeated by an error in your code and <a href="/codingwisdom-what-to-do-when-you-want-to-quit">want to give up</a>, take solace in knowing that thousands of developers are sharing your frustrations and overcoming them. Instead of being defeated, take a break from your code, return with determination and approach the problem from a new angle. Then, when you experience that rewarding feeling when your code runs error free, celebrate (you deserve it).</p>
<p>Now go out there, take on your next project and don’t be afraid to break your code.</p>yashumittalOur instinct tells us that things shouldn’t be broken, but when it comes to coding, reverse that thought process. Regardless of what type (and level) of developer you are, coding relies on using a programming language to solve a problem, so naturally problem-solving is the most valuable skill you can have. So what’s the best way to improve your problem-solving skills? Find out what does and doesn’t work. Put your ideas to the test. Break your code and put it back together. In the world of developers, that’s what everyone does.
https://cdn.codecarrot.net/images/Stressed.png
How to Learn to Code by Teaching2017-10-28T19:47:00+00:002017-10-28T19:47:00+00:00https://blog.codecarrot.net/how-to-learn-code-by-teaching<p>If you’re anything like I was two years ago, you just read that title and thought ”wait, what? Learn to code by teaching?” On its face, it defies logic. How can you possibly learn by teaching or helping others learn? What would you conceivably add to your knowledge base and skill set by explaining something you already know how to do? When I first started answering talking with other developers in the <a href="//developer-community.flock.com/">Developer Community</a>, I did it because I wanted to give back to the Community that had helped answer my questions. I honestly never considered the possibility of learning about code by helping others learn about code. Having answered many questions from other developers, I can tell you what I’ve personally learned by helping others.</p>
<h2 id="the-cliché">The Cliché</h2>
<p>You’ve probably heard it said a thousand ways: “Everyone has something to teach.” Now, what if I adjusted that to read: “Everyone who has written even a small program successfully has something to teach about coding”? The statistics are on my side. According to the <a href="//insights.stackoverflow.com/survey/2017">2017 StackOverflow Developer Survey Results</a>, approximately 40 million people visit them every month. An estimated 16.8 million are professional developers. If you’ve passed a few coding challenges, taken a course in some programming language, or ever torn your hair out at a compiler error and still managed to fix it, congratulations! You know more about coding than 99% of the world. You do have something to teach, even if you’re still learning.</p>
<h2 id="the-hidden-error-game">The Hidden Error Game</h2>
<p>Have you ever had a scenario like this happen? You pour yourself a cup of coffee and set the coffee mug on your desk. You walk over to a co-worker to ask something and return to your desk. Now suddenly you can’t find your coffee cup, so you do the reasonable thing and ask your coworker if they’ve seen it. They respond with: “It’s on your desk, right behind you,” but you swear you just looked there. This type of thing happens to us all on occasion. It’s your mind playing tricks on you. There’s a name for it. It’s called a mental scotoma or “blind spot.” The second you think “I can’t see it,” you now are incapable of seeing it.</p>
<p>This phenomenon becomes more pronounced in a discipline where a single space or punctuation mark can break your code. At this point, an extra set of eyes is what is needed. By training yourself to spot the error in someone else’s code, it makes it easier to spot the error within your own.</p>
<p>I’m sure most of us have at some point in our lives played a “Hidden Object” or “Spot the Difference” type game. I’m always reminded of these when confronted with a fellow student who has code that isn’t compiling or isn’t passing a challenge. The first thing I look for is syntax errors. It is exceedingly common to misspell a variable name, forget a semicolon or one of a thousand tiny things that can make your code seem to fail arbitrarily. Nine times out of ten it isn’t giant logic flaws that get us; it’s the tiny details. Challenge yourself to see if you can spot the detail that’s off. The more you do this, the more efficient you will be at debugging code and common mistakes.</p>
<h2 id="code-objectivity">Code Objectivity</h2>
<p>One of the greatest benefits to answering questions on forums has been that I’ve gained a certain amount of objectivity to my own code. I no longer immediately panic the first time I see a compiler error or the first time something doesn’t work as I thought it would. Having answered many questions about a myriad of different programming languages, I’m now familiar with many compiler errors and common mistakes.</p>
<p>I believe that it’s because of my familiarity with the most common mistakes that I can get up and walk off for a few minutes and try not to think about it. When I return, I try and pretend like it’s someone else’s code I’m debugging. I am essentially playing the “Spot the Difference” game with myself.</p>
<h2 id="helping-others-isnt-100-selfless">Helping Others Isn’t 100% Selfless</h2>
<p>When I first started answering questions on the Community, I usually left an answer and a brief explanation. This method of answering went on for a while until I started getting secondary questions about the “how”s and “why”s. These were significantly tougher and required more time to answer.</p>
<p>Around this time, I began to notice answers posted which were just working code with no explanation. This practice irritated me somewhat as there was no guarantee that the already frustrated student would review the code line by line and learn what the code was doing. It was then that I began to feel obligated to expand my answers to include why my code works, and theirs doesn’t. Sometimes I would explain a concept or possibly even why we would need this thing in the first place.</p>
<p>I have answered questions that have forced me to go through the code line by line. I’ve had other answers that required me to dig through documentation, forum postings, and known issues. Besides being valuable for just that answer, it also has made me more confident in finding answers from other sources for myself and working out logically how the code is working and why it is working that way. I have posted many answers where I suspect that I learned more about the code by teaching than the person who asked the question.</p>
<h2 id="feed-the-curiosity-monster">Feed the Curiosity Monster</h2>
<p>It’s not enough to be curious about programming. You must stay curious constantly, so if you truly want a better learning experience, take a look at questions that are outside of your current knowledge base. Maybe it’s a syntax error and you can help, or maybe not.</p>
<p>When I look at coding questions that are outside of my skill level, I try and challenge myself to see if I can understand what it’s attempting to do just in a general way. After that, I keep tabs on that question. Eventually, someone is likely to answer it, and I want to know the answer. I’m forever curious. If I’m lucky, the answer will come with a detailed explanation. I might not understand it all right then, and that’s ok. Seeing the question and the code with it seems to make it easier to follow along with the course material when I get there. It doesn’t feel nearly as alien and intimidating because I’ve at least had exposure to it.</p>
<div class="callout">
It’s not enough to be curious about programming. You must stay curious constantly
</div>
<h2 id="making-friends-with-the-documentation">Making Friends with the Documentation</h2>
<p>I don’t know about the rest of you, but when I first started looking at programming documentation, it was flat-out intimidating. I could hardly understand what they were trying to get across. It contained lots of words I didn’t know or only had a vague idea of what they meant. It wasn’t until I started answering the questions of others that I began to think of the documentation as being on my side.</p>
<p>In many cases, I sincerely needed the documentation to be on my side. I can’t count the number of times I’ve received a question with a “how” or “why.” I know I’ve learned it before and I may know it to be true. Remembering where I heard it or the example I saw becomes difficult to pinpoint. I genuinely needed the documentation to be my witness so that I could point to it and say: “It says it in this paragraph.”</p>
<h2 id="soft-skills-are-hard">“Soft Skills” are Hard</h2>
<p>Besides increasing your skill with coding, helping others on a consistent basis increases your communication skills. I don’t believe anyone is friendly all day long every day. We all have rotten days. I may have been working with some code that isn’t behaving the way that I want for an hour. I’m tired and frustrated, but now I go to the Community and see questions by students who likely feel exactly the way I feel right now.</p>
<p>Many questions come from beginners just starting to learn. No matter how basic I might consider the subject matter to be, I remind myself that there was a time when none of it was basic. At one point, I was right where they are. A few kind words and a little encouragement can go a long way. I know this because I received this when I was starting, and it was
tremendously appreciated.</p>
<p>Perception is key. I’ve repeatedly seen examples where two students have posted answers to a question, and both are equally correct. However, the one perceived as friendlier or more explanatory will usually receive the “Best Answer.” I try and avoid markdown and emojis that might be misinterpreted as sarcastic, condescending or even aggressive. I do, however, include a small amount of emojis that convey a friendly tone and markdown that is appropriate for the situation. The tone of your answer could be the difference between someone sticking with it and giving up altogether.</p>
<h2 id="dont-rewrite-history">Don’t Rewrite History</h2>
<p>I have answered hundreds of questions with over 1k chosen as “Best Answers.” However, not all my answers are correct, and some of them are only partially correct. In most cases, I will not remove them. I like to own my mistakes because they are part of the learning process. Many of them have spawned a discussion where I was ultimately proven incorrect. That’s terrific! We only learn things by being wrong. I’m ok with being wrong if I can learn why I am wrong. What I’m hoping is that others learn from that discussion in the same way I have. All of these things reflect what I’ve learned in my effort to help others.</p>
<p>Challenging yourself to provide top-notch answers with detailed explanations can be even more difficult than the coding problem at hand. Providing a simple answer that can be copy/pasted to solve a problem isn’t ideal. By posting an answer with no explanation, there’s a good chance that the student will not review it to learn why or how it works, and there’s a 100% chance that you’re cheating yourself out of a learning opportunity. If you feel like it might be helpful to reinforce your knowledge base on a consistent basis and to go deeper into the how and why of some solutions you’ve encountered, I can’t recommend helping others enough.</p>yashumittalIf you’re anything like I was two years ago, you just read that title and thought ”wait, what? Learn to code by teaching?” On its face, it defies logic. How can you possibly learn by teaching or helping others learn? What would you conceivably add to your knowledge base and skill set by explaining something you already know how to do? When I first started answering talking with other developers in the Developer Community, I did it because I wanted to give back to the Community that had helped answer my questions. I honestly never considered the possibility of learning about code by helping others learn about code. Having answered many questions from other developers, I can tell you what I’ve personally learned by helping others.
https://cdn.codecarrot.net/images/Screen-Shot-2017-09-06-at-23.48.24.png
Factor Learning to Code into Your 9-52017-10-28T18:31:00+00:002017-10-28T18:31:00+00:00https://blog.codecarrot.net/factor-learning-to-code-into-your-9-5<p><strong>So if you’re ready to make the commitment, how should you factor learning to code into your 9-5?</strong></p>
<h2 id="decide-when-youll-learn">Decide when you’ll learn</h2>
<p>The first step is to decide when in your schedule you can facilitate learning. Choosing the best time to learn will vary depending on your daily routine, but here are a few suggested times to consider.</p>
<ul>
<li><strong>Early Birds:</strong> If you have a busy household or work long days, try learning in the morning before work when your mind is fresh and undistracted. Depending on how you get to work, there’s also always the option of continuing to learn on your commute.</li>
<li><strong>Use Your Breaks:</strong> If your work schedule allows for it, another option is to make the most of the breaks in your working day. I’d even suggest discussing your learning goals with your manager. In many cases, they’ll likely on board with your commitment. If they are, take it one step further and discuss a learning budget with them?</li>
<li><strong>Night Owls:</strong> If you’re less of a morning person (like myself), then spending time learning in the evening is a great alternative. The caveat is that it can be challenging to find the motivation after a long day at work. But, provided you can establish a routine and keep the end goal in mind, it’s a productive way to spend a part of your evening.</li>
<li><strong>BONUS: Catch up on the weekends:</strong> Regardless of which time of day works best for your schedule, I’d also recommend dedicating sometime during the weekends to your coding (you’ll be surprised by how quickly you find yourself hooked on it anyway). Even if it’s just an hour, that extra boost is a great way to keep your learning pace or make up for any coding time cut short during a busy week.</li>
</ul>
<h2 id="decide-where-youll-learn">Decide where you’ll learn</h2>
<p>Once you’ve decided on the when it’s time to establish the where. The environment is important when you’re learning. Try to base yourself somewhere you’re comfortable and if possible, free from distractions. If you do find yourself learning in a busier setting—like your office, in a coffee shop or on a commute—I’d recommend creating an awesome playlist to drown out the background noise and help you stay focused.</p>
<p>One of the benefits of learning to code is that all you need is a computer and an internet connection. Make the most of the flexibility and try out learning in different places till you find the best learning environment that works for you.</p>yashumittalSo if you’re ready to make the commitment, how should you factor learning to code into your 9-5?
https://cdn.codecarrot.net/images/StockSnap_K1GVTNT1GJ.jpg
3 Ways to Learn Better by Studying Less2017-10-28T17:26:00+00:002017-10-28T17:26:00+00:00https://blog.codecarrot.net/3-ways-to-learn-better-by-studying-less<p>We believe that anyone can, and everyone should be a life-long learner. The changing demands of work, our innate curiosity and a desire for challenge, longer life expectancy — all these provide great reasons to expand your knowledge and try new things.</p>
<blockquote>
You can literally change the size of your brain by spending just 15 minutes each day learning something new.
</blockquote>
<p>Think you’re too old to learn? It doesn’t matter whether you’re 16 or 60, you can learn at any age. The human brain starts life with around 100 billion neurons (nerve cells that transmit information). Many neurons die over time, but the hippocampus, an area of the brain dedicated to emotions and memory is one of the few parts of the brain that can actually grow new neurons. You can literally change the size of your brain by spending just 15 minutes each day learning something new. Try these tips to make it work for you.</p>
<h2 id="1-study-in-short-frequent-sessions">1. Study in Short, Frequent Sessions</h2>
<p>You may think that 15 minutes isn’t enough time to learn anything of substance and that you’d be better off carving out 3 hours to study on a Saturday. However, the science of learning has news for you: A single, long study session isn’t as helpful as shorter more frequent sessions.</p>
<p>The longer the time gap between study sessions, the greater the likelihood that the memory of what you study will fade away. But, if you return to your studies within just a day or two, your mind is still holding onto that previous study session, and the new learning you do helps reinforce those older learning moments.</p>
<blockquote>
The act of remembering makes memories stronger.
</blockquote>
<p>Here’s another tip: you can improve memory by spending a few minutes each day thinking about what you learned the day before. This “retrieval practice” is shown to strengthen your memory and improve your learning — in other words, remembering something makes that memory stronger!</p>
<h2 id="2-let-your-brain-do-the-work">2. Let Your Brain Do the Work</h2>
<p>We often think of learning as the time we actively concentrate on our studies: reading, writing, doing homework or completing practice problems. But our brains are amazingly active even when we aren’t consciously thinking about anything. The scientist and educator <a href="//barbaraoakley.com/">Barbara Oakley</a>, who writes about effective learning techniques, talks about two different brain modes: <strong>the focused mode</strong>, which is when you’re really concentrating, and the <strong>diffused mode</strong> when you aren’t thinking about anything in particular.</p>
<p>Most of us think of this focused mode when we talk about learning. But it turns out that when our brains enter a resting state — when you’re gardening, taking a shower, cleaning the house, or just “spacing out” — the diffused mode of thinking kicks in and the brain continues to process thoughts. Have you ever been stuck on a problem, and while you take a quick walk around the block, the answer miraculously pops into your mind? That’s the diffused mode at work.</p>
<h2 id="3-sleep-to-remember">3. Sleep to Remember</h2>
<p>We all know that it can be difficult to concentrate, think, or learn when we’re exhausted. We need good sleep to study well. However, the benefits of sleep and learning don’t stop here. Research shows that sleep also plays an important role after we’ve just learned something.</p>
<p>I mentioned earlier that our brains literally grow as we learn — neurons are created and new neural connections formed. Sleep helps with this process. As we sleep, our brains build memories in a process called “consolidation.” It’s like our brain says “What a day! So much has happened. I’d better put everything in order so I can find it later.”</p>
<p>When you spend 3 hours in a single day learning, your brain has only that <strong>one</strong> night to consolidate those learning memories. Your brain’s going to have to work longer to successfully store that new information. But, if you spread that learning out over 7 days you give your brain 7 nights to build those memories — in other words, give your brain the time it needs to consolidate your learning.</p>yashumittalWe believe that anyone can, and everyone should be a life-long learner. The changing demands of work, our innate curiosity and a desire for challenge, longer life expectancy — all these provide great reasons to expand your knowledge and try new things.
https://cdn.codecarrot.net/images/1635.jpeg
4 Big Challenges of Learning to Code2017-10-28T16:47:00+00:002017-10-28T16:47:00+00:00https://blog.codecarrot.net/4-big-challenges-of-learning-to-code<p>When you hear that anyone can learn the skills they need to become a developer, there’s one important caveat. If you’re going to learn to code, you need to be willing to work hard. Coding is an attainable skill, but it isn’t easy and there are challenges you’ll encounter along the way. We recently asked some of our students – who are now developers – what they found most challenging about learning to code. Here are 4 of the major challenges of learning to code that they shared.</p>
<p><img src="https://cdn.codecarrot.net/images/JESHOOTS.com_.png" alt="Working Place" /></p>
<h2 id="1-imposter-syndrome">1. Imposter Syndrome</h2>
<p>Whether you’re new to programming or a veteran developer, you will be all too familiar with the lurking presence of <a href="/slaying-the-dragon-imposter-syndrome">Imposter Syndrome</a> when it comes to learning to code. Lacking confidence in your skills is common when you’re new, but honestly, it’s unnecessary. Remember every expert developer was once a beginner and they know how it felt. The tech industry is a welcoming and supportive community where you can find others with more experience who are willing to collaborate or offer guidance (provided you put yourself out there to meet people in tech).</p>
<blockquote>
That fear and insecurity still creeps up at times and I wonder if I’m good/smart enough to be successful in this field. But then I remember that I love coding and every day is an opportunity to continue to learn.
</blockquote>
<p>As a new developer, it’s easy to want to compare yourself to other developers or worry whether you’re learning the right thing. The path to learning about software isn’t linear. The key is to learn problem-solving. Once you learn how to solve problems, you can learn anything about coding.</p>
<p>Don’t let yourself feel intimidated. Instead, rise to the challenge, problem-solve and back yourself. There is no single stereotype for a developer anymore, opportunities are out there waiting for you, you just need to focus your efforts on learning and sharpening your coding skill set.</p>
<blockquote>
The path to learning about software isn’t linear. The key is to learn problem-solving.
</blockquote>
<h2 id="2-trying-to-understand-it-all">2. Trying to understand it all</h2>
<p>Learning to code is like learning any new language. At first, ideas and concepts of coding can feel abstract. Then, even once you’ve begun to grasp the basics, you’ll need to <a href="/why-its-a-learning-curve-not-a-line">start piecing those bit of knowledge into understanding</a>. There will likely come a time in your learning when you notice things becoming significantly more difficult. These tend to happen when concepts come into play. You’ve learned the basic building blocks, but now you must put them together to architect a solution to a problem. In my experience, this feels a bit like standing at the bottom of a cliff. It is here that I’ve felt the most frustration in my learning process.</p>
<p>When faced with that overwhelming hurdle, remember again that every developer has been there, and overcome it. Trust that with patience and dedication to learning, you’ll begin to grasp the knowledge. Another useful tip is to use learning tactics to break down concepts into retainable chunks of information. For example, <a href="/3-ways-to-learn-better-by-studying-less">research shows</a> that short, frequent sessions of study are more effective than long ones. <em>(For more tips on how to learn better by studying less, check out <a href="/3-ways-to-learn-better-by-studying-less">this post</a>.)</em></p>
<blockquote>
You’ve learned the basic building blocks, but now you must put them together to architect a solution to a problem.
</blockquote>
<p>With trial and error in coding, you may find yourself tinkering with your code and resolving an issue, but you’re not sure how.When that happens, try to understand why? Take the time to review your code and identify what you did to make it work. These lessons you learn along the way will help solidify your understanding and grow your skills.</p>
<h2 id="3-finding-the-time">3. Finding the time</h2>
<p>Another common challenge that you’ll face when learning to code is finding the time, especially when you have to factor it in between work, life, and family. There are a million distractions and a million reasons to quit. This is when self-disciplined comes in. Set yourself learning goals and establish a schedule. <a href="/factor-learning-to-code-into-your-9-5">Here are a few tips</a> on how to fit learning to code into your 9-5.</p>
<p>There will likely be plenty of times when you don’t feel like sitting down at your computer to learn during the weekend or after a long day at work. Those days, remind yourself of the end goal and what you can achieve if you persevere. For example, when you’re lacking motivation after a bad day in the office and struggling to find the motivation to learn, remember that once you master those in-demand coding skills, you can leave that job behind.</p>
<h2 id="4-the-frustration">4. The frustration</h2>
<p>The final challenge is one that anyone who has touched code can relate to; periods of extreme frustration. Whether it’s a hidden error in your code, a new concept you’re trying to learn, or another issue you’ve encountered, the frustration can be overwhelming. When that happens, you may feel like you want to quit. “I thought about quitting. I threw things and once even kicked a hole through my wall. I cried. I started at the same lines of code for hours before I realized I was missing a semicolon, or forgot to close a div. I can’t count how many times I did that.” In reality, you’ll have to confront these frustrations through your career as a developer, BUT everytime you persevere, debug, and problem-solve, you’ll learn something new which can help you to avoid similar frustrations in the future. (There’s also the added bonus of the immense satisfaction when you overcome a frustrating challenge!)</p>
<p><em>These are just a few of the challenges of learning to code. Now we’d really like to hear about your experience. What challenges have you faced? How did you overcome them?</em></p>yashumittalWhen you hear that anyone can learn the skills they need to become a developer, there’s one important caveat. If you’re going to learn to code, you need to be willing to work hard. Coding is an attainable skill, but it isn’t easy and there are challenges you’ll encounter along the way. We recently asked some of our students – who are now developers – what they found most challenging about learning to code. Here are 4 of the major challenges of learning to code that they shared.
https://cdn.codecarrot.net/images/JESHOOTS.com_.png
Slaying the Dragon - Imposter Syndrome2017-10-28T16:26:00+00:002017-10-28T16:26:00+00:00https://blog.codecarrot.net/slaying-the-dragon-imposter-syndrome<p>Another day, another new JavaScript framework. And another person on your team who is somehow already an expert on it. How does everyone else keep up in the ever-changing world while you feel like you’ll never know nearly enough? When will everyone else notice you’re a hack who’s barely keeping up? How long can you keep up this charade?</p>
<p><strong>Here’s the thing, you’re not a fraud.</strong> And while everyone feels like an imposter in their role at some point(s) in their career, it happens on a daily basis in the field of Software Development. Technology is changing at a ridiculous pace, and while you might feel like you’re the only person falling behind, the truth is no one person is on top of it all. Instead, get to know Imposter Syndrome beyond the buzzword so you can conquer it.</p>
<blockquote>
Technology is changing at a ridiculous pace, and while you might feel like you’re the only person falling behind, the truth is no one person is on top of it all.
</blockquote>
<h2 id="own-your-awesome">Own your Awesome</h2>
<p>Imposter Syndrome is a concept describing high-achieving individuals who are marked by an inability to internalize their accomplishments and a persistent fear of being exposed as a “fraud”. The main takeaway time and again is the fear of being exposed as a fraud. That feeling of being an imposter. But let’s shift our focus a bit. The real problem here is the inability to internalize accomplishments. For years whenever anyone complimented me on something at work, I would respond with, “I got lucky.” Meanwhile, I would simultaneously berate myself for any mistake no matter how trivial. Someone finally called me out on it and pointed out all the work I had put in that got me to the “lucky” moment (and much of that work included mistakes which became learning opportunities.)</p>
<p>I’m not saying I easily celebrated my wins from that day forward. It continues to be a process for me. But, the key was actually becoming mindful of the problem. When those wins happen, pause and celebrate them! Recognize all the hard work you put in that got you to this moment. Software Development by nature pits you against many failures and few wins. It’s challenging work, which is likely what attracted you to the field at least in part. Embrace the process.</p>
<div class="callout">
The real problem with Imposter Syndrome is the inability to internalize accomplishments.
</div>
<h2 id="own-your-mistakes">Own your Mistakes</h2>
<p>New tools and technologies are released every day and nobody can keep up, yet we all feel like we should be able to. This is defeating only if you let it be. When I get stuck in a series of mistakes I grab a can of WD-40, but not for the reason you might be thinking. Do you know how it got its name? The chemist, Norm Larsen, called the formula “Water Displacement #40” in the lab as it was his 40th attempt to create the substance. We could easily think of this as 39 failures. But I challenge you instead to think of it as a 40 step process. Learning is a journey. View these missteps as an opportunity to learn and move forward.</p>
<p>Don’t suffer in silence. You will constantly be using new skills, which means mistake will happen frequently. By acknowledging them and seeking input from others, you will not only improve but likely learn that others deal with these obstacles consistently as well. Knowing that your colleagues and counterparts also feel inadequate at times can help ease your distress.</p>
<blockquote>
Learning is a journey. View missteps as an opportunity to learn and move forward.
</blockquote>
<h2 id="own-your-knowledge">Own your Knowledge</h2>
<p>While it is important to lean on others when you need assistance with a new tool or concept, it is equally as important to support others as they learn. By definition those who suffer from Imposter Syndrome are high-achievers. And I think with that achievement it is easy for others to assume that we’ve got all of our ducks in a row. But I’ve learned one of the best ways for me to collaborate with my team and mentor others is to pull back the curtain and let them see my flaws. The struggle is real, and sometimes the pressure we put on ourselves is normal, and sometimes it is irrational.</p>
<p>Knowing how devastating Imposter Syndrome can make you feel at times, make sure you are not contributing to someone else’s suffering. Support others who are new to a thing, especially when you happen to be the pro in the room. They likely know something you don’t and will be able to return the favor some day. By sharing the load and balancing each other’s strengths and weaknesses, Imposter Syndrome becomes manageable.</p>
<p>Work to shift your perspective. If you can own these three items – your Awesome, your Mistakes, and your Knowledge – you will be well on your way to conquering Imposter Syndrome.</p>
<div class="callout">
By balancing each other’s strengths and weaknesses, Imposter Syndrome becomes manageable.
</div>yashumittalAnother day, another new JavaScript framework. And another person on your team who is somehow already an expert on it. How does everyone else keep up in the ever-changing world while you feel like you’ll never know nearly enough? When will everyone else notice you’re a hack who’s barely keeping up? How long can you keep up this charade?
https://cdn.codecarrot.net/images/imposter_darker.png
What are Progressive Web Apps?2017-10-26T20:29:00+00:002017-10-26T20:29:00+00:00https://blog.codecarrot.net/what-is-a-progressive-web-app<p>By now, you’ve probably heard that Progressive Web Apps are the future of all mankind. They’ll bring world peace, end hunger, save the rainbows and unicorns, bring balance to the force, and a whole lot more. In the process, they might even push the mobile web forward, bring parity to web and native apps, and help mobile developers reach more users beyond the confines of the app stores.</p>
<p>That all sounds great… but what are Progressive Web Apps, exactly? Want to <a href="#kickstarting-your-journey-to-progressive-web-apps">kickstarting Your Journey to Progressive Web Apps</a>?</p>
<blockquote>
“A Progressive Web App uses modern web capabilities to deliver an app-like user experience.” – Progressive Web Apps
</blockquote>
<p>Native app store apps do things like send push notifications, work offline, look and feel like an app (as Apple and Google have imagined them), load on the homescreen, and so on and so forth. Mobile Web Apps accessed in a mobile browser, by comparison, historically haven’t done those things. Progressive Web Apps fix that with new Web APIs, new design concepts, and new buzzwords.</p>
<p>To be clear, I’m talking about browser mobile web apps. Hybrid apps, like Ionic with Cordova, run uninhibited in the native app environment, with all the features we expect of any native app. But pull out the web content from a hybrid app and load it in a mobile browser, and the app is thusly constrained by the features of the browser (for a variety of good security and API standardization reasons).</p>
<p>Progressive Web Apps bring features we expect from native apps to the mobile browser experience in a way that uses standards-based technologies and run in a secure container accessible to anyone on the web.</p>
<p>On the whole, Progressive Web Apps describe a collection of technologies, design concepts, and Web APIs that work in tandem to provide an app-like experience on the mobile web. Let’s walk through some of the core tenets of Progressive Web Apps.</p>
<h2 id="service-workers">Service Workers</h2>
<p>Service Workers are an incredibly powerful, and equally as confusing, technology behind a Progressive Web App. They power offline functionality, push notifications, background content updating, content caching, and a whole lot more.</p>
<p>At a high level, a Service Worker is a worker script that works behind the scenes, independent of your app, and runs in response to events like network requests, push notifications, connectivity changes, and more.</p>
<p>I’ve heard Service Workers described as a “proxy,” which I think describes them nicely. We can listen for events like <code class="highlighter-rouge">fetch</code> that happen any time a network request occurs. We can handle that event with full control, checking for cached data and returning immediately, or allowing the request to continue to the remote server. Our script acts as a proxy, or middleware, for the request.</p>
<p>The sheer power and flexibility of Service Workers makes them very complicated, and generally, developers will want to use pre-made “recipes” for common service worker use cases, such as offline mode. Mozilla has a <a href="//serviceworke.rs/">great reference</a> for service worker recipes that demonstrate the myriad applications with reusable code. For example, here’s how to do a simple <a href="//serviceworke.rs/offline-fallback_service-worker_doc.html">offline mode</a> that intercepts <code class="highlighter-rouge">fetch</code> events and returns data from a cache if the network request fails. Google also has a slew of <a href="//github.com/GoogleChrome/samples/tree/gh-pages/service-worker">Service Worker Samples</a>.</p>
<p>Main takeaway: Service Workers are just a JavaScript file like any other, running in the background and triggered via events, and it’s up to you to write code to handle caching, push notifications, content fetching, etc. Since developers end up using the same “recipes” to do common tasks (like offline support), we will most likely want to use existing recipes to make our lives easier. Service Workers are available on Android with Chrome 50 and not <a href="//caniuse.com/#feat=serviceworkers">currently supported</a> by other major mobile browsers.</p>
<h2 id="app-shell">App Shell</h2>
<p>The App Shell model is a simple design concept whereby the initial load of a mobile web app provides a basic shell of a app UI, and the content for the app is loaded after. App Shell isn’t a Web API or a framework, but rather a design approach that developers can choose to adhere to that is enhanced by the caching abilities of service workers. You might find that it’s a pretty straightforward, obvious approach, made more dramatic by a buzzword.</p>
<p>With the App Shell model, we focus on keeping the shell of our app UI and the content inside of it separate, and we cache them separately. Ideally, our App Shell is cached such that it loads as quickly as possible when a user visits and returns at a later date. Having the shell and the content load separately theoretically improves the user’s perception of the performance and usability of the app.</p>
<p>Putting this in the context of Ionic, we can load our Ionic app layout immediately (tabs, navigation controller, side menu, etc.), cache it through a service worker, and then fetch and update the content through JS after the app shell has loaded.</p>
<p>As we start to add more PWA support to Ionic, you can expect an App Shell approach to come out-of-the-box for all Ionic apps that are deployed as mobile web apps, with pre-made Service Worker recipes for caching, offline support, and background content refreshing.</p>
<h2 id="installability-and-app-manifest">Installability and App Manifest</h2>
<p>Historically, mobile web apps were not installed like an app to the homescreen. Sure, a user could “pin” a mobile website to their homescreen on iOS and Android, but the experience was second-rate, and the app still did not come with the local features we expect out of native apps (plus, does anyone actually do that?).</p>
<p>This is changing. Recently, Chrome on Android added support <a href="//developers.google.com/web/updates/2014/11/Support-for-installable-web-apps-with-webapp-manifest-in-chrome-38-for-Android?hl=en">for installing web apps to the homescreen</a> with a native install banner, just like the native app banners we’re used to.</p>
<p>To tell Chrome our mobile website is installable as an app, we write a <a href="//github.com/pivanaio/banjo/blob/master/manifest.json">manifest.json</a> file and link to it from our main HTML page (see the second link above for a full example).</p>
<p>Currently, iOS doesn’t have any additional features here beyond Pin to Homescreen, so the experience won’t be as fluid, but here’s hoping Apple gives us some goodies this year ?.</p>
<h2 id="conclusion">Conclusion</h2>
<p>Progressive Web Apps are equal parts new Web APIs, design patterns, and marketing fluff. The mobile web comes closer to parity with installable app store apps through app manifest and homescreen install support, background worker functionality with Service Workers, faster load time with App Shell, and a renewed belief that web developers, too, can build amazing mobile app experiences.</p>
<hr />
<h2 id="kickstarting-your-journey-to-progressive-web-apps">Kickstarting Your Journey to Progressive Web Apps</h2>
<div data-type="youtube" data-video-id="goafiwzhKMI"></div>yashumittalBy now, you’ve probably heard that Progressive Web Apps are the future of all mankind. They’ll bring world peace, end hunger, save the rainbows and unicorns, bring balance to the force, and a whole lot more. In the process, they might even push the mobile web forward, bring parity to web and native apps, and help mobile developers reach more users beyond the confines of the app stores.
https://cdn.codecarrot.net/images/what-is-pwa.png
Who contributed the most to open source in 2017? Let’s analyze GitHub’s data and find out.2017-10-26T19:22:00+00:002017-10-26T19:22:00+00:00https://blog.codecarrot.net/who-contributed-the-most-to-open-source-in-2017<p><img src="https://cdn.codecarrot.net/images/1_ywkHH3kMMVdGhXe6LDq7IA.png" alt="Top contributor on Github in 2017" /></p>
<p>For this analysis we’ll look at all the <code class="highlighter-rouge">PushEvents</code> published by GitHub during 2017. For each GitHub user we’ll have to make our best guess to determine to which organization they belong. We’ll only look at repositories that have received at least 20 stars this year.</p>
<p>Here are the results I got, which you can <a href="//datastudio.google.com/open/0ByGAKP3QmCjLU1JzUGtJdTlNOG8">tinker with in my the interactive Data Studio report</a>.</p>
<h2 id="comparing-the-top-cloud-providers">Comparing the top cloud providers</h2>
<p>Looking at GitHub during 2017:</p>
<ul>
<li>Microsoft appears to have ~1,300 employees actively pushing code to 825 top repositories on GitHub.</li>
<li>Google displays ~900 employees active on GitHub, who are pushing code to ~1,100 top repositories.</li>
<li>Amazon appears to have only 134 active employees on GitHub, pushing code to only 158 top projects.</li>
<li>Not all projects are equal: While Googlers are contributing code to 25% more repositories than Microsoft, these repositories have collected way more stars (530,000 vs 260,000). Amazon repositories sum of 2017 stars? 27,000.</li>
</ul>
<p><img src="https://cdn.codecarrot.net/images/1_EfhT-K6feRjyifX_K49AFg.png" alt="Google, microsoft, amazon repo" /></p>
<h2 id="redhat-ibm-pivotal-intel-and-facebook">RedHat, IBM, Pivotal, Intel, and Facebook</h2>
<p>If Amazon seems so far behind Microsoft and Google — what are the companies in between? According to this ranking RedHat, Pivotal, and Intel are pushing great contributions to GitHub:</p>
<p>Note that the following table combines all of IBM regional domains — while the individual regions still show up in the subsequent tables.</p>
<p><img src="https://cdn.codecarrot.net/images/1_KnaOtVpdmPFabCtk-saYUw.png" alt="redhat, ibm" /></p>
<p><img src="https://cdn.codecarrot.net/images/1_Dy08nNIdjxBQRqQ6zXTThg.png" alt="pivotal, intel, fb" /></p>
<p>Facebook and IBM <em>(US)</em> have a similar number of GitHub users than Amazon, but the projects they contribute to have collected more stars <em>(especially Facebook)</em>:</p>
<p><img src="https://cdn.codecarrot.net/images/1_ZJP36ojAFyo7BcZnJ-PT3Q.png" alt="fb, ibm, amazon" /></p>
<p>Followed by Alibaba, Uber, and Wix:</p>
<p><img src="https://cdn.codecarrot.net/images/1_yG3X8Sq35S8Z9mNLv9pliA.png" alt="alibaba, uber, wix" /></p>
<p>GitHub itself, Apache, Tencent:</p>
<p><img src="https://cdn.codecarrot.net/images/1_Ij2hSTZiQndHdFRsFNwb-g.png" alt="GitHub itself, Apache, Tencent" /></p>
<p>Baidu, Apple, Mozilla:</p>
<p><img src="https://cdn.codecarrot.net/images/1_ZRjQ0fNe39-qox3cy6OGUQ.png" alt="Baidu, Apple, Mozilla" /></p>
<p>Oracle, Stanford, Mit, Shopify, MongoDb, Berkeley, VmWare, Netflix, Salesforce, Gsa.gov:</p>
<p><img src="https://cdn.codecarrot.net/images/1_mi1gdgVUYRbTBoBuo14gtA.png" alt="Oracle, Stanford, Mit, Shopify, MongoDb, Berkeley, VmWare, Netflix, Salesforce, Gsa.gov" /></p>
<p>LinkedIn, Broad Institute, Palantir, Yahoo, MapBox, Unity3d, Automattic, Sandia, Travis-ci, Spotify:</p>
<p><img src="https://cdn.codecarrot.net/images/1_yQzsoab7AFbQ2BTnPCGbXg.png" alt="LinkedIn, Broad Institute, Palantir, Yahoo, MapBox, Unity3d, Automattic, Sandia, Travis-ci, Spotify" /></p>
<p>Chromium, UMich, Zalando, Esri, IBM (UK), SAP, EPAM, Telerik, UK Cabinet Office, Stripe:</p>
<p><img src="https://cdn.codecarrot.net/images/1_TCbZaq4sgpjFQ9f4yFoWoQ.png" alt="Chromium, UMich, Zalando, Esri, IBM (UK), SAP, EPAM, Telerik, UK Cabinet Office, Stripe" /></p>
<p>Cern, Odoo, Kitware, Suse, Yandex, IBM (Canada), Adobe, AirBnB, Chef, The Guardian:</p>
<p><img src="https://cdn.codecarrot.net/images/1_zXxtygHJUi4tdNr1JRNlyg.png" alt="Cern, Odoo, Kitware, Suse, Yandex, IBM (Canada), Adobe, AirBnB, Chef, The Guardian" /></p>
<p>Arm, Macports, Docker, Nuxeo, NVidia, Yelp, Elastic, NYU, Wso2, Mesosphere, Inria:</p>
<p><img src="https://cdn.codecarrot.net/images/1_f6AK5xHrJIAhEn7t9569lQ.png" alt="Arm, Macports, Docker, Nuxeo, NVidia, Yelp, Elastic, NYU, Wso2, Mesosphere, Inria" /></p>
<p>Puppet, Stanford (CS), DatadogHQ, Epfl, NTT Data, Lawrence Livermore Lab:</p>
<p><img src="https://cdn.codecarrot.net/images/1_RP5nyYdwn2d2pb05xnMxyA.png" alt="Puppet, Stanford (CS), DatadogHQ, Epfl, NTT Data, Lawrence Livermore Lab" /></p>
<h2 id="my-methodology">My Methodology</h2>
<h3 id="how-i-linked-github-users-to-companies">How I linked GitHub users to companies</h3>
<p>Determining the organization to which each GitHub user belongs it’s not easy — but we can use the email domains that show up in each commit message contained on PushEvents:</p>
<ul>
<li>The same email can show up in more than one user, so I only considered GitHub users able to push code to GitHub projects with more than 20 stars during the period.</li>
<li>I only counted GitHub users with more than 3 pushes during the period.</li>
<li>Users pushing code to GitHub can display many different emails on their pushes — part of how Git works. To determine the organization for each user, I looked into the email their pushes shows up most frequently.</li>
<li>Not everyone uses their organization email on GitHub. There are a lot of gmail.com, users.noreply.github.com, and other email hosting providers. Sometimes the reason for this is anonymity and protecting their corporate inboxes — but if I couldn’t see their email domain, I couldn’t count them. Sorry.</li>
<li>Sometimes employees switch organizations. I assigned them to the one that got the more pushes according to these rules.</li>
</ul>
<p><strong>My query</strong></p>
<div class="language-sql highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="o">#</span><span class="n">standardSQL</span>
<span class="k">WITH</span>
<span class="n">period</span> <span class="k">AS</span> <span class="p">(</span>
<span class="k">SELECT</span> <span class="o">*</span>
<span class="k">FROM</span> <span class="nv">`githubarchive.month.2017*`</span> <span class="n">a</span>
<span class="p">),</span>
<span class="n">repo_stars</span> <span class="k">AS</span> <span class="p">(</span>
<span class="k">SELECT</span> <span class="n">repo</span><span class="p">.</span><span class="n">id</span><span class="p">,</span> <span class="k">COUNT</span><span class="p">(</span><span class="k">DISTINCT</span> <span class="n">actor</span><span class="p">.</span><span class="n">login</span><span class="p">)</span> <span class="n">stars</span><span class="p">,</span> <span class="n">APPROX_TOP_COUNT</span><span class="p">(</span><span class="n">repo</span><span class="p">.</span><span class="n">name</span><span class="p">,</span> <span class="mi">1</span><span class="p">)[</span><span class="k">OFFSET</span><span class="p">(</span><span class="mi">0</span><span class="p">)].</span><span class="n">value</span> <span class="n">repo_name</span>
<span class="k">FROM</span> <span class="n">period</span>
<span class="k">WHERE</span> <span class="k">type</span><span class="o">=</span><span class="s1">'WatchEvent'</span>
<span class="k">GROUP</span> <span class="k">BY</span> <span class="mi">1</span>
<span class="k">HAVING</span> <span class="n">stars</span><span class="o">></span><span class="mi">20</span>
<span class="p">),</span>
<span class="n">pushers_guess_emails_and_top_projects</span> <span class="k">AS</span> <span class="p">(</span>
<span class="k">SELECT</span> <span class="o">*</span>
<span class="o">#</span> <span class="p">,</span> <span class="n">REGEXP_EXTRACT</span><span class="p">(</span><span class="n">email</span><span class="p">,</span> <span class="n">r</span><span class="s1">'@(.*)'</span><span class="p">)</span> <span class="k">domain</span>
<span class="p">,</span> <span class="n">REGEXP_REPLACE</span><span class="p">(</span><span class="n">REGEXP_EXTRACT</span><span class="p">(</span><span class="n">email</span><span class="p">,</span> <span class="n">r</span><span class="s1">'@(.*)'</span><span class="p">),</span> <span class="n">r</span><span class="s1">'.*.ibm.com'</span><span class="p">,</span> <span class="s1">'ibm.com'</span><span class="p">)</span> <span class="k">domain</span>
<span class="k">FROM</span> <span class="p">(</span>
<span class="k">SELECT</span> <span class="n">actor</span><span class="p">.</span><span class="n">id</span>
<span class="p">,</span> <span class="n">APPROX_TOP_COUNT</span><span class="p">(</span><span class="n">actor</span><span class="p">.</span><span class="n">login</span><span class="p">,</span><span class="mi">1</span><span class="p">)[</span><span class="k">OFFSET</span><span class="p">(</span><span class="mi">0</span><span class="p">)].</span><span class="n">value</span> <span class="n">login</span>
<span class="p">,</span> <span class="n">APPROX_TOP_COUNT</span><span class="p">(</span><span class="n">JSON_EXTRACT_SCALAR</span><span class="p">(</span><span class="n">payload</span><span class="p">,</span> <span class="s1">'$.commits[0].author.email'</span><span class="p">),</span><span class="mi">1</span><span class="p">)[</span><span class="k">OFFSET</span><span class="p">(</span><span class="mi">0</span><span class="p">)].</span><span class="n">value</span> <span class="n">email</span>
<span class="p">,</span> <span class="k">COUNT</span><span class="p">(</span><span class="o">*</span><span class="p">)</span> <span class="k">c</span>
<span class="p">,</span> <span class="n">ARRAY_AGG</span><span class="p">(</span><span class="k">DISTINCT</span> <span class="n">TO_JSON_STRING</span><span class="p">(</span><span class="n">STRUCT</span><span class="p">(</span><span class="n">b</span><span class="p">.</span><span class="n">repo_name</span><span class="p">,</span><span class="n">stars</span><span class="p">)))</span> <span class="n">repos</span>
<span class="k">FROM</span> <span class="n">period</span> <span class="n">a</span>
<span class="k">JOIN</span> <span class="n">repo_stars</span> <span class="n">b</span>
<span class="k">ON</span> <span class="n">a</span><span class="p">.</span><span class="n">repo</span><span class="p">.</span><span class="n">id</span><span class="o">=</span><span class="n">b</span><span class="p">.</span><span class="n">id</span>
<span class="k">WHERE</span> <span class="k">type</span><span class="o">=</span><span class="s1">'PushEvent'</span>
<span class="k">GROUP</span> <span class="k">BY</span> <span class="mi">1</span>
<span class="k">HAVING</span> <span class="k">c</span><span class="o">></span><span class="mi">3</span>
<span class="p">)</span>
<span class="p">)</span>
<span class="k">SELECT</span> <span class="o">*</span> <span class="k">FROM</span> <span class="p">(</span>
<span class="k">SELECT</span> <span class="k">domain</span>
<span class="p">,</span> <span class="n">githubers</span>
<span class="p">,</span> <span class="p">(</span><span class="k">SELECT</span> <span class="k">COUNT</span><span class="p">(</span><span class="k">DISTINCT</span> <span class="n">repo</span><span class="p">)</span> <span class="k">FROM</span> <span class="k">UNNEST</span><span class="p">(</span><span class="n">repos</span><span class="p">)</span> <span class="n">repo</span><span class="p">)</span> <span class="n">repos_contributed_to</span>
<span class="p">,</span> <span class="n">ARRAY</span><span class="p">(</span>
<span class="k">SELECT</span> <span class="k">AS</span> <span class="n">STRUCT</span> <span class="n">JSON_EXTRACT_SCALAR</span><span class="p">(</span><span class="n">repo</span><span class="p">,</span> <span class="s1">'$.repo_name'</span><span class="p">)</span> <span class="n">repo_name</span>
<span class="p">,</span> <span class="k">CAST</span><span class="p">(</span><span class="n">JSON_EXTRACT_SCALAR</span><span class="p">(</span><span class="n">repo</span><span class="p">,</span> <span class="s1">'$.stars'</span><span class="p">)</span> <span class="k">AS</span> <span class="n">INT64</span><span class="p">)</span> <span class="n">stars</span>
<span class="p">,</span> <span class="k">COUNT</span><span class="p">(</span><span class="o">*</span><span class="p">)</span> <span class="n">githubers_from_domain</span> <span class="k">FROM</span> <span class="k">UNNEST</span><span class="p">(</span><span class="n">repos</span><span class="p">)</span> <span class="n">repo</span>
<span class="k">GROUP</span> <span class="k">BY</span> <span class="mi">1</span><span class="p">,</span> <span class="mi">2</span>
<span class="k">HAVING</span> <span class="n">githubers_from_domain</span><span class="o">></span><span class="mi">1</span>
<span class="k">ORDER</span> <span class="k">BY</span> <span class="n">stars</span> <span class="k">DESC</span> <span class="k">LIMIT</span> <span class="mi">3</span>
<span class="p">)</span> <span class="n">top</span>
<span class="p">,</span> <span class="p">(</span><span class="k">SELECT</span> <span class="k">SUM</span><span class="p">(</span><span class="k">CAST</span><span class="p">(</span><span class="n">JSON_EXTRACT_SCALAR</span><span class="p">(</span><span class="n">repo</span><span class="p">,</span> <span class="s1">'$.stars'</span><span class="p">)</span> <span class="k">AS</span> <span class="n">INT64</span><span class="p">))</span> <span class="k">FROM</span> <span class="p">(</span><span class="k">SELECT</span> <span class="k">DISTINCT</span> <span class="n">repo</span> <span class="k">FROM</span> <span class="k">UNNEST</span><span class="p">(</span><span class="n">repos</span><span class="p">)</span> <span class="n">repo</span><span class="p">))</span> <span class="n">sum_stars_projects_contributed_to</span>
<span class="k">FROM</span> <span class="p">(</span>
<span class="k">SELECT</span> <span class="k">domain</span><span class="p">,</span> <span class="k">COUNT</span><span class="p">(</span><span class="o">*</span><span class="p">)</span> <span class="n">githubers</span><span class="p">,</span> <span class="n">ARRAY_CONCAT_AGG</span><span class="p">(</span><span class="n">ARRAY</span><span class="p">(</span><span class="k">SELECT</span> <span class="o">*</span> <span class="k">FROM</span> <span class="k">UNNEST</span><span class="p">(</span><span class="n">repos</span><span class="p">)</span> <span class="n">repo</span><span class="p">))</span> <span class="n">repos</span>
<span class="k">FROM</span> <span class="n">pushers_guess_emails_and_top_projects</span>
<span class="o">#</span><span class="k">WHERE</span> <span class="k">domain</span> <span class="k">IN</span> <span class="k">UNNEST</span><span class="p">(</span><span class="n">SPLIT</span><span class="p">(</span><span class="s1">'google.com|microsoft.com|amazon.com'</span><span class="p">,</span> <span class="s1">'|'</span><span class="p">))</span>
<span class="k">WHERE</span> <span class="k">domain</span> <span class="k">NOT</span> <span class="k">IN</span> <span class="k">UNNEST</span><span class="p">(</span><span class="n">SPLIT</span><span class="p">(</span><span class="s1">'gmail.com|users.noreply.github.com|qq.com|hotmail.com|163.com|me.com|googlemail.com|outlook.com|yahoo.com|web.de|iki.fi|foxmail.com|yandex.ru'</span><span class="p">,</span> <span class="s1">'|'</span><span class="p">))</span> <span class="o">#</span> <span class="n">email</span> <span class="n">hosters</span>
<span class="k">GROUP</span> <span class="k">BY</span> <span class="mi">1</span>
<span class="k">HAVING</span> <span class="n">githubers</span> <span class="o">></span> <span class="mi">30</span>
<span class="p">)</span>
<span class="k">WHERE</span> <span class="p">(</span><span class="k">SELECT</span> <span class="k">MAX</span><span class="p">(</span><span class="n">githubers_from_domain</span><span class="p">)</span> <span class="k">FROM</span> <span class="p">(</span><span class="k">SELECT</span> <span class="n">repo</span><span class="p">,</span> <span class="k">COUNT</span><span class="p">(</span><span class="o">*</span><span class="p">)</span> <span class="n">githubers_from_domain</span> <span class="k">FROM</span> <span class="k">UNNEST</span><span class="p">(</span><span class="n">repos</span><span class="p">)</span> <span class="n">repo</span> <span class="k">GROUP</span> <span class="k">BY</span> <span class="n">repo</span><span class="p">))</span><span class="o">></span><span class="mi">4</span> <span class="o">#</span> <span class="k">second</span> <span class="n">filter</span> <span class="n">email</span> <span class="n">hosters</span>
<span class="p">)</span>
<span class="k">ORDER</span> <span class="k">BY</span> <span class="n">githubers</span> <span class="k">DESC</span>
</code></pre></div></div>
<h3 id="faq">FAQ</h3>
<p><strong>If an organization has 1,500 repositories, why do you only count 200? If a repository has 7,000 stars, why do you only show 1,500?</strong></p>
<p>I’m filtering for relevancy. I’m only counting stars given during 2017. For example, Apache has >1,500 repositories on GitHub, but only 205 have received more than 20 stars this year.</p>
<p><img src="https://cdn.codecarrot.net/images/1_wf86s1GygY1u283nA6LoYQ.png" alt="How I linked GitHub users to companies" /></p>
<h3 id="is-this-the-state-of-open-source">Is this the state of open source?</h3>
<p>Note that analyzing GitHub doesn’t include top communities like Android, Chromium, GNU, Mozilla, nor the the Apache or Eclipse Foundation, and other projects that choose to run most of their activities outside of GitHub.</p>
<h3 id="you-were-unfair-to-my-organization">You were unfair to my organization.</h3>
<p>I can only count what I can see. Please challenge my assumptions and tell me how you would measure things in a better way. Working queries would be the best way.</p>
<p>For example, see how their ranking changes when I combine IBM’s region-based domains into their top one with one SQL transformation:</p>
<div class="language-sql highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="k">SELECT</span> <span class="o">*</span><span class="p">,</span> <span class="n">REGEXP_REPLACE</span><span class="p">(</span><span class="n">REGEXP_EXTRACT</span><span class="p">(</span><span class="n">email</span><span class="p">,</span> <span class="n">r</span><span class="s1">'@(.*)'</span><span class="p">),</span> <span class="n">r</span><span class="s1">'.*.ibm.com'</span><span class="p">,</span> <span class="s1">'ibm.com'</span><span class="p">)</span> <span class="k">domain</span>
</code></pre></div></div>
<p><img src="https://cdn.codecarrot.net/images/1_sKjuzOO2OYPcKGAzq9jDYw.png" alt="IBM’s relative position moves significantly when you combine their regional email domains." /></p>
<p><img src="https://cdn.codecarrot.net/images/1_ywkHH3kMMVdGhXe6LDq7IA.png" alt="IBM’s relative position moves significantly when you combine their regional email domains." /></p>
<p><em>IBM’s relative position moves significantly when you combine their regional email domains.</em></p>
<p>This blog is originally published by <a href="//medium.freecodecamp.org/@hoffa">Felipe Hoffa</a></p>yashumittal
https://cdn.codecarrot.net/images/1_ywkHH3kMMVdGhXe6LDq7IA.png
How to force HTTPS using .htaccess file in cPanel2017-10-24T21:22:00+00:002017-10-24T21:22:00+00:00https://blog.codecarrot.net/how-to-force-https-using-htaccess-file-in-cpanel<p>Once a SSL certificate is installed and a site can be reached via <strong>https://</strong> appropriately, visitors should be able to access the whole site or key pages via <strong>https://</strong> automatically. In other words, by typing domain.com in a web-browser, a user should be redirected to https://domain.com to access the site securely.</p>
<p>To accomplish this, a special set of directives called rewrite rules needs to be added to the web-site’s <strong>.htaccess file</strong>, which can be found in the root folder of a specific site in cPanel (e.g. “public_html”). If the file is not shown, please make sure to click on ‘Settings’ and tick the option ‘Show hidden files’. Also, this file can be created if it cannot be located in any way.</p>
<h2 id="types-of-redirects">Types of redirects</h2>
<p>When it comes to setting up a rewrite rule, it is useful to know that there is a permanent redirection type and a temporary one. Each type is processed by search engines and web-browsers differently and has its own status code, which can be specified in a rewrite rule explicitly:</p>
<h3 id="status-code-301-permanent-redirect">Status code 301 (permanent redirect)</h3>
<p><strong>Status code 301 (permanent redirect)</strong> implies that the requested resource has moved to a new location permanently, thus search engines should not take into account the references to a previous location and index a new one. Web-browsers, in turn, will store a new URL in cache, therefore, giving it priority over the initial URL.</p>
<p><img src="https://cdn.codecarrot.net/images/force_https1.png" alt="Status code 301" /></p>
<h3 id="status-code-302-temporary-redirect">Status code 302 (temporary redirect)</h3>
<p><strong>Status code 302 (temporary redirect)</strong> means that the redirect has been set for a limited period of time. Search engines in this case should honor both locations as equal and the initial one would remain valid. Accordingly, browsers will not cache the new URL and the redirection will be executed every time the initial URL is requested.</p>
<p><img src="https://cdn.codecarrot.net/images/force_https2.png" alt="Status code 302" /></p>
<p><strong>NOTE:</strong> Enabling a 302 redirect for a long period of time can significantly decrease a website’s ranking in search results. In terms of HTTP-HTTPS redirect, all site requests are split between http://domain.com and https://domain.com, since both are indexed by search engines separately. Therefore, in most cases a 301 status code is preferable for HTTP-HTTPS redirects.</p>
<p>We will describe exactly where a status code needs to be specified in the next section.</p>
<p><strong>Setting a rewrite rule in .htaccess: use cases</strong></p>
<p><strong>NOTE:</strong> The directives specified below work under their own syntax. Changing any symbol or character can lead to improper function or failure of the rewrite rule. To keep things clear, we have highlighted those parts, which can be modified, with bold weight (mostly where a certain domain name should be placed).</p>
<p>Let’s take an overview of the most common situations in which a redirection from HTTP to HTTPS can be configured.</p>
<p><strong>Enabling redirect for all sites in a cPanel account</strong></p>
<p>To redirect all sites within a cPanel account, one of the following blocks should be added to .htaccess:</p>
<div class="highlighter-rouge"><div class="highlight"><pre class="highlight"><code>a. RewriteEngine On
RewriteCond %{HTTPS} !=on
RewriteRule ^/?(.*) https://%{SERVER_NAME}/$1 [R,L]
</code></pre></div></div>
<p>This block enables rewriting capabilities, verifies that the initial request does not already have https://, and rewrites the entire requested URL, replacing http:// with https:// (<strong>e.g.</strong>, http://domain.com/subfolder/index.php will be replaced with https://domain.com/subfolder/index.php).</p>
<div class="highlighter-rouge"><div class="highlight"><pre class="highlight"><code>b. RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [R,L]
</code></pre></div></div>
<p>This block works the same as the previous one, just with the help of a different syntax. It is possible to use either of the above mentioned rewrite rules in order to redirect all sites within a cPanel account.</p>
<p><strong>Forcing HTTPS for a specific site</strong></p>
<p>To enable a redirect for a single site, one can specify any of the blocks listed below in .htaccess:</p>
<p><img src="https://cdn.codecarrot.net/images/enable-https-using-code-in-htaccess.png" alt="Enable https using code in .htaccess" /></p>
<p>Generally, all of the rule sets above do the same job: checking the port (80 for http, 443 for https), verifying whether a domain name in the initial request is with or without “www.” alias, and rewriting the URL with https://. You may choose which one to implement based on your individual preference.</p>
<p><strong>Disabling rewrite rule application for a specific site</strong></p>
<p>If you need to setup a redirect for all sites within Cpanel account except of one or a few, the block of code specified below can be added to .htaccess:</p>
<p><img src="https://cdn.codecarrot.net/images/disabling-rewrite-rule-application-for-a-specific-site.png" alt="Disabling rewrite rule application for a specific site" /></p>
<p>The first condition in the block matches the requested URL against the domain name, included to conditional value (the one that should NOT be redirected), and stops rewriting if they match. It is possible to add domain names to the conditional directive, separating them with the <code class="highlighter-rouge">”|”</code> symbol, or to specify several conditional directives, (see examples in previous section).</p>
<p><strong>Enabling HTTPS for a specific subfolder</strong></p>
<p>Sometimes you may need to redirect a certain part of a website located in a specific subfolder, while leaving the rest of the site as-is. To do this, insert the following block to .htaccess:</p>
<p><img src="https://cdn.codecarrot.net/images/enabling-https-for-a-specific-subfolder.png" alt="Enabling HTTPS for a specific subfolder" /></p>
<p>This rule is applied if only a specified subfolder is mentioned in the initial request.</p>
<p><strong>Forcing HTTPS for a specific page</strong></p>
<p>The rewrite rule for redirecting a specific page is similar to the previous one:</p>
<p><img src="https://cdn.codecarrot.net/images/forcing-https-for-a-specific-page.png" alt="Forcing HTTPS for a specific page" /></p>
<p>Only the requested page will be redirected; other site content will remain unaffected.</p>
<p>If the page that needs to be redirected is located in a specific subfolder, the RewriteRule line should be modified as follows:</p>
<p><img src="https://cdn.codecarrot.net/images/forcing-https-for-a-specific-page2.png" alt="Forcing HTTPS for a specific page 2" /></p>
<p>(in the above example, “test” is the subfolder in question)</p>
<p><strong>Setting up redirect for a specific file name, regardless of location</strong></p>
<p>If you have a number of pages with the same name, located in different subfolders (the example “index.html” is used below), you may enable HTTPS redirect for all of them at once. Do this by applying the ruleset as shown below:</p>
<p><img src="https://cdn.codecarrot.net/images/setting-up-redirect-for-a-specific-file-name-regardless-of-location.png" alt="Setting up redirect for a specific file name, regardless of location" /></p>
<p>Only the pages with the file names that match the {REQUEST_FILENAME} parameter value will be redirected to HTTPS.</p>
<p><strong>How to specify a redirect status code in rewrite rule</strong></p>
<p>Each rewrite rule ends with so-called “rewrite flag”s (specified in square brackets, e.g. [R,L]). These flags help to control the rewriting process to be performed correctly. To set a redirect with a 301 status code (permanent), you will need to assign this code to the R-flag in brackets by adding “=301”.</p>
<p><img src="https://cdn.codecarrot.net/images/force_https3.png" alt="How to specify a redirect status code in rewrite rule" /></p>
<p><strong>NOTE:</strong> If there is no value specified for the R-flag, a redirection will be executed with a 302 status code by default.</p>yashumittalOnce a SSL certificate is installed and a site can be reached via https:// appropriately, visitors should be able to access the whole site or key pages via https:// automatically. In other words, by typing domain.com in a web-browser, a user should be redirected to https://domain.com to access the site securely.
https://cdn.codecarrot.net/images/https-lock.png
Sass control directives - @if, @for, @each and @while2017-10-23T20:40:00+00:002017-10-23T20:40:00+00:00https://blog.codecarrot.net/sass-control-directives-if-for-each-while<p><a href="//sass-lang.com/docs/yardoc/file.SASS_REFERENCE.html#control_directives">Sass control directives</a> are the cornerstone of creating libraries for reuse and distribution, and need to be among the very first items on your list of things to learn when taking your Sass skills to the next level.</p>
<h2 id="if">@if</h2>
<p>The <code class="highlighter-rouge">@if</code> control directive takes a <a href="//sass-lang.com/docs/yardoc/file.SASS_REFERENCE.html#sassscript">SassScript</a> expression and processes its block of styles if the expression returns anything other than <code class="highlighter-rouge">false</code>.</p>
<p>Here’s a fairly simple example of an <code class="highlighter-rouge">@if</code> control directive. I’ve simplified this example to be more readable, rather than usable.</p>
<div class="language-sass highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="c1">// Set a variable to run the if statement against</span>
<span class="nv">$boolean</span><span class="p">:</span> <span class="bp">true</span> <span class="o">!</span><span class="nb">default</span>
<span class="nf">=simple-mixin</span>
<span class="k">@if</span> <span class="nv">$boolean</span>
<span class="k">@debug</span> <span class="s2">"$boolean is </span><span class="si">#{</span><span class="nv">$boolean</span><span class="si">}</span><span class="s2">"</span>
<span class="nl">display</span><span class="p">:</span> <span class="nb">block</span>
<span class="k">@else</span>
<span class="k">@debug</span> <span class="s2">"$boolean is </span><span class="si">#{</span><span class="nv">$boolean</span><span class="si">}</span><span class="s2">"</span>
<span class="nl">display</span><span class="p">:</span> <span class="nb">none</span>
<span class="nc">.some-selector</span>
<span class="nd">+simple-mixin</span>
</code></pre></div></div>
<p>Which emits this CSS:</p>
<div class="language-css highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="nc">.some-selector</span> <span class="p">{</span>
<span class="nl">display</span><span class="p">:</span> <span class="nb">block</span><span class="p">;</span>
<span class="p">}</span>
</code></pre></div></div>
<p>Also notice that I’ve added <code class="highlighter-rouge">@debug</code> followed by a string in each flow option. This isn’t core to this guide, but I’ve added this to show you how you can output a message to the command-line output log to let users know about certain events such as a <a href="//sass-lang.com/docs/yardoc/file.SASS_REFERENCE.html#id9">@warn</a> or a <a href="//sass-lang.com/docs/yardoc/file.SASS_REFERENCE.html#id8">@debug</a> as your code gets executed. For complex mixins and functions, this could come in handy to provide a better user experience and make it easier to spot and track down issues.</p>
<p>For example, if you ran this code this is what you would see in the command-line output.</p>
<div class="highlighter-rouge"><div class="highlight"><pre class="highlight"><code>/Users/.../screen.sass:8 DEBUG: $boolean is true
</code></pre></div></div>
<h2 id="for">@for</h2>
<p>The <code class="highlighter-rouge">@for</code> directive comes in two forms.</p>
<p>The first option is <code class="highlighter-rouge">@for $var from <start> through <end></code> which starts at <code class="highlighter-rouge"><start></code> and loops “through” each iteration and ends at <end>. Pretty straight forward.</end></p>
<p>The second option is <code class="highlighter-rouge">@for $var from <start> to <end></code> which starts at <code class="highlighter-rouge"><start></code> and loops through each iteration “to” <code class="highlighter-rouge"><end></code> and stops. Once the directive hits the <code class="highlighter-rouge"><end></code> it stops the looping process and does not evaluate the loop that one last time. Using the values mentioned in the example below, it’s like saying “go from 1 to 4 and then stop”.</p>
<p>In either case, the <code class="highlighter-rouge">$var</code> can be any variable name. Because this directive is often used to increment <code class="highlighter-rouge">$i</code> is often the name you will see as the <code class="highlighter-rouge">$var</code>.</p>
<p>Here’s a fairly simple example of a <code class="highlighter-rouge">@for</code> control directive.</p>
<div class="language-sass highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="nv">$class-slug</span><span class="p">:</span> <span class="n">for</span> <span class="o">!</span><span class="nb">default</span>
<span class="k">@for</span> <span class="nv">$i</span> <span class="ow">from</span> <span class="m">1</span> <span class="ow">through</span> <span class="m">4</span>
<span class="nc">.</span><span class="si">#{</span><span class="nv">$class-slug</span><span class="si">}</span><span class="nc">-</span><span class="si">#{</span><span class="nv">$i</span><span class="si">}</span>
<span class="nl">width</span><span class="p">:</span> <span class="m">60px</span> <span class="o">+</span> <span class="nv">$i</span>
</code></pre></div></div>
<p>Which emits this CSS:</p>
<div class="language-css highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="nc">.for-1</span> <span class="p">{</span>
<span class="nl">width</span><span class="p">:</span> <span class="m">61px</span><span class="p">;</span>
<span class="p">}</span>
<span class="nc">.for-2</span> <span class="p">{</span>
<span class="nl">width</span><span class="p">:</span> <span class="m">62px</span><span class="p">;</span>
<span class="p">}</span>
<span class="nc">.for-3</span> <span class="p">{</span>
<span class="nl">width</span><span class="p">:</span> <span class="m">63px</span><span class="p">;</span>
<span class="p">}</span>
<span class="nc">.for-4</span> <span class="p">{</span>
<span class="nl">width</span><span class="p">:</span> <span class="m">64px</span><span class="p">;</span>
<span class="p">}</span>
</code></pre></div></div>
<p>Here’s a sample of the code you’ll see in that file.</p>
<div class="language-sass highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="c1">// Loops to enumerate the classes</span>
<span class="c1">// Yep, this saves us tons of typing (if this were CSS)</span>
<span class="k">@for</span> <span class="nv">$i</span> <span class="ow">from</span> <span class="m">1</span> <span class="ow">through</span> <span class="nv">$grid-columns</span> <span class="err">{</span>
<span class="nc">.grid-</span><span class="si">#{</span><span class="nv">$i</span><span class="si">}</span> <span class="err">{</span> <span class="o">@</span><span class="nt">include</span> <span class="nt">grid-base</span><span class="o">(</span><span class="err">$</span><span class="nt">i</span><span class="o">);</span> <span class="o">@</span><span class="nt">extend</span> <span class="nc">.grid-block</span><span class="o">;</span> <span class="err">}</span>
<span class="err">}</span>
<span class="k">@for</span> <span class="nv">$i</span> <span class="ow">from</span> <span class="m">1</span> <span class="ow">to</span> <span class="nv">$grid-columns</span> <span class="err">{</span>
<span class="nc">.grid-prefix-</span><span class="si">#{</span><span class="nv">$i</span><span class="si">}</span> <span class="err">{</span> <span class="o">@</span><span class="nt">include</span> <span class="nt">grid-prefix</span><span class="o">(</span><span class="err">$</span><span class="nt">i</span><span class="o">);</span> <span class="err">}</span>
<span class="err">}</span>
<span class="k">@for</span> <span class="nv">$i</span> <span class="ow">from</span> <span class="m">1</span> <span class="ow">to</span> <span class="nv">$grid-columns</span> <span class="err">{</span>
<span class="nc">.grid-suffix-</span><span class="si">#{</span><span class="nv">$i</span><span class="si">}</span> <span class="err">{</span> <span class="o">@</span><span class="nt">include</span> <span class="nt">grid-suffix</span><span class="o">(</span><span class="err">$</span><span class="nt">i</span><span class="o">);</span> <span class="err">}</span>
<span class="err">}</span>
<span class="k">@for</span> <span class="nv">$i</span> <span class="ow">from</span> <span class="m">1</span> <span class="ow">to</span> <span class="nv">$grid-columns</span> <span class="err">{</span>
<span class="nc">.grid-push-</span><span class="si">#{</span><span class="nv">$i</span><span class="si">}</span> <span class="err">{</span> <span class="o">@</span><span class="nt">include</span> <span class="nt">grid-push</span><span class="o">(</span><span class="err">$</span><span class="nt">i</span><span class="o">);</span> <span class="err">}</span>
<span class="err">}</span>
<span class="k">@for</span> <span class="nv">$i</span> <span class="ow">from</span> <span class="m">1</span> <span class="ow">to</span> <span class="nv">$grid-columns</span> <span class="err">{</span>
<span class="nc">.grid-pull-</span><span class="si">#{</span><span class="nv">$i</span><span class="si">}</span> <span class="err">{</span> <span class="o">@</span><span class="nt">include</span> <span class="nt">grid-pull</span><span class="o">(</span><span class="err">$</span><span class="nt">i</span><span class="o">);</span> <span class="err">}</span>
<span class="err">}</span>
</code></pre></div></div>
<h2 id="each">@each</h2>
<p>The @each directive takes the form <code class="highlighter-rouge">@each $var in <list></code>. If you haven’t played with lists yet, get ready because this has just turned into a 2 in 1 lesson.</p>
<p>As you can see in the example below, <code class="highlighter-rouge">$var</code> can be any variable name, and <code class="highlighter-rouge"><list></code> is a SassScript expression that returns a list. When processed, <code class="highlighter-rouge">$var</code> is set to each item in the list, and processes its block of styles using that value of <code class="highlighter-rouge">$var</code>.</p>
<p>Here’s a fairly simple example of an <code class="highlighter-rouge">@each</code> control directive.</p>
<div class="language-sass highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="nv">$list</span><span class="p">:</span> <span class="n">adam</span> <span class="n">john</span> <span class="n">wynn</span> <span class="n">mason</span> <span class="n">kuroir</span>
<span class="nf">=author-images</span>
<span class="k">@each</span> <span class="nv">$author</span> <span class="n">in</span> <span class="nv">$list</span>
<span class="nc">.photo-</span><span class="si">#{</span><span class="nv">$author</span><span class="si">}</span>
<span class="nl">background</span><span class="p">:</span> <span class="nf">image-url</span><span class="p">(</span><span class="s2">"avatars/</span><span class="si">#{</span><span class="nv">$author</span><span class="si">}</span><span class="s2">.png"</span><span class="p">)</span> <span class="nb">no-repeat</span>
<span class="nc">.author-bio</span>
<span class="nd">+author-images</span>
</code></pre></div></div>
<p>Which emits this CSS:</p>
<div class="language-css highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="nc">.author-bio</span> <span class="nc">.photo-adam</span> <span class="p">{</span>
<span class="nl">background</span><span class="p">:</span> <span class="sx">url('/images/avatars/adam.png')</span> <span class="nb">no-repeat</span><span class="p">;</span>
<span class="p">}</span>
<span class="nc">.author-bio</span> <span class="nc">.photo-john</span> <span class="p">{</span>
<span class="nl">background</span><span class="p">:</span> <span class="sx">url('/images/avatars/john.png')</span> <span class="nb">no-repeat</span><span class="p">;</span>
<span class="p">}</span>
<span class="nc">.author-bio</span> <span class="nc">.photo-wynn</span> <span class="p">{</span>
<span class="nl">background</span><span class="p">:</span> <span class="sx">url('/images/avatars/wynn.png')</span> <span class="nb">no-repeat</span><span class="p">;</span>
<span class="p">}</span>
<span class="nc">.author-bio</span> <span class="nc">.photo-mason</span> <span class="p">{</span>
<span class="nl">background</span><span class="p">:</span> <span class="sx">url('/images/avatars/mason.png')</span> <span class="nb">no-repeat</span><span class="p">;</span>
<span class="p">}</span>
<span class="nc">.author-bio</span> <span class="nc">.photo-kuroir</span> <span class="p">{</span>
<span class="nl">background</span><span class="p">:</span> <span class="sx">url('/images/avatars/kuroir.png')</span> <span class="nb">no-repeat</span><span class="p">;</span>
<span class="p">}</span>
</code></pre></div></div>
<h2 id="while">@while</h2>
<p>The <code class="highlighter-rouge">@while</code> directive takes a SassScript expression (just like the other control directives) and repeatedly emits the nested block of styles until the statement evaluates to <code class="highlighter-rouge">false</code>. Much like the <code class="highlighter-rouge">@for</code> control directive, you are able to create very complex looping statements “while” a specific condition evaluates to true.</p>
<p>Here’s a fairly simple example of a <code class="highlighter-rouge">@while</code> control directive.</p>
<div class="language-sass highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="nv">$types</span><span class="p">:</span> <span class="m">4</span>
<span class="nv">$type-width</span><span class="p">:</span> <span class="m">20px</span>
<span class="k">@while</span> <span class="nv">$types</span> <span class="o">></span> <span class="m">0</span>
<span class="nc">.while-</span><span class="si">#{</span><span class="nv">$types</span><span class="si">}</span>
<span class="nl">width</span><span class="p">:</span> <span class="nv">$type-width</span> <span class="o">+</span> <span class="nv">$types</span>
<span class="nv">$types</span><span class="p">:</span> <span class="nv">$types</span> <span class="o">-</span> <span class="m">1</span>
</code></pre></div></div>
<p>Which emits this CSS:</p>
<div class="language-css highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="nc">.while-4</span> <span class="p">{</span>
<span class="nl">width</span><span class="p">:</span> <span class="m">24px</span><span class="p">;</span>
<span class="p">}</span>
<span class="nc">.while-3</span> <span class="p">{</span>
<span class="nl">width</span><span class="p">:</span> <span class="m">23px</span><span class="p">;</span>
<span class="p">}</span>
<span class="nc">.while-2</span> <span class="p">{</span>
<span class="nl">width</span><span class="p">:</span> <span class="m">22px</span><span class="p">;</span>
<span class="p">}</span>
<span class="nc">.while-1</span> <span class="p">{</span>
<span class="nl">width</span><span class="p">:</span> <span class="m">21px</span><span class="p">;</span>
<span class="p">}</span>
</code></pre></div></div>
<h2 id="conclusion">Conclusion</h2>
<p>As you can see, Sass control directives will super-charge your mixins and functions to give you all the tools you need to make decisions, loop through and to, and provide the flow and control required to create awesome libraries.</p>yashumittalSass control directives are the cornerstone of creating libraries for reuse and distribution, and need to be among the very first items on your list of things to learn when taking your Sass skills to the next level.
https://cdn.codecarrot.net/images/1-LbKGyabNR-rvnzPg.png
The Ultimate Guide to Guest Blogging2017-10-22T19:00:00+00:002017-10-22T19:00:00+00:00https://blog.codecarrot.net/the-ultimate-guide-to-guest-blogging<p>We are going to look at exactly how you can get guest blogging opportunities and make the most out of them.</p>
<h2 id="determine-your-guest-blogging-goals">Determine Your Guest Blogging Goals</h2>
<p>Before we begin, your first task is to decide what your goal for guest blogging is. Knowing this goal ahead of time is key in determining the right kind of blogs to submit guest posts to. Typically there are three main goals for guest blogging.</p>
<ol>
<li>Positioning yourself as an authority and well-known name in the industry.</li>
<li>Getting exposure (traffic) back to your website.</li>
<li>Building backlinks to your website.</li>
</ol>
<p>With the right kind of content on the top blogs, you can do all three of these things. If you are trying to accomplish either #1 or #2, then you will want to find blogs that have a good sized and engaged audience. If you are just trying to accomplish #3, then you need to pinpoint blogs with strong root domain authority. You can check this for free using the SEOmoz toolbar. Knowing your goals in advance will help you in determining which blogs will be the best for you to submit guest posts to.</p>
<h2 id="how-to-find-guest-blogging-opportunities">How to Find Guest Blogging Opportunities</h2>
<p>The first thing you will want to do is find guest post opportunities. When looking for places to guest post, your main goal is to find sites relevant to your niche or industry. You are looking for blogs that fit the following criteria:</p>
<ul>
<li>The content is focused on your niche / industry.</li>
<li>The audience of the blog will be interested in your industry.</li>
<li>The blog has engaged readership (posts have been shared socially and commented upon).</li>
<li>The blog owner is active on social media (so you know that they will be promoting your work on their site).</li>
</ul>
<p>So if you are selling seeds, you will want to find gardening blogs with an engaged audience of gardeners. The following should help you find the right kind of guest post opportunities.</p>
<h3 id="google-searches">Google Searches</h3>
<p>Google is a great place to start in the search for guest posting opportunities. You can use any of the following keyword searches to find blogs that accept guest posts. Just replace keyword with keywords from your industry.</p>
<ul>
<li><em>keyword “submit a guest post”</em></li>
<li><em>keyword “guest post”</em></li>
<li><em>keyword “guest post by”</em></li>
<li><em>keyword “accepting guest posts”</em></li>
<li><em>keyword “guest post guidelines”</em></li>
</ul>
<p>These searches should lead you to a blog’s guest post guidelines page, guest post submission page, or actual guest posts by other writers.</p>
<h3 id="prolific-guest-bloggers">Prolific Guest Bloggers</h3>
<p>Know of any prolific guest bloggers in your industry? If you read enough blogs in your industry (which you should), these will be the names you see over and over writing content for others. For online marketers, that list includes Gregory Ciotti, Danny Iny, Leo Widrich, Neil Patel, Marcus Sheridan, and many others. Using Google search, search for the name of prolific guest bloggers in your industry plus the phrase “guest post by”. This will reveal all of the sites that these guest bloggers have posted upon. They should be good places for you to guest post upon as well. A bonus would be if you actually know a guest blogger in your industry that can make an introduction for you to the owners of blogs they have guest posted upon.</p>
<h3 id="competitor-backlinks">Competitor Backlinks</h3>
<p>If you (or your online marketing agency) has ever pulled up a backlink analysis of a competitor while working on your SEO campaign, chances are one or more of your competitors have backlinks from guest posts they have done. If you have access to tools like Open Site Explorer, you can look at the backlinks of your competitors and spot any blogs they have written for. If you don’t, you can do a Google search for link:domain.com -domain.com “guest post” (replacing domain.com with your competitor’s domain) which should reveal sites that a competitor has written for.</p>
<h3 id="social-searches">Social Searches</h3>
<p>A lot of bloggers and guest posters will share their latest guest posts on social networks. Since the easiest one to search is Twitter, you should try running a Twitter search for keyword “guest post” to get the latest tweets about guest posts in your industry. Just follow the links to see which blogs are accepting the guest posts.</p>
<h3 id="600-guest-blogging-opportunities">600+ Guest Blogging Opportunities</h3>
<p>Need more keyword search ideas or a just a list with lots of different guest posting opportunities? Check out this post on Buzz Blogger with 500 places to syndicate content and this one by Brian Keith May with 100 sites to submit guest posts.</p>
<h3 id="myblogguest">MyBlogGuest</h3>
<p>Last, but definitely not least, is My Blog Guest, a community of guest bloggers. Sign up for free and search for blogs which are accepting guest posts. Better yet, post your own information to say that you are looking to write guest posts on a particular topic so blog owners can find you!</p>
<h2 id="preparing-to-pitch-a-guest-post">Preparing to Pitch a Guest Post</h2>
<p>Notice that we don’t just jump from finding guest blogging opportunities to contacting the blogs. That’s because there are a few things you need to do before you propose a guest post for a site you’ve just found.</p>
<h3 id="get-to-know-the-blogs-content">Get to Know the Blog’s Content</h3>
<p>Getting to know your target blog’s content is key. Sure you know they have content about the keyword you searched for while looking for guest post opportunities. But you need to know even more about that content such as…</p>
<ul>
<li>What level of audience are they writing for (beginners, intermediate, advanced)?</li>
<li>What type of audience are they writing for? If your business is B2B, then you will want the blog audience for your guest post to be businesses, not general consumers.</li>
<li>What type of content do they write? Is it mostly general concepts or specific, detailed tutorials? Do they like lists?</li>
</ul>
<h3 id="see-how-other-guest-posts-do">See How Other Guest Posts Do</h3>
<p>While a blog may have guest posts, the question is do the guest bloggers do well? Do guest blog posts on the site get as much comments and social sharing as blog posts by the owner? Some sites might accept guest posts, but if the audience is only tuning in for the blog owner, then you won’t do so well if your goal is to build authority or get traffic back to your website.</p>
<h3 id="see-who-the-guest-bloggers-are">See Who the Guest Bloggers Are</h3>
<p>Some blog owners are more likely to accept guest posts by certain types of people over others. Peruse a few guest blogger bios on the blog to see if they are fellow bloggers, freelancers, consultants, business owners, and so forth. This will be important when you introduce yourself to the blog owner for your pitch. You can read more about the success rates of guest posting outreach in this study on SEOmoz.</p>
<h3 id="find-out-what-posts-do-the-best">Find Out What Posts Do the Best</h3>
<p>To ensure that your guest post gets accepted, you will want to pitch the blog owner with topics that will do well with their audience. To get some good ideas of topics that will work with the blog’s audience, use the following sites to see what posts have been popular on social media. Just replace domain.com with the blog’s domain.</p>
<ul>
<li>https://topsy.com/s?q=domain.com – This will show you the number of times blog posts have been tweeted. Click on the number if you want to see who has tweeted the post and learn more about the blog’s audience.</li>
<li>https://plus.topsy.com/s/domain.com – This will show you the number of times blog posts have been shared on Google+. Chances are, blog posts that have been shared on Google+ a lot will also have a lot of +1’s which might mean better search visibility.</li>
<li>https://delicious.com/search?p=domain.com&jtf=E&partial_type=B – This will show you the number of times blog posts have been saved on Delicious.</li>
<li>https://digg.com/search?q=site:domain.com – This will show you the posts on a blog that have received the most amount of Digg votes.</li>
</ul>
<h3 id="become-a-familiar-face-in-the-blog-community">Become a Familiar Face in the Blog Community</h3>
<p>To increase your chances of getting accepted as a guest blogger, you will want to get some recognition from the blog owner first. The best way to do this is to take a week or two and comment on their latest posts. You’ll get bonus points for sharing those posts on Twitter too – just be sure to include the blog owner’s <a href="https://www.twitter.com/codecarrotnet">@username</a> on Twitter. This way, when you pitch your guest post, you won’t be a complete stranger.</p>
<p>The Best Times to Pitch a Guest Post
You won’t always have a golden opportunity to pitch a guest post, but there are certain things to take advantage of when they arise. These include the following.</p>
<p>When blog mentions you in one of their posts or on social media (Twitter, Facebook, Google+, etc.).
When the blog lists you, your business, or your product in one of their posts.
When the blog specifically advertises they are looking for guest posts.
When the blog publishes another guest post.</p>
<h2 id="basic-pitch-best-practices">Basic Pitch Best Practices</h2>
<p>The following are absolute musts when pitching a guest blog post to another blog owner.</p>
<h3 id="read-the-guidelines">Read the Guidelines</h3>
<p>The last thing you need to do before contacting the blog owner is read the guest posting guidelines, if applicable, and follow them closely. Does the blog owner want you to pitch an idea or actually submit a full post? What format do they want it in? Do they want you to create an account and enter it into WordPress? These are all things to know ahead of time before you contact the blog owner.</p>
<h3 id="personalize-your-email">Personalize Your Email</h3>
<p>As a blogger who receives daily guest post pitches, nothing turns me off of an email more than ones starting with Dear Sir or Madam, Dear Webmaster, To the owner of Kikolani.com, or simply Hi. Somewhere on the blog you are about to contact will be the name of the blog owner. You might have to ferret around for it on the about page or on one of the blog’s social media accounts, but it is more than likely out there. Find it, and use it to start the email.</p>
<h3 id="who-are-you">Who Are You</h3>
<p>Remember the part about seeing who guest bloggers are on your target blog? Some blog owners are particular about only allowing other bloggers to submit guest posts on their sites. If you noticed that most guest bloggers are bloggers themselves, then you might want to introduce yourself as a blogger at (insert your personal or business blog here). You can always be a business owner on the side – just focus on your blogging skills first.</p>
<h3 id="why-you-should-be-a-guest-blogger">Why You Should Be a Guest Blogger</h3>
<p>Be sure to include why you should be a guest blogger. Add a few links to posts you have published elsewhere, including your own blog. Preferably go with posts that have a good bit of social engagement so the blog owner will see your potential value with their audience.</p>
<h2 id="how-to-pitch-a-guest-post-idea">How to Pitch a Guest Post Idea</h2>
<p>If the guest post guidelines ask you to submit a topic idea, then (based on your research of previously popular posts), pitch a few different ideas so the blog owner has some to choose from.</p>
<h2 id="how-to-submit-a-great-guest-post">How to Submit a Great Guest Post</h2>
<p>One of the common questions about guest blogging is whether you should be using your best content for your own blog or for your guest posting. It really depends on the quality of the blog you are submitting your content to. If the blog has nothing but 900+ word posts with lots of screenshots, then your post should be similar. If the blog has nothing but posts with 500 words or less with only one image, then your posts (again) should be similar. The following are other good tips for making your guest post as awesome as possible.</p>
<h3 id="its-not-about-you">It’s Not About You</h3>
<p>The first thing to remember about a great guest post is that it is not about your business, your products, or your services. Guest posts should be valuable sources of information – not advertisements! Any information about your business and related items should be reserved for the author bio. Occasional mentions, stories, or examples are OK to illustrate a point, but the majority of the post should be focused on something other than your business.</p>
<h3 id="format-posts-like-the-ones-on-the-site">Format Posts Like the Ones on the Site</h3>
<p>Take a look at posts on your target blog. Do they use lots of headers, bolded text, images, quotes, or other special formatting? Make sure that your post has similar elements to match other posts on the site.</p>
<h3 id="include-internal-and-source-links">Include Internal and Source Links</h3>
<p>Show the blog owner that you know their content by including a few internal links back to some of their posts. The easiest way to do this is to do a Google search for site:domain.com intitle:keyword. This will get you their top posts on a particular keyword so you can link that post to the keyword in your post. Also, if you mention any specific products, books, etc., be sure to link to those too (assuming it’s not self-promotional).</p>
<h3 id="include-a-call-to-action-for-comments">Include a Call to Action for Comments</h3>
<p>At the end of your amazing guest post, be sure to include a call to action for comments. The more discussion your post generates, the better!</p>
<h2 id="how-to-craft-a-great-guest-bio">How to Craft a Great Guest Bio</h2>
<p>The most important part of guest blogging (for you) will likely be your guest post bio. This is usually the only place you should include self-promotion links back to your website, blog, product, service, book, etc. What you write in this section will depend on your guest blogging goals.</p>
<ul>
<li>If your goal is to get good backlinks, just make sure your bio includes a link back to your website with your target anchor text and you are all set.</li>
<li>If your goal is to get traffic back to your website, then you might want to consider where you want that traffic to go. Depending on the subject of your guest post and the audience of the blog you place it upon, you might want to send traffic to a custom landing page or page about a specific product / service.</li>
<li>If your goal is to increase followers to your social accounts, do this by adding a line to the end of your bio that says “Follow me on (insert your top social network and link here).”</li>
</ul>
<h2 id="how-to-be-the-best-guest-blogger">How to Be the Best Guest Blogger</h2>
<p>If you’re aiming to become a regular contributor to a blog, or simply want the blog owner to brag about what a great guest blogger you are, then be sure to do your best to promote your post to popularity through your own audience. The blog owner will love it if you send new readers their way. Also, be sure to reply to your comments. That will go a long way if you are working to build authority in your industry.</p>
<h2 id="tracking-your-results">Tracking Your Results</h2>
<p>When the goal is traffic, the results of your guest blogging should definitely be measured. The best way to do this is to create an Advanced Segment in Google Analytics. You can learn how to set up an Advanced Segment in this post on how to find out which online marketing strategy drives the best traffic. All you need is one segment using the source dimension with multiple statements for each domain that you have guest blogged for – you can have up to 20 or statements per Advanced Segment.</p>
<p>Using this, you can view all of your Google Analytics data based on referrals from your guest posts. This can help you determine the success of your overall guest blogging strategy in terms of getting traffic and making conversions. If you’re not sure how to track conversions, see this post on getting actionable data to learn how to set up goals.</p>
<h2 id="how-to-get-guest-bloggers-for-your-blog">How to Get Guest Bloggers for Your Blog</h2>
<p>Finally, don’t forget that guest blogging can be a two way street. It’s tough to maintain your own blog content while guest posting on a lot of other blogs. So be sure to open an invitation for guest bloggers to write on your own blog. This way, you can keep fresh content on your own blog, add a new perspective for your audience, and hopefully get new readers from your guest blogger’s community. It’s a win-win situation!</p>
<p><em>Do you use guest blogging as part of your online marketing strategy? What other things would you suggest for a business looking to increase their guest blogging success?</em></p>yashumittalWe are going to look at exactly how you can get guest blogging opportunities and make the most out of them.
https://i.imgur.com/hni9dWR.jpg
7 Reasons Why List Posts Will Always Work2017-10-22T18:40:00+00:002017-10-22T18:40:00+00:00https://blog.codecarrot.net/7-reasons-why-list-posts-will-always-work<p>It’s a blogosphere favorite for good reason — “list” content works, in large part due to the attention-grabbing power of the headline.</p>
<p>What may be news to some bloggers is that the effectiveness of this type of headline and content is as old as the advertising hills. So you shouldn’t worry about it dying out anytime soon.</p>
<p>Any headline that lists a number of reasons, secrets, types, or ways will work because, once again, it makes a very specific promise of what’s in store for the reader. A nice quantifiable return on attention invested goes a long way toward prompting action, and as long as you deliver with quality content, you’ll have a satisfied reader.</p>
<p>Plus, these type of posts and articles are perfect for building your authority and demonstrating a mastery of your area of expertise. If you’re business blogging, that’s key.</p>
<p>With that in mind, let’s take a quick look at 7 classic “list” headlines that you can remix on your blog when you’re looking to boost readership (and maybe even get a little link love).</p>
<h2 id="1-do-you-recognize-the-7-early-warning-signs-of-high-blood-pressure">1. Do You Recognize the 7 Early Warning Signs of High Blood Pressure?</h2>
<p>Use this type of headline to demonstrate the expertise that only comes from really knowing your business or niche. People love to get a “heads up” on potential problems.</p>
<h2 id="2-10-ways-to-beat-the-high-cost-of-living">2. 10 Ways to Beat the High Cost of Living</h2>
<p>A classic that can only flop if you fail to deliver. Concentrate on writing content that sparkles, and people will acknowledge that you not only know what you’re talking about, but you also communicate it well.</p>
<h2 id="3-five-familiar-skin-troubles">3. Five Familiar Skin Troubles</h2>
<p>Commiserate with your readers by setting forth problems you know they are having, and they just might determine that you are the right solution.</p>
<h2 id="4-six-types-of-investor--which-group-are-you-in">4. Six Types of Investor — Which Group Are You In?</h2>
<p>Let the readers self-identify themselves by providing categories into which they will likely fall into. You know about the power of using the word “you” when addressing readers, but people love it even more when they can focus on themselves.</p>
<h2 id="5-how-to-give-your-children-extra-iron--these-3-delicious-ways">5. How to Give Your Children Extra Iron — These 3 Delicious Ways</h2>
<p>A “how to” headline mixed in with a list — it’s almost not fair. Note that the word “these” plus the number of items, followed by “(adjective) ways,” is an extremely specific and powerful use of 4 simple words.</p>
<h2 id="6-free-book-tells-you-12-secrets-of-better-lawn-care">6. Free Book Tells You 12 Secrets of Better Lawn Care</h2>
<p>Use this style of headline and content structure with a free report or tutorial that you are promoting, and you should get wider circulation.</p>
<h2 id="7-76-reasons-why-it-would-have-paid-you-to-answer-our-ad-a-few-months-ago">7. 76 Reasons Why It Would Have Paid You to Answer Our Ad a Few Months Ago</h2>
<p>An especially bold headline that worked wonders for a popular news magazine. The number of reasons given is so large it’s almost absurd, and that’s good from a value standpoint with free content. Plus, by referring back to previous ads, the piece points out the peril of not paying attention earlier.</p>yashumittalIt’s a blogosphere favorite for good reason — “list” content works, in large part due to the attention-grabbing power of the headline.
https://i.imgur.com/Ied4ivD.jpg
10 Sure-Fire Headline Formulas That Work2017-10-22T18:05:00+00:002017-10-22T18:05:00+00:00https://blog.codecarrot.net/10-sure-fire-headline-formulas-that-work<p>So, you’re seeing too many of those “how to” and <a href="/7-reasons-why-list-posts-will-always-work">list headlines</a>, and want to try a few different angles?</p>
<p>Let’s move beyond those common headline formulas you see over and over, and add some new blood to your attention-grabbing arsenal.</p>
<h2 id="1-who-else-wants-blank">1. Who Else Wants [blank]?</h2>
<p>Starting a headline with “Who Else Wants…” is a classic social proof strategy that implies an already existing consensus desire. While overused in the Internet marketing arena, it still works like gangbusters for other subject matter.</p>
<ul>
<li>Who Else Wants a Great WordPress Theme?</li>
<li>Who Else Wants a Higher Paying Job?</li>
<li>Who Else Wants More Fun and Less Stress When on Vacation?</li>
</ul>
<h2 id="2-the-secret-of-blank">2. The Secret of [blank]</h2>
<p>This one is used quite a bit, but that’s because it works. Share insider knowledge and translate it into a benefit for the reader.</p>
<ul>
<li>The Secret of Successful Podcasting</li>
<li>The Secret of Protecting Your Assets in Litigation</li>
<li>The Secret of Getting Your Home Loan Approved</li>
</ul>
<h2 id="3-here-is-a-method-that-is-helping-blank-to-blank">3. Here is a Method That is Helping [blank] to [blank]</h2>
<p>Simply identify your target audience and the benefit you can provide them, and fill in the blanks.</p>
<ul>
<li>Here is a Method That is Helping Homeowners Save Hundreds on Insurance</li>
<li>Here is a Method That is Helping Children Learn to Read Sooner</li>
<li>Here is a Method That is Helping Bloggers Write Better Post Titles</li>
</ul>
<h2 id="4-little-known-ways-to-blank">4. Little Known Ways to [blank]</h2>
<p>A more intriguing (and less common) way of accomplishing the same thing as “The Secret of…” headline.</p>
<ul>
<li>Little Known Ways to Save on Your Heating Bill</li>
<li>Little Known Ways to Hack Google’s Gmail</li>
<li>Little Known Ways to Lose Weight Quickly and Safely</li>
</ul>
<h2 id="5-get-rid-of-problem-once-and-for-all">5. Get Rid of [problem] Once and For All</h2>
<p>A classic formula that identifies either a painful problem or an unfulfilled desire that the reader wants to remedy.</p>
<ul>
<li>Get Rid of Your Unproductive Work Habits Once and For All</li>
<li>Get Rid of That Carpet Stain Once and For All</li>
<li>Get Rid of That Lame Mullet Hairdo Once and For All</li>
</ul>
<h2 id="6-heres-a-quick-way-to-solve-a-problem">6. Here’s a Quick Way to [solve a problem]</h2>
<p>People love quick and easy when it comes to solving a nagging problem.</p>
<ul>
<li>Here’s a Quick Way to Get Over a Cold</li>
<li>Here’s a Quick Way to Potty Train Junior</li>
<li>Here’s a Quick Way to Backup Your Hard Drive</li>
</ul>
<h2 id="7-now-you-can-have-something-desirable-great-circumstance">7. Now You Can Have [something desirable] [great circumstance]</h2>
<p>The is the classic “have your cake and eat it too” headline — and who doesn’t like that?</p>
<ul>
<li>Now You Can Quit Your Job and Make Even More Money</li>
<li>Now You Can Meet Sexy Singles Online Without Spending a Dime</li>
<li>Now You Can Own a Cool Mac and Still Run Windows</li>
</ul>
<h2 id="8-do-something-like-world-class-example">8. [Do something] like [world-class example]</h2>
<p>Gatorade milked this one fully with the “Be Like Mike” campaign featuring Michael Jordan in the early 1990s.</p>
<ul>
<li>Speak Spanish Like a Diplomat</li>
<li>Party Like Paris Hilton</li>
<li>Blog Like an A-Lister</li>
</ul>
<h2 id="9-have-a-or-build-a-blank-you-can-be-proud-of">9. Have a [or] Build a [blank] You Can Be Proud Of</h2>
<p>Appeal to vanity, dissatisfaction, or shame. Enough said.</p>
<ul>
<li>Build a Body You Can Be Proud Of</li>
<li>Have a Smile You Can Be Proud Of</li>
<li>Build a Blog Network You Can Be Proud Of</li>
</ul>
<h2 id="10-what-everybody-ought-to-know-about-blank">10. What Everybody Ought to Know About [blank]</h2>
<p>Big curiosity draw with this type of headline, and it acts almost as a challenge to the reader to go ahead and see if they are missing something.</p>
<ul>
<li>What Everybody Ought to Know About ASP</li>
<li>What Everybody Ought to Know About Adjustable Rate Mortgages</li>
<li>What Everybody Ought to Know About Writing Great Headlines</li>
</ul>yashumittalSo, you’re seeing too many of those “how to” and list headlines, and want to try a few different angles?
https://i.imgur.com/OlwwOAg.jpg
Want Blog Traffic? Stop Making These Content Marketing Mistakes2017-10-22T18:00:00+00:002017-10-22T18:00:00+00:00https://blog.codecarrot.net/want-blog-traffic-stop-making-these-content-marketing-mistakes<p><a href="/44-content-marketing-resources">Content marketing</a> can be an asset to your company if its used well, but it can also become a gigantic liability if the execution is poor.</p>
<p>When done well, content marketing will increase your traffic and increase the number of prospects in your sales funnel. However, there are 13 regularly made content marketing mistakes that will hold you back.</p>
<h2 id="1-inconsistency">1. Inconsistency</h2>
<p>Content creation can be overwhelming. After starting out with tremendous amounts of energy and passion, too many companies burn out. This causes inconsistent content creation.</p>
<p>Inconsistency comes in two forms – quantity and quality. It is hard to regularly produce great content and it is also complicated to maintain a regular posting schedule.</p>
<p>You need to find ways to make producing high quality content on a regular basis a priority for your business.</p>
<h2 id="2-writing-for-the-wrong-audience">2. Writing for the wrong audience</h2>
<p>Too many businesses start writing content without knowing their audience. The purpose of blogging and content creation is to build brand awareness and trust. If you speak to the wrong audience, you will not be able to achieve this goal.</p>
<p><img src="https://i.imgur.com/pJENKNm.jpg" alt="One Simply create content" /></p>
<p>Sometimes writing for the right audience involves changing the topics you cover. Other times writing for the right audience means staying on the same topic, but using less jargon and more everyday language.</p>
<h2 id="3-using-only-marketers-to-produce-content">3. Using only marketers to produce content</h2>
<p>High quality content comes from experience and insight. The experience and insight you need to write compelling content doesn’t always exist within your marketing department.</p>
<p>People can see right through thin, low quality content. That’s not all though. In 2011, Google created its Panda update to combat content that it perceives as thin so it’s in your best interest to create content of value for your audience.</p>
<p><img src="https://i.imgur.com/x7SFA0v.png" alt="Google Pandaversary" /></p>
<p>Don’t be afraid to branch out to others departments within your organization and external experts to assist your content marketing efforts.</p>
<h2 id="4-putting-your-concerns-first">4. Putting your concerns first</h2>
<p>A lot of content marketing sounds too much like a commercial – that’s not what it is meant to do. Content marketing is supposed to educate and inform, not pitch. The trend is that as you educate and inform people start to think of you as an authority and that, as an authority, people will want to interact with you, consume your content, and, eventually, enter your prospect list.</p>
<p><strong>Remember:</strong> The goal of your content is to build familiarity, build likability, and build trust.</p>
<h2 id="5-boring-headlines">5. Boring headlines</h2>
<p>While content marketing isn’t supposed to pitch, it does need to be compelling and persuasive to grab readers’ attention. A great headline will grab attention, hold people’s interest, be clear and easy to understand, and should include keywords.</p>
<p>Certain headlines are always popular – people love “How To” and list headlines. Those aren’t the only way to grab attention. Copyblogger also says there are other foolproof headline formulas that work. For example, “Who Else Wants …?” “The Secret Of …” or “Here’s A Quick Way To Solve …”</p>
<p><strong>Here’s a good resource for strong headlines:</strong> <a href="/10-sure-fire-headline-formulas-that-work">10 Surefire Headline Formulas That Work</a> (good headline huh?).</p>
<h2 id="6-only-focusing-on-owned-media">6. Only focusing on owned media</h2>
<p>Owned media is, as the phrase suggests, platforms your business owns. For example, a blog or company website is a type of owned media. Too many businesses will write a great piece of content and only post it on their company website. Unless you have a highly trafficked blog, that’s not enough.</p>
<p>Content marketing involves guest posting and the use of third party distribution services to ensure your content is properly distributed and seen.</p>
<p><strong>Here’s a resource to get started with guest blogging:</strong> <a href="/the-ultimate-guide-to-guest-blogging">The Ultimate Guide to Guest Blogging</a></p>
<h2 id="7-not-using-a-call-to-action">7. Not using a call to action</h2>
<p>As I mentioned above, content marketing needs to inform and educate, but it also needs to be palatably persuasive. Part of such a technique involves using a call to action whenever you are creating a great piece of content.</p>
<p>You may want people to take a certain action after reading your material and they may take that action without actually being asked. The chances of someone subscribing, leaving a comment or sharing your content increases exponentially if you politely ask them to do so – <a href="/effective-marketing-calls-to-action">don’t forget your call to action</a>.</p>
<h2 id="8-putting-quantity-before-quality">8. Putting quantity before quality</h2>
<p>There are a lot of companies blogging and implementing content marketing strategies. With more and more companies involved, the need to create great content is more urgent than ever. Too many companies prioritize publishing three to five times per week over publishing one great piece of content every week.</p>
<p>Focus on writing that one great post per week and then you can think about scaling up once you hit the quality that you’re aiming for.</p>
<h2 id="9-not-setting-goals">9. Not setting goals</h2>
<p><a href="https://i.imgur.com/9S2kVBG.jpg">setting targets</a></p>
<p>You need to set content marketing goals before you jump in. Without such goals, you will never know if you are being successful.</p>
<p>It’s also a big mistake to set vague goals. You need to set specific, measurable, and data-driven goals before you jump into content marketing. For example, are you looking to increase traffic by x%? are you looking to increase e-mail subscribers by a certain amount?</p>
<p>Don’t skip out on this. It’s very important to hold yourself and your team accountable to hitting these goals.</p>
<h2 id="10-forgetting-to-create-landing-pages">10. Forgetting to create landing pages</h2>
<p>Creating landing pages and the associated offers is a complicated process and, understandably, companies are hesitant to incorporate landing pages into their content marketing efforts. Creating a great blog post and including a call to action will have minimal impact without linking to an offer specific landing page. Having offer specific landing pages will let you make specific pitches to the right audience.</p>
<h2 id="11-forgetting-about-search-engine-optimization">11. Forgetting about search engine optimization</h2>
<p>Not having an SEO strategy to go along with your content marketing strategy is setting sail for fail. This starts with keyword research to optimizing your titles and much more. Some people think SEO is either black magic or really hard. It’s neither of those. SEO is just hard work.</p>
<p>Sure, if you’re just starting out you’re going to have to be scrappy about reaching out to others to help promote your content and get guest blog posts placed but that’s what it’s going to take. Don’t give up 🙂</p>
<h2 id="12-forgetting-about-the-real-world">12. Forgetting about the real world</h2>
<p>If your content doesn’t consider real world events it will lack the human element necessary for success. Your content should incorporate special events, customer success stories, promotions, new product offerings, and alliances with new partners.</p>
<p>Here’s a nugget for you, if you’re extremely fast about picking up news quickly, there’s a tactic you can use called Newsjacking. If used correctly, it can be a very powerful tool for pulling in traffic. Don’t abuse it though.</p>
<h2 id="13-only-hitting-one-social-network">13. Only hitting one social network</h2>
<p>Companies get comfortable and develop habits – we all do. However, habits can be defeating.</p>
<p>If you spend all of your time focusing on one social network, you can miss potential customers within your target demographic. Focusing too much on one network also leaves you vulnerable if that network starts making changes – for example, Facebook just made changes to the algorithm that decides what appears in people’s news feed.</p>
<p>If your content marketing strategy involves using social networks to spread your content, discover all of the networks your potential customers are on and go there. Diversifying your distribution channels will ensure you’re not left too vulnerable to such unexpected changes.</p>
<p>This doesn’t mean you should be on all social networks at the same time – it means you should constantly be testing different channels to see what sticks and what doesn’t. Being on every social network at the same time will lead to marginal results because you’re spread too thin.</p>
<p>A lot of these mistakes happen because of habits and an organizational culture that develops. They can and must be overcome to ensure the success of your content marketing efforts.</p>
<h2 id="conclusion">Conclusion</h2>
<p>If content marketing was easy, everyone would be doing it. But there has to be a reason why successful companies are doubling down on publishing, right? It’s because it’s worth it. You won’t exactly get direct conversions from all of your content marketing efforts but you can damn well be sure that your traffic and assisted conversions are going up because of all the hard work you’re putting in.</p>
<p><strong>Finally, if there is any key takeaway that you want to get from this article, just refer to the following image. These are the people you want to write for:</strong></p>
<p><img src="https://i.imgur.com/3yerbh5.jpg" alt="content-relevance-scale" /></p>yashumittalContent marketing can be an asset to your company if its used well, but it can also become a gigantic liability if the execution is poor.
https://i.imgur.com/6gOPI6Z.png
Effective Marketing Calls to Action2017-10-22T12:40:00+00:002017-10-22T12:40:00+00:00https://blog.codecarrot.net/effective-marketing-calls-to-action<p>Learn some of the strategy used to deliver effective marketing calls to action.</p>
<p>Calls to action should be compelling with an eye catching and easy-to-understand look. However, they should also offer the promise of great content or services.</p>
<p>Effective marketing often comes down to who has the best content. However, whether you’re a designer or not you still have to lead users along the right path.</p>
<p>Want them to register and fill out a form or download a free trial to install your mobile app, making your content shine by providing effective calls to action.</p>
<p>If you’ve done your job and loaded your website with lots of great content you’re way ahead of the game after all, you do need something to point people to.</p>
<p>With all these calls to action it better to be good part of this process comes down to understanding your users experience what page do they see first, is it the homepage a landing page or somewhere else are they finding you via searches emails or social media.</p>
<p>The question is why are they on your site, hopefully the reason they’re there will match what you want them to do.</p>
<p>However, don’t assume that your calls to action should be the most eye-catching thing on the page as soon as your page loads, your best content should be in center.</p>
<p><img src="https://i.imgur.com/nyexxxt.png" alt="Codecarrot website screenshot" /></p>
<p>This is why the users came to your site in the first place not to be sold or marketed to.</p>
<p>Don’t distract them, give them what they’re looking for and gain their trust.</p>
<p>If the users have never been to your site before they’re already taking a risk, so deliver the goods and they might be interested in what else you have to offer.</p>
<p><img src="https://i.imgur.com/kHFSqaB.png" alt="CodeCarrot blog subscribe to newsletter screenshot" /></p>
<p>A strong call-to-action will build upon this trust bringing users to a new part of the site where they can accomplish a new task one more than likely connected to one of your own corporate goals, if you’ve shown them great content, they’ll trust you enough to subscribe to a newsletter.</p>
<p><img src="https://i.imgur.com/iMoCew4.png" alt="product or service related screenshot" /></p>
<p>If you’ve shown them awesome screenshots and lists of features for your app, perhaps they’ll want to download it visually, your call to action should be clear and eye-catching.</p>
<p>There should be no question that the call to action is clickable where it will lead users and what they’ll get when they get there take all these steps when you consider your content and goals and new users won’t just follow your calls to action they’ll trust.</p>
<hr />
<p>Whether they exist on home pages or landing pages, calls to action need to work along with content to build trust and convince the user that their personal goals will be accomplished by clicking through.</p>
<p><strong>Pro Tips:</strong> Design will only increase your conversions to a certain extent. Combine great design with great content to achieve maximum results.</p>yashumittalLearn some of the strategy used to deliver effective marketing calls to action.
https://i.imgur.com/3KMskSa.jpg
What is Difference Between Unstaged and Untracked File in Git?2017-10-20T20:34:30+00:002017-10-20T20:34:30+00:00https://blog.codecarrot.net/what-is-difference-between-unstaged-and-untracked-file-in-git<p>Whenever you initialize a new repository with <code class="highlighter-rouge">git init</code>, Git creates a directory called <strong>Git Directory</strong>, which store information about <em>branch, tag, remote, etc</em>. <strong>Git’s object data</strong>. Generally it is <code class="highlighter-rouge">.git</code> <strong>(hidden directory)</strong> in the current repository.</p>
<p><strong>Pro Tip:</strong> Untracked changes are not in Git. Unstaged changes are in Git but not marked for commit. Staged changes are in Git and marked for commit.</p>
<p>But this is not what we are looking for, there is one thing more called <strong>working directory</strong>. It is a checkout repository or <em>simply file structure covering all of your repository’s data at a particular time</em>.</p>
<p>So when you initialize a new repository, our working directory is our current directory and everything you have in directory right now even the directory is empty.</p>
<p>If you cloning a different remote repository then, our working directory is everything that is in any branch <em>(in which, you are right now)</em> of the cloned remote repository.</p>
<p>Now whenever you create a new file in your repository, it is going in the <em>working directory</em>.</p>
<p>Using the command <code class="highlighter-rouge">git status</code>, it will shows status of the current position in the repository. In simple terms, it includes what you have done so far, what you should do next, comparison results of your repository to its remote <em>(like local repository have more commits then your remote it or less)</em> etc.</p>
<p>When you will check git status in the repository, it will tell you the status about the files that are in untracked state.</p>
<p>What this means is that these changes in the untracked files are not yet able to get converted to a <strong>Git commit</strong>. For this, you have to send these changes to Git’s staging section(area).</p>
<p><strong>Now what is this staging area?</strong></p>
<p>In simple terms, it stores all the information about what will go with the next commit. It’s also called index.</p>
<p><img src="https://cdn.codecarrot.net/images/main-qimg-ef1ac9925df956225785f65119ed6ddc.png" alt="Local Operations in Git Repository" /></p>
<p>So, to commit something, all of the commit’s changes pass these areas one by one.</p>
<p>working directory is where you do the modifications in your files, then you stage the changes using <code class="highlighter-rouge">git add.</code></p>
<p>Now your changes are in staging area. You can now commit these changes using <code class="highlighter-rouge">git commit</code> or you can choose to modify even more.</p>
<p>On each git status, it will show you that there are some files that haven’t been added to staging area but contains some recent changes. It will also tell you that there are some changes that haven’t been added to staging area, even a single time. This will fall in the category of untracked files.</p>
<p><strong>untracked file</strong> is each file that was not there in previous snapshot of the repository <em>(file that is newly introduced)</em>.</p>
<p>Here’s an example where we created untracked_file in the working directory without adding it:</p>
<div class="highlighter-rouge"><div class="highlight"><pre class="highlight"><code>$ git status
On branch master
Untracked files:
(use "git add <file>..." to include in what will be committed)
untracked_file
nothing added to commit but untracked files present (use "git add" to track)
</code></pre></div></div>
<p>But unstaged state sounds fine for changes more than files. For example some changes in tracked file that are not yet in staging area.</p>
<p>You can start tracking using git add, a file directly goes to staging area when you use git add, now that file is both tracked and staged.</p>
<p>You can unstage any staged file using <code class="highlighter-rouge">git reset -- filename</code>.</p>
<p>An untracked file is in unstaged state also.</p>yashumittalWhenever you initialize a new repository with git init, Git creates a directory called Git Directory, which store information about branch, tag, remote, etc. Git’s object data. Generally it is .git (hidden directory) in the current repository.
https://cdn.codecarrot.net/images/detective-tracking.png
Responsive Images With Srcset Display2017-10-18T18:55:23+00:002017-10-18T18:55:23+00:00https://blog.codecarrot.net/responsive-images-with-srcset-display<p>Ever since Apple launched a retina display on the iPhone 4, web designers have been looking for a way to handle high density displays. That is where <code class="highlighter-rouge">srcset</code> and its display density descriptors come in.</p>
<p>The reason why we want to use <code class="highlighter-rouge">srcset</code> is because it gives the browser choice. When we use the media attribute provided by the <code class="highlighter-rouge"><picture></code> element, we’re dictating to the browser what image it must use. That makes sense for art direction.</p>
<p>But when it comes to resolution switching, the browser knows best what image will work. It can make decisions based on factors that we’re not privy to such as network conditions or user preference.</p>
<p>So unless we are doing art direction, we should strive to give the browser options and let it make smart decisions.</p>
<h2 id="display-density">Display density</h2>
<p>The syntax for display density is fairly straight forward:</p>
<p>The <code class="highlighter-rouge">srcset</code> attribute is added to an <code class="highlighter-rouge"><img></code> element. The value of <code class="highlighter-rouge">srcset</code> contains a comma-separated list. Each item in the list contains the path to an image and the density of that image provided as a multiple <em>(e.g., 1x, 2x, 3x…)</em>.</p>
<div class="language-html highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="nt"><img</span> <span class="na">src=</span><span class="s">"cat.jpg"</span> <span class="na">alt=</span><span class="s">"cat"</span> <span class="na">srcset=</span><span class="s">"cat.jpg, cat-2X.jpg 2x"</span><span class="nt">></span>
</code></pre></div></div>
<p>The display density values—the 1x, 2x, etc.—are referred to as <em>display density descriptors</em>. If a display density descriptor isn’t provided, it is assumed to be 1x.</p>
<p>Now you have multiple densities at multiple image breakpoints. And sometimes you’re repeating your image sources because 2x at a small size could be the same as 1x resolution at a larger image breakpoint.</p>
<p>It gets messy quickly.</p>
<h2 id="display-density-descriptors-are-best-for-fixed-width-images">Display density descriptors are best for fixed width images</h2>
<p>The moment you move beyond providing alternate densities of a fixed width <code class="highlighter-rouge">img</code> element, the display density descriptor becomes unwieldy and inadequate to the task.</p>
<hr />
<p>display density descriptors and concluded that they are great for fixed width images, but are insufficient for flexible images.</p>
<p>Flexible images is where srcset’s width descriptors shine.</p>
<h2 id="width-descriptors">Width descriptors</h2>
<p>The syntax for width descriptors is similar to that of display density descriptors. The value of the <code class="highlighter-rouge">srcset</code> attribute is a comma-separated list of image sources and descriptors.</p>
<p>The difference is that instead of having 1x, 2x, and other values representing the density, we now list the width of the image source such as 320w, 480w, etc.</p>
<div class="language-html highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="nt"><img</span> <span class="na">src=</span><span class="s">"cat.jpg"</span> <span class="na">alt=</span><span class="s">"cat"</span> <span class="na">srcset=</span><span class="s">"cat-160.jpg 160w, cat-320.jpg 320w, cat-640.jpg 640w, cat-1280.jpg 1280w"</span><span class="nt">></span>
</code></pre></div></div>
<p>The width of the image source can cause some confusion. Width descriptors are looking for the resolution of the source file.</p>
<p>In other words, if you open the image in an image editor, what does it say the resolution is? Grab the width and put it in the srcset attribute.</p>
<h2 id="the-browser-picks-the-best-source">The browser picks the best source?</h2>
<p>When you use width descriptors, you’re providing the browser with a list of images and their true widths so that it can select the best source. How does the browser do that?</p>
<p>Your first instinct is probably to say that the browser looks at the size of the element in the page and compares it to the list of source sizes. That makes sense, but it isn’t how the selection work.</p>
<p>See, when a browser starts downloading images, it often doesn’t know the size of the image in the page.</p>
<h2 id="browser-pre-loader-and-speculative-asset-downloading">Browser pre-loader and speculative asset downloading</h2>
<p>If you look at a timeline of how a browser renders a page, you’ll notice something striking.</p>
<p><img src="https://i.imgur.com/Dytz2kK.jpg" alt="Chrome timeline" /></p>
<p>Shortly after the browser downloads the HTML, it requests CSS and JavaScript. But before the CSS and JavaScript is done loading, the browser starts downloading images.</p>
<p>Because neither the CSS nor JavaScript is complete, the browser is downloading images without knowing what the layout of the page will be. And without knowing the layout, it doesn’t know what size the image element will be.</p>
<p>BTW, this pre-loading behavior is why <a href="/css-and-js-cant-do-responsive-images">we can’t solve inline responsive images using CSS or JavaScript</a>. They aren’t available when the browser starts downloading.</p>
<p>The only thing that the browser does know is the size of the viewport. Once we move past display density descriptors, everything hinges on the size of the viewport.</p>yashumittalEver since Apple launched a retina display on the iPhone 4, web designers have been looking for a way to handle high density displays. That is where srcset and its display density descriptors come in.
https://i.imgur.com/5wbOr0F.jpg
DevTools Tips For Sublime Text Users2017-10-17T19:59:00+00:002017-10-17T19:59:00+00:00https://blog.codecarrot.net/devtools-tips-for-sublime-text-users<h2 id="introduction">Introduction</h2>
<p>In this quick write-up, we’ll cover how to take advantage of your existing knowledge of features in <strong>Sublime Text</strong> and apply them to another powerful tool in your arsenal — the Chrome DevTools.</p>
<p>Thanks to several modern tools including DevTools, JSBin and Codepen relying on the excellent CodeMirror editor, keyboard bindings like those in Sublime Text are more readily available elsewhere than they have been.</p>
<p><em>Let’s assume for the rest of this write-up that we’ll primarily be working inside the DevTools Sources panel — a feature which, when paired with <a href="//developer.chrome.com/devtools/docs/workspaces">Workspaces</a> gives you a powerful in-browser editor.</em></p>
<p><img src="https://cdn.codecarrot.net/images/1-RXuLuUJs_JxzA7U_vZgNqQ.png" alt="The Sources panel in Chrome DevTools can be used as a powerful editor and companion during debugging" /></p>
<p><em>The Sources panel in Chrome DevTools can be used as a powerful editor and companion during debugging</em></p>
<h2 id="keyboard-shortcuts">Keyboard Shortcuts</h2>
<h3 id="goto-anything">Goto Anything</h3>
<p>Very similar to Sublime, DevTools has a Goto “Anything” dialog. This can take you to a specific file, a line number or a method definition. You can bring up the Goto “Anything” search using Ctrl/Cmd + P. This lets you search/filter through files just by starting to type in the files name. To search for a method — such as a JavaScript <strong>method or a CSS selector</strong>, use Ctrl/Cmd + Shift + P and start typing in the method name.</p>
<p><img src="https://cdn.codecarrot.net/images/1-v595nTQXCOB_FOzmaYWtrg.gif" alt="Goto Anything" /></p>
<h3 id="goto-line-in-file">Goto Line in file</h3>
<p><code class="highlighter-rouge">Ctrl</code> + <code class="highlighter-rouge">G</code> will toggle a dialog allowing you to jump to a specific line in a file. If you wish to go to a line in the current file, bring up the dialog and type in a colon followed by the line number you are interested in. For example, :25 will take you to line 25. If you wish to go to a line in a different file, type in the file name, a colon and then the line number (e.g app.js:25).</p>
<p><img src="https://cdn.codecarrot.net/images/1-PBHOVst6HsDfLdfFU7QwDA.gif" alt="Goto Line in file" /></p>
<h3 id="go-to-the-start-or-end-of-a-line">Go to the start or end of a line</h3>
<p><strong>Go to end of a line:</strong> <code class="highlighter-rouge">Alt</code> + <code class="highlighter-rouge">Right</code> or <code class="highlighter-rouge">Cmd</code> + <code class="highlighter-rouge">Right</code>
<strong>Go to the start of a line:</strong> <code class="highlighter-rouge">Alt</code> + <code class="highlighter-rouge">Left</code> or <code class="highlighter-rouge">Cmd</code> + <code class="highlighter-rouge">Left</code></p>
<h3 id="go-to-start-or-end-of-a-file">Go to start or end of a file</h3>
<p><strong>Go to the start of a file:</strong> <code class="highlighter-rouge">Alt</code> + <code class="highlighter-rouge">Up</code> or <code class="highlighter-rouge">Cmd</code> + <code class="highlighter-rouge">Up</code>
<strong>Go to the end of a file:</strong> <code class="highlighter-rouge">Alt</code> + <code class="highlighter-rouge">Down</code> or <code class="highlighter-rouge">Cmd</code> + <code class="highlighter-rouge">Down</code></p>
<h3 id="go-one-word-left-or-right">Go one word left or right</h3>
<p><strong>Go one word left:</strong> <code class="highlighter-rouge">Ctrl</code>+ <code class="highlighter-rouge">Left</code> or <code class="highlighter-rouge">Alt</code> + <code class="highlighter-rouge">Left</code>
<strong>Go one word right:</strong> <code class="highlighter-rouge">Ctrl</code> + <code class="highlighter-rouge">Right</code> or <code class="highlighter-rouge">Alt</code> + <code class="highlighter-rouge">Right</code></p>
<h3 id="go-up-or-down-a-line">Go up or down a line</h3>
<p><strong>Go up a line:</strong> <code class="highlighter-rouge">Up</code>
<strong>Go down a line:</strong> <code class="highlighter-rouge">Down</code></p>
<h2 id="using-carets--multiple-cursors">Using Carets / Multiple Cursors</h2>
<p>A caret is that blinking line that indicates where you’re typing at the moment. Similar to Sublime Text, DevTools can have as many carets as you want.</p>
<h3 id="adding-multiple-carets">Adding multiple Carets</h3>
<p>You can start playing with carets by opening any supported file in Sources, then selecting each line by holding down <code class="highlighter-rouge">Cmd</code>/<code class="highlighter-rouge">Alt</code> and clicking wherever you would like to add a new caret.</p>
<p><img src="https://cdn.codecarrot.net/images/1-4svsSOFNREo3PYlqAIHMcw.gif" alt="Adding multiple Caret" /></p>
<p>For example, if you have multi-line JavaScript that needs to be prefixed, edited or wrapped in quotes, multiple carets can make this a breeze.
The following steps will quickly get every line selected:</p>
<ol>
<li>Click on the first line</li>
<li>While holding down <code class="highlighter-rouge">⌘</code> and <code class="highlighter-rouge">Option</code></li>
<li>Drag your mouse through the rest of the lines</li>
</ol>
<p>You should now have a cursor somewhere on each line.</p>
<p><strong>Use multiple carets from the front of a line</strong></p>
<p>Use <code class="highlighter-rouge">Cmd</code> + <code class="highlighter-rouge">←</code> ( <code class="highlighter-rouge">Alt</code> + <code class="highlighter-rouge">←</code> for Windows/Linux) to bring all cursors to the front of the line, and then hold down <code class="highlighter-rouge">Option</code> while using the arrow keys to jump by word. When in front of the file name, simply type in your prefix and you’re done!</p>
<p><img src="https://cdn.codecarrot.net/images/1-zWyHDztwW8K6h6ocgo4RBQ.gif" alt="Adding multiple Carets" /></p>
<p><strong>Wrap with Quotes or Brackets</strong></p>
<p>Highlight the words with <code class="highlighter-rouge">Cmd</code> + <code class="highlighter-rouge">Shift</code> + <code class="highlighter-rouge">←</code> ( <code class="highlighter-rouge">Ctrl</code> + <code class="highlighter-rouge">Shift</code> + <code class="highlighter-rouge">←</code> for Windows/Linux) and type an opening quote or bracket. Dev tools will wrap each word in the selected quote or bracket.</p>
<p><img src="https://cdn.codecarrot.net/images/1-uFxPo9AInxze4-VAOQZ23w.gif" alt="Wrap with Quotes or Brackets" /></p>
<p><strong>Column selection</strong></p>
<p>Carets can similarly be used for selecting custom columns of text. Hold down <code class="highlighter-rouge">Alt</code> and then click and drag over the region of text you would like to select. DevTools will highlight the area and you can now copy or edit it as needed.</p>
<p><strong>Carets and matching words</strong></p>
<p>Carets can also be used for highlighting specific words. Select a word in your editor (it can be a variable, method, or anything really). DevTools will highlight other instances of this word with a border around them.</p>
<p>Now use <code class="highlighter-rouge">Cmd</code> + <code class="highlighter-rouge">D</code> (or <code class="highlighter-rouge">Alt</code> + <code class="highlighter-rouge">D</code>) and DevTools will highlight and place multiple cursors on the matching words. This is particularly useful during batch rename operations. Hitting D a few more time while still holding ⌘ selects the next instance of the selection found. By hitting ⌘, then D three times, you can select three iterations of the text.</p>
<p><img src="https://cdn.codecarrot.net/images/1-zsYjnj7I6Mi1WF1oy_lyYQ.gif" alt="Carets and matching words" /></p>
<p><strong>Jump to matching brackets</strong></p>
<p>When working with non-complex pieces of code, you might find it tricky to find corresponding opening and closing brackets with your naked eye. <code class="highlighter-rouge">Ctrl</code> + <code class="highlighter-rouge">M</code> allows you to instantly move your cursor there. Using it twice will jump to its opening or closing counterpart.</p>
<p><img src="https://cdn.codecarrot.net/images/1-QdrkPBShYAHrDhr5UElG1A.gif" alt="Jump to matching brackets" /></p>
<p><strong>Indentation</strong></p>
<p>We know the importance of indentation. It helps keep our code readable and easy to understand. To increase or decrease the current line’s indent, use the shortcuts below:</p>
<p>Indent text: <code class="highlighter-rouge">Tab</code>
Unindent text: <code class="highlighter-rouge">Shift</code> + <code class="highlighter-rouge">Tab</code></p>
<p><img src="https://cdn.codecarrot.net/images/1-_QkNVE12OJjcAs3ejnlVqw.gif" alt="Indentation" /></p>
<h3 id="quickly-comment-your-code">Quickly comment your code</h3>
<p>If you need to comment/uncomment a piece of code, the same shortcuts you would use for this in Sublime Text also apply:</p>
<p><strong>Comment text:</strong> <code class="highlighter-rouge">Cmd</code>/<code class="highlighter-rouge">Ctrl</code> + <code class="highlighter-rouge">/</code>
<strong>Uncomment text:</strong> <code class="highlighter-rouge">Cmd</code>/<code class="highlighter-rouge">Ctrl</code> + <code class="highlighter-rouge">/</code> on the same section of text.</p>
<p>This works across all languages and works pretty well with lines or whole selections.</p>
<p><img src="https://cdn.codecarrot.net/images/1-zeNecjKCY0sSTVZ1ZFHaPw.gif" alt="Quickly comment your code" /></p>
<h3 id="toggle-autocompletion">Toggle Autocompletion</h3>
<p>When typing values in the DevTools Sources panel, you’re presented with autocompletions as you type. If however you dismiss these and would like to manually toggle autocompletion, you can do so with:</p>
<p><code class="highlighter-rouge">Ctrl</code> + <code class="highlighter-rouge">Space</code></p>
<p><img src="https://cdn.codecarrot.net/images/1-LMoNl681Off06TxYdZcWiA.gif" alt="Toggle Autocompletion" /></p>
<h3 id="cutcopypasteundoredo">Cut/Copy/Paste/Undo/Redo</h3>
<p>You can cut, copy and paste text using the same shortcuts you’re used to in other editors:</p>
<p><strong>Cut:</strong> <code class="highlighter-rouge">Cmd</code> + <code class="highlighter-rouge">X</code>
<strong>Copy:</strong> <code class="highlighter-rouge">Cmd</code> + <code class="highlighter-rouge">C</code>
<strong>Paste:</strong> <code class="highlighter-rouge">Cmd</code> + <code class="highlighter-rouge">V</code>
<strong>Undo:</strong> <code class="highlighter-rouge">Cmd</code> + <code class="highlighter-rouge">Z</code>
<strong>Soft undo:</strong> <code class="highlighter-rouge">Cmd</code> + <code class="highlighter-rouge">U</code>
<strong>Redo:</strong> <code class="highlighter-rouge">Cmd</code> + <code class="highlighter-rouge">Y</code></p>
<h3 id="increment-and-decrement-values">Increment and Decrement values</h3>
<p>Note: ⇞ and ⇟ are page up and page down. On an Apple keyboard, you can page up/down by holding fn + ↑/↓</p>
<p>In the Sources pane, you can select a numeric value and easily increment or decrement the value using your keyboard. Highlight the value and then:</p>
<p><strong>Increment CSS unit by 1:</strong> <code class="highlighter-rouge">Option</code> + <code class="highlighter-rouge">↑</code>
<strong>Decrement CSS unit by 1:</strong> <code class="highlighter-rouge">Option</code> + <code class="highlighter-rouge">↓</code>
<strong>Increment CSS unit by 10:</strong> <code class="highlighter-rouge">Option</code> + <code class="highlighter-rouge">⇟</code>
<strong>Decrement CSS unit by 10:</strong> <code class="highlighter-rouge">Option</code> + <code class="highlighter-rouge">⇟</code></p>
<p><img src="https://cdn.codecarrot.net/images/1-el4vmdu2MAwwZw5o9pyG0w.gif" alt="Increment and Decrement values" /></p>
<p>The Styles pane also supports shortcuts for incrementing/decrementing values.</p>
<p><strong>Increment value:</strong> ↑
<strong>Decrement value:</strong> ↓
<strong>Increment by 10:</strong> ⇞ or ⇧↑
<strong>Decrement by 10:</strong> ⇟ or ⇧↓
<strong>Increment by 100:</strong> ⇧⇞
<strong>Decrement by 100:</strong> ⇧⇟
<strong>Increment by 0.1:</strong> ⌥↑
<strong>Decrement by 0.1:</strong> ⌥↓</p>
<p><img src="https://cdn.codecarrot.net/images/1-1UHsuMbrljOwdCrgQ84g6w.gif" alt="Increase and Decrease values" /></p>
<h2 id="cycle-through-editing-locations">Cycle through editing locations</h2>
<p>DevTools can now also preserve your position cursor history in Sources. This lets you cycle through your previous editing locations using <strong>Alt- and Alt+</strong>:</p>
<p><img src="https://cdn.codecarrot.net/images/1-ccH3zKqBHkwq445ijzSXsw.gif" alt="Cycle through editing locations" /></p>
<h2 id="shortcuts-page">Shortcuts page</h2>
<p>If you’ve found the above shortcuts helpful, you can pull most of them up via the DevTools <a href="//developer.chrome.com/devtools/docs/settings">settings menu</a>. It looks a little like this:</p>
<p><img src="https://cdn.codecarrot.net/images/1-ruU4iOfl63bDdOcHf0t6Hg.png" alt="Shortcuts page" /></p>
<h2 id="source-settings">Source Settings</h2>
<p>The Settings page also allows you to configure how the editor behaves. This includes customizing the default <strong>indendation</strong>, toggling bracket matching, autocompletion and the display of whitespace characters.</p>
<p><img src="https://cdn.codecarrot.net/images/1-kNSTfEe7h8FJUgJ8eFd6bA.png" alt="Source Settings" /></p>
<h2 id="themes">Themes</h2>
<p>Similar to your editor, the DevTools UI can also be customized (the theming for the syntax highlighting, the colors across each of the panels, the look of UI elements like tabs). Some of these themes make intelligent use of color to highlight the key pieces of UI in DevTools without taking your focus away from the code.
Some of our choice picks for DevTools themes are the following:</p>
<ul>
<li><a href="//github.com/mauricecruz/chrome-devtools-zerodarkmatrix-theme">//github.com/mauricecruz/chrome-devtools-zerodarkmatrix-theme</a></li>
<li><a href="//github.com/xero/greybeard-devtools">//github.com/xero/greybeard-devtools</a></li>
</ul>
<p><img src="https://cdn.codecarrot.net/images/1-0v6KQTbisUbn_kF9MFWRxw.png" alt="The ZeroDarkMatrix theme" /></p>
<p><em>The ZeroDarkMatrix theme</em></p>
<h2 id="to-install-a-theme">To install a theme:</h2>
<ul>
<li>Install it from the <a href="//chrome.google.com/webstore/search/devtools?_category=extensions">Chrome Web Store</a>.</li>
<li>Open chrome://flags ▶ Enable Developer Tools experiments and click “Relaunch Now” at the bottom.</li>
<li>Open developer tools settings ▶ Experiments ▶ [✔] Allow custom UI themes.</li>
<li>Boom. You should be good to go. Themes can be found in a number of places, including the Web Store, <a href="//DevThemez.com">DevThemez.com</a> and GitHub.</li>
</ul>
<h2 id="quick-bonus-tip">Quick bonus tip</h2>
<p>DevTools also supports a few nice debugging helpers that can further augment your daily editing & debugging workflow. For instance, while debugging you can preview the inline values of JavaScript variables at the current point in time. Super powerful.</p>
<p><img src="https://cdn.codecarrot.net/images/1-8eBfaiXNPUu8NK2qKspaLA.png" alt="Display values inline while you’re debugging (see the blocks highlighted in orange). Enabled via Settings > Sources > Display variable values inline while debugging" /></p>
<p>Display values inline while you’re debugging (see the blocks highlighted in orange). Enabled via Settings > Sources > Display variable values inline while debugging</p>
<h2 id="wrapping-up">Wrapping up</h2>
<p>We hope you’ve found these DevTools tips helpful!.</p>
<p>Many of the SublimeText equivalents we’ve covered here work equally as well in other editors and we encourage you to spend time learning about the shortcuts in apps you use regularly.
They’re powerful stuff and can make a HUUUGE difference to your workflow.</p>
<p>If you’re hungry for more and want to continue improving your workflow, grab Wes’ <a href="//sublimetextbook.com/">Sublime Text Book + Videos </a>— use the code <strong>DEVTOOLS</strong> for $11 off. You can also check-out the first episode of <a href="//www.youtube.com/watch?v=2eu23_if6Lw&index=11&list=PLOU2XLYxmsILKwwASNS0xgfcmakbK_8JZ">Totally Tooling Tips</a> for a look at Sublime Text plugins.</p>
<p>This blog is published at medium by <a href="//twitter.com/addyosmani">Addy Osmani</a>.</p>yashumittalIntroduction
https://cdn.codecarrot.net/images/1-RXuLuUJs_JxzA7U_vZgNqQ.png
CSS And JavaScript Can’t Do Responsive Images2017-10-15T10:12:15+00:002017-10-15T10:12:15+00:00https://blog.codecarrot.net/css-and-js-cant-do-responsive-images<p>All browsers have what’s called a <code class="highlighter-rouge">preloader</code>. As the browser is munching through the HTML – before it’s even started to construct a DOM – the <code class="highlighter-rouge">preloader</code> sees <code class="highlighter-rouge"><img></code> and rushes off to fetch the image before it’s even considering doing anything about the CSS or JavaScript.</p>
<p>It does this to get images as fast as it can – after all, they can often be pretty big and are one of the things that boosts the perceived performance of a page dramatically.</p>
<p>So, by the time the browser gets around to dealing with CSS or script, it may very well have already grabbed an image – or at least downloaded a fair bit. If you try</p>
<div class="language-html highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="nt"><img</span> <span class="na">id=</span><span class="s">"image"</span> <span class="na">src=</span><span class="s">"picture.png"</span> <span class="na">alt=</span><span class="s">"Image"</span><span class="nt">></span>
</code></pre></div></div>
<div class="language-css highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="k">@media</span> <span class="n">all</span> <span class="n">and</span> <span class="p">(</span><span class="n">max-width</span><span class="p">:</span><span class="m">600px</span><span class="p">)</span> <span class="p">{</span>
<span class="nf">#image</span> <span class="p">{</span>
<span class="nl">content</span><span class="p">:</span> <span class="sx">url(medium-res.png)</span><span class="p">;</span>
<span class="p">}</span>
<span class="p">}</span>
<span class="k">@media</span> <span class="n">all</span> <span class="n">and</span> <span class="p">(</span><span class="n">max-width</span><span class="p">:</span><span class="m">320px</span><span class="p">)</span> <span class="p">{</span>
<span class="nf">#image</span> <span class="p">{</span>
<span class="nl">content</span><span class="p">:</span> <span class="sx">url(low-res.png)</span><span class="p">;</span>
<span class="p">}</span>
<span class="p">}</span>
</code></pre></div></div>
<p>You’ll find the correct image is selected by the media query <em>(assuming your browser supports <code class="highlighter-rouge">content</code> on simple selectors without :before or :after pseudo-elements)</em> but you’ll find that the <code class="highlighter-rouge">preloader</code> has downloaded the resource pointed to by the <code class="highlighter-rouge"><img src></code> and <em>then</em> the one that the CSS replaces it with is downloaded, too. So you get a double download which is not what you want at all.</p>
<p>Alternatively, you could have an <code class="highlighter-rouge"><img></code> with no <code class="highlighter-rouge">src</code> attribute, and then add it in with JavaScript – but then you’re fetching the resource until much later, delaying the loading of the page. Because your browser won’t know the width and height of the image that the JS will select, it can’t leave room for it when laying out the page so you may find that your page gets reflowed and, if the user was reading some textual content, she might find the stuff she’s reading scrolls off the page.</p>
<p>So the only way to beat the <code class="highlighter-rouge">preloader</code> is to put all the potential image sources in the HTML and give the browser all the information it needs to make the selection there, too. That’s what the <code class="highlighter-rouge">w</code> and <code class="highlighter-rouge">x</code> descriptors in <code class="highlighter-rouge">srcset</code> are for, and the <code class="highlighter-rouge">sizes</code> attribute.</p>yashumittalAll browsers have what’s called a preloader. As the browser is munching through the HTML – before it’s even started to construct a DOM – the preloader sees <img> and rushes off to fetch the image before it’s even considering doing anything about the CSS or JavaScript.
https://i.imgur.com/Rr0MXWW.jpg
Learning Python - From Zero to Hero2017-10-12T18:09:00+00:002017-10-12T18:09:00+00:00https://blog.codecarrot.net/learning-python-from-zero-to-hero<p>First of all, what is Python? According to its creator, Guido van Rossum, Python is a</p>
<blockquote>
“high-level programming language, and its core design philosophy is all about code readability and a syntax which allows programmers to express concepts in a few lines of code.”
</blockquote>
<p>For me, the first reason to learn Python was that it is, in fact, a beautiful programming language. It was really natural to code in it and express my thoughts.</p>
<p>Another reason was that we can use coding in Python in multiple ways: data science, web development, and machine learning all shine here. Quora, Pinterest and Spotify all use Python for their backend web development. So let’s learn a bit about it.</p>
<h2 id="the-basics">The Basics</h2>
<h3 id="1-variables">1. Variables</h3>
<p>You can think about variables as words that store a value. Simple as that.
In Python, it is really easy to define a variable and set a value to it. Imagine you want to store number 1 in a variable called “one.” Let’s do it:</p>
<div class="language-py highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="n">one</span> <span class="o">=</span> <span class="mi">1</span>
</code></pre></div></div>
<p>How simple was that? You just assigned the value 1 to the variable “one.”</p>
<div class="language-py highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="n">two</span> <span class="o">=</span> <span class="mi">2</span>
<span class="n">some_number</span> <span class="o">=</span> <span class="mi">10000</span>
</code></pre></div></div>
<p>And you can assign any other <strong>value</strong> to whatever other <strong>variables</strong> you want. As you see in the table above, the variable “two” stores the integer 2, and “<strong>some_number</strong>” stores <strong>10,000</strong>.</p>
<p>Besides integers, we can also use booleans (True / False), strings, float, and so many other data types.</p>
<div class="language-py highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="c1"># booleans
</span><span class="n">true_boolean</span> <span class="o">=</span> <span class="bp">True</span>
<span class="n">false_boolean</span> <span class="o">=</span> <span class="bp">False</span>
<span class="c1"># string
</span><span class="n">my_name</span> <span class="o">=</span> <span class="s">"Leandro Tk"</span>
<span class="c1"># float
</span><span class="n">book_price</span> <span class="o">=</span> <span class="mf">15.80</span>
</code></pre></div></div>
<h2 id="2-control-flow-conditional-statements">2. Control Flow: conditional statements</h2>
<p>“<strong>If</strong>” uses an expression to evaluate whether a statement is True or False. If it is True, it executes what is inside the “if” statement. For example:</p>
<div class="language-py highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="k">if</span> <span class="bp">True</span><span class="p">:</span>
<span class="k">print</span><span class="p">(</span><span class="s">"Hello Python If"</span><span class="p">)</span>
<span class="k">if</span> <span class="mi">2</span> <span class="o">></span> <span class="mi">1</span><span class="p">:</span>
<span class="k">print</span><span class="p">(</span><span class="s">"2 is greater than 1"</span><span class="p">)</span>
</code></pre></div></div>
<p><strong>2</strong> is greater than <strong>1</strong>, so the “<strong>print</strong>” code is executed.</p>
<p>The “<strong>else</strong>” statement will be executed if the “<strong>if</strong>” expression is <strong>false</strong>.</p>
<div class="language-py highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="k">if</span> <span class="mi">1</span> <span class="o">></span> <span class="mi">2</span><span class="p">:</span>
<span class="k">print</span><span class="p">(</span><span class="s">"1 is greater than 2"</span><span class="p">)</span>
<span class="k">else</span><span class="p">:</span>
<span class="k">print</span><span class="p">(</span><span class="s">"1 is not greater than 2"</span><span class="p">)</span>
</code></pre></div></div>
<p><strong>1</strong> is not greater than <strong>2</strong>, so the code inside the “<strong>else</strong>” statement will be executed.</p>
<p>You can also use an “<strong>elif</strong>” statement:</p>
<div class="language-py highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="k">if</span> <span class="mi">1</span> <span class="o">></span> <span class="mi">2</span><span class="p">:</span>
<span class="k">print</span><span class="p">(</span><span class="s">"1 is greater than 2"</span><span class="p">)</span>
<span class="k">elif</span> <span class="mi">2</span> <span class="o">></span> <span class="mi">1</span><span class="p">:</span>
<span class="k">print</span><span class="p">(</span><span class="s">"1 is not greater than 2"</span><span class="p">)</span>
<span class="k">else</span><span class="p">:</span>
<span class="k">print</span><span class="p">(</span><span class="s">"1 is equal to 2"</span><span class="p">)</span>
</code></pre></div></div>
<h2 id="3-looping--iterator">3. Looping / Iterator</h2>
<p>In Python, we can iterate in different forms. I’ll talk about two: <strong>while</strong> and <strong>for</strong>.</p>
<p><strong>While</strong> Looping: while the statement is True, the code inside the block will be executed. So, this code will print the number from <strong>1</strong> to <strong>10</strong>.</p>
<div class="language-py highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="n">num</span> <span class="o">=</span> <span class="mi">1</span>
<span class="k">while</span> <span class="n">num</span> <span class="o"><=</span> <span class="mi">10</span><span class="p">:</span>
<span class="k">print</span><span class="p">(</span><span class="n">num</span><span class="p">)</span>
<span class="n">num</span> <span class="o">+=</span> <span class="mi">1</span>
</code></pre></div></div>
<p>The <strong>while</strong> loop needs a “<strong>loop condition.</strong>” If it stays True, it continues iterating. In this example, when <code class="highlighter-rouge">num</code> is <code class="highlighter-rouge">11</code> the <strong>loop condition</strong> equals <code class="highlighter-rouge">False</code>.</p>
<p>Another basic bit of code to better understand it:</p>
<div class="language-py highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="n">loop_condition</span> <span class="o">=</span> <span class="bp">True</span>
<span class="k">while</span> <span class="n">loop_condition</span><span class="p">:</span>
<span class="k">print</span><span class="p">(</span><span class="s">"Loop Condition keeps: %s"</span> <span class="o">%</span><span class="p">(</span><span class="n">loop_condition</span><span class="p">))</span>
<span class="n">loop_condition</span> <span class="o">=</span> <span class="bp">False</span>
</code></pre></div></div>
<p>The <strong>loop condition</strong> is <code class="highlighter-rouge">True</code> so it keeps iterating — until we set it to <code class="highlighter-rouge">False</code>.</p>
<p><strong>For Looping</strong>: you apply the variable “<strong>num</strong>” to the block, and the “<strong>for</strong>” statement will iterate it for you. This code will print the same as <strong>while</strong> code: from <strong>1</strong> to <strong>10</strong>.</p>
<div class="language-py highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="k">for</span> <span class="n">i</span> <span class="ow">in</span> <span class="nb">range</span><span class="p">(</span><span class="mi">1</span><span class="p">,</span> <span class="mi">11</span><span class="p">):</span>
<span class="k">print</span><span class="p">(</span><span class="n">i</span><span class="p">)</span>
</code></pre></div></div>
<p>See? It is so simple. The range starts with <code class="highlighter-rouge">1</code> and goes until the <code class="highlighter-rouge">11</code>th element (<code class="highlighter-rouge">10</code> is the <code class="highlighter-rouge">10</code>th element).</p>
<h2 id="list-collection--array--data-structure">List: Collection | Array | Data Structure</h2>
<p>Imagine you want to store the integer 1 in a variable. But maybe now you want to store 2. And 3, 4, 5 …</p>
<p>Do I have another way to store all the integers that I want, but not in <strong>millions of variables</strong>? You guessed it — there is indeed another way to store them.</p>
<p><code class="highlighter-rouge">List</code> is a collection that can be used to store a list of values (like these integers that you want). So let’s use it:</p>
<div class="language-py highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="n">my_integers</span> <span class="o">=</span> <span class="p">[</span><span class="mi">1</span><span class="p">,</span> <span class="mi">2</span><span class="p">,</span> <span class="mi">3</span><span class="p">,</span> <span class="mi">4</span><span class="p">,</span> <span class="mi">5</span><span class="p">]</span>
</code></pre></div></div>
<p>It is really simple. We created an array and stored it on <strong>my_integer</strong>.</p>
<p>But maybe you are asking: “How can I get a value from this array?”</p>
<p>Great question. <code class="highlighter-rouge">List</code> has a concept called <strong>index</strong>. The first element gets the index 0 (zero). The second gets 1, and so on. You get the idea.</p>
<p>To make it clearer, we can represent the array and each element with its index.</p>
<table>
<thead>
<tr>
<th>Index</th>
<th>Array</th>
</tr>
</thead>
<tbody>
<tr>
<td>0</td>
<td>5</td>
</tr>
<tr>
<td>1</td>
<td>7</td>
</tr>
<tr>
<td>2</td>
<td>1</td>
</tr>
<tr>
<td>3</td>
<td>3</td>
</tr>
<tr>
<td>4</td>
<td>5</td>
</tr>
</tbody>
</table>
<p>Using the Python syntax, it’s also simple to understand:</p>
<div class="language-py highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="n">my_integers</span> <span class="o">=</span> <span class="p">[</span><span class="mi">5</span><span class="p">,</span> <span class="mi">7</span><span class="p">,</span> <span class="mi">1</span><span class="p">,</span> <span class="mi">3</span><span class="p">,</span> <span class="mi">4</span><span class="p">]</span>
<span class="k">print</span><span class="p">(</span><span class="n">my_integers</span><span class="p">[</span><span class="mi">0</span><span class="p">])</span> <span class="c1"># 5
</span><span class="k">print</span><span class="p">(</span><span class="n">my_integers</span><span class="p">[</span><span class="mi">1</span><span class="p">])</span> <span class="c1"># 7
</span><span class="k">print</span><span class="p">(</span><span class="n">my_integers</span><span class="p">[</span><span class="mi">4</span><span class="p">])</span> <span class="c1"># 4
</span></code></pre></div></div>
<p>Imagine that you don’t want to store integers. You just want to store strings, like a list of your relatives’ names. Mine would look something like this:</p>
<div class="language-py highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="n">relatives_names</span> <span class="o">=</span> <span class="p">[</span>
<span class="s">"Toshiaki"</span><span class="p">,</span>
<span class="s">"Juliana"</span><span class="p">,</span>
<span class="s">"Yuji"</span><span class="p">,</span>
<span class="s">"Bruno"</span><span class="p">,</span>
<span class="s">"Kaio"</span>
<span class="p">]</span>
<span class="k">print</span><span class="p">(</span><span class="n">relatives_names</span><span class="p">[</span><span class="mi">4</span><span class="p">])</span> <span class="c1"># Kaio
</span></code></pre></div></div>
<p>It works the same way as integers. Nice.</p>
<p>We just learned how <code class="highlighter-rouge">Lists</code> indices work. But I still need to show you how we can add an element to the <code class="highlighter-rouge">List</code> data structure (an item to a list).</p>
<p>The most common method to add a new value to a <code class="highlighter-rouge">List</code> is <code class="highlighter-rouge">append</code>. Let’s see how it works:</p>
<div class="language-py highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="n">bookshelf</span> <span class="o">=</span> <span class="p">[]</span>
<span class="n">bookshelf</span><span class="p">.</span><span class="n">append</span><span class="p">(</span><span class="s">"The Effective Engineer"</span><span class="p">)</span>
<span class="n">bookshelf</span><span class="p">.</span><span class="n">append</span><span class="p">(</span><span class="s">"The 4 Hour Work Week"</span><span class="p">)</span>
<span class="k">print</span><span class="p">(</span><span class="n">bookshelf</span><span class="p">[</span><span class="mi">0</span><span class="p">])</span> <span class="c1"># The Effective Engineer
</span><span class="k">print</span><span class="p">(</span><span class="n">bookshelf</span><span class="p">[</span><span class="mi">1</span><span class="p">])</span> <span class="c1"># The 4 Hour Work Week
</span></code></pre></div></div>
<p><code class="highlighter-rouge">append</code> is super simple. You just need to apply the element (eg. “<strong>The Effective Engineer</strong>”) as the <code class="highlighter-rouge">append</code> parameter.</p>
<p>Well, enough about Lists. Let’s talk about another data structure.</p>
<h2 id="dictionary-key-value-data-structure">Dictionary: Key-Value Data Structure</h2>
<p>Now we know that <code class="highlighter-rouge">Lists</code> are indexed with integer numbers. But what if we don’t want to use integer numbers as indices? Some data structures that we can use are numeric, string, or other types of indices.</p>
<p>Let’s learn about the <code class="highlighter-rouge">Dictionary</code> data structure. <code class="highlighter-rouge">Dictionary</code> is a collection of key-value pairs. Here’s what it looks like:</p>
<div class="language-py highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="n">dictionary_example</span> <span class="o">=</span> <span class="p">{</span>
<span class="s">"key1"</span><span class="p">:</span> <span class="s">"value1"</span><span class="p">,</span>
<span class="s">"key2"</span><span class="p">:</span> <span class="s">"value2"</span><span class="p">,</span>
<span class="s">"key3"</span><span class="p">:</span> <span class="s">"value3"</span>
<span class="p">}</span>
</code></pre></div></div>
<p>The <strong>key</strong> is the index pointing to the <strong>value</strong>. How do we access the <code class="highlighter-rouge">Dictionary</code> <strong>value</strong>? You guessed it — using the <strong>key</strong>. Let’s try it:</p>
<div class="language-py highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="n">dictionary_tk</span> <span class="o">=</span> <span class="p">{</span>
<span class="s">"name"</span><span class="p">:</span> <span class="s">"Leandro"</span><span class="p">,</span>
<span class="s">"nickname"</span><span class="p">:</span> <span class="s">"Tk"</span><span class="p">,</span>
<span class="s">"nationality"</span><span class="p">:</span> <span class="s">"Brazilian"</span>
<span class="p">}</span>
<span class="k">print</span><span class="p">(</span><span class="s">"My name is %s"</span> <span class="o">%</span><span class="p">(</span><span class="n">dictionary_tk</span><span class="p">[</span><span class="s">"name"</span><span class="p">]))</span> <span class="c1"># My name is Leandro
</span><span class="k">print</span><span class="p">(</span><span class="s">"But you can call me %s"</span> <span class="o">%</span><span class="p">(</span><span class="n">dictionary_tk</span><span class="p">[</span><span class="s">"nickname"</span><span class="p">]))</span> <span class="c1"># But you can call me Tk
</span><span class="k">print</span><span class="p">(</span><span class="s">"And by the way I'm %s"</span> <span class="o">%</span><span class="p">(</span><span class="n">dictionary_tk</span><span class="p">[</span><span class="s">"nationality"</span><span class="p">]))</span> <span class="c1"># And by the way I'm Brazilian
</span></code></pre></div></div>
<p>I created a <code class="highlighter-rouge">Dictionary</code> about me. My name, nickname, and nationality. Those attributes are the <code class="highlighter-rouge">Dictionary</code> keys.</p>
<p>As we learned how to access the <code class="highlighter-rouge">List</code> using index, we also use indices (<strong>keys</strong> in the <code class="highlighter-rouge">Dictionary</code> context) to access the <strong>value</strong> stored in the <code class="highlighter-rouge">Dictionary</code>.</p>
<p>In the example, I printed a phrase about me using all the values stored in the <code class="highlighter-rouge">Dictionary</code>. Pretty simple, right?</p>
<p>Another cool thing about <code class="highlighter-rouge">Dictionary</code> is that we can use anything as the value. In the <code class="highlighter-rouge">Dictionary</code> I created, I want to add the key “age” and my real integer age in it:</p>
<div class="language-py highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="n">dictionary_tk</span> <span class="o">=</span> <span class="p">{</span>
<span class="s">"name"</span><span class="p">:</span> <span class="s">"Leandro"</span><span class="p">,</span>
<span class="s">"nickname"</span><span class="p">:</span> <span class="s">"Tk"</span><span class="p">,</span>
<span class="s">"nationality"</span><span class="p">:</span> <span class="s">"Brazilian"</span><span class="p">,</span>
<span class="s">"age"</span><span class="p">:</span> <span class="mi">24</span>
<span class="p">}</span>
<span class="k">print</span><span class="p">(</span><span class="s">"My name is %s"</span> <span class="o">%</span><span class="p">(</span><span class="n">dictionary_tk</span><span class="p">[</span><span class="s">"name"</span><span class="p">]))</span> <span class="c1"># My name is Leandro
</span><span class="k">print</span><span class="p">(</span><span class="s">"But you can call me %s"</span> <span class="o">%</span><span class="p">(</span><span class="n">dictionary_tk</span><span class="p">[</span><span class="s">"nickname"</span><span class="p">]))</span> <span class="c1"># But you can call me Tk
</span><span class="k">print</span><span class="p">(</span><span class="s">"And by the way I'm %i and %s"</span> <span class="o">%</span><span class="p">(</span><span class="n">dictionary_tk</span><span class="p">[</span><span class="s">"age"</span><span class="p">],</span> <span class="n">dictionary_tk</span><span class="p">[</span><span class="s">"nationality"</span><span class="p">]))</span> <span class="c1"># And by the way I'm Brazilian
</span></code></pre></div></div>
<p>Here we have a <strong>key</strong> (age) <strong>value</strong> (24) pair using string as the <strong>key</strong> and integer as the value.</p>
<p>As we did with <code class="highlighter-rouge">Lists</code>, let’s learn how to add elements to a <code class="highlighter-rouge">Dictionary</code>. The <strong>key</strong> pointing to a <strong>value</strong> is a big part of what <code class="highlighter-rouge">Dictionary</code> is. This is also true when we are talking about adding elements to it:</p>
<div class="language-py highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="n">dictionary_tk</span> <span class="o">=</span> <span class="p">{</span>
<span class="s">"name"</span><span class="p">:</span> <span class="s">"Leandro"</span><span class="p">,</span>
<span class="s">"nickname"</span><span class="p">:</span> <span class="s">"Tk"</span><span class="p">,</span>
<span class="s">"nationality"</span><span class="p">:</span> <span class="s">"Brazilian"</span>
<span class="p">}</span>
<span class="n">dictionary_tk</span><span class="p">[</span><span class="s">'age'</span><span class="p">]</span> <span class="o">=</span> <span class="mi">24</span>
<span class="k">print</span><span class="p">(</span><span class="n">dictionary_tk</span><span class="p">)</span> <span class="c1"># {'nationality': 'Brazilian', 'age': 24, 'nickname': 'Tk', 'name': 'Leandro'}
</span></code></pre></div></div>
<p>We just need to assign a <strong>value</strong> to a <code class="highlighter-rouge">Dictionary</code> <strong>key</strong>. Nothing complicated here, right?</p>
<h2 id="iteration-looping-through-data-structures">Iteration: Looping Through Data Structures</h2>
<p>The <code class="highlighter-rouge">List</code> iteration is very simple. We <code class="highlighter-rouge">Python</code> developers commonly use <code class="highlighter-rouge">For</code> looping. Let’s do it:</p>
<div class="language-py highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="n">bookshelf</span> <span class="o">=</span> <span class="p">[</span>
<span class="s">"The Effective Engineer"</span><span class="p">,</span>
<span class="s">"The 4 hours work week"</span><span class="p">,</span>
<span class="s">"Zero to One"</span><span class="p">,</span>
<span class="s">"Lean Startup"</span><span class="p">,</span>
<span class="s">"Hooked"</span>
<span class="p">]</span>
<span class="k">for</span> <span class="n">book</span> <span class="ow">in</span> <span class="n">bookshelf</span><span class="p">:</span>
<span class="k">print</span><span class="p">(</span><span class="n">book</span><span class="p">)</span>
</code></pre></div></div>
<p>So for each book in the bookshelf, we (<strong>can do everything with it</strong>) print it. Pretty simple and intuitive. That’s Python.
For a hash data structure, we can also use the <code class="highlighter-rouge">for</code> loop, but we apply the <code class="highlighter-rouge">key</code>:</p>
<div class="language-py highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="n">dictionary</span> <span class="o">=</span> <span class="p">{</span> <span class="s">"some_key"</span><span class="p">:</span> <span class="s">"some_value"</span> <span class="p">}</span>
<span class="k">for</span> <span class="n">key</span> <span class="ow">in</span> <span class="n">dictionary</span><span class="p">:</span>
<span class="k">print</span><span class="p">(</span><span class="s">"%s --> %s"</span> <span class="o">%</span><span class="p">(</span><span class="n">key</span><span class="p">,</span> <span class="n">dictionary</span><span class="p">[</span><span class="n">key</span><span class="p">]))</span>
<span class="c1"># some_key --> some_value
</span></code></pre></div></div>
<p>This is an example how to use it. For each <code class="highlighter-rouge">key</code> in the <code class="highlighter-rouge">dictionary</code>, we <code class="highlighter-rouge">print</code> the <code class="highlighter-rouge">key</code> and its corresponding <code class="highlighter-rouge">value</code>.</p>
<p>Another way to do it is to use the <code class="highlighter-rouge">iteritems</code> method.</p>
<div class="language-py highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="n">dictionary</span> <span class="o">=</span> <span class="p">{</span> <span class="s">"some_key"</span><span class="p">:</span> <span class="s">"some_value"</span> <span class="p">}</span>
<span class="k">for</span> <span class="n">key</span><span class="p">,</span> <span class="n">value</span> <span class="ow">in</span> <span class="n">dictionary</span><span class="p">.</span><span class="n">items</span><span class="p">():</span>
<span class="k">print</span><span class="p">(</span><span class="s">"%s --> %s"</span> <span class="o">%</span><span class="p">(</span><span class="n">key</span><span class="p">,</span> <span class="n">value</span><span class="p">))</span>
<span class="c1"># some_key --> some_value
</span></code></pre></div></div>
<p>We did name the two parameters as <code class="highlighter-rouge">key</code> and <code class="highlighter-rouge">value</code>, but it is not necessary. We can name them anything. Let’s see it:</p>
<div class="language-py highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="n">dictionary_tk</span> <span class="o">=</span> <span class="p">{</span>
<span class="s">"name"</span><span class="p">:</span> <span class="s">"Leandro"</span><span class="p">,</span>
<span class="s">"nickname"</span><span class="p">:</span> <span class="s">"Tk"</span><span class="p">,</span>
<span class="s">"nationality"</span><span class="p">:</span> <span class="s">"Brazilian"</span><span class="p">,</span>
<span class="s">"age"</span><span class="p">:</span> <span class="mi">24</span>
<span class="p">}</span>
<span class="k">for</span> <span class="n">attribute</span><span class="p">,</span> <span class="n">value</span> <span class="ow">in</span> <span class="n">dictionary_tk</span><span class="p">.</span><span class="n">items</span><span class="p">():</span>
<span class="k">print</span><span class="p">(</span><span class="s">"My %s is %s"</span> <span class="o">%</span><span class="p">(</span><span class="n">attribute</span><span class="p">,</span> <span class="n">value</span><span class="p">))</span>
<span class="c1"># My name is Leandro
# My nickname is Tk
# My nationality is Brazilian
# My age is 24
</span></code></pre></div></div>
<p>We can see we used attribute as a parameter for the <code class="highlighter-rouge">Dictionary</code> <code class="highlighter-rouge">key</code>, and it works properly. Great!</p>
<h2 id="classes--objects">Classes & Objects</h2>
<h3 id="a-little-bit-of-theory">A little bit of theory:</h3>
<p><strong>Objects</strong> are a representation of real world objects like cars, dogs, or bikes. The objects share two main characteristics: <strong>data</strong> and <strong>behavior</strong>.</p>
<p>Cars have <strong>data</strong>, like number of wheels, number of doors, and seating capacity They also exhibit <strong>behavior:</strong> they can accelerate, stop, show how much fuel is left, and so many other things.</p>
<p>We identify <strong>data</strong> as <strong>attributes</strong> and <strong>behavior</strong> as <strong>methods</strong> in object-oriented programming. Again:</p>
<p>Data → Attributes and Behavior → Methods</p>
<p>And a <strong>Class</strong> is the blueprint from which individual objects are created. In the real world, we often find many objects with the same type. Like cars. All the same make and model (and all have an engine, wheels, doors, and so on). Each car was built from the same set of blueprints and has the same components.</p>
<h2 id="python-object-oriented-programming-mode-on">Python Object-Oriented Programming mode: ON</h2>
<p>Python, as an Object-Oriented programming language, has these concepts: <strong>class</strong> and <strong>object</strong>.</p>
<p>A class is a blueprint, a model for its objects.</p>
<p>So again, a class it is just a model, or a way to define <strong>attributes</strong> and <strong>behavior</strong> (as we talked about in the theory section). As an example, a vehicle class has its own <strong>attributes</strong> that define what <strong>objects</strong> are vehicles. The number of wheels, type of tank, seating capacity, and maximum velocity are all attributes of a vehicle.</p>
<p>With this in mind, let’s look at Python syntax for <strong>classes:</strong></p>
<div class="language-py highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="k">class</span> <span class="nc">Vehicle</span><span class="p">:</span>
<span class="k">pass</span>
</code></pre></div></div>
<p>We define classes with a <strong>class statement</strong> — and that’s it. Easy, isn’t it?
<strong>Objects</strong> are instances of a <strong>class</strong>. We create an instance by naming the class.</p>
<div class="language-py highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="n">car</span> <span class="o">=</span> <span class="n">Vehicle</span><span class="p">()</span>
<span class="k">print</span><span class="p">(</span><span class="n">car</span><span class="p">)</span>
</code></pre></div></div>
<p>Here <code class="highlighter-rouge">car</code> is an <strong>object</strong> (or instance) of the <strong>class</strong> <code class="highlighter-rouge">Vehicle</code>.</p>
<p>Remember that our vehicle <strong>class</strong> has four <strong>attributes:</strong> number of wheels, type of tank, seating capacity, and maximum velocity. We set all these <strong>attributes</strong> when creating a vehicle <strong>object</strong>. So here, we define our <strong>class</strong> to receive data when it initiates it:</p>
<div class="language-py highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="k">class</span> <span class="nc">Vehicle</span><span class="p">:</span>
<span class="k">def</span> <span class="nf">__init__</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">number_of_wheels</span><span class="p">,</span> <span class="n">type_of_tank</span><span class="p">,</span> <span class="n">seating_capacity</span><span class="p">,</span> <span class="n">maximum_velocity</span><span class="p">):</span>
<span class="bp">self</span><span class="p">.</span><span class="n">number_of_wheels</span> <span class="o">=</span> <span class="n">number_of_wheels</span>
<span class="bp">self</span><span class="p">.</span><span class="n">type_of_tank</span> <span class="o">=</span> <span class="n">type_of_tank</span>
<span class="bp">self</span><span class="p">.</span><span class="n">seating_capacity</span> <span class="o">=</span> <span class="n">seating_capacity</span>
<span class="bp">self</span><span class="p">.</span><span class="n">maximum_velocity</span> <span class="o">=</span> <span class="n">maximum_velocity</span>
</code></pre></div></div>
<p>We use the <code class="highlighter-rouge">init</code> <strong>method</strong>. We call it a constructor method. So when we create the vehicle object, we can define these <strong>attributes</strong>. Imagine that we love the <strong>Tesla Model S</strong>, and we want to create this kind of <strong>object</strong>. It has four wheels, runs on electric energy, has space for five seats, and the maximum velocity is 250km/hour (155 mph). Let’s create this <strong>object:</strong></p>
<div class="language-py highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="n">tesla_model_s</span> <span class="o">=</span> <span class="n">Vehicle</span><span class="p">(</span><span class="mi">4</span><span class="p">,</span> <span class="s">'electric'</span><span class="p">,</span> <span class="mi">5</span><span class="p">,</span> <span class="mi">250</span><span class="p">)</span>
</code></pre></div></div>
<p>Four wheels + electric “tank type” + five seats + 250km/hour maximum speed.</p>
<p>All attributes are set. But how can we access these attributes’ values? We <strong>send a message to the object asking about them</strong>. We call it a <strong>method</strong>. It’s the <strong>object’s behavior</strong>. Let’s implement it:</p>
<div class="language-py highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="k">class</span> <span class="nc">Vehicle</span><span class="p">:</span>
<span class="k">def</span> <span class="nf">__init__</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">number_of_wheels</span><span class="p">,</span> <span class="n">type_of_tank</span><span class="p">,</span> <span class="n">seating_capacity</span><span class="p">,</span> <span class="n">maximum_velocity</span><span class="p">):</span>
<span class="bp">self</span><span class="p">.</span><span class="n">number_of_wheels</span> <span class="o">=</span> <span class="n">number_of_wheels</span>
<span class="bp">self</span><span class="p">.</span><span class="n">type_of_tank</span> <span class="o">=</span> <span class="n">type_of_tank</span>
<span class="bp">self</span><span class="p">.</span><span class="n">seating_capacity</span> <span class="o">=</span> <span class="n">seating_capacity</span>
<span class="bp">self</span><span class="p">.</span><span class="n">maximum_velocity</span> <span class="o">=</span> <span class="n">maximum_velocity</span>
<span class="k">def</span> <span class="nf">number_of_wheels</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span>
<span class="k">return</span> <span class="bp">self</span><span class="p">.</span><span class="n">number_of_wheels</span>
<span class="k">def</span> <span class="nf">set_number_of_wheels</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">number</span><span class="p">):</span>
<span class="bp">self</span><span class="p">.</span><span class="n">number_of_wheels</span> <span class="o">=</span> <span class="n">number</span>
</code></pre></div></div>
<p>This is an implementation of two methods: <strong>number_of_wheels</strong> and <strong>set_number_of_wheels</strong>. We call it <code class="highlighter-rouge">getter</code> & <code class="highlighter-rouge">setter</code>. Because the first gets the attribute value, and the second sets a new value for the attribute.</p>
<p>In Python, we can do that using <code class="highlighter-rouge">@property</code> (<code class="highlighter-rouge">decorators</code>) to define <code class="highlighter-rouge">getters</code> and <code class="highlighter-rouge">setters</code>. Let’s see it with code:</p>
<div class="language-py highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="k">class</span> <span class="nc">Vehicle</span><span class="p">:</span>
<span class="k">def</span> <span class="nf">__init__</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">number_of_wheels</span><span class="p">,</span> <span class="n">type_of_tank</span><span class="p">,</span> <span class="n">seating_capacity</span><span class="p">,</span> <span class="n">maximum_velocity</span><span class="p">):</span>
<span class="bp">self</span><span class="p">.</span><span class="n">number_of_wheels</span> <span class="o">=</span> <span class="n">number_of_wheels</span>
<span class="bp">self</span><span class="p">.</span><span class="n">type_of_tank</span> <span class="o">=</span> <span class="n">type_of_tank</span>
<span class="bp">self</span><span class="p">.</span><span class="n">seating_capacity</span> <span class="o">=</span> <span class="n">seating_capacity</span>
<span class="bp">self</span><span class="p">.</span><span class="n">maximum_velocity</span> <span class="o">=</span> <span class="n">maximum_velocity</span>
<span class="o">@</span><span class="nb">property</span>
<span class="k">def</span> <span class="nf">number_of_wheels</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span>
<span class="k">return</span> <span class="bp">self</span><span class="p">.</span><span class="n">number_of_wheels</span>
<span class="o">@</span><span class="n">number_of_wheels</span><span class="p">.</span><span class="n">setter</span>
<span class="k">def</span> <span class="nf">number_of_wheels</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">number</span><span class="p">):</span>
<span class="bp">self</span><span class="p">.</span><span class="n">number_of_wheels</span> <span class="o">=</span> <span class="n">number</span>
</code></pre></div></div>
<p>And we can use these methods as attributes:</p>
<div class="language-py highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="n">tesla_model_s</span> <span class="o">=</span> <span class="n">Vehicle</span><span class="p">(</span><span class="mi">4</span><span class="p">,</span> <span class="s">'electric'</span><span class="p">,</span> <span class="mi">5</span><span class="p">,</span> <span class="mi">250</span><span class="p">)</span>
<span class="k">print</span><span class="p">(</span><span class="n">tesla_model_s</span><span class="p">.</span><span class="n">number_of_wheels</span><span class="p">)</span> <span class="c1"># 4
</span><span class="n">tesla_model_s</span><span class="p">.</span><span class="n">number_of_wheels</span> <span class="o">=</span> <span class="mi">2</span> <span class="c1"># setting number of wheels to 2
</span><span class="k">print</span><span class="p">(</span><span class="n">tesla_model_s</span><span class="p">.</span><span class="n">number_of_wheels</span><span class="p">)</span> <span class="c1"># 2
</span></code></pre></div></div>
<p>This is slightly different than defining methods. The methods work as attributes. For example, when we set the new number of wheels, we don’t apply two as a parameter, but set the value 2 to <code class="highlighter-rouge">number_of_wheels</code>. This is one way to write <code class="highlighter-rouge">pythonic</code> <code class="highlighter-rouge">getter</code> and <code class="highlighter-rouge">setter</code> code.</p>
<p>But we can also use methods for other things, like the “<strong>make_noise</strong>” method. Let’s see it:</p>
<div class="language-py highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="k">class</span> <span class="nc">Vehicle</span><span class="p">:</span>
<span class="k">def</span> <span class="nf">__init__</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">number_of_wheels</span><span class="p">,</span> <span class="n">type_of_tank</span><span class="p">,</span> <span class="n">seating_capacity</span><span class="p">,</span> <span class="n">maximum_velocity</span><span class="p">):</span>
<span class="bp">self</span><span class="p">.</span><span class="n">number_of_wheels</span> <span class="o">=</span> <span class="n">number_of_wheels</span>
<span class="bp">self</span><span class="p">.</span><span class="n">type_of_tank</span> <span class="o">=</span> <span class="n">type_of_tank</span>
<span class="bp">self</span><span class="p">.</span><span class="n">seating_capacity</span> <span class="o">=</span> <span class="n">seating_capacity</span>
<span class="bp">self</span><span class="p">.</span><span class="n">maximum_velocity</span> <span class="o">=</span> <span class="n">maximum_velocity</span>
<span class="k">def</span> <span class="nf">make_noise</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span>
<span class="k">print</span><span class="p">(</span><span class="s">'VRUUUUUUUM'</span><span class="p">)</span>
</code></pre></div></div>
<p>When we call this method, it just returns a string “<strong>VRRRRUUUUM.</strong>”</p>
<div class="language-py highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="n">tesla_model_s</span> <span class="o">=</span> <span class="n">Vehicle</span><span class="p">(</span><span class="mi">4</span><span class="p">,</span> <span class="s">'electric'</span><span class="p">,</span> <span class="mi">5</span><span class="p">,</span> <span class="mi">250</span><span class="p">)</span>
<span class="n">tesla_model_s</span><span class="p">.</span><span class="n">make_noise</span><span class="p">()</span> <span class="c1"># VRUUUUUUUM
</span></code></pre></div></div>
<h2 id="encapsulation-hiding-information">Encapsulation: Hiding Information</h2>
<p>Encapsulation is a mechanism that restricts direct access to objects’ data and methods. But at the same time, it facilitates operation on that data (objects’ methods).</p>
<blockquote>
“Encapsulation can be used to hide data members and members function. Under this definition, encapsulation means that the internal representation of an object is generally hidden from view outside of the object’s definition.” — Wikipedia
</blockquote>
<ul>
<li><a href="//en.wikipedia.org/wiki/Object_%28computer_science%29">Object</a></li>
</ul>
<p>All internal representation of an object is hidden from the outside. Only the object can interact with its internal data.</p>
<p>First, we need to understand how <code class="highlighter-rouge">public</code> and <code class="highlighter-rouge">non-public</code> instance variables and methods work.</p>
<h3 id="public-instance-variables">Public Instance Variables</h3>
<p>For a Python class, we can initialize a <code class="highlighter-rouge">public instance variable</code> within our constructor method. Let’s see this:</p>
<p>Within the constructor method:</p>
<div class="language-py highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="k">class</span> <span class="nc">Person</span><span class="p">:</span>
<span class="k">def</span> <span class="nf">__init__</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">first_name</span><span class="p">):</span>
<span class="bp">self</span><span class="p">.</span><span class="n">first_name</span> <span class="o">=</span> <span class="n">first_name</span>
</code></pre></div></div>
<p>Here we apply the <code class="highlighter-rouge">first_name</code> value as an argument to the <code class="highlighter-rouge">public instance variable</code>.</p>
<div class="language-py highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="n">tk</span> <span class="o">=</span> <span class="n">Person</span><span class="p">(</span><span class="s">'TK'</span><span class="p">)</span>
<span class="k">print</span><span class="p">(</span><span class="n">tk</span><span class="p">.</span><span class="n">first_name</span><span class="p">)</span> <span class="c1"># => TK
</span></code></pre></div></div>
<p>Within the class:</p>
<div class="language-py highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="k">class</span> <span class="nc">Person</span><span class="p">:</span>
<span class="n">first_name</span> <span class="o">=</span> <span class="s">'TK'</span>
</code></pre></div></div>
<p>Here, we do not need to apply the <code class="highlighter-rouge">first_name</code> as an argument, and all instance objects will have a <code class="highlighter-rouge">class attribute</code> initialized with <code class="highlighter-rouge">TK</code>.</p>
<div class="language-py highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="n">tk</span> <span class="o">=</span> <span class="n">Person</span><span class="p">()</span>
<span class="k">print</span><span class="p">(</span><span class="n">tk</span><span class="p">.</span><span class="n">first_name</span><span class="p">)</span> <span class="c1"># => TK
</span></code></pre></div></div>
<p>Cool. We have now learned that we can use <code class="highlighter-rouge">public instance variables</code> and <code class="highlighter-rouge">class attributes</code>. Another interesting thing about the <code class="highlighter-rouge">public</code> part is that we can manage the variable value. What do I mean by that? Our object can manage its variable value: <code class="highlighter-rouge">Get</code> and <code class="highlighter-rouge">Set</code> variable values.</p>
<p>Keeping the <code class="highlighter-rouge">Person</code> class in mind, we want to set another value to its <code class="highlighter-rouge">first_name</code> variable:</p>
<div class="language-py highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="n">tk</span> <span class="o">=</span> <span class="n">Person</span><span class="p">(</span><span class="s">'TK'</span><span class="p">)</span>
<span class="n">tk</span><span class="p">.</span><span class="n">first_name</span> <span class="o">=</span> <span class="s">'Kaio'</span>
<span class="k">print</span><span class="p">(</span><span class="n">tk</span><span class="p">.</span><span class="n">first_name</span><span class="p">)</span> <span class="c1"># => Kaio
</span></code></pre></div></div>
<p>There we go. We just set another value (<code class="highlighter-rouge">kaio</code>) to the <code class="highlighter-rouge">first_name</code> instance variable and it updated the value. Simple as that. Since it’s a <code class="highlighter-rouge">public</code> variable, we can do that.</p>
<h3 id="non-public-instance-variable">Non-public Instance Variable</h3>
<blockquote>
We don’t use the term “private” here, since no attribute is really private in Python (without a generally unnecessary amount of work).
</blockquote>
<p>As the <code class="highlighter-rouge">public instance variable</code>, we can define the <code class="highlighter-rouge">non-public instance</code> variable both within the constructor method or within the class. The syntax difference is: for <code class="highlighter-rouge">non-public instance variables</code>, use an underscore (<code class="highlighter-rouge">_</code>) before the <code class="highlighter-rouge">variable</code> name.</p>
<blockquote>
“‘Private’ instance variables that cannot be accessed except from inside an object don’t exist in Python. However, there is a convention that is followed by most Python code: a name prefixed with an underscore (e.g. `_spam`) should be treated as a non-public part of the API (whether it is a function, a method or a data member)”— Python Software Foundation
</blockquote>
<p><a href="//docs.python.org/2/tutorial/classes.html#private-variables-and-class-local-references">Python Software Foundation</a></p>
<p>Here’s an example:</p>
<div class="language-py highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="k">class</span> <span class="nc">Person</span><span class="p">:</span>
<span class="k">def</span> <span class="nf">__init__</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">first_name</span><span class="p">,</span> <span class="n">email</span><span class="p">):</span>
<span class="bp">self</span><span class="p">.</span><span class="n">first_name</span> <span class="o">=</span> <span class="n">first_name</span>
<span class="bp">self</span><span class="p">.</span><span class="n">_email</span> <span class="o">=</span> <span class="n">email</span>
</code></pre></div></div>
<p>Did you see the <code class="highlighter-rouge">email</code> variable? This is how we define a <code class="highlighter-rouge">non-public variable</code>:</p>
<div class="language-py highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="n">tk</span> <span class="o">=</span> <span class="n">Person</span><span class="p">(</span><span class="s">'TK'</span><span class="p">,</span> <span class="s">'tk@mail.com'</span><span class="p">)</span>
<span class="k">print</span><span class="p">(</span><span class="n">tk</span><span class="p">.</span><span class="n">_email</span><span class="p">)</span> <span class="c1"># tk@mail.com
</span></code></pre></div></div>
<blockquote>
We can access and update it. `Non-public variables` are just a convention and should be treated as a non-public part of the API.
</blockquote>
<p>So we use a method that allows us to do it inside our class definition. Let’s implement two methods (<code class="highlighter-rouge">email</code> and <code class="highlighter-rouge">update_email</code>) to understand it:</p>
<div class="language-py highlighter-rouge"><div class="highlight"><pre class="highlight"><code>
<span class="k">class</span> <span class="nc">Person</span><span class="p">:</span>
<span class="k">def</span> <span class="nf">__init__</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">first_name</span><span class="p">,</span> <span class="n">email</span><span class="p">):</span>
<span class="bp">self</span><span class="p">.</span><span class="n">first_name</span> <span class="o">=</span> <span class="n">first_name</span>
<span class="bp">self</span><span class="p">.</span><span class="n">_email</span> <span class="o">=</span> <span class="n">email</span>
<span class="k">def</span> <span class="nf">update_email</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">new_email</span><span class="p">):</span>
<span class="bp">self</span><span class="p">.</span><span class="n">_email</span> <span class="o">=</span> <span class="n">new_email</span>
<span class="k">def</span> <span class="nf">email</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span>
<span class="k">return</span> <span class="bp">self</span><span class="p">.</span><span class="n">_email</span>
</code></pre></div></div>
<p>Now we can update and access <code class="highlighter-rouge">non-public variables</code> using those methods. Let’s see:</p>
<div class="language-py highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="n">tk</span> <span class="o">=</span> <span class="n">Person</span><span class="p">(</span><span class="s">'TK'</span><span class="p">,</span> <span class="s">'tk@mail.com'</span><span class="p">)</span>
<span class="k">print</span><span class="p">(</span><span class="n">tk</span><span class="p">.</span><span class="n">email</span><span class="p">())</span> <span class="c1"># => tk@mail.com
</span><span class="n">tk</span><span class="p">.</span><span class="n">_email</span> <span class="o">=</span> <span class="s">'new_tk@mail.com'</span>
<span class="k">print</span><span class="p">(</span><span class="n">tk</span><span class="p">.</span><span class="n">email</span><span class="p">())</span> <span class="c1"># => tk@mail.com
</span><span class="n">tk</span><span class="p">.</span><span class="n">update_email</span><span class="p">(</span><span class="s">'new_tk@mail.com'</span><span class="p">)</span>
<span class="k">print</span><span class="p">(</span><span class="n">tk</span><span class="p">.</span><span class="n">email</span><span class="p">())</span> <span class="c1"># => new_tk@mail.com
</span></code></pre></div></div>
<ol>
<li>We initiated a new object with <code class="highlighter-rouge">first_name</code> TK and <code class="highlighter-rouge">email</code> tk@mail.com</li>
<li>Printed the email by accessing the <code class="highlighter-rouge">non-public variable</code> with a method</li>
<li>Tried to set a new <code class="highlighter-rouge">email</code> out of our class</li>
<li>We need to treat <code class="highlighter-rouge">non-public variable</code> as <code class="highlighter-rouge">non-public</code> part of the API</li>
<li>Updated the <code class="highlighter-rouge">non-public variable</code> with our instance method</li>
<li>Success! We can update it inside our class with the helper method</li>
</ol>
<h3 id="public-method">Public Method</h3>
<p>With <code class="highlighter-rouge">public methods</code>, we can also use them out of our class:</p>
<div class="language-py highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="k">class</span> <span class="nc">Person</span><span class="p">:</span>
<span class="k">def</span> <span class="nf">__init__</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">first_name</span><span class="p">,</span> <span class="n">age</span><span class="p">):</span>
<span class="bp">self</span><span class="p">.</span><span class="n">first_name</span> <span class="o">=</span> <span class="n">first_name</span>
<span class="bp">self</span><span class="p">.</span><span class="n">_age</span> <span class="o">=</span> <span class="n">age</span>
<span class="k">def</span> <span class="nf">show_age</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span>
<span class="k">return</span> <span class="bp">self</span><span class="p">.</span><span class="n">_age</span>
</code></pre></div></div>
<p>Let’s test it:</p>
<div class="language-py highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="n">tk</span> <span class="o">=</span> <span class="n">Person</span><span class="p">(</span><span class="s">'TK'</span><span class="p">,</span> <span class="mi">25</span><span class="p">)</span>
<span class="k">print</span><span class="p">(</span><span class="n">tk</span><span class="p">.</span><span class="n">show_age</span><span class="p">())</span> <span class="c1"># => 25
</span></code></pre></div></div>
<p>Great — we can use it without any problem.</p>
<h3 id="non-public-method">Non-public Method</h3>
<p>But with <code class="highlighter-rouge">non-public methods</code> we aren’t able to do it. Let’s implement the same <code class="highlighter-rouge">Person</code> class, but now with a <code class="highlighter-rouge">show_age</code> <code class="highlighter-rouge">non-public method</code> using an underscore (<code class="highlighter-rouge">_</code>).</p>
<div class="language-py highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="k">class</span> <span class="nc">Person</span><span class="p">:</span>
<span class="k">def</span> <span class="nf">__init__</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">first_name</span><span class="p">,</span> <span class="n">age</span><span class="p">):</span>
<span class="bp">self</span><span class="p">.</span><span class="n">first_name</span> <span class="o">=</span> <span class="n">first_name</span>
<span class="bp">self</span><span class="p">.</span><span class="n">_age</span> <span class="o">=</span> <span class="n">age</span>
<span class="k">def</span> <span class="nf">_show_age</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span>
<span class="k">return</span> <span class="bp">self</span><span class="p">.</span><span class="n">_age</span>
</code></pre></div></div>
<p>And now, we’ll try to call this <code class="highlighter-rouge">non-public method</code> with our object:</p>
<div class="language-py highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="n">tk</span> <span class="o">=</span> <span class="n">Person</span><span class="p">(</span><span class="s">'TK'</span><span class="p">,</span> <span class="mi">25</span><span class="p">)</span>
<span class="k">print</span><span class="p">(</span><span class="n">tk</span><span class="p">.</span><span class="n">_show_age</span><span class="p">())</span> <span class="c1"># => 25
</span></code></pre></div></div>
<blockquote>
We can access and update it. `Non-public methods` are just a convention and should be treated as a non-public part of the API.
</blockquote>
<p>Here’s an example for how we can use it:</p>
<div class="language-py highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="k">class</span> <span class="nc">Person</span><span class="p">:</span>
<span class="k">def</span> <span class="nf">__init__</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">first_name</span><span class="p">,</span> <span class="n">age</span><span class="p">):</span>
<span class="bp">self</span><span class="p">.</span><span class="n">first_name</span> <span class="o">=</span> <span class="n">first_name</span>
<span class="bp">self</span><span class="p">.</span><span class="n">_age</span> <span class="o">=</span> <span class="n">age</span>
<span class="k">def</span> <span class="nf">show_age</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span>
<span class="k">return</span> <span class="bp">self</span><span class="p">.</span><span class="n">_get_age</span><span class="p">()</span>
<span class="k">def</span> <span class="nf">_get_age</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span>
<span class="k">return</span> <span class="bp">self</span><span class="p">.</span><span class="n">_age</span>
<span class="n">tk</span> <span class="o">=</span> <span class="n">Person</span><span class="p">(</span><span class="s">'TK'</span><span class="p">,</span> <span class="mi">25</span><span class="p">)</span>
<span class="k">print</span><span class="p">(</span><span class="n">tk</span><span class="p">.</span><span class="n">show_age</span><span class="p">())</span> <span class="c1"># => 25
</span></code></pre></div></div>
<p>Here we have a <code class="highlighter-rouge">_get_age</code> <code class="highlighter-rouge">non-public method</code> and a <code class="highlighter-rouge">show_age</code> <code class="highlighter-rouge">public method</code>. The <code class="highlighter-rouge">show_age</code> can be used by our object (out of our class) and the <code class="highlighter-rouge">_get_age</code> only used inside our class definition (inside <code class="highlighter-rouge">show_age</code> method). But again: as a matter of convention.</p>
<h3 id="encapsulation-summary">Encapsulation Summary</h3>
<p>With encapsulation we can ensure that the internal representation of the object is hidden from the outside.</p>
<h2 id="inheritance-behaviors-and-characteristics">Inheritance: behaviors and characteristics</h2>
<p>Certain objects have some things in common: their behavior and characteristics.</p>
<p>For example, I inherited some characteristics and behaviors from my father. I inherited his eyes and hair as characteristics, and his impatience and introversion as behaviors.</p>
<p>In object-oriented programming, classes can inherit common characteristics (data) and behavior (methods) from another class.</p>
<p>Let’s see another example and implement it in Python.</p>
<p>Imagine a car. Number of wheels, seating capacity and maximum velocity are all attributes of a car. We can say that an <strong>ElectricCar</strong> class inherits these same attributes from the regular <strong>Car</strong> class.</p>
<div class="language-py highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="k">class</span> <span class="nc">Car</span><span class="p">:</span>
<span class="k">def</span> <span class="nf">__init__</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">number_of_wheels</span><span class="p">,</span> <span class="n">seating_capacity</span><span class="p">,</span> <span class="n">maximum_velocity</span><span class="p">):</span>
<span class="bp">self</span><span class="p">.</span><span class="n">number_of_wheels</span> <span class="o">=</span> <span class="n">number_of_wheels</span>
<span class="bp">self</span><span class="p">.</span><span class="n">seating_capacity</span> <span class="o">=</span> <span class="n">seating_capacity</span>
<span class="bp">self</span><span class="p">.</span><span class="n">maximum_velocity</span> <span class="o">=</span> <span class="n">maximum_velocity</span>
</code></pre></div></div>
<p>Our <strong>Car</strong> class implemented:</p>
<div class="language-py highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="n">my_car</span> <span class="o">=</span> <span class="n">Car</span><span class="p">(</span><span class="mi">4</span><span class="p">,</span> <span class="mi">5</span><span class="p">,</span> <span class="mi">250</span><span class="p">)</span>
<span class="k">print</span><span class="p">(</span><span class="n">my_car</span><span class="p">.</span><span class="n">number_of_wheels</span><span class="p">)</span>
<span class="k">print</span><span class="p">(</span><span class="n">my_car</span><span class="p">.</span><span class="n">seating_capacity</span><span class="p">)</span>
<span class="k">print</span><span class="p">(</span><span class="n">my_car</span><span class="p">.</span><span class="n">maximum_velocity</span><span class="p">)</span>
</code></pre></div></div>
<p>Once initiated, we can use all <code class="highlighter-rouge">instance variables</code> created. Nice.</p>
<p>In Python, we apply a <code class="highlighter-rouge">parent class</code> to the <code class="highlighter-rouge">child class</code> as a parameter. An <strong>ElectricCar</strong> class can inherit from our <strong>Car</strong> class.</p>
<div class="language-py highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="k">class</span> <span class="nc">ElectricCar</span><span class="p">(</span><span class="n">Car</span><span class="p">):</span>
<span class="k">def</span> <span class="nf">__init__</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">number_of_wheels</span><span class="p">,</span> <span class="n">seating_capacity</span><span class="p">,</span> <span class="n">maximum_velocity</span><span class="p">):</span>
<span class="n">Car</span><span class="p">.</span><span class="n">__init__</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">number_of_wheels</span><span class="p">,</span> <span class="n">seating_capacity</span><span class="p">,</span> <span class="n">maximum_velocity</span><span class="p">)</span>
</code></pre></div></div>
<p>Simple as that. We don’t need to implement any other method, because this class already has it (inherited from <strong>Car</strong> class). Let’s prove it:</p>
<div class="language-py highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="n">my_electric_car</span> <span class="o">=</span> <span class="n">ElectricCar</span><span class="p">(</span><span class="mi">4</span><span class="p">,</span> <span class="mi">5</span><span class="p">,</span> <span class="mi">250</span><span class="p">)</span>
<span class="k">print</span><span class="p">(</span><span class="n">my_electric_car</span><span class="p">.</span><span class="n">number_of_wheels</span><span class="p">)</span> <span class="c1"># => 4
</span><span class="k">print</span><span class="p">(</span><span class="n">my_electric_car</span><span class="p">.</span><span class="n">seating_capacity</span><span class="p">)</span> <span class="c1"># => 5
</span><span class="k">print</span><span class="p">(</span><span class="n">my_electric_car</span><span class="p">.</span><span class="n">maximum_velocity</span><span class="p">)</span> <span class="c1"># => 250
</span></code></pre></div></div>
<p>Beautiful.</p>
<h2 id="thats-it">That’s it!</h2>
<p>We learned a lot of things about Python basics:</p>
<ul>
<li>How Python variables work</li>
<li>How Python conditional statements work</li>
<li>How Python looping (while & for) works</li>
<li>
<table>
<tbody>
<tr>
<td>How to use Lists: Collection</td>
<td>Array</td>
</tr>
</tbody>
</table>
</li>
<li>Dictionary Key-Value Collection</li>
<li>How we can iterate through these data structures</li>
<li>Objects and Classes</li>
<li>Attributes as objects’ data</li>
<li>Methods as objects’ behavior</li>
<li>Using Python getters and setters & property decorator</li>
<li>Encapsulation: hiding information</li>
<li>Inheritance: behaviors and characteristics</li>
</ul>
<p>Congrats! You completed this dense piece of content about Python.</p>yashumittalFirst of all, what is Python? According to its creator, Guido van Rossum, Python is a
https://cdn.codecarrot.net/images/1-ueWmI48uuShON-hX7LwI0w.png
20 JavaScript tools to blow your mind2017-10-11T18:30:10+00:002017-10-11T18:30:10+00:00https://blog.codecarrot.net/20-javascript-tools-to-blow-your-mind<p>JavaScript started its life as a browser-based language used for adding interactivity to web pages, but it has evolved tremendously over the past few years. Once Node.js enabled JavaScript to be run on the server, it opened up a world of possibilities, and more language innovations were inevitable.</p>
<p>As the language grew, these evolutionary stepping stones led to the next major version of JavaScript: ECMAScript 2015 (previously known as ES6). Along with this new version came a new release cycle. After its major update in 2015, the JavaScript language will now start seeing smaller updates every year, allowing it to keep evolving through smaller, more frequent iterations.</p>
<p>Let’s take a look at some of my favourite JavaScript tips, tricks and tools. These will give you some web design inspiration and they’re sure to blow your mind, especially if you haven’t kept up with how JavaScript has grown up over the years. These tools are split into different themes – navigate to the page you want using the drop-down menu above.</p>
<h2 id="01-write-tomorrows-javascript-today-with-babel">01. Write tomorrow’s JavaScript today with Babel</h2>
<p><img src="https://cdn.codecarrot.net/images/babel-website-3453VSDerg34.png" alt="Babel allows developers to write code using the latest version of JavaScript without sacrificing compatibility with older browsers" /></p>
<p><em>Babel allows developers to write code using the latest version of JavaScript without sacrificing compatibility with older browsers</em></p>
<p>Not all browsers understand ES2015 code yet, so in order to use the latest features of the language today, we need a tool like Babel. This transforms ES2015 code into normal ES5 JavaScript code that all browsers are able to interpret. It is common for developers to include Babel in their deployment process through build systems such as gulp or webpack.</p>
<p>This approach allows devs to use the latest tech while ensuring their apps remain compatible with old browser versions, but only at the deployment stage.</p>
<h2 id="02-explore-new-ways-of-declaring-variables">02. Explore new ways of declaring variables</h2>
<p>In ES2015, JavaScript introduced two new ways of declaring variables: <strong>let</strong> and <strong>const</strong>. <strong>let</strong> is used when a variable will be reassigned, whereas <strong>const</strong> keeps a variable from being reassigned. Note that using <strong>const</strong> does not freeze arrays and objects, and it doesn’t stop properties from being mutated. Instead, it just keeps the variable itself from being reassigned.</p>
<p>The main benefit that both <strong>let</strong> and <strong>const</strong> deliver over <strong>var</strong> is that when using <strong>var</strong> your variables get scoped to the top of the current function, therefore making the variable available to the whole function. In contrast, <strong>let</strong> and <strong>const</strong> are scoped to their closest block, allowing developers to declare variables within <strong>if</strong>, <strong>while</strong>, <strong>for</strong> and even <strong>switch</strong> blocks, without worrying about the variable scope leaking outside of that context.</p>
<p><img src="https://cdn.codecarrot.net/images/o3UDAeR3Din8AZ6dnqgjEk-650-80.jpg" alt="JavaScript is among the fastest growing programming languages" /></p>
<p><em>JavaScript is among the fastest growing programming languages</em></p>
<h2 id="03-use-arrow-functions-to-keep-this-intact">03. Use arrow functions to keep ‘this’ intact</h2>
<p>Another feature that’s been added to JavaScript recently is arrow functions. These have the ability to keep the <strong>this</strong> context intact, especially when using it within callbacks that might get called from somewhere else (i.e. adding an event listener with jQuery, and so on). Essentially, arrow functions replace the need to add <strong>.bind(this)</strong> at the end of a function declaration.</p>
<p>There are two main ways of writing arrow functions: one-liners and multiple-liners. One-liners have only one expression and return the value of that given expression, without the need for curly braces. Multiple-liners, on the other hand, have curly braces and the return keyword must be used explicitly.</p>
<div class="language-js highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="kd">let</span> <span class="nx">doubleShort</span> <span class="o">=</span> <span class="p">(</span><span class="nx">num</span><span class="p">)</span> <span class="o">=></span> <span class="nx">num</span> <span class="o">*</span> <span class="mi">2</span><span class="p">;</span>
<span class="kd">let</span> <span class="nx">doubleLong</span> <span class="o">=</span> <span class="p">(</span><span class="nx">num</span><span class="p">)</span> <span class="o">=></span> <span class="p">{</span>
<span class="kd">let</span> <span class="nx">doubleNum</span> <span class="o">=</span> <span class="nx">num</span> <span class="o">*</span> <span class="mi">2</span><span class="p">;</span>
<span class="k">return</span> <span class="nx">doubleNum</span><span class="p">;</span>
<span class="p">}</span>
</code></pre></div></div>
<h2 id="04-use-promises-to-avoid-a-callback-can-of-worms">04. Use promises to avoid a callback can of worms</h2>
<p><img src="https://cdn.codecarrot.net/images/1-o9BJ_DkWpdASQV_A.png" alt="Learn JavaScript for free and stay up to date with the latest news on JavaScript.com" /></p>
<p><em>Learn JavaScript for free and stay up to date with the latest news on JavaScript.com</em></p>
<p>JavaScript does a lot of its operations asynchronously, so passing callback functions while waiting for other things to happen is a pretty standard pattern. The problem begins, though, when you’re executing an async action that will trigger another async action, and so forth. You’ll likely be passing many nested callback functions, which will make the code cluttered and harder to read.</p>
<p>Promises solve this problem by helping you execute code in the right order, in a concise manner, while keeping operations asynchronous. The API is pretty neat: you tell the code to do something, then something else, then something else – and you’re even able to catch errors along the way.</p>
<h2 id="05-replace-for-loops-with-map-to-keep-things-simple">05. Replace ‘for’ loops with ‘map’ to keep things simple</h2>
<p>Let’s pretend we have an array of numbers and we’d like to produce another array by doubling all of the numbers from the first array. One way to do this is to declare an empty array, write a for loop, and set a number in the second array by looking up the index on the first array and doubling it.</p>
<p>Or we could use a more concise solution by mapping an array to another array:</p>
<div class="language-js highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="p">[</span><span class="mi">1</span><span class="p">,</span> <span class="mi">2</span><span class="p">,</span> <span class="mi">3</span><span class="p">].</span><span class="nx">map</span><span class="p">((</span><span class="nx">num</span><span class="p">)</span> <span class="o">=></span> <span class="nx">num</span> <span class="o">*</span> <span class="mi">2</span><span class="p">);</span> <span class="c1">// [2, 4, 6]</span>
</code></pre></div></div>
<h2 id="06-replace-for-loops-with-filter">06. Replace ‘for’ loops with ‘filter’</h2>
<p>This time, let’s pretend we have an array of numbers and we’d like to produce another array containing only the even numbers from the first array. Again, one way of doing this would be to declare an empty array, write a for loop, and write an if statement to check if the number at the index is even (for example).</p>
<p>Or, we could use the <strong>filter</strong> method available for arrays:</p>
<div class="language-js highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="p">[</span><span class="mi">4</span><span class="p">,</span> <span class="mi">7</span><span class="p">,</span> <span class="mi">2</span><span class="p">,</span> <span class="mi">3</span><span class="p">].</span><span class="nx">filter</span><span class="p">((</span><span class="nx">num</span><span class="p">)</span> <span class="o">=></span> <span class="nx">num</span> <span class="o">%</span> <span class="mi">2</span> <span class="o">===</span> <span class="mi">0</span><span class="p">);</span> <span class="c1">// [4, 2]</span>
</code></pre></div></div>
<h2 id="07-use-reduce-instead-of-for-loops">07. Use ‘reduce’ instead of ‘for’ loops</h2>
<p>For this exercise, let’s calculate the sum of all of the numbers in an array. One way to do this would be to declare a variable that has zero as its initial value. Then, we would write a for loop and traverse our array, taking each number and adding it to our newly created variable.</p>
<p>Or we could use the reduce method:</p>
<div class="language-js highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="p">[</span><span class="mi">7</span><span class="p">,</span> <span class="mi">2</span><span class="p">,</span> <span class="mi">4</span><span class="p">].</span><span class="nx">reduce</span><span class="p">((</span><span class="nx">a</span><span class="p">,</span> <span class="nx">b</span><span class="p">)</span> <span class="o">=></span> <span class="nx">a</span> <span class="o">+</span> <span class="nx">b</span><span class="p">);</span> <span class="c1">// 13</span>
</code></pre></div></div>
<p>Of course, we could combine all three concepts by multiplying all the numbers by 7 and adding all the numbers that are smaller than 20:</p>
<div class="language-js highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="p">[</span><span class="mi">3</span><span class="p">,</span> <span class="mi">2</span><span class="p">,</span> <span class="mi">1</span><span class="p">,</span> <span class="mi">6</span><span class="p">]</span>
<span class="p">.</span><span class="nx">map</span><span class="p">(</span><span class="nx">num</span> <span class="o">=></span> <span class="nx">num</span> <span class="o">*</span> <span class="mi">7</span><span class="p">)</span>
<span class="p">.</span><span class="nx">filter</span><span class="p">(</span><span class="nx">num</span> <span class="o">=></span> <span class="nx">num</span> <span class="o"><</span> <span class="mi">20</span><span class="p">)</span>
<span class="p">.</span><span class="nx">reduce</span><span class="p">((</span><span class="nx">a</span><span class="p">,</span> <span class="nx">b</span><span class="p">)</span> <span class="o">=></span> <span class="nx">a</span> <span class="o">+</span> <span class="nx">b</span><span class="p">);</span> <span class="c1">// 21</span>
</code></pre></div></div>
<h2 id="08-take-advantage-of-immutability">08. Take advantage of immutability</h2>
<p><img src="https://cdn.codecarrot.net/images/0-AjTy1nZrZsjB.png" alt="Take advantage of immutability" /></p>
<p>Data immutability is a common concept in functional languages. Immutable data allows programs to detect changes early on by comparing object references, instead of having to continually check and iterate through objects to see if we need to refresh the data on the screen.</p>
<p>Since, by default, objects and arrays are not immutable in JavaScript, there is a library to help accomplish this. It’s called <a href="//facebook.github.io/immutable-js/">Immutable.js</a> and it was developed and open-sourced by an engineering team at Facebook.</p>
<h2 id="09-nodejs-avoid-switching-language-context">09. Node.js: Avoid switching language context</h2>
<p><img src="https://cdn.codecarrot.net/images/1-Azz7YwzYDKFj8iIGZg.png" alt="This platform for developing server-side web apps has opened up a world of new possibilities" /></p>
<p><em>This platform for developing server-side web apps has opened up a world of new possibilities</em></p>
<p>Node.js is what allows JavaScript to be used on the server side. This has some interesting side effects, like making developers crazy-productive because they don’t have to change the language context when switching back and forth between client and server code.</p>
<p>It also allows libraries to be shared between the client and the server, which decreases the amount of duplicate code one has to write.</p>
<h2 id="10-npm-the-worlds-largest-package-manager">10. NPM: The world’s largest package manager</h2>
<p>With over 300 thousand packages, npm (the node package manager) has become the biggest package manager in the world, containing more packages than Java’s Maven Central Repository, PHP’s Packagist, and even .NET’s nuget. Plus, the level of collaboration that happens within the community means writing an application has never been so convenient.</p>
<h2 id="11-npm-bring-in-frontend-dependencies">11. NPM: Bring in frontend dependencies</h2>
<p><img src="https://cdn.codecarrot.net/images/1-DvIYrgwJ9EfAYv_nA.png" alt="This has grown into the world’s largest package manager" /></p>
<p><em>This has grown into the world’s largest package manager</em></p>
<p>Over the years, there have been many recommended practices around bringing in external dependencies into your local codebase. What are the best practices for using libraries like Bootstrap or Zurb Foundation? Including them from a central CDN or downloading everything manually from their website?</p>
<p>With the rise of the npm, an increasing number of developers are getting rid of alternative solutions like Bower and simply sticking to npm for everything. Yes, even CSS dependencies.</p>
<h2 id="12-angular-one-framework-to-rule-them-all">12. Angular: One framework to rule them all</h2>
<p><img src="https://cdn.codecarrot.net/images/1-LbKGyab-9iR-rvnzPg.png" alt="Angular: One framework to rule them all" /></p>
<p>Angular is a JavaScript framework maintained by Google with the help of the open-source community. The first version of the framework was based on an MVClike pattern, cleaning up a lot of the clutter we saw in larger codebases that relied on the jQuery-style of programming. The newest version, Angular 2, has taken things to the next level, transforming Angular into a full platform that allows development of not only web UIs, but also native mobile development and more!</p>
<h2 id="13-react-the-view-library-that-shook-the-ui-world">13. React: The view library that shook the UI world</h2>
<p><img src="https://cdn.codecarrot.net/images/1-Azz7YwzYYR6Fj8iIGZg.png" alt="This JavaScript framework is maintained by a team at Google with the help of the open-source community, and the latest version makes it suitable for native mobile development" /></p>
<p><em>This JavaScript framework is maintained by a team at Google with the help of the open-source community, and the latest version makes it suitable for native mobile development</em></p>
<p>React is a view library. This might sound small and innocent, but don’t underestimate it, as this little library put a dent in the whole UI development world. When React launched, it garnered contrasting opinions from veteran web developers. Fortunately, the Facebook engineering team knew it was on to something. Applications written with React carry a component-based architecture, keeping things small and composable. It often adopts functional paradigms to solve problems.</p>
<h2 id="14-ember-what-if-ruby-on-rails-spoke-javascript">14. Ember: What if Ruby on Rails spoke JavaScript?</h2>
<p><img src="https://cdn.codecarrot.net/images/4f89-b0b4-ef7fce53f.png" alt="Opinionated framework Ember.js has the world’s cutest framework mascot: Tomster" /></p>
<p><em>Opinionated framework Ember.js has the world’s cutest framework mascot: Tomster</em></p>
<p>If you’ve ever used Ruby on Rails to write a web app, you’ll know it uses the convention-over-configuration paradigm. This means it’s very opinionated about how apps should be written, which is exactly what the team behind Ember delivers for JS developers. Ember is a very complete framework with predictable development practices. This makes it easy to use all the best practices while writing applications.</p>
<h2 id="15-redux-state-of-management-for-all">15. Redux: State of management for all</h2>
<p>One of the hardest parts of writing apps with highly dynamic user interfaces is keeping up with the application’s state. This is the problem the Redux library addresses. Redux is commonly used alongside React and is slowly being adopted by the Angular community. It helps you write applications that behave consistently and it offers a great developer experience. So if you’re writing an app that might become very large, you should consider using Redux from the get-go.</p>
<h2 id="16-try-visual-regression-testing-with-phantomcss">16. Try visual regression testing with PhantomCSS</h2>
<p>Every developer that’s been around for long enough has accidentally pushed a bug to production at one point or another. There’s no shame in that. Especially with UI development, it’s hard to prevent errors within CSS and HTML markup. Or is it? It turns out there is a package called PhantomCSS that helps with visual regression testing. It works by taking screenshots of before and after changes and calculating the difference between the two images.</p>
<h2 id="17-go-beyond-consolelog">17. Go beyond ‘console.log’</h2>
<p>Using <strong>console.log()</strong> to display data in the console while writing JavaScript apps is pretty common, but did you know you can use other console methods – such as <strong>dir()</strong> and <strong>table()</strong> – to help you visualise data while developing?</p>
<p>That’s right; for a more interactive way of visualising objects in the console, use <strong>console.dir(object)</strong>. If you have an array of objects you’d like to visualise, you can use <strong>console.table(array)</strong> to create a beautifully formatted table displaying all your data. Much easier on the eyes.</p>
<h2 id="18-use-debugger">18. Use ‘debugger’</h2>
<p>One feature that often gets overlooked by developers is the <strong>debugger</strong> keyword. Instead of using <strong>console.log()</strong> to do some pseudo-debugging, simply add the <strong>debugger</strong> and modern browsers like Google Chrome will add a breakpoint so you can have a deeper look at your app’s state, including all local variables.</p>
<h2 id="19-remember-semicolons-are-optional">19. Remember semicolons are optional</h2>
<p>Did you know that semicolons are (mostly) optional in JavaScript? The official JavaScript language specification has a feature called automatic semicolon insertion (ASI) that has caused riots within the community – pitchforks included. The reality is that an increasing number of developers are dropping semicolons in their JavaScript code, mostly due to personal preference. If that’s something you’re interested in doing, be sure to use a code linter such as ESLint to help you avoid some bugs and pitfalls.</p>
<h2 id="20-have-a-strict-typed-codebase">20. Have a strict-typed codebase</h2>
<p><img src="https://cdn.codecarrot.net/images/1-LbKGyabN69iR-rvnzPg.png" alt="A project by Facebook, Flow uses type inference to find bugs" /></p>
<p><em>A project by Facebook, Flow uses type inference to find bugs</em></p>
<p>An argument that some devs coming from other languages like to use against writing large-scale JavaScript apps is the lack of a strict type system. If that was only reason that kept them from migrating, it’s time for them to reconsider!</p>
<p>There are two main projects that add an optional strict-type system to JavaScript: Flow, which was developed at Facebook, and TypeScript, developed at Microsoft. While using different strategies, both these projects aim to add catch bugs early by adding a JavaScript-friendly type system to applications.</p>yashumittalJavaScript started its life as a browser-based language used for adding interactivity to web pages, but it has evolved tremendously over the past few years. Once Node.js enabled JavaScript to be run on the server, it opened up a world of possibilities, and more language innovations were inevitable.
https://cdn.codecarrot.net/images/ZtBAmJoRqrJwzUuP6eYFsG-970-80.jpg
Everything you need to know about the new Node.js 82017-10-11T15:59:00+00:002017-10-11T15:59:00+00:00https://blog.codecarrot.net/everything-you-need-to-know-about-the-new-nodejs-8<p>The latest major release of Node.js brings many significant improvements to the JavaScript community, including an updated JavaScript engine, npm version 5, Google’s V8, Node.js API, async_hooks, a WHATWG URL parser, more secure Buffers and more. Here we’ll update you on these features and the other most important aspects of this release.</p>
<p>Node.js 8 is released under the code name Carbon, and is available now from the <a href="//nodejs.org/en/download/current/">Node.js site</a>. It will be actively worked on for another 18 months (no new features, just bug fixes, security improvements and npm updates), before going into maintenance mode. As with previous releases, during maintenance mode releases will only receive critical security updates and bug fixes.</p>
<p>Check our these <a href="/20-javascript-tools-to-blow-your-mind">20 JavaScript tools</a> that will blow your mind.</p>
<p>It is safe to say that since Node.js has been around, this is one of the biggest updates that the runtime has ever received – it changes how native add-ons are written and also brings additional security and performance improvements.</p>
<p>RisingStack has been helping companies succeed with Node.js for four years with training, consulting or development. One of the biggest struggles we had was adding native dependencies to projects.</p>
<p>Before Node.js 8, if applications were dependant on modules with native code, whenever major new Node.js versions arrived, as an application maintainer you had to recompile your dependencies. If you were lucky, they worked at first.</p>
<p>This process was made possible with the tremendous work module maintainers put into making their modules work across incompatible Node.js versions, mostly with the help of a module called NAN (Node.js Native Abstractions).</p>
<p>This process is far from ideal, as lots of companies failed to get their dependencies updated if they could not be compiled, and it also put a huge extra workload on module maintainers. To solve this issue, the Node.js API (or N-API) was introduced.</p>
<h2 id="01-enter-the-nodejs-api">01. Enter the Node.js API</h2>
<p><img src="https://cdn.codecarrot.net/images/YUsX5W2DrjQrMGc5J9Cmb-650-80.jpg" alt="Enter the node.js api" /></p>
<p><em>Machine agnostic: Native modules now work with Microsoft’s Chakra as well as different Node.js versions</em></p>
<p>The Node.js API is one of the most significant improvements of Node.js 8. It brings a well-defined ABI (Application Binary Interface) to Node.js to make its virtual machine agnostic. This means that native modules will not only work with different Node.js versions using Google’s V8 JavaScript engine, but with Microsoft’s Chakra too.</p>
<p>For now, the N-API is in an experimental state, meaning significant changes may happen to both the implementation and the API. With this said, native module maintainers are encouraged to try out the new interface and give feedback.</p>
<p>If you are a module maintainer, you can release an N-API version of your module in parallel with your main module version. To do so, the official recommendation is to publish a version of your module with the n-api tag to npm.</p>
<p>To publish an N-API version, you have to:</p>
<ol>
<li>Publish the non-N-API version as normal.</li>
<li>Publish the N-API version:</li>
</ol>
<ul>
<li>Update the version in the package.json file by adding a dash and the napi tag – so if you had 1.0.0 previously, it becomes 1.0.0-napi</li>
<li>Publish to npm using npm publish –tag n-api</li>
</ul>
<p>This way you ensure that the N-API version won’t become the latest release, so if someone installs your module, by default they get the non-N-API version.</p>
<p>Yarn, the package manager created by the engineers of Facebook, was released in October 2016. It tried to address some shortcomings of the official npm client, mostly by becoming more performant and deterministic. Most of these innovations are featured in npm 5 as well.</p>
<h2 id="02-say-hello-to-npm-5">02. Say hello to npm 5</h2>
<p>Just like Yarn, npm 5 introduced a lock-file mechanism – whenever you are installing a new dependency to your project, it will be added automatically not just to <strong>package.json</strong>, but a new file called <strong>package-lock.json</strong> as well.</p>
<p>You may ask what the difference is between <strong>package-lock.jso</strong>n and <strong>npm-shrinkwrap.json</strong>, as npm-shrinkwrap has been in npm since forever? Long story short, they are essentially the same, but <strong>package-lock.json</strong> is automatically created.</p>
<p>Their purpose is to describe exactly what dependency tree npm must create for your package. If you have both, <strong>npm-shrinkwrap</strong> will take precedence. Based on npm’s recommendation, you should use <strong>npm-shrinkwrap.json</strong> if you want to publish it, so your module consumers will use it too. On the other hand, you should use the package-lock.json internally – even checked into repositories.</p>
<p>But improvements to npm 5 have not stopped with adding a lock file – with the new version, all the modules you are installing are automatically saved as well, and they will be added both to your <strong>package.json</strong> and <strong>package-lock.jso</strong> file.</p>
<p>The way npm scripts work has also changed a bit. First of all, preinstalled scripts now run before everything else, so they can modify the node_modules directory before the CLI actually reads it. Besides this, two new scripts have been added – prepack and postpack. They both run on npm pack and npm publish as well, but not on npm install.</p>
<p>In the heart of Node.js is the JavaScript engine that interprets your JavaScript code, creates bytecode from it and lets your application run. With the new Node.js 8 release, this was updated as well.</p>
<h2 id="03-updated-javascript-engine">03. Updated JavaScript Engine</h2>
<p><img src="https://cdn.codecarrot.net/images/qnnXLGrpMAmRaWUFfPB2wA-650-80.jpg" alt="Updated JavaScript Engine" /></p>
<p><em>Big news: Node.js will be able to update the V8 engine without a major release</em></p>
<p>With the updated V8 engine, major performance improvements are introduced – but more importantly, it is guaranteed to have a forward-compatible application binary interface. This means that Node.js will be able to update the V8 engine without a major Node.js release.</p>
<p>This is crucial, as the newer versions of the V8 engine will introduce a new compiler pipeline, which will introduce further performance improvements to Node.js. This update was so important that it was the reason the original Node.js 8 release date was postponed.</p>
<p>The current pipeline is way too complex, and introducing new language features usually means touching multiple parts of the pipeline. With the new pipeline, it will become a lot simpler.</p>
<p>Ignition, the new interpreter, and TurboFan, the new optimising compiler, have been in development for almost three and half years. They are the foundation on which new language features will be built upon. They include the experience that the V8 team at Google collected from measuring real-life JavaScript applications.</p>
<h2 id="04-welcome-async-hooks">04. Welcome Async Hooks</h2>
<p>To better understand what Async Hooks are, let’s take a step back and get to grips with continuation-local storage first. They work like thread-local storage in threaded programming, but in Node.js it uses callbacks to pass down context.</p>
<p>Imagine that you are writing an application that fetches a product from the database, then later on you want to send it out in your HTML response:</p>
<div class="language-js highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="kd">const</span> <span class="nx">createNamespace</span> <span class="o">=</span> <span class="nx">require</span><span class="p">(</span><span class="dl">'</span><span class="s1">continuation-local-storage</span><span class="dl">'</span><span class="p">).</span><span class="nx">createNamespace</span>
<span class="kd">const</span> <span class="nx">session</span> <span class="o">=</span> <span class="nx">createNamespace</span><span class="p">(</span><span class="dl">'</span><span class="s1">my-app-session</span><span class="dl">'</span><span class="p">)</span>
<span class="kd">const</span> <span class="nx">db</span> <span class="o">=</span> <span class="nx">require</span><span class="p">(</span><span class="dl">'</span><span class="s1">./db.js</span><span class="dl">'</span><span class="p">)</span>
<span class="kd">function</span> <span class="nx">onRequest</span><span class="p">(</span><span class="nx">options</span><span class="p">,</span> <span class="nx">next</span><span class="p">)</span> <span class="p">{</span>
<span class="nx">db</span><span class="p">.</span><span class="nx">fetchUserById</span><span class="p">(</span><span class="nx">options</span><span class="p">.</span><span class="nx">id</span><span class="p">,</span> <span class="kd">function</span> <span class="p">(</span><span class="nx">error</span><span class="p">,</span> <span class="nx">user</span><span class="p">)</span> <span class="p">{</span>
<span class="k">if</span> <span class="p">(</span><span class="nx">error</span><span class="p">)</span> <span class="p">{</span>
<span class="k">return</span> <span class="nx">next</span><span class="p">(</span><span class="nx">error</span><span class="p">)</span>
<span class="p">}</span>
<span class="nx">session</span><span class="p">.</span><span class="kd">set</span><span class="p">(</span><span class="dl">'</span><span class="s1">user</span><span class="dl">'</span><span class="p">,</span> <span class="nx">user</span><span class="p">)</span>
<span class="nx">next</span><span class="p">()</span>
<span class="p">})</span>
<span class="p">}</span>
</code></pre></div></div>
<p>Later on, if you want to access the user object, all you need to do is grab it from the local storage:</p>
<div class="language-js highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="kd">const</span> <span class="nx">getNamespace</span> <span class="o">=</span> <span class="nx">require</span><span class="p">(</span><span class="dl">'</span><span class="s1">continuation-local-storage</span><span class="dl">'</span><span class="p">).</span><span class="nx">getNamespace</span>
<span class="kd">const</span> <span class="nx">session</span> <span class="o">=</span> <span class="nx">getNamespace</span><span class="p">(</span><span class="dl">'</span><span class="s1">my session</span><span class="dl">'</span><span class="p">)</span>
<span class="kd">const</span> <span class="nx">render</span> <span class="o">=</span> <span class="nx">require</span><span class="p">(</span><span class="dl">'</span><span class="s1">./render.js</span><span class="dl">'</span><span class="p">)</span>
<span class="kd">function</span> <span class="nx">finish</span><span class="p">(</span><span class="nx">response</span><span class="p">)</span> <span class="p">{</span>
<span class="kd">const</span> <span class="nx">user</span> <span class="o">=</span> <span class="nx">session</span><span class="p">.</span><span class="kd">get</span><span class="p">(</span><span class="dl">'</span><span class="s1">user</span><span class="dl">'</span><span class="p">)</span>
<span class="nx">render</span><span class="p">({</span><span class="na">user</span><span class="p">:</span> <span class="nx">user</span><span class="p">}).</span><span class="nx">pipe</span><span class="p">(</span><span class="nx">response</span><span class="p">)</span>
<span class="p">}</span>
</code></pre></div></div>
<p>This technique is extensively used by application performance monitoring providers, such as Trace by RisingStack, to keep execution context and collect monitoring information from production systems.</p>
<p>With Async Hooks, a similar feature is moved to the Node.js core – it helps track asynchronous requests and handlers through their lifecycle. The <strong>async_hooks</strong> module provides an API to register callbacks tracking the lifetime of asynchronous resources created inside a Node.js application.</p>
<h2 id="05-improved-promise-support">05. Improved promise support</h2>
<p>Before Node.js 8, if you wanted to use the core modules in an application that uses Promises, you had to manually wrap the core modules so they could be used the same way. It looked something like this:</p>
<div class="language-js highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="kd">const</span> <span class="nx">fs</span> <span class="o">=</span> <span class="nx">require</span><span class="p">(</span><span class="dl">'</span><span class="s1">fs</span><span class="dl">'</span><span class="p">)</span>
<span class="kd">function</span> <span class="nx">readFilePromise</span> <span class="p">(...</span><span class="nx">args</span><span class="p">)</span> <span class="p">{</span>
<span class="k">return</span> <span class="k">new</span> <span class="nb">Promise</span><span class="p">((</span><span class="nx">resolve</span><span class="p">,</span> <span class="nx">reject</span><span class="p">)</span> <span class="o">=></span> <span class="p">{</span>
<span class="nx">fs</span><span class="p">.</span><span class="nx">readFile</span><span class="p">(...</span><span class="nx">args</span><span class="p">,</span> <span class="p">(</span><span class="nx">err</span><span class="p">,</span> <span class="nx">result</span><span class="p">)</span> <span class="o">=></span> <span class="p">{</span>
<span class="k">if</span> <span class="p">(</span><span class="nx">err</span><span class="p">)</span> <span class="p">{</span>
<span class="k">return</span> <span class="nx">resolve</span><span class="p">(</span><span class="nx">err</span><span class="p">)</span>
<span class="p">}</span>
<span class="nx">resolve</span><span class="p">(</span><span class="nx">result</span><span class="p">)</span>
<span class="p">})</span>
<span class="p">})</span>
<span class="p">}</span>
<span class="nx">readFilePromise</span><span class="p">(</span><span class="dl">'</span><span class="s1">./package.json</span><span class="dl">'</span><span class="p">,</span> <span class="dl">'</span><span class="s1">utf-8</span><span class="dl">'</span><span class="p">)</span>
<span class="p">.</span><span class="nx">then</span><span class="p">((</span><span class="nx">res</span><span class="p">)</span> <span class="o">=></span> <span class="nx">console</span><span class="p">.</span><span class="nx">log</span><span class="p">(</span><span class="nx">res</span><span class="p">))</span>
<span class="p">.</span><span class="k">catch</span><span class="p">((</span><span class="nx">err</span><span class="p">)</span> <span class="o">=></span> <span class="nx">console</span><span class="p">.</span><span class="nx">log</span><span class="p">(</span><span class="nx">err</span><span class="p">))</span>
</code></pre></div></div>
<p>With Node.js 8, a new helper method is added to the util core module, util.promisify. It allows standard Node.js callback-style APIs to be wrapped in a function that returns Promises.</p>
<p>Using this function, the above snippet is simplified and becomes this:</p>
<div class="language-js highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="kd">const</span> <span class="nx">fs</span> <span class="o">=</span> <span class="nx">require</span><span class="p">(</span><span class="dl">'</span><span class="s1">fs</span><span class="dl">'</span><span class="p">)</span>
<span class="kd">const</span> <span class="nx">promisify</span> <span class="o">=</span> <span class="nx">require</span><span class="p">(</span><span class="dl">'</span><span class="s1">util</span><span class="dl">'</span><span class="p">).</span><span class="nx">promisify</span>
<span class="nx">readFilePromise</span> <span class="o">=</span> <span class="nx">promisify</span><span class="p">(</span><span class="nx">fs</span><span class="p">.</span><span class="nx">readFile</span><span class="p">)</span>
<span class="nx">readFilePromise</span><span class="p">(</span><span class="dl">'</span><span class="s1">./package.json</span><span class="dl">'</span><span class="p">,</span> <span class="dl">'</span><span class="s1">utf-8</span><span class="dl">'</span><span class="p">)</span>
<span class="p">.</span><span class="nx">then</span><span class="p">((</span><span class="nx">res</span><span class="p">)</span> <span class="o">=></span> <span class="nx">console</span><span class="p">.</span><span class="nx">log</span><span class="p">(</span><span class="nx">res</span><span class="p">))</span>
<span class="p">.</span><span class="k">catch</span><span class="p">((</span><span class="nx">err</span><span class="p">)</span> <span class="o">=></span> <span class="nx">console</span><span class="p">.</span><span class="nx">log</span><span class="p">(</span><span class="nx">err</span><span class="p">))</span>
</code></pre></div></div>
<h2 id="06-more-secure-buffers">06. More secure Buffers</h2>
<p>Before Node.js version 8, Buffers allocated using the new Buffer(Number) constructor did not initialise the memory space with zeros. As a result, new Buffer instances could contain sensitive information, leading to serious security problems – even popular modules such as mongoose, ws or the request module were affected.</p>
<p>But how did we get there? When JavaScript was moved from the browser to the server side, there was a need for fast and easy data processing – so the Buffer class was added. Buffer is a mutable array of binary data. When used with the constructor that asks for the size of the new Buffer, it just reserved the memory space, but did not clean it.</p>
<p>As your server can serve multiple users at the same time (unlike your browser), it is possible that the freshly allocated memory space contains sensitive information from other users (even passwords!), and can potentially be exposed to an attacker.</p>
<p>While it was an intentional decision to boost the performance of the new Buffer creation, for most of us, it was not the intended use – even if it was documented. Because of this, starting with Node.js 8, Buffers allocated using new Buffer(Number) or Buffer(Number) will be automatically filled with zeros.</p>
<h2 id="07-changes-in-debugging">07. Changes in debugging</h2>
<p>Before Node.js 8, if you wanted to debug your Node.js applications, one of the easiest solutions was to start the built-in debugger, using node debug index.js. With Node.js 8, this is being removed and replaced by node-inspector. You can still use the CLI debugger, but it will be removed shortly.</p>
<p>From now on, you should use node <strong>–inspect index.js</strong>, or node <strong>–inspect-brk index.js</strong> if you want the debugger to put a breakpoint on the first line of the application. Once you run it, you will receive a WebSocket link that Google Chrome can use to connect its debugger.</p>
<p>You should head over to <a href="chrome://inspect/">chrome://inspect</a> in your Chrome browser, and it will automatically recognise the running Node.js application, enabling you to connect. After you have connected to your process, you will get Chrome’s debugger to inspect your running Node.js application.</p>
<h2 id="08-introducing-static-error-codes">08. Introducing static error codes</h2>
<p>Previously, if you wanted to check an error you received in runtime and act accordingly, in most cases you had to check the error message. This was error prone, as error messages may have changed with new Node.js versions.</p>
<p>With Node.js 8, static error codes have been assigned to most of the errors – it is still a work-in-progress, but once it is finished, these error codes won’t change, even if the message in the error does.</p>
<p>For example, the newly introduced <strong>WHATWG URL API</strong> will throw an <strong>ERR_INVALID_URL</strong> error in the following snippet, as the parameter is not a valid URL:</p>
<div class="language-js highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="kd">const</span> <span class="nx">URL</span> <span class="o">=</span> <span class="nx">require</span><span class="p">(</span><span class="dl">'</span><span class="s1">url</span><span class="dl">'</span><span class="p">).</span><span class="nx">URL</span>
<span class="kd">const</span> <span class="nx">myURL</span> <span class="o">=</span> <span class="k">new</span> <span class="nx">URL</span><span class="p">(</span><span class="dl">'</span><span class="s1">/foo</span><span class="dl">'</span><span class="p">)</span>
</code></pre></div></div>
<p>As you can see, the release of the Node.js 8 update has brought plenty of new and exciting improvements to the JavaScript community. To start experimenting with all of these new features yourself, head over to <a href="//nodejs.org/en/">nodejs.org</a>, download the Node.js 8 binary and start playing with your new toolset!</p>yashumittalThe latest major release of Node.js brings many significant improvements to the JavaScript community, including an updated JavaScript engine, npm version 5, Google’s V8, Node.js API, async_hooks, a WHATWG URL parser, more secure Buffers and more. Here we’ll update you on these features and the other most important aspects of this release.
https://cdn.codecarrot.net/images/dSLsz4Aqa4zWZdn5hSFRBS-970-80.jpg
4 Tips to Make You More Secure Online2017-10-11T14:50:00+00:002017-10-11T14:50:00+00:00https://blog.codecarrot.net/4-tips-to-make-you-more-secure-online<p>We all know that it’s important to have secure passwords for all of the online services that we use, but making sure that all those passwords are unique and that all the data that we transmit over the web is encrypted and secure is challenging – and it’s also inconvenient.</p>
<p>Here are a few things that you can do to make yourself more secure online.</p>
<h2 id="1-check-to-see-if-your-email-address-has-been-a-part-of-a-breach">1. Check to see if your email address has been a part of a breach</h2>
<p>It’s likely that some of your email accounts have been compromised. Visit <a href="//haveibeenpwnd.com/">haveibeenpwnd.com</a>, type in your email address and you’ll find out immediately if any of your accounts have been a part of a major breach.</p>
<p><a href="https://cdn.codecarrot.net/images/haveibeenpwnd.png">secure online</a></p>
<p>If your account has been part of a major breach, change your password for that service! I typed in my personal and work email addresses and found out that they’d both been part of multiple breaches. 🙁</p>
<h2 id="2-research-and-get-a-password-manager-to-generate-and-secure-your-passwords">2. Research and get a Password Manager to generate and secure your passwords</h2>
<p>Passwords are the most vulnerable point of our internet security. The password is the door to the house where we store all of our valuable data.</p>
<p>While some security experts recommend changing your passwords regularly, that assumes that users have the same password for every one of their accounts. Rather than worrying about regularly changing passwords, you should have unique passwords for each service you use. That way when one of your passwords is compromised, it doesn’t give an attacker access to all of your accounts.</p>
<p>When creating new passwords, you want passwords that are:</p>
<ul>
<li>Unique</li>
<li>Long</li>
<li>Have never been used</li>
<li>Contain no personal information</li>
<li>Contain no dictionary words</li>
</ul>
<p>It’s hard to think of strong, complex passwords that satisfy all those criteria – and when you have unique passwords for each service you use, where do you store them? Using a password manager, like Dashlane, LastPass, or 1Password to generate passwords makes creating unique passwords for each service you use more convenient.</p>
<h2 id="3-enable-two-factor-authentication">3. Enable Two-Factor Authentication</h2>
<p><img src="https://cdn.codecarrot.net/images/TwoFactorAuth.png" alt="TwoFactorAuth.org" /></p>
<p>Two Factor Authentication, also known as 2FA, is an extra layer of security that adds an extra layer of security to your login process. In addition to a username and a password, 2FA requires you to enter an additional password that only you would have access to. Normally this means entering an additional code received from an app or through a text message, which can be very inconvenient – but I think it’s worth the tradeoff to make your accounts more secure.</p>
<p>You should add 2FA to all of your most sensitive accounts if it is available. In a quick online search, I found a service called <a href="//twofactorauth.org/">TwoFactorAuth.org</a> that lists websites and whether or not they support 2FA.</p>
<h2 id="4-understand-how-youre-being-tracked-online">4. Understand how you’re being tracked online</h2>
<p>Your browser activity is constantly being tracked. Learn what services are tracking your activity by visiting <a href="//panopticlick.eff.org">panopticlick.eff.org</a> and installing the PrivacyBadger extension.</p>
<p><img src="https://cdn.codecarrot.net/images/panopticlick.eff.png" alt="panopticlick.eff" /></p>
<p>With the PrivacyBadger extension, you can see exactly what services are tracking your browser activity and block them.</p>yashumittalWe all know that it’s important to have secure passwords for all of the online services that we use, but making sure that all those passwords are unique and that all the data that we transmit over the web is encrypted and secure is challenging – and it’s also inconvenient.
https://cdn.codecarrot.net/images/StockSnap_70GQNT6XZM.jpg
9 security tips to protect your website from hackers2017-10-11T14:50:00+00:002017-10-11T14:50:00+00:00https://blog.codecarrot.net/9-security-tips-to-protect-your-website-from-hackers<p>You may not think your site has anything worth being hacked for, but websites are compromised all the time. The majority of website security breaches are not to steal your data or deface your website, but instead attempts to use your server as an email relay for spam, or to setup a temporary web server, normally to serve files of an illegal nature. Other very common ways to abuse compromised machines include using your servers as part of a botnet, or to mine for Bitcoins. You could even be hit by ransomware.</p>
<p>Hacking is regularly performed by automated scripts written to scour the Internet in an attempt to exploit known website security issues in software. Here are our top 10 tips to help keep you and your site safe online.</p>
<h2 id="01-keep-software-up-to-date">01. Keep software up to date</h2>
<p>It may seem obvious, but ensuring you keep all software up to date is vital in keeping your site secure. This applies to both the server operating system and any software you may be running on your website such as a CMS or forum. When website security holes are found in software, hackers are quick to attempt to abuse them.</p>
<p>If you are using a managed hosting solution then you don’t need to worry so much about applying security updates for the operating system as the hosting company should take care of this.</p>
<p>If you are using third-party software on your website such as a CMS or forum, you should ensure you are quick to apply any security patches. Most vendors have a mailing list or RSS feed detailing any website security issues. WordPress, Umbraco and many other CMSes notify you of available system updates when you log in.</p>
<p>Many developers use tools like Composer, npm, or RubyGems to manage their software dependencies, and security vulnerabilities appearing in a package you depend but aren’t paying any attention to on is one of the easiest ways to get caught out. Ensure you keep your dependencies up to date, and use tools like Gemnasium to get automatic notifications when a vulnerability is announced in one of your components.</p>
<h2 id="02-sql-injection">02. SQL injection</h2>
<p>SQL injection attacks are when an attacker uses a web form field or URL parameter to gain access to or manipulate your database. When you use standard Transact SQL it is easy to unknowingly insert rogue code into your query that could be used to change tables, get information and delete data. You can easily prevent this by always using parameterised queries, most web languages have this feature and it is easy to implement.</p>
<p>Consider this query:</p>
<div class="language-sql highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="nv">"SELECT * FROM table WHERE column = '"</span> <span class="o">+</span> <span class="k">parameter</span> <span class="o">+</span> <span class="nv">"';"</span>
</code></pre></div></div>
<p>If an attacker changed the URL parameter to pass in ‘ or ‘1’=’1 this will cause the query to look like this:</p>
<div class="language-sql highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="nv">"SELECT * FROM table WHERE column = '' OR '1'='1';"</span>
</code></pre></div></div>
<p>Since ‘1’ is equal to ‘1’ this will allow the attacker to add an additional query to the end of the SQL statement which will also be executed.</p>
<p>You could fix this query by explicitly parameterising it. For example, if you’re using MySQLi in PHP this should become:</p>
<div class="language-sql highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="err">$</span><span class="n">stmt</span> <span class="o">=</span> <span class="err">$</span><span class="n">pdo</span><span class="o">-></span><span class="k">prepare</span><span class="p">(</span><span class="s1">'SELECT * FROM table WHERE column = :value'</span><span class="p">);</span>
<span class="err">$</span><span class="n">stmt</span><span class="o">-></span><span class="k">execute</span><span class="p">(</span><span class="n">array</span><span class="p">(</span><span class="s1">'value'</span> <span class="o">=></span> <span class="err">$</span><span class="k">parameter</span><span class="p">));</span>
</code></pre></div></div>
<h2 id="03-xss">03. XSS</h2>
<p>Cross-site scripting (XSS) attacks inject malicious JavaScript into your pages, which then runs in the browsers of your users, and can change page content, or steal information to send back to the attacker. For example, if you show comments on a page without validation, then an attacker might submit comments containing script tags and JavaScript, which could run in every other user’s browser and steal their login cookie, allowing the attack to take control of the account of every user who viewed the comment. You need to ensure that users cannot inject active JavaScript content into your pages.</p>
<p>This is a particular concern in modern web applications, where pages are now built primarily from user content, and which in many cases generate HTML that’s then also interpreted by front-end frameworks like Angular and Ember. These frameworks provide many XSS protections, but mixing server and client rendering creates new and more complicated attack avenues too: not only is injecting JavaScript into the HTML effective, but you can also inject content that will run code by inserting Angular directives, or using Ember helpers.</p>
<p>The key here is to focus on how your user-generated content could escape the bounds you expect and be interpreted by the browser as something other that what you intended. This is similar to defending against SQL injection. When dynamically generating HTML, use functions which explicitly make the changes you’re looking for (e.g. use element.setAttribute and element.textContent, which will be automatically escaped by the browser, rather than setting element.innerHTML by hand), or use functions in your templating tool that automatically do appropriate escaping, rather than concatenating strings or setting raw HTML content.</p>
<p>Another powerful tool in the XSS defender’s toolbox is Content Security Policy (CSP). CSP is a header your server can return which tells the browser to limit how and what JavaScript is executed in the page, for example to disallow running of any scripts not hosted on your domain, disallow inline JavaScript, or disable eval(). Mozilla have an excellent guide with some example configurations. This makes it harder for an attacker’s scripts to work, even if they can get them into your page.</p>
<h2 id="04-error-messages">04. Error messages</h2>
<p>Be careful with how much information you give away in your error messages. Provide only minimal errors to your users, to ensure they don’t leak secrets present on your server (e.g. API keys or database passwords). Don’t provide full exception details either, as these can make complex attacks like SQL injection far easier. Keep detailed errors in your server logs, and show users only the information they need.</p>
<h2 id="05-server-side-validationform-validation">05. Server side validation/form validation</h2>
<p>Validation should always be done both on the browser and server side. The browser can catch simple failures like mandatory fields that are empty and when you enter text into a numbers only field. These can however be bypassed, and you should make sure you check for these validation and deeper validation server side as failing to do so could lead to malicious code or scripting code being inserted into the database or could cause undesirable results in your website.</p>
<h2 id="06-passwords">06. Passwords</h2>
<p>Everyone knows they should use complex passwords, but that doesn’t mean they always do. It is crucial to use strong passwords to your server and website admin area, but equally also important to insist on good password practices for your users to protect the security of their accounts.</p>
<p>As much as users may not like it, enforcing password requirements such as a minimum of around eight characters, including an uppercase letter and number will help to protect their information in the long run.</p>
<p>Passwords should always be stored as encrypted values, preferably using a one way hashing algorithm such as SHA. Using this method means when you are authenticating users you are only ever comparing encrypted values. For extra website security it is a good idea to salt the passwords, using a new salt per password.</p>
<p>In the event of someone hacking in and stealing your passwords, using hashed passwords could help damage limitation, as decrypting them is not possible. The best someone can do is a dictionary attack or brute force attack, essentially guessing every combination until it finds a match. When using salted passwords the process of cracking a large number of passwords is even slower as every guess has to be hashed separately for every salt + password which is computationally very expensive.</p>
<p>Thankfully, many CMSes provide user management out of the box with a lot of these website security features built in, although some configuration or extra modules might be required to use salted passwords (pre Drupal 7) or to set the minimum password strength. If you are using .NET then it’s worth using membership providers as they are very configurable, provide inbuilt website security and include readymade controls for login and password reset.</p>
<h2 id="07-file-uploads">07. File uploads</h2>
<p>Allowing users to upload files to your website can be a big website security risk, even if it’s simply to change their avatar. The risk is that any file uploaded however innocent it may look, could contain a script that when executed on your server completely opens up your website.</p>
<p>If you have a file upload form then you need to treat all files with great suspicion. If you are allowing users to upload images, you cannot rely on the file extension or the mime type to verify that the file is an image as these can easily be faked. Even opening the file and reading the header, or using functions to check the image size are not full proof. Most images formats allow storing a comment section which could contain PHP code that could be executed by the server.</p>
<p>So what can you do to prevent this? Ultimately you want to stop users from being able to execute any file they upload. By default web servers won’t attempt to execute files with image extensions, but it isn’t recommended to rely solely on checking the file extension as a file with the name image.jpg.php has been known to get through.</p>
<p>Some options are to rename the file on upload to ensure the correct file extension, or to change the file permissions, for example, chmod 0666 so it can’t be executed. If using <code class="highlighter-rouge">*nix</code> you could create a <a href="/how-to-remove-php-html-htm-extensions-with-htaccess">.htaccess</a> file (see below) that will only allow access to set files preventing the double extension attack mentioned earlier.</p>
<div class="language-sql highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="n">deny</span> <span class="k">from</span> <span class="k">all</span>
<span class="o"><</span><span class="n">Files</span> <span class="o">~</span> <span class="nv">"^</span><span class="se">\w</span><span class="nv">+</span><span class="se">\.</span><span class="nv">(gif|jpe?g|png)$"</span><span class="o">></span>
<span class="k">order</span> <span class="n">deny</span><span class="p">,</span><span class="n">allow</span>
<span class="n">allow</span> <span class="k">from</span> <span class="k">all</span>
<span class="o"></</span><span class="n">Files</span><span class="o">></span>
</code></pre></div></div>
<p>Ultimately, the recommended solution is to prevent direct access to uploaded files all together. This way, any files uploaded to your website are stored in a folder outside of the webroot or in the database as a blob. If your files are not directly accessible you will need to create a script to fetch the files from the private folder (or an HTTP handler in .NET) and deliver them to the browser. Image tags support an src attribute that is not a direct URL to an image, so your src attribute can point to your file delivery script providing you set the correct content type in the HTTP header. For example:</p>
<div class="language-php highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="nt"><img</span> <span class="na">src=</span><span class="s">"/imageDelivery.php?id=1234"</span> <span class="nt">/></span>
<span class="cp"><?php</span>
<span class="c1">// imageDelivery.php</span>
<span class="c1">// Fetch image filename from database based on $_GET["id"]</span>
<span class="mf">...</span>
<span class="c1">// Deliver image to browser</span>
<span class="nb">Header</span><span class="p">(</span><span class="s1">'Content-Type: image/gif'</span><span class="p">);</span>
<span class="nb">readfile</span><span class="p">(</span><span class="s1">'images/'</span><span class="mf">.</span><span class="nv">$fileName</span><span class="p">);</span>
<span class="cp">?></span>
</code></pre></div></div>
<p>Most hosting providers deal with the server configuration for you, but if you are hosting your website on your own server then there are few things you will want to check.</p>
<p>Ensure you have a firewall setup, and are blocking all non essential ports. If possible setting up a DMZ (Demilitarised Zone) only allowing access to port 80 and 443 from the outside world. Although this might not be possible if you don’t have access to your server from an internal network as you would need to open up ports to allow uploading files and to remotely log in to your server over SSH or RDP.</p>
<p>If you are allowing files to be uploaded from the Internet only use secure transport methods to your server such as SFTP or SSH.</p>
<p>If possible have your database running on a different server to that of your web server. Doing this means the database server cannot be accessed directly from the outside world, only your web server can access it, minimising the risk of your data being exposed.</p>
<p>Finally, don’t forget about restricting physical access to your server.</p>
<h2 id="08-https">08. HTTPS</h2>
<p>HTTPS is a protocol used to provide security over the Internet. HTTPS guarantees to users that they’re talking to the server they expect, and that nobody else can intercept or change the content they’re seeing in transit.</p>
<p>If you have anything that your users might want private, it’s highly advisable to use only HTTPS to deliver it. That of course means credit card and login pages (and the URLs they submit to) but typically far more of your site too. A login form will often set a cookie for example, which is sent with every other request to your site that a logged in user makes, and is used to authenticate those requests. An attacker stealing this would be able to perfectly imitate a user and take over their login session. To defeat these kind of attacks, you almost always want to use HTTPS for your entire site.</p>
<p>That’s no longer as tricky or expensive as it once was though. Let’s Encrypt provides totally free and automated certificates, which you’ll need to enable HTTPS, and there are existing community tools available for a wide range of common platforms and frameworks to automatically set this up for you.</p>
<p>Notably Google have announced that they will boost you up in the search rankings if you use HTTPS, giving this an SEO benefit too. There’s a stick to go with that carrot though: Chrome and other browsers are planning to put bigger and bigger warnings on every site that doesn’t do this, starting from January 2017. Insecure HTTP is on its way out, and now’s the time to upgrade.</p>
<p>Already using HTTPS everywhere? Go further and look at setting up HTTP Strict Transport Security (HSTS), an easy header you can add to your server responses to disallow insecure HTTP for your entire domain.</p>
<h2 id="09-website-security-tools">09. Website security tools</h2>
<p>Once you think you have done all you can then it’s time to test your website security. The most effective way of doing this is via the use of some website security tools, often referred to as penetration testing or pen testing for short.</p>
<p>There are many commercial and free products to assist you with this. They work on a similar basis to scripts hackers will use in that they test all know exploits and attempt to compromise your site using some of the previous mentioned methods such as SQL injection.</p>
<p>Some free tools that are worth looking at:</p>
<ul>
<li>Netsparker (Free community edition and trial version available). Good for testing SQL injection and XSS</li>
<li>OpenVAS. Claims to be the most advanced open source security scanner. Good for testing known vulnerabilities, currently scans over 25,000. But it can be difficult to setup and requires a * OpenVAS server to be installed which only runs on <code class="highlighter-rouge">*nix</code>. OpenVAS is fork of a Nessus before it became a closed-source commercial product.</li>
<li>SecurityHeaders.io (free online check). A tool to quickly report which security headers mentioned above (such as CSP and HSTS) a domain has enabled and correctly configured.</li>
<li>Xenotix XSS Exploit Framework A tool from OWASP (Open Web Application Security Project) that includes a huge selection of XSS attack examples, which you can run to quickly confirm whether your site’s inputs are vulnerable in Chrome, Firefox and IE.</li>
</ul>
<p>The results from automated tests can be daunting, as they present a wealth of potential issues. The important thing is to focus on the critical issues first. Each issue reported normally comes with a good explanation of the potential vulnerability. You will probably find that some of the medium/low issues aren’t a concern for your site.</p>
<p>If you wish to take things a step further then there are some further steps you can take to manually try to compromise your site by altering POST/GET values. A debugging proxy can assist you here as it allows you to intercept the values of an HTTP request between your browser and the server. A popular freeware application called Fiddler is a good starting point.</p>
<p>So what should you be trying to alter on the request? If you have pages which should only be visible to a logged in user then I would try changing URL parameters such as user id, or cookie values in an attempt to view details of another user. Another area worth testing are forms, changing the POST values to attempt to submit code to perform XSS or to upload a server side script.</p>
<p>Hopefully these tips will help keep your site and information safe. Thankfully most CMSes have a lot of inbuilt website security features, but it is a still a good idea to have knowledge of the most common security exploits so you can ensure you are covered.</p>
<p>There are also some helpful modules available for CMSes to check your installation for common security flaws such as Security Review for Drupal and WP Security Scan for WordPress.</p>yashumittalYou may not think your site has anything worth being hacked for, but websites are compromised all the time. The majority of website security breaches are not to steal your data or deface your website, but instead attempts to use your server as an email relay for spam, or to setup a temporary web server, normally to serve files of an illegal nature. Other very common ways to abuse compromised machines include using your servers as part of a botnet, or to mine for Bitcoins. You could even be hit by ransomware.
https://cdn.codecarrot.net/images/siarhei-horbach-267470.jpg
What is a 404 page error?2017-10-11T14:30:00+00:002017-10-11T14:30:00+00:00https://blog.codecarrot.net/what-is-a-404-page-error<p>One of the most common errors you can come across while browsing the Internet is a 404 or Page Not Found error. This error often occurs when you follow a broken link or if you type in a website address that doesn’t exist.</p>
<p>A 404 page error appears when a website is active, but the specific page within it doesn’t exist. A different error appears if the whole website you’re visiting is unavailable.</p>
<p>Having broken links on your website provides a poor experience and search engines see it as an indicator of low quality. Therefore, cleaning up broken links across your website can improve how high your website ranks in search engine results.</p>
<p>The best way to clean up broken links on your website is by removing them or replacing them with different, relevant links.</p>
<p>Even if your website has no broken links, it’s a good practice to have a 404 page in place when people mistype a website address. A 404 page is a page that explains that a 404 error has occurred. Most website templates have a default 404 page included.</p>
<p>Here are a couple examples of creative 404 pages.</p>
<p>Some 404 pages may not mention the number 404 at all, but rather include more user-friendly language such as:</p>
<p><img src="https://cdn.codecarrot.net/images/dribbble_404.gif" alt="404" /></p>
<p><img src="https://cdn.codecarrot.net/images/octupus_404.jpg" alt="404" /></p>
<p><img src="https://cdn.codecarrot.net/images/404.png" alt="404" /></p>
<p><img src="https://cdn.codecarrot.net/images/404_blog_image.png" alt="404" /></p>
<p><img src="https://cdn.codecarrot.net/images/404_dribbble.gif" alt="404" /></p>
<p><img src="https://cdn.codecarrot.net/images/404-01.png" alt="404" /></p>
<p><img src="https://cdn.codecarrot.net/images/404-page.gif" alt="404" /></p>
<p><img src="https://cdn.codecarrot.net/images/404-in-app.gif" alt="404" /></p>
<blockquote>
Page Not Found
Sorry, we couldn’t find the page you requested. Would you like to search our website or go to the homepage?
</blockquote>
<p>The status code 404 is one of the many <a href="//en.wikipedia.org/wiki/List_of_HTTP_status_codes">HTTP response codes</a> that exist from 100 to 599. Web browsers like Chrome and servers use codes like these to communicate when displaying websites. They are also useful when troubleshooting issues.</p>
<p>Each 3-digit code corresponds to a specific status or error. The official status code registry is maintained by <a href="//www.iana.org/assignments/http-status-codes/http-status-codes.xhtml">IANA</a>. For organizational purposes, the first digit of a status code explains the category of the code:</p>
<ol>
<li>Informational</li>
<li>Success</li>
<li>Redirection</li>
<li>Client related errors</li>
<li>Server related errors</li>
</ol>yashumittalOne of the most common errors you can come across while browsing the Internet is a 404 or Page Not Found error. This error often occurs when you follow a broken link or if you type in a website address that doesn’t exist.
https://cdn.codecarrot.net/images/4042.png
ECMAScript 5 Strict Mode, JSON, and More2017-10-11T13:52:00+00:002017-10-11T13:52:00+00:00https://blog.codecarrot.net/ecmascript-5-strict-mode-json-and-more<p>ECMAScript 5’s Object and Property system is a huge new aspect of the language and deserved its special consideration.</p>
<p>There are a number of other new features and APIs that need attention, as well. The largest of which are <strong>Strict Mode</strong> and native <strong>JSON</strong> support.</p>
<h2 id="strict-mode">Strict Mode</h2>
<p>Strict Mode is a new feature in ECMAScript 5 that allows you to place a program, or a function, in a “strict” operating context. This strict context prevents certain actions from being taken and throws more exceptions (generally providing the user with more information and a tapered-down coding experience).</p>
<p>Since ECMAScript 5 is backwards-compatible with ECMAScript 3, all of the “features” that were in ECMAScript 3 that were “deprecated” are just disabled (or throw errors) in strict mode, instead.</p>
<p>Strict mode helps out in a couple ways:</p>
<ul>
<li>It catches some common coding bloopers, throwing exceptions.</li>
<li>It prevents, or throws errors, when relatively “unsafe” actions are taken (such as gaining access to the global object).</li>
<li>It disables features that are confusing or poorly thought out.</li>
</ul>
<p>It should be noted that ECMAScript 5’s strict mode is different from the strict mode available in Firefox (which can be turned on by going to <code class="highlighter-rouge">about:config</code> and enabled <code class="highlighter-rouge">javascript.options.strict)</code>. ES5’s strict mode complains about a completely different set of potential errors (whereas Firefox’s existing strict mode tries to enforce some good practices, only).</p>
<h3 id="how-do-you-enable-strict-mode">How do you enable strict mode?</h3>
<p>Simple. Toss this at the top of a program to enable it for the whole script:</p>
<div class="language-js highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="dl">"</span><span class="s2">use strict</span><span class="dl">"</span><span class="p">;</span>
</code></pre></div></div>
<p>Or place it within a function to turn on strict mode only within that context.</p>
<div class="language-js highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="kd">function</span> <span class="nx">imStrict</span><span class="p">(){</span>
<span class="dl">"</span><span class="s2">use strict</span><span class="dl">"</span><span class="p">;</span>
<span class="c1">// ... your code ...</span>
<span class="p">}</span>
</code></pre></div></div>
<p>Note the syntax that’s used to enable strict mode (I love this!). It’s simply a string in a single statement that happens to contain the contents “use strict”. No new syntax is introduced in order to enable strict mode. This is huge. This means that you can turn strict mode on in your scripts – today – and it’ll have, at worst, no side effect in old browsers.</p>
<p>You can write your ES5 scripts in a manner that will be able to gracefully degrade for older useragents – something that wasn’t possible with ECMAScript 4. The way in which strict mode is enabled is a great illustration of that point in practice.</p>
<p>A neat aspect of being able to define strict mode within a function is that you can now define complete JavaScript libraries in a strict manner without affecting outside code.</p>
<div class="language-js highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="c1">// Non-strict code...</span>
<span class="p">(</span><span class="kd">function</span><span class="p">(){</span>
<span class="dl">"</span><span class="s2">use strict</span><span class="dl">"</span><span class="p">;</span>
<span class="c1">// Define your library strictly...</span>
<span class="p">})();</span>
<span class="c1">// Non-strict code...</span>
</code></pre></div></div>
<p>A number of libraries already use the above technique (wrapping the whole library with an anonymous self-executing function) and they will be able to take advantage of strict mode very easily.</p>
<p>So what changes when you put a script into strict mode? A number of things.</p>
<h2 id="variables-and-properties">Variables and Properties</h2>
<p>An attempt to assign <code class="highlighter-rouge">foo = "bar";</code> where ‘foo’ hasn’t been defined will fail. Previously it would assign the value to the foo property of the global object <code class="highlighter-rouge">(e.g. window.foo)</code>, now it just throws an exception. This is definitely going to catch some annoying bugs.</p>
<p>Any attempts to write to a property whose writable attribute is set to false, delete a property whose configurable attribute is set to false, or add a property to an object whose extensible attribute is set to false will result in an error. Traditionally no error will be thrown when any of these actions are attempted, it will just fail silently.</p>
<p>Deleting a variable, a function, or an argument will result in an error.</p>
<div class="language-js highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="kd">var</span> <span class="nx">foo</span> <span class="o">=</span> <span class="dl">"</span><span class="s2">test</span><span class="dl">"</span><span class="p">;</span>
<span class="kd">function</span> <span class="nx">test</span><span class="p">(){}</span>
<span class="k">delete</span> <span class="nx">foo</span><span class="p">;</span> <span class="c1">// Error</span>
<span class="k">delete</span> <span class="nx">test</span><span class="p">;</span> <span class="c1">// Error</span>
<span class="kd">function</span> <span class="nx">test2</span><span class="p">(</span><span class="nx">arg</span><span class="p">)</span> <span class="p">{</span>
<span class="k">delete</span> <span class="nx">arg</span><span class="p">;</span> <span class="c1">// Error</span>
<span class="p">}</span>
</code></pre></div></div>
<p>Defining a property more than once in an object literal will cause an exception to be thrown</p>
<div class="language-js highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="c1">// Error</span>
<span class="p">{</span> <span class="nl">foo</span><span class="p">:</span> <span class="kc">true</span><span class="p">,</span> <span class="nx">foo</span><span class="p">:</span> <span class="kc">false</span> <span class="p">}</span>
</code></pre></div></div>
<h3 id="eval">eval</h3>
<p>Virtually any attempt to use the name ‘eval’ is prohibited – as is the ability to assign the eval function to a variable or a property of an object.</p>
<div class="language-js highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="c1">// All generate errors...</span>
<span class="nx">obj</span><span class="p">.</span><span class="nb">eval</span> <span class="o">=</span> <span class="p">...</span>
<span class="nx">obj</span><span class="p">.</span><span class="nx">foo</span> <span class="o">=</span> <span class="nb">eval</span><span class="p">;</span>
<span class="kd">var</span> <span class="nb">eval</span> <span class="o">=</span> <span class="p">...;</span>
<span class="k">for</span> <span class="p">(</span> <span class="kd">var</span> <span class="nb">eval</span> <span class="k">in</span> <span class="p">...</span> <span class="p">)</span> <span class="p">{}</span>
<span class="kd">function</span> <span class="nb">eval</span><span class="p">(){}</span>
<span class="kd">function</span> <span class="nx">test</span><span class="p">(</span><span class="nb">eval</span><span class="p">){}</span>
<span class="kd">function</span><span class="p">(</span><span class="nb">eval</span><span class="p">){}</span>
<span class="k">new</span> <span class="nb">Function</span><span class="p">(</span><span class="dl">"</span><span class="s2">eval</span><span class="dl">"</span><span class="p">)</span>
</code></pre></div></div>
<p>Additionally, attempts to introduce new variables through an eval will be blocked.</p>
<div class="language-js highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="nb">eval</span><span class="p">(</span><span class="dl">"</span><span class="s2">var a = false;</span><span class="dl">"</span><span class="p">);</span>
<span class="nx">print</span><span class="p">(</span> <span class="k">typeof</span> <span class="nx">a</span> <span class="p">);</span> <span class="c1">// undefined</span>
</code></pre></div></div>
<h3 id="functions">Functions</h3>
<p>Attempting to overwrite the arguments object will result in an error:
<code class="highlighter-rouge">arguments = [...]; // not allowed</code></p>
<p>Defining identically-named arguments will result in an error <code class="highlighter-rouge">function( foo, foo ) {}</code>.</p>
<p>Access to <code class="highlighter-rouge">arguments.caller</code> and <code class="highlighter-rouge">arguments.callee</code> now throw an exception. Thus any anonymous functions that you want to reference will need to be named, like so:</p>
<div class="language-js highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="nx">setTimeout</span><span class="p">(</span><span class="kd">function</span> <span class="nx">later</span><span class="p">(){</span>
<span class="c1">// do stuff...</span>
<span class="nx">setTimeout</span><span class="p">(</span> <span class="nx">later</span><span class="p">,</span> <span class="mi">1000</span> <span class="p">);</span>
<span class="p">},</span> <span class="mi">1000</span> <span class="p">);</span>
</code></pre></div></div>
<p>The arguments and caller properties of other functions no longer exist – and the ability to define them is prohibited.</p>
<div class="language-js highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="kd">function</span> <span class="nx">test</span><span class="p">(){</span>
<span class="kd">function</span> <span class="nx">inner</span><span class="p">(){</span>
<span class="c1">// Don't exist, either</span>
<span class="nx">test</span><span class="p">.</span><span class="nx">arguments</span> <span class="o">=</span> <span class="p">...;</span> <span class="c1">// Error</span>
<span class="nx">inner</span><span class="p">.</span><span class="nx">caller</span> <span class="o">=</span> <span class="p">...;</span> <span class="c1">// Error</span>
<span class="p">}</span>
<span class="p">}</span>
</code></pre></div></div>
<p>Finally, a long-standing (and very annoying) bug has been resolved: Cases where null or undefined is coerced into becoming the global object. Strict mode now prevents this from happening and throws an exception instead.</p>
<div class="language-js highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="p">(</span><span class="kd">function</span><span class="p">(){</span> <span class="p">...</span> <span class="p">}).</span><span class="nx">call</span><span class="p">(</span> <span class="kc">null</span> <span class="p">);</span> <span class="c1">// Exception</span>
<span class="kd">with</span><span class="p">(){}</span>
</code></pre></div></div>
<p><code class="highlighter-rouge">with(){}</code> statements are dead when strict mode is enabled – in fact it even appears as a syntax error. While the feature was certainly mis-understood and possibly mis-used I’m not convinced that it’s enough to be stricken from the record.</p>
<p>The changes made in ECMAScript 5 strict mode are certainly varied (ranging from imposing stylistic preferences, like removing with statements, to fixing legitimately bad language bugs, like the ability to redefine properties in object literals). It’ll be interesting to see how people begin to adopt these points and how it’ll change JavaScript development.</p>
<blockquote>
All that being said, I’m fairly certain that jQuery is ES5-Strict compatible right now. Once an implementation of the language is made available (so that that premise may be tested) I’ll happily switch jQuery over to working exclusively in strict mode.
</blockquote>
<h2 id="json">JSON</h2>
<p>The second major feature of the language is the addition of native JSON support to the language.</p>
<p>I’ve been championing this move for a long time and I’m glad to see it finally arrive in a specification.</p>
<p>In the meantime PLEASE start migrating your JSON-using applications over to Crockford’s <a href="//json.org/json2.js">json2.js</a>. It is fully compatible with the ECMAScript 5 specification and gracefully degrades if a native (faster!) implementation exists.</p>
<blockquote>
In fact, I [just landed](//dev.jquery.com/changeset/6361) a change in jQuery yesterday that utilizes the JSON.parse method if it exists, now that it has been completely specified.
</blockquote>
<p>There are two primary methods for handling <code class="highlighter-rouge">JSON: JSON.parse</code> (which converts a JSON string into a JavaScript object) and <code class="highlighter-rouge">JSON.stringify</code> (which convert a JavaScript object into a serialized string).</p>
<div class="language-js highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="nx">JSON</span><span class="p">.</span><span class="nx">parse</span><span class="p">(</span> <span class="nx">text</span> <span class="p">)</span>
</code></pre></div></div>
<p>Converts a serialized JSON string into a JavaScript object.</p>
<div class="language-js highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="kd">var</span> <span class="nx">obj</span> <span class="o">=</span> <span class="nx">JSON</span><span class="p">.</span><span class="nx">parse</span><span class="p">(</span><span class="dl">'</span><span class="s1">{"name":"John"}</span><span class="dl">'</span><span class="p">);</span>
<span class="c1">// Prints 'John'</span>
<span class="nx">print</span><span class="p">(</span> <span class="nx">obj</span><span class="p">.</span><span class="nx">name</span> <span class="p">);</span>
<span class="nx">JSON</span><span class="p">.</span><span class="nx">parse</span><span class="p">(</span> <span class="nx">text</span><span class="p">,</span> <span class="nx">translate</span> <span class="p">)</span>
</code></pre></div></div>
<p>Use a translation function to convert values or remove them entirely.</p>
<div class="language-js highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="kd">function</span> <span class="nx">translate</span><span class="p">(</span><span class="nx">key</span><span class="p">,</span> <span class="nx">value</span><span class="p">)</span> <span class="p">{</span>
<span class="k">if</span> <span class="p">(</span> <span class="nx">key</span> <span class="o">===</span> <span class="dl">"</span><span class="s2">name</span><span class="dl">"</span> <span class="p">)</span> <span class="p">{</span>
<span class="k">return</span> <span class="nx">value</span> <span class="o">+</span> <span class="dl">"</span><span class="s2"> Resig</span><span class="dl">"</span><span class="p">;</span>
<span class="p">}</span>
<span class="p">}</span>
<span class="kd">var</span> <span class="nx">obj</span> <span class="o">=</span> <span class="nx">JSON</span><span class="p">.</span><span class="nx">parse</span><span class="p">(</span><span class="dl">'</span><span class="s1">{"name":"John","last":"Resig"}</span><span class="dl">'</span><span class="p">,</span> <span class="nx">translate</span><span class="p">);</span>
<span class="c1">// Prints 'John Resig'</span>
<span class="nx">print</span><span class="p">(</span> <span class="nx">obj</span><span class="p">.</span><span class="nx">name</span> <span class="p">);</span>
<span class="c1">// Undefined</span>
<span class="nx">print</span><span class="p">(</span> <span class="nx">obj</span><span class="p">.</span><span class="nx">last</span> <span class="p">);</span>
<span class="nx">JSON</span><span class="p">.</span><span class="nx">stringify</span><span class="p">(</span> <span class="nx">obj</span> <span class="p">)</span>
</code></pre></div></div>
<p>Convert an object into a serialized JSON string.</p>
<div class="language-js highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="kd">var</span> <span class="nx">str</span> <span class="o">=</span> <span class="nx">JSON</span><span class="p">.</span><span class="nx">stringify</span><span class="p">({</span> <span class="na">name</span><span class="p">:</span> <span class="dl">"</span><span class="s2">John</span><span class="dl">"</span> <span class="p">});</span>
<span class="c1">// Prints {"name":"John"}</span>
<span class="nx">print</span><span class="p">(</span> <span class="nx">str</span> <span class="p">);</span>
<span class="nx">JSON</span><span class="p">.</span><span class="nx">stringify</span><span class="p">(</span> <span class="nx">obj</span><span class="p">,</span> <span class="p">[</span><span class="dl">"</span><span class="s2">white</span><span class="dl">"</span><span class="p">,</span> <span class="dl">"</span><span class="s2">list</span><span class="dl">"</span><span class="p">])</span>
</code></pre></div></div>
<p>Serialize only a specific white list of properties.</p>
<div class="language-js highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="kd">var</span> <span class="nx">list</span> <span class="o">=</span> <span class="p">[</span><span class="dl">"</span><span class="s2">name</span><span class="dl">"</span><span class="p">];</span>
<span class="kd">var</span> <span class="nx">str</span> <span class="o">=</span> <span class="nx">JSON</span><span class="p">.</span><span class="nx">stringify</span><span class="p">({</span><span class="na">name</span><span class="p">:</span> <span class="dl">"</span><span class="s2">John</span><span class="dl">"</span><span class="p">,</span> <span class="na">last</span><span class="p">:</span> <span class="dl">"</span><span class="s2">Resig</span><span class="dl">"</span><span class="p">},</span> <span class="nx">list</span><span class="p">);</span>
<span class="c1">// Prints {"name":"John"}</span>
<span class="nx">print</span><span class="p">(</span> <span class="nx">str</span> <span class="p">);</span>
<span class="nx">JSON</span><span class="p">.</span><span class="nx">stringify</span><span class="p">(</span> <span class="nx">obj</span><span class="p">,</span> <span class="nx">translate</span> <span class="p">)</span>
</code></pre></div></div>
<p>Serializes the object using a translation function.</p>
<div class="language-js highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="kd">function</span> <span class="nx">translate</span><span class="p">(</span><span class="nx">key</span><span class="p">,</span> <span class="nx">value</span><span class="p">)</span> <span class="p">{</span>
<span class="k">if</span> <span class="p">(</span> <span class="nx">key</span> <span class="o">===</span> <span class="dl">"</span><span class="s2">name</span><span class="dl">"</span> <span class="p">)</span> <span class="p">{</span>
<span class="k">return</span> <span class="nx">value</span> <span class="o">+</span> <span class="dl">"</span><span class="s2"> Resig</span><span class="dl">"</span><span class="p">;</span>
<span class="p">}</span>
<span class="p">}</span>
<span class="kd">var</span> <span class="nx">str</span> <span class="o">=</span> <span class="nx">JSON</span><span class="p">.</span><span class="nx">stringify</span><span class="p">({</span><span class="dl">"</span><span class="s2">name</span><span class="dl">"</span><span class="p">:</span><span class="dl">"</span><span class="s2">John</span><span class="dl">"</span><span class="p">,</span><span class="dl">"</span><span class="s2">last</span><span class="dl">"</span><span class="p">:</span><span class="dl">"</span><span class="s2">Resig</span><span class="dl">"</span><span class="p">},</span> <span class="nx">translate</span><span class="p">);</span>
<span class="c1">// Prints {"name":"John Resig"}</span>
<span class="nx">print</span><span class="p">(</span> <span class="nx">str</span> <span class="p">);</span>
<span class="nx">JSON</span><span class="p">.</span><span class="nx">stringify</span><span class="p">(</span> <span class="nx">obj</span><span class="p">,</span> <span class="kc">null</span><span class="p">,</span> <span class="mi">2</span> <span class="p">)</span>
</code></pre></div></div>
<p>Adds the specified number of spaces to the output, printing it evenly.</p>
<div class="language-js highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="kd">var</span> <span class="nx">str</span> <span class="o">=</span> <span class="nx">JSON</span><span class="p">.</span><span class="nx">stringify</span><span class="p">({</span> <span class="na">name</span><span class="p">:</span> <span class="dl">"</span><span class="s2">John</span><span class="dl">"</span> <span class="p">},</span> <span class="kc">null</span><span class="p">,</span> <span class="mi">2</span><span class="p">);</span>
<span class="c1">// Prints:</span>
<span class="c1">// {</span>
<span class="c1">// "name": "John"</span>
<span class="c1">// }</span>
<span class="nx">print</span><span class="p">(</span> <span class="nx">str</span> <span class="p">);</span>
<span class="nx">JSON</span><span class="p">.</span><span class="nx">stringify</span><span class="p">(</span> <span class="nx">obj</span><span class="p">,</span> <span class="kc">null</span><span class="p">,</span> <span class="dl">"</span><span class="se">\t</span><span class="dl">"</span> <span class="p">)</span>
</code></pre></div></div>
<p>Uses the specified string to do the spacing.</p>
<div class="language-js highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="kd">var</span> <span class="nx">str</span> <span class="o">=</span> <span class="nx">JSON</span><span class="p">.</span><span class="nx">stringify</span><span class="p">({</span> <span class="na">name</span><span class="p">:</span> <span class="dl">"</span><span class="s2">John</span><span class="dl">"</span> <span class="p">},</span> <span class="kc">null</span><span class="p">,</span> <span class="dl">"</span><span class="se">\t</span><span class="dl">"</span><span class="p">);</span>
<span class="c1">// Prints:</span>
<span class="c1">// {\n\t"name": "John"\n}</span>
<span class="nx">print</span><span class="p">(</span> <span class="nx">str</span> <span class="p">);</span>
</code></pre></div></div>
<p>Additionally, a few new generic methods have been added to some of the base objects but, frankly, they aren’t that interesting. The results from String, Boolean, and Number are just equivalent to calling .valueOf() and the result from Date is equivalent to calling <code class="highlighter-rouge">.toISOString()</code></p>
<div class="highlighter-rouge"><div class="highlight"><pre class="highlight"><code>// Yawn...
String.prototype.toJSON
Boolean.prototype.toJSON
Number.prototype.toJSON
Date.prototype.toJSON
</code></pre></div></div>
<h2 id="bind">.bind()</h2>
<p>A welcomed addition to the language is a built-in .bind() method for enforcing the context of a function (virtually identical to <a href="//www.prototypejs.org/api/function/bind">Prototype’s .bind implementation</a>).</p>
<div class="language-js highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="nb">Function</span><span class="p">.</span><span class="nx">prototype</span><span class="p">.</span><span class="nx">bind</span><span class="p">(</span><span class="nx">thisArg</span><span class="p">,</span> <span class="nx">arg1</span><span class="p">,</span> <span class="nx">arg2</span><span class="p">....)</span>
</code></pre></div></div>
<p>Enforces the ‘this’ of the specified function to a specific object – and passing in any specified arguments.</p>
<div class="language-js highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="kd">var</span> <span class="nx">obj</span> <span class="o">=</span> <span class="p">{</span>
<span class="na">method</span><span class="p">:</span> <span class="kd">function</span><span class="p">(</span><span class="nx">name</span><span class="p">){</span>
<span class="k">this</span><span class="p">.</span><span class="nx">name</span> <span class="o">=</span> <span class="nx">name</span><span class="p">;</span>
<span class="p">}</span>
<span class="p">};</span>
<span class="nx">setTimeout</span><span class="p">(</span> <span class="nx">obj</span><span class="p">.</span><span class="nx">method</span><span class="p">.</span><span class="nx">bind</span><span class="p">(</span><span class="nx">obj</span><span class="p">,</span> <span class="dl">"</span><span class="s2">John</span><span class="dl">"</span><span class="p">),</span> <span class="mi">100</span> <span class="p">);</span>
</code></pre></div></div>
<p>Considering how long this function (and its equivalents) have been around it’s a welcome addition to the language.</p>
<h2 id="date">Date</h2>
<p>Dates are now capable of both parsing and outputting ISO-formatted dates. Thank goodness, about time. <code class="highlighter-rouge">rimshot</code></p>
<p>The Date constructor now attempts to parse the date as if it was ISO-formatted, first, then moves on to the other inputs that it accepts.</p>
<p>Additionally, date objects now have a new <code class="highlighter-rouge">.toISOString()</code> method that outputs the date in an ISO format.</p>
<div class="language-js highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="kd">var</span> <span class="nx">date</span> <span class="o">=</span> <span class="k">new</span> <span class="nb">Date</span><span class="p">(</span><span class="dl">"</span><span class="s2">2009-05-21T16:06:05.000Z</span><span class="dl">"</span><span class="p">);</span>
<span class="c1">// Prints 2009-05-21T16:06:05.000Z</span>
<span class="nx">print</span><span class="p">(</span> <span class="nx">date</span><span class="p">.</span><span class="nx">toISOString</span><span class="p">()</span> <span class="p">);</span>
</code></pre></div></div>
<h2 id="trim">.trim()</h2>
<p>A native, built-in, .trim() is now included for strings. Works identically to all the other trim methods out there – with the potential to possibly work faster.</p>
<h2 id="array">Array</h2>
<p>The JavaScript Array Extras that’ve been around for, what seems like, forever are finally formally specified. This includes the following methods: indexOf, lastIndexOf, every, some, forEach, map, filter, reduce, and reduceRight.</p>
<p>Additionally a new Array.isArray method is included, providing functionality very similar to the following:</p>
<div class="language-js highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="nb">Array</span><span class="p">.</span><span class="nx">isArray</span> <span class="o">=</span> <span class="kd">function</span><span class="p">(</span> <span class="nx">array</span> <span class="p">)</span> <span class="p">{</span>
<span class="k">return</span> <span class="nb">Object</span><span class="p">.</span><span class="nx">prototype</span><span class="p">.</span><span class="nx">toString</span><span class="p">.</span><span class="nx">call</span><span class="p">(</span> <span class="nx">array</span> <span class="p">)</span> <span class="o">===</span> <span class="dl">"</span><span class="s2">[object Array]</span><span class="dl">"</span><span class="p">;</span>
<span class="p">};</span>
</code></pre></div></div>
<p>Altogether I think ECMAScript 5 makes for an interesting package. It isn’t the massive leap that ECMAScript 4 promised but it is a series of respectable improvements that reduces the number of obvious bugs while making the language safer and faster.</p>yashumittalECMAScript 5’s Object and Property system is a huge new aspect of the language and deserved its special consideration.
https://cdn.codecarrot.net/images/strictness1.jpg
How do Python and Ruby compare?2017-10-11T09:09:00+00:002017-10-11T09:09:00+00:00https://blog.codecarrot.net/how-do-python-and-ruby-compare<p><strong><a href="//www.quora.com/profile/Fabio-Akita">Fabio Akita Answer</a></strong></p>
<p>Technically they “feel” similar, but in practice they are worlds apart. Both previous answers have flaws. For example, Python does compile from .py to .pyc. But because there is no .rbc it doesn’t mean any disadvantages.</p>
<p>Internally, since Ruby 1.9, every .rb source code is converted to byte-codes and then executed in runtime. It’s just that Ruby doesn’t cache it down in files. When we say “interpreted” it feels like every time we need something from a source file, it’s constantly reopened and reinterpreted, which is not true for both. Once loaded it’s executed within the virtual machines. (<a href="//www.ruby-forum.com/topic/4403013">Ruby vs Python vs Java bytecode concept</a>)</p>
<p>In terms of garbage collection, Python uses Reference Counting backed by a 3-stage generational collector (which helps finding circular references, among other things). Ruby uses a Bitmap Marking with Lazy Sweep and a 2-stage generational collector (which will become 3-stages in Ruby 2.2). Both are not nearly in the same league of something like Java’s G1GC, but Ruby’s not so far behind after Ruby 2.1. (Generational GC in Python and Ruby)</p>
<p>Ruby indeed has its roots in Perl (that’s the reason we have “perlisms” such as =~ for regex matching), but we don’t use most of them nowadays. It also has inspirations in Python’s terseness. On the other hand it’s heavily influenced by Smalltalk (which is why objects feel really first class, including protocol based object compatibility and message passing). Finally Ruby also borrowed a few aspects of Lisp in its function-like approach and heavy usage of blocks (for stuff such as lazy enumerators, in which I can enumerate a collection with an infinite number of items without blocking, and yes, we can have Infinite, it’s even a class in Ruby ;-).</p>
<p>In terms of package management, Pythonists will disagree but I have to say that the mature combination of Rubygems and Bundler gives it a larger edge. Dependency management is a solved problem in the Ruby community nowadays and with a very slick design to it. PIP is evolving and coming strong (even though NPM is evolving much faster, although lacking a mature library community like Python’s), but it lacks some of the nicer features of Bundler.</p>
<p>Speaking of which, it’s good that Python has virtualenv to solve having multiple versions of Python in the same environment. It’s akin to what Rbenv does for Ruby. On the other hand, there’s an edge for Ruby. RVM is still more feature complete.</p>
<p>In terms of evolution of the language, Ruby was really the true underdog. It was buggy, incomplete, very very slow. But starting from 1.8.6 it picked up speed really fast. We are in Ruby 2.1.2 and the entire community is there already. We never had anything like the Python 2 vs Python 3 situation.</p>
<p>Also because Rails was truly awful around version 1.0 with very sloppy support in terms of system administration and deployment, we came a long way. With web servers such as Puma, Unicorn, Thin, Passenger, Rainbows, we can have normal blocking web applications and web sockets or asynchronous applications with Thin, Puma and Rainbows. Rails 4 (which still unmatched features such as the Asset Pipeline) is truly state of the art in this category right now. In terms of async, we do have Eventmachine and Goliath but neither approached the maturity of Tornado or Twisted in Python, and both lagged behind Node.js nowadays.</p>
<p>Ruby had Capistrano. Python came with Fabric. Ruby went all the way to Chef and Puppet. Python came up with Ansible. This arena represents a very good fight. Rubysts use Ansible as well, we don’t shy away from tools that didn’t start in our own ecosystem.</p>
<p>Rails was really the catalyst and it represents the unity of the community. In 10 years we never had a fragmented community. Tools and libraries are usually cross-compatible between Rails, Sinatra, and other frameworks. Even though Python started with the WSGI initiative, Rubysts steered faster towards it’s equivalent, Rack. And it’s now a default standard.</p>
<p>In terms of practice, we adopted tools such as RSpec for tests (even though we use a lot of minitest as well). Task management with Rake (even though we also have Thor). By the way, we really paved the way for what proper testing tools should be. Unit all the way to acceptance. We inherited that from the cutting-edge side of the Java community.</p>
<p>Never mind syntax differences. There are many, they are not alike at all. You can’t code Ruby the same way you code Python. There are different conventions, there are different ways to organize code, there are different tricks of the trade that only practice will show you. Those differences do not represent advantages or disadvantages, it’s the same thing to say that motorcycle mechanics are different from car mechanics. More important: the ecosystems work very differently.</p>
<p>Python has more roots amidst academics, engineers, system administrators. Ruby had to start with entrepreneurship, as it wasn’t accepted anywhere else. And now it’s permeating other areas. Which is why you will find Github as one of the most successful developer-based startups ever and the largest repository of open source code in the world, where you will find many things, including Python tools. We do have to remember Mercurial and Bazaar, Git alternatives in Python, but neither achieved it’s popularity. (Update: just because someone complained, let me clarify that Git was created by Linus Torvalds and it is all C, never I have intended to feel like Git is made in Ruby. I did say however, that Rubyists are fast to pick up best of breed).</p>
<p>As you may have realized, I’m a rubyst and of course my point of view is very biased towards Ruby. The difference is that I am not trying to mask it away. Python 2 is still faster than Ruby 2.1. Python 3, I’m not so sure, but it’s still faster. The ecosystems are very different. When you choose Python or Ruby, it’s not a simple syntax difference (oh, indentation), it goes much deeper than that.</p>
<hr />
<p><strong><a href="//www.quora.com/profile/Luciano-Ramalho">Luciano Ramalho Answer</a></strong></p>
<p>Fabio Akita’s answer is excellent, and I will not try to emulate it in depth or breadth. But I will add a couple things from the point of view of a Python user since 1998, who also loves Ruby.</p>
<p>Semantically the languages are very similar, there is no other mainstream language that is closer to Python than Ruby and vice-versa, although their respective communities prefer to avoid this reality and love to stress the differences.</p>
<p>The syntax of Python is much simpler – you may even say “poorer”. But this makes it more suitable for beginners who will see less variation across real life code bases, and perhaps will find it a little harder to write obfuscated code by accident. On the other hand, Ruby’s richer syntax makes is suitable to host DSLs – Domain Specific Languages – language subsets specialized in some niche kind or programming.</p>
<p>Talking about niches and mainstream languages, I believe the biggest advantage of Python over Ruby in 2014 is its much wider deployment. When I mentioned “beginners” before, that includes not only beginning software developers but also all kinds of professionals from other areas who need to program. Being friendly to beginners allowed Python to spread and in some cases dominate several areas where the presence of Ruby is much smaller.</p>
<p>Python is the de-facto standard scripting language in computer graphics, used everywhere from production pipelines to tool automation in the largest CGI companies like ILM, Disney Animation, Pixar, Weta Digital and embedded in professional software such as Autodesk Maya and NUKE.</p>
<p>Python is now essential for professional system administration, as a replacement for shell scripting in more complex tasks and as the basis of huge projects like OpenStack and OpenShift. Every important GNU/Linux comes with Python pre-installed, since many admin tools and end-user apps are written in Python. The best jobs for system administration now require Python skills.</p>
<p>Python is now mainstream in science and engineering, thanks to <a href="//www.scipy.org/">SciPy.org</a> (which makes a huge collection of code in C, C++ and FORTRAN easily accessible to Python scripts) and the <a href="//ipython.org/notebook.html">IPython Notebook</a> project (which you must see!). Note that Python established itself as a programming language for advanced research before this happened: Python is Now the Most Popular Introductory Teaching Language at Top U.S. Universities (Communications of the ACM). So it is likely the importance of Python in academia will grow even more.</p>
<p>By the way, the same toolset that makes Python popular in science and engineering also makes it increasingly employed in finance, with the growth of quantitative analysis. See this Stack Exchange question where Python is mentioned by several respondents: <a href="//quant.stackexchange.com/questions/306/what-programming-languages-are-most-commonly-used-in-quantitative-finance">What programming languages are most commonly used in quantitative finance?</a>. There are also several books about Python in finances available.</p>
<p>The only major area where Ruby and Python compete in equal footing is server-side web development, where they have similar penetration.</p>
<hr />
<p><strong><a href="//www.quora.com/profile/Ben-Neely-3">Ben Neely Answer</a></strong></p>
<p>Ruby and Python are both programming languages that are popular for being easy to learn, powerful, and open-source with many great features in common.</p>
<p><img src="https://cdn.codecarrot.net/images/main-qimg-24067acdc9023a72fb4dc92140c717d4-c.jpg" alt="Python and ruby has same algorithms" /></p>
<p>Ruby was created in 1999, in fact because the author didn’t like Python. The <em><a href="//ruby-doc.org/docs/ruby-doc-bundle/FAQ/FAQ.html">Ruby Language FAQ</a></em> describes his thinking:</p>
<p>I knew Python then. But I didn’t like it, because I didn’t think it was a true object-oriented language—OO features appeared to be add-on to the language. As a language manic and OO fan for 15 years, I really wanted a genuine object-oriented, easy-to-use scripting language. I looked for, but couldn’t find one.</p>
<p>So, I decided to make it. It took several months to make the interpreter run. I put it the features I love to have in my language, such as iterators, exception handling, garbage collection.</p>
<p>Like Ruby, Python has come a long way. Python now boasts many of the same features as Ruby. The Python Software Foundation FAQ describes Python:</p>
<p>Python is an interpreted, interactive, object-oriented programming language. It incorporates modules, exceptions, dynamic typing, very high level dynamic data types, and classes. Python combines remarkable power with very clear syntax.</p>
<p>Both languages are popular and easy to learn when compared to other languages. They look and function very similar. Here’s some sample code from:</p>
<p><strong>Ruby</strong></p>
<div class="language-ruby highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="n">letters</span> <span class="o">=</span> <span class="p">[</span><span class="s1">'a'</span><span class="p">,</span> <span class="s1">'s'</span><span class="p">,</span> <span class="s1">'d'</span><span class="p">,</span> <span class="s1">'f'</span><span class="p">].</span><span class="nf">sort!</span>
<span class="c1"># letters is ['a', 'd', 'f', 's']</span>
</code></pre></div></div>
<p><strong>Python</strong></p>
<div class="language-python highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="n">letters</span> <span class="o">=</span> <span class="p">[</span><span class="s">'a'</span><span class="p">,</span> <span class="s">'s'</span><span class="p">,</span> <span class="s">'d'</span><span class="p">,</span> <span class="s">'f'</span><span class="p">]</span>
<span class="n">letters</span><span class="p">.</span><span class="n">sort</span><span class="p">()</span>
<span class="c1"># letters is ['a', 'd', 'f', 's']
</span></code></pre></div></div>
<p>Both languages are open source, object-oriented, interpreted, and statically typed with almost identical features:</p>
<p><img src="https://cdn.codecarrot.net/images/main-qimg-ebde4be01b518c463f42d48569b552a4-c.jpg" alt="features of python and ruby language" /></p>
<p>Both also have strong communities of teachers and open-source developers. Ruby has one clear advantage: its community focuses on efficient developer tools that save time by implementing smart defaults and hiding complexity. The Python community is more focused on providing customizable and concise tools that give developers full control over their tools, but come with a steeper learning curve. Ruby’s tools make it simpler for beginners to build complete web applications, while providing the power to customize application functionality. For these reasons, we think that Ruby is the better language to learn with, and that’s what we chose to teach as part of our Full Stack Web Development Track at Bloc, where I write curriculum</p>
<p>Ultimately, these two languages are similar semantically, but have communities with different philosophies and long-term goals. Ruby is focused on create the most developer friendly programming language with many handy ways for users to accomplish their goals. Python focuses on providing one “pythonic” way to do things and is more widely used for data science applications, and Python frameworks have more advanced statistical analysis and data rendering tools.</p>
<hr />
<p>These are the answers from <a href="//www.quora.com/profile/Yashu-Mittal-7">quora</a>.</p>yashumittalFabio Akita Answer
https://cdn.codecarrot.net/images/python_vs_ruby.gif
Try Docker with One Command2017-10-08T18:31:00+00:002017-10-08T18:31:00+00:00https://blog.codecarrot.net/try-docker-one-command<h2 id="what-is-docker">What is Docker?</h2>
<p>Docker is the world’s leading software container platform. Developers use Docker to eliminate “works on my machine” problems when collaborating on code with co-workers. Operators use Docker to run and manage apps side-by-side in isolated containers to get better compute density. Enterprises use Docker to build agile software delivery pipelines to ship new features faster, more securely and with confidence for both Linux, Windows Server, and Linux-on-mainframe apps.</p>
<h2 id="what-is-a-container">What is a Container?</h2>
<p>Containers are a way to package software in a format that can run isolated on a shared operating system. Unlike VMs, containers do not bundle a full operating system - only libraries and settings required to make the software work are needed. This makes for efficient, lightweight, self-contained systems and guarantees that software will always run the same, regardless of where it’s deployed.</p>
<p>Heard of <a href="//www.docker.com/">Docker</a>. Right? But still don’t know exactly what it is? I’ll fix that in one sentence:</p>
<blockquote>
Docker lets developers bundle an app, together with services it depends on (like databases), into a runnable package called a container.
</blockquote>
<p>Okay, maybe it needs a little more explanation than that. Let’s say I’ve been hearing about this cool web server called Nginx, and I’d like to try it out on my laptop. But I already have another web server installed, and I don’t want to interfere with that.</p>
<p>So I install Docker instead.</p>
<ul>
<li><a href="//www.docker.com/docker-windows">Windows version</a></li>
<li><a href="//www.docker.com/docker-mac">Mac version</a></li>
</ul>
<p>Then I run this command:</p>
<div class="highlighter-rouge"><div class="highlight"><pre class="highlight"><code>docker run -p 8080:80 nginx
</code></pre></div></div>
<p>I wait until I see the text <code class="highlighter-rouge">Status: Downloaded newer image for nginx:latest</code> in my terminal. Then I launch my browser, connect to <code class="highlighter-rouge">http://localhost:8080</code>, and am greeted by this response:</p>
<p><img src="https://cdn.codecarrot.net/images/docker_nginx.png" alt="Open the localhost port 8000 on browser" /></p>
<p>That’s coming from my new personal Nginx server, running on my laptop within a Docker container. If I press Ctrl-C in my terminal, the Docker container shuts down, and http://localhost:8080 no longer responds.</p>
<h2 id="what-just-happened">What Just Happened?!</h2>
<p>You’re probably wondering how Docker can accomplish all that with one command. Don’t worry, it’s a lot less mysterious once you know what’s going on. Here are the steps Docker goes through when you run <code class="highlighter-rouge">docker run -p 8080:80 nginx</code>:</p>
<ul>
<li>It connects to a Docker <strong>registry</strong>, which is kind of like a GitHub for Docker packages.</li>
<li>It downloads an <strong>image</strong> named <code class="highlighter-rouge">nginx</code>. An image is a file that Docker can base new containers off of. The <code class="highlighter-rouge">nginx</code> image includes a compressed Linux file system, into which Nginx has been pre-installed by the creators of the image.</li>
<li>It launches a container based on the image. The container runs Nginx, which listens for requests on port 80.</li>
<li>Nginx is listening on port 80 of the container, though. I need to <strong>publish</strong> that port to a port on my laptop’s OS. That’s why I added <code class="highlighter-rouge">-p 8080:80</code> to the command: to publish port 80 of the container as port 8080 on my laptop.</li>
<li>Typing <code class="highlighter-rouge">http://localhost:8080</code> in my browser makes a connection to localhost, that is, my own laptop. The <code class="highlighter-rouge">:8080</code> directs it to port 8080. Docker then forwards the request from port 8080 of my laptop to port 80 on the container.</li>
<li>Nginx receives the request, and responds.</li>
</ul>
<p>This one short command demonstrates three cool features of Docker:</p>
<ul>
<li>Registries, which let users easily download images containing whatever software they need and the OS it runs on.</li>
<li>Containers, which let you run the software you want, without interfering with software running on the host.</li>
<li>Networking, which lets you connect to software running in a container. Docker will also let you run multiple containers on a host, and make virtual network connections between the containers.</li>
</ul>
<h2 id="other-things-to-try">Other Things to Try</h2>
<p>Let’s try a few more commands:</p>
<div class="highlighter-rouge"><div class="highlight"><pre class="highlight"><code>$ docker run -it ubuntu
</code></pre></div></div>
<p>This one downloads and runs an image with a stripped-down Ubuntu Linux, then sets up an interactive terminal session on it (that’s the -it in the command). When it runs, you’ll be in an Ubuntu shell, working in a file system that’s totally separate from your actual computer’s.</p>
<p><img src="https://cdn.codecarrot.net/images/docker_ubuntu.png" alt="An Ubuntu shell, running within Docker" /></p>
<div class="highlighter-rouge"><div class="highlight"><pre class="highlight"><code>docker run ruby ruby -e 'puts RUBY_VERSION'
</code></pre></div></div>
<p>This one downloads an image that includes the Ruby programming language, and runs a small command-line script that prints the Ruby version. You don’t need Ruby installed on your system for this to work; Ruby runs from within the container. If Ruby’s not your thing, don’t worry, the link below has images for many other languages as well.</p>
<div class="highlighter-rouge"><div class="highlight"><pre class="highlight"><code>docker run -it patricknw/xaos
</code></pre></div></div>
<p>This one’s just for fun. It runs XaoS, an awesome fractal viewer, which just happens to have an ASCII-art mode so it can run in your terminal. There are many key controls available, described <a href="//hub.docker.com/r/patricknw/xaos/">here</a>, but the “a” key turns on autopilot for moving around, the “y” key cycles through colors, and the “q” key quits.</p>
<p>There are lots more cool images ready to go at <a href="//hub.docker.com/explore/">https://hub.docker.com/explore/</a>. If there’s a software package you’ve been wanting to try, but didn’t want the hassle of installing, see if it’s listed there!</p>yashumittalWhat is Docker?
https://cdn.codecarrot.net/images/group_5622_0.png
7 Must-Have Tools in a Beginner Developer’s Toolkit2017-10-08T17:51:00+00:002017-10-08T17:51:00+00:00https://blog.codecarrot.net/7-must-have-tools-in-a-beginner-developers-toolkit<p>When you’re new to coding, you’ll start to hear about all the latest and greatest tools for developers. Coding is ultimately problem-solving, which is why new tools are constantly being created to help solve those problems. As you grow your skills, you’ll start to be able to test out the tools that best fit your needs and projects. But, when you’re first getting started, what are some of the essential tools that should be in a developer’s toolkit?</p>
<h2 id="edit-with-atom-or-visual-studio-code">Edit with Atom or Visual Studio Code</h2>
<p>I love using <a href="/how-to-sync-sublime-text-packages-and-settings-across-multiple-computers-with-cloud-storage">sublime text</a>, but you can use atom or visual studio too.</p>
<p><img src="https://cdn.codecarrot.net/images/atom-mark@1200x630-914x480.png" alt="Atom text editor" /></p>
<p>Whether you’re learning to code, the first tool you’ll need is a code editor. Depending on a developer’s preference, you may get different recommendations. But for when you’re first getting started, there are two great options we’d recommend: <strong><a href="//atom.io/">Atom</a> and <a href="//code.visualstudio.com/">Visual Studio Code</a></strong>. Both are open source, beginner friendly and best of all they’re completely free!</p>
<h2 id="collaborate-and-share-your-code-on-github">Collaborate and share your code on GitHub</h2>
<p><img src="https://cdn.codecarrot.net/images/octocat-939x480.jpeg" alt="Github Logo" /></p>
<p><a href="//github.com/mittalyashu">GitHub</a> is a huge collaboration development platform built on top of a distributed version control system called <a href="/what-is-git">Git</a>. From when you’re a beginner through to when you’re a pro, GitHub will be the most valuable place for you to share & collaborate with other developers on code. If you’re entirely new to GitHub, check out the GitHub Basics beginner course to learn how to navigate the site, explore open source software, and best practices for sharing and collaborating.</p>
<h2 id="inspect-with-chrome-devtools">Inspect with Chrome DevTools</h2>
<p><img src="https://cdn.codecarrot.net/images/1-DvIYrAYv_JeL74nA.png" alt="Developer Tool Bar Screenshot" /></p>
<p>If you’re interested in front end web design and development, then first on your list has to be <a href="//developer.chrome.com/devtools">Chrome Developer Tools</a> (DevTools). DevTools has a lot of different uses, but when you’re first learning it’s particularly useful for inspecting exactly how any page is built and styled. It’s also great for debugging. Check out this workshop with Guil Hernandez to learn how to debug your CSS using DevTools.</p>
<p>Another bonus of Chrome DevTools is that they’re constantly updated with new debuggers and powerful exploratory features that can help you stay efficient and ahead of the curve with your skills.</p>
<p><strong>Access Chrome DevTools by following <a href="//developer.chrome.com/devtools">these steps</a>.</strong></p>
<h2 id="visualize-with-the-firefox-grid-inspector-tool">Visualize with the Firefox Grid inspector tool</h2>
<p><img src="https://cdn.codecarrot.net/images/firefox-developer-tools-css-grid-723x480.jpg" alt="Firefox grid inspector" /></p>
<p>Mozilla Firefox also provides some awesome developer tools, but one that is particularly helpful for beginners interested in front end is the new CSS Grid Inspector tool. The tools allows you to layout specs so you can visualize exactly how you build your grid in the browser, which saves on making tweaks to your code later.</p>
<h2 id="create-with-gimp-and-inkscape">Create with Gimp and Inkscape</h2>
<p>When it comes to using a vector graphics editor, Adobe Illustrator is likely the first tool that will come up. However, when you’re starting out and only have limited needs, a monthly subscription can feel unnecessary. The great news is that there are free alternatives. Top of our list are <a href="//www.gimp.org/">Gimp</a> and <a href="//inkscape.org/en/">Inkscape</a>, both of which are awesome free tools that you can use to create icons, graphics etc for your projects.</p>
<h2 id="php-bonus-tools-phpstorm--composer"><em>(PHP Bonus Tools: PHPStorm & Composer)</em></h2>
<p>For all the PHP developers out there, there are two tools, that I really like the efficiency of PHPStorm and also Composer for PHP, it really changed the way that PHP is developed.</p>
<h2 id="ruby-bonus-tool-debug-with-pry"><em>(Ruby Bonus Tool: Debug with Pry)</em></h2>
<p>When it comes to debugging your Ruby code, Dustin Brown describes <code class="highlighter-rouge">binding.pry</code> as his bread and butter. From when you’re first getting started with Ruby, have the <a href="//pryrepl.org/">Pry gem</a> installed to keep you on track with your code.</p>
<p><strong>Install Pry <a href="//pryrepl.org/">here</a>.</strong></p>
<p><em>These are only a few of thousands of tools out there, we’d love to hear what you would add to the list in the comments below!</em></p>yashumittalWhen you’re new to coding, you’ll start to hear about all the latest and greatest tools for developers. Coding is ultimately problem-solving, which is why new tools are constantly being created to help solve those problems. As you grow your skills, you’ll start to be able to test out the tools that best fit your needs and projects. But, when you’re first getting started, what are some of the essential tools that should be in a developer’s toolkit?
https://cdn.codecarrot.net/images/todd-quackenbush-701.jpg
How to Register a Private Limited Company in India2017-10-08T16:56:00+00:002017-10-08T16:56:00+00:00https://blog.codecarrot.net/how-to-register-private-limited-company-in-india<p>Looking to register your business as a private limited company? Here is everything you need to know to help you get started.</p>
<h2 id="understanding-private-limited-company">Understanding Private Limited Company</h2>
<p>The term corporation has been derived from the Latin word corpus, which means “body.” According to the law, a corporation is a body, a legally recognized entity. It can do business, trade property, make a contract and pay taxes. The most remarkable feature of a corporation is, that it protects its owners from personal liability for corporate debts and obligations to a large extent.</p>
<h2 id="below-is-the-step-by-step-procedure-for-incorporation-of-a-company-under-companies-act-2013">Below is the step-by-step procedure for incorporation of a Company under Companies Act, 2013:</h2>
<p>A corporation is a legal entity created externally and artificially apart from those who created it and those who carry out its operations. According to Section 3(1) two or more persons can form a Private Limited Company to conduct any lawful business.</p>
<p>The three basic methods to form a Private Limited Company as per Section 3 (2) are listed below.</p>
<ul>
<li>A company limited by shares.</li>
<li>A company limited by guarantee.</li>
<li>An unlimited company.</li>
</ul>
<p>A private limited company must have a minimum of two directors and can have up to a maximum of fifteen directors. The shareholders could be natural persons or companies, including foreign companies. Below listed are the step-wise procedures to be followed when registering a company.</p>
<ul>
<li>Procure Digital Signatures</li>
</ul>
<p>Various documents prescribed under the Companies Act, 2013, are needed to be filed with the digital signature of the Managing Director or Director or Manager or Secretary of the Company, therefore, it is mandatory to obtain a Digital Signature Certificate from the authorized Digital Signature Certificate issuing authority for a minimum of one director to sign the E-forms related to incorporation like form INC.1 and several other documents.</p>
<ul>
<li>Procure a DIN (Director Identification Number), as per Section 153</li>
</ul>
<p>Next step towards company incorporation is DIN. As per 153 of the Companies Act, 2013, each and every individual intending to be appointed as director of a company should apply for allotment of Director Identification Number in form DIR.3 to the Central Government in such form and manner and along with fees applicable. Therefore, before submission of e-Form INC.1 for the availability of the name, all the directors of the proposed company must be sure to procure a DIN if they don’t already have it.</p>
<ul>
<li>Check availability of name proposed for the company</li>
</ul>
<p>Have you thought about the name you want to give your company? If not, now is the time. The name you have thought about must also be available and a procedure needs to be followed to check the availability of the name you have chosen. As per section 4(4) read with Rule-9 of Companies (Incorporation) Rules, 2014, application for the reservation/availability of name shall be in Form no. INC.1 along with prescribed fee of Rs. 1,000/-. In selection of Company name should be in according to the</p>
<p>As per section 4(4) read with Rule-9 of Companies (Incorporation) Rules, 2014, application for the reservation/availability of name shall be in Form no. INC.1 along with prescribed fee. Selection of the company name should be according to the guidelines given in Rule-8 of Companies (Incorporation) Rules, 2014.</p>
<p>MCA has prescribed certain rules for name availability so it is a must to check before applying for the name. Refer Rule-8 of Companies (Incorporation) Rules, 2014.
After approval of name Registrar Of Companies will issue a Name availability letter with reference to approval for the availability of name for a proposed company.</p>
<h3 id="validity-of-name-approved-by-registrar-of-companies">Validity of Name approved by Registrar Of Companies:</h3>
<p>As per section 4(5), the maximum time for which name will be available has been prescribed in the law itself under section 4(5). The name will be valid for a period of 60 Days from the date on which the application for reservation was made.
The applicant is not allowed to start business transactions or enter into any agreement or contract in the name of the proposed company until a certificate of registration is issued by the registrar of companies as per the provisions of the Companies Act, 2013 and the rules there under.</p>
<ul>
<li>Preparation of the Memorandum of Association (MOA) and Articles of Association (AOA)</li>
</ul>
<p>Drafting of the MOA and AOA is the next step to we worked upon if the name is available and approval letter is issued by the Registrar. It should be noted that the main objects should match with the objects shown in e-Form INC.1. The MOA & AOA are essentially the charters and internal rules and regulations of the company. Therefore, it must be drafted with care.
As per section 4(6) the memorandum of a company shall be in respective forms specified in Tables A, B, C, D and E in Schedule I as may be applicable to such company.</p>
<ul>
<li>Application for Incorporation of a Private Company</li>
</ul>
<p>The next step would be application for the incorporation of a Private Company. As per Rule-12 of Companies (Incorporation) Rules, 2014, application for incorporation of a private and Public company, with the Registrar, within whose jurisdiction the registered office of the company is proposed to be situated, shall be filed in Form no. INC 7 [Rule 12 to 18] along with Form no. INC.22 for a situation of registered office of the company.</p>
<p>Here is a consolidated list of the requirements of this Act:</p>
<ul>
<li>Declaration in Form No. INC-8 by Professionals. (As per Rule-14 of Companies (Incorporation) Rules, 2014,</li>
<li>A declaration in the prescribed form by an advocate, a CA, CMA or CS, who is engaged in the formation of the company.</li>
<li>Proof of residential address (the address for correspondence till its registered office is established. For verification of signature of subscribers [Pursuant to rule 16 (1) (q) of companies (Incorporation) Rules, 2014 in form no. INC – 10.</li>
<li>A declaration in the prescribed form by a person named in the articles as a director, manager or secretary of the company, that all the requirements of this Act and the rules made there under with respect of registration and matters precedent or incidental thereto have been complied with.</li>
<li>Affidavit from each of the subscriber to the Memorandum in Form No. INC-9 as per Rule-15 of Companies (Incorporation) Rules, 2014, (an affidavit from each of the subscribers to the memorandum and from persons named as the first directors, if there are any, in the articles that he is not convicted of any offence with reference with the promotion, formation or management of any company, or that he has not been found guilty of any fraud or misfeasance or breach of duty to any company under this Act or any former company law during the previous five years and that all the documents filed with the Registrar for registration of the company contain correct and complete information that stands true to the best of his knowledge and belief.</li>
<li>No Objection Certificate is needed in case there is change in the promoters (first subscribers to MOA).</li>
<li>Proof of Identity, like the particulars of name, last name or family name, address, nationality and such other particulars of every subscriber to the memorandum, and the particulars of the individuals mentioned in the articles like the first directors of the company along with proof of identity, as may be required, and in the case of a subscriber being a body corporate, such particulars as may be prescribed.</li>
<li>Articles of Association, if there are any.</li>
</ul>
<p><strong>Note:</strong> Where the articles contain the provisions for entrenchment, the company shall give notice to the Registrar of such provisions in Form No. INC.7, as the case may be, along with the fee as provided in the Companies (Registration offices and fees) Rules, 2014 at the time of incorporation of the company.</p>
<ul>
<li>Certified true copy of board resolution/consent by all the partners authorizing to subscribe to MOA.</li>
<li>PAN Card for an Indian national.</li>
<li>Copy of certificate of incorporation of the foreign body corporate and proof of registered office address.</li>
<li>Optional attachments, if there are any</li>
</ul>
<p>As per Rule-17 of Companies (Incorporation) Rules, 2014, the particulars of each person mentioned in the articles as first director of the company and his interest in other firms or bodies corporate along with his consent to act and hold the position as director of the company shall be filed in Form No.DIR-12. This along with the fee as provided in the Companies (Registration offices and fees) Rules, 2014.</p>
<p>Along with the above details in the Form no.INC.7, Form no. DIR 12 to be filed with the following attachments:</p>
<ul>
<li>Declaration by first director in Form INC-9 is compulsory to attach in case of a new company.</li>
<li>Declaration of the appointee Director, in Form DIR-2.</li>
<li>Interest in other entities of director it is compulsory to attach in case number of entities entered is more than one.</li>
<li>Optional attachments, if there are any.</li>
</ul>
<p>Form no. INC 22:</p>
<p>As per Rule 25 of verification of the registered office.</p>
<p>Section 12(2) of the Companies Act, 2013 states that the Company shall furnish to the Registrar, verification of its Registered Office within a period of thirty days of its incorporation in the prescribed manner and form.</p>
<p>Section 12(4) of the Companies Act, 2013 states that Notice of every change of the situation of the registered office, verified in the prescribed manner, after the date of incorporation of the company, shall be given to the Registrar within fifteen days of the change, who shall maintain record of it.</p>
<p>Along with the above details in Form No. INC.7, Form no. DIR.22 to be filed with the following attachments:</p>
<ul>
<li>Copies of the utility bills as mentioned above for eg: the proof of evidence of any utility service like telephone, gas, electricity, etc. depicting the address of the premises in the name of the owner or document, which is not older than two months(not older than two months).</li>
<li>Proof of Registered Office address for eg: Rent Agreement/Conveyance/Lease deed along with the rent receipts, or the notarized copy of lease /rent agreement in the name of the company along with a copy of rent paid receipt not older than one month; or the authorization from the owner or authorized occupant of the premises along with proof of ownership or occupancy authorization, to use the premises by the company as its registered office.</li>
<li>List of all the companies (specifying their CIN) having the same registered office address, if there are any.</li>
<li>Optional attachments, if there is any.</li>
</ul>
<h2 id="please-follow-these-pointers">Please follow these pointers:</h2>
<ul>
<li>User is required to file E-Form INC-7 for incorporation of Company other than OPC within sixty days from the date of application of reservation of name in E-Form INC-1.</li>
<li>It is suggested that E-Form DIR-12 and E-Form INC-22 should be filed together at the time of filing of E-Form INC-7 when address for correspondence is the address of registered office of the company.</li>
<li>In case the address for correspondence is not the same as address of the registered office of the Company, user is required to file INC-22 within 30 days of its incorporation.</li>
<li>Stamp duty on E-Form INC-7, MOA and AOA can be paid electronically through the MCA portal and in such case submission of physical copies of the uploaded E-Form INC-7, MOA and AOA to the office of Registrar Of Companies is not required.</li>
<li>Payment of stamp duty has to be made electronically through MCA portal is mandatory in respect of the States which have authorized the Central Government to collect stamp duty on their behalf.</li>
<li>Now e-Stamp duty payment is to be made online through MCA portal for all the states.</li>
<li>It is compulsory for the user to scan the photographs of each and every subscriber with MOA and AOA.</li>
<li>Minimum authorized capital of Indian Rupees 100,000 is required to form a private company in India. There is no ceiling to it.</li>
</ul>
<p>Usually time taken for incorporation a Private Limited Company in India from 2 to 6 weeks. The speed of registration will depend on submission of relevant documents by the client and speed of government approval. To ensure speedy registration, one must try to choose a unique name for the Company and ensure you have all the required documents in place prior to starting the registration process.</p>
<p>Once a Company is duly incorporated, it will remain active and in-existence as long as the annual compliance are lawfully met in a regular fashion. In case of non-compliance, the company will become dormant and maybe unlisted from the register after a certain period of time.</p>
<p>While registering your company may be a long, tedious process – getting started with an online business may not be. <a href="https://www.codecarrot.net/">Get started today</a>.</p>
<p><a href="https://www.codecarrot.net/"><img src="https://i.imgur.com/ISrEDIW.png" alt="Make your business online with a website" /></a></p>yashumittalLooking to register your business as a private limited company? Here is everything you need to know to help you get started.
https://i.imgur.com/vBWytuD.jpg
How to open a bank account in India2017-10-08T16:11:00+00:002017-10-08T16:11:00+00:00https://blog.codecarrot.net/how-to-open-a-bank-account-in-india<p><em>Are you planning on moving to India permanently? Or perhaps you often travel there for pleasure? India has long been popular as a holiday destination, and with good reason. Not only are there lots of different cultures to experience and places to explore, it’s also incredibly beautiful.</em></p>
<p>But India is more than just a holiday destination. With the fastest growing economy in the world, more and more people are choosing to move to India to pursue their career whilst making the most of what this huge country has to offer.</p>
<p>Thankfully, whether you plan to move there permanently or simply to play tourist for a few months, opening a bank account is as easy as it gets.</p>
<p>Read on to find out how to do it.</p>
<h2 id="can-i-open-a-bank-account-as-a-non-resident">Can I open a bank account as a non-resident?</h2>
<p>Yes, you can. In fact, you can open a bank account even if you’re just a tourist.</p>
<p>There are three types of bank account you can open as a non-resident: a Non-Resident Ordinary Account (NRO), a Non-Resident External Account (NRE) and a Foreign Currency Non-Resident Account (FCNR).</p>
<p>Let’s have a look at each of them.</p>
<h3 id="non-resident-external-account">Non-resident external account</h3>
<p>This is a traditional bank account in Indian Rupees.</p>
<p>You can freely make deposits and withdrawals from the account, including international transfers. This makes it ideal if you’re looking for a place to keep your money safe without losing access to it during a short stay. Many accounts also come with an Indian debit card you can use for ATM withdrawals and to make payments.</p>
<p>And if your account bears interest, this will be exempt from Indian tax.</p>
<h3 id="non-resident-ordinary-account">Non-resident ordinary account</h3>
<p>Like non-resident external accounts, this type of account is also a traditional bank account in Indian Rupees. However, there are a number of important differences.</p>
<p>An NRO is less flexible than an NRE, and is better suited for longer stays.</p>
<p>There are limits to how much money you can transfer back to your home country out of this account. You’ll also need an accountant to do the paperwork for you.</p>
<p>More importantly, if you earn any form of income in India, this is where you’ll need to deposit it. Any interest will be taxed by the Indian government.</p>
<p>You can only open an NRO for up to six months.</p>
<h3 id="foreign-currency-non-resident-account">Foreign currency non-resident account</h3>
<p>This type of account can only be opened in a foreign currency, so it isn’t particularly useful if you’re looking for an Indian account to use during your stay.</p>
<p>Unlike a traditional bank account, an FCNR is a fixed deposit which pays regular interest. This makes it better suited as an investment, rather than a working account for your day-to-day needs.</p>
<p>You must keep the account open for at least one year, but not more than five years.</p>
<h2 id="what-documents-do-i-need">What documents do I need?</h2>
<p><img src="https://i.imgur.com/iWlmj7B.jpg" alt="Life Aboard Studying Abroad" /></p>
<p>Whether you want to open an account as a resident or non-resident, you will need to provide proof of identity and proof of your address, as well as a recent photograph.</p>
<p>You can prove your identity by presenting your passport or your driving license.</p>
<p>If these documents contain your address, they can also be accepted as proof of address. If they don’t, you’ll need to submit at least another document.</p>
<p>Which documents are acceptable as proof of address will depend on whether you’re applying for a resident or non-resident account.</p>
<h3 id="proof-of-address-for-non-residents">Proof of address for non-residents</h3>
<p>If you’re applying for a bank account as a non-resident, you can present one of the following documents as proof of your address:</p>
<ol>
<li>A recent utility bill (not more than 2 months old);</li>
<li>Bank statements for the last 3 months, containing at least 2 transactions you initiated yourself;</li>
<li>Correspondence with a government department or authority; or</li>
<li>Your valid, unexpired driving licence (if it bears your address).</li>
</ol>
<h3 id="proof-of-address-for-residents">Proof of address for residents</h3>
<p>A recent utility bill (not more than 2 months old); and bank statements for the last 3 months with at least 2 transactions you initiated yourself will also work as proof of your Indian address.</p>
<p>Alternatively, you can present your <a href="https://resident.uidai.gov.in/aadhaarverification">Aadahaar Card</a>, which is sort of the Indian equivalent of an identity card and social security number, rolled into one.</p>
<p>Some banks may also accept other documents as proof of address. These include a <a href="https://tin.tin.nsdl.com/pan/">PAN card</a>, government correspondence, a letter from your embassy in India and even a municipal or property tax receipt. It’s entirely up to individual banks to decide whether to accept these documents, so you’ll need to confirm with your bank beforehand.</p>
<h3 id="small-accounts">Small accounts</h3>
<p>Don’t have a document to prove your address?</p>
<p>No problem!</p>
<p>You can still open an account, called a small account, by providing a photo and signing it or putting your thumb impression on it in the presence of a bank official.</p>
<p>However, small accounts have a number of limitations compared to a normal account, namely:</p>
<ol>
<li>The balance in your account can never exceed INR50, 000 (approximately USD$750);</li>
<li>You cannot credit your account with more than INR1,000,000 (about USD$15,000) in a given year;</li>
<li>You cannot transfer or withdraw more than INR10,000 (USD$150) a month; and</li>
<li>You cannot make an international transfer directly into or out of the account.</li>
</ol>
<h2 id="can-i-open-a-bank-account-from-abroad">Can I open a bank account from abroad?</h2>
<p>If you want to open a resident bank account, you’ll need an Indian proof of address. This is very difficult, if not impossible to obtain unless you’re physically present in India.</p>
<p>On the other hand, applying for a non-resident bank account from abroad is very easy. In fact, you can do it without ever setting foot in India.</p>
<p>In some cases, you can submit your application online, via the bank’s website. However, most of the time, you’ll need to download an application pack and fill it in by hand.</p>
<p>Depending on the bank, a customer representative may book a phone call with you to go over the application and ensure that you’ve filled it in correctly. You’ll also need to get your documents self-attested and notarised. You self-attest your documents simply by signing on every page.</p>
<p>After the application is complete, you’ll need to mail the documents over for processing. Very often, you’ll also need to make a minimum initial deposit. This can even be in your own currency, which will then be converted into Rupees. Be careful though, as you may not always get the best exchange rate when you do this.</p>
<h2 id="which-bank-is-best-for-my-needs">Which bank is best for my needs?</h2>
<p>India is huge, and so is its banking system.</p>
<p>However, the four largest banks are State Bank of India, ICICI Bank, Punjab National Bank and Canara Bank. Unfortunately, most of them have fairly basic products with not too many perks.</p>
<p>Here’s what they each have to offer.</p>
<h3 id="state-bank-of-india">State Bank of India</h3>
<p>State Bank of India is by far the largest bank in India, with a staggering 9143 branches across the country. It’s also the country’s oldest bank.</p>
<p>The bank offers both <a href="https://www.onlinesbi.com/nri/accounts_deposits/sbinri_ad.html">non-resident accounts</a> and accounts for residents.</p>
<p>A resident <a href="https://www.sbi.co.in/portal/web/personal-banking/current-account">current account</a> will include an ATM debit card that’s free for the first year as well as personal accident insurance for an additional premium.</p>
<p>While the bank doesn’t offer a current account specifically for students, it does offer a <a href="https://www.sbi.co.in/portal/web/personal-banking/yuva-savings-bank-account">savings account</a> for people aged 18 to 30. However, this doesn’t have much in the way of benefits other than it being free of charge and having a free ATM card.</p>
<p>There’s also a selection of <a href="https://sbiforsme.sbi.co.in/SME/smeLiabilityProduct.htm?execution=e2s1">business products</a> to choose from, including two current accounts and deposit facilities that can pay up to 6.71% interest for 60 days.</p>
<h3 id="icici-bank">ICICI Bank</h3>
<p>ICICI Bank’s <a href="https://www.icicibank.com/nri-banking/nri-banking.page?">non-resident accounts</a> are great because they offer up to 3% cashback on bill payments you make via internet banking, a MasterCard debit card with big discounts and free personal accident and air travel protection insurance.</p>
<p>They also have tailored personal and business accounts.</p>
<p>In particular, the <a href="https://www.icicibank.com/Personal-Banking/account-deposit/salary-account/advantage-employees.page?#toptitle">Salary Account</a> includes a free international debit card and gives you reward points for paying your bills online, shopping online or even for simply activating your internet and mobile banking facilities.</p>
<p>Your choice of <a href="https://www.icicibank.com/business-banking/current-account/current-account-product-calculator.page">business account</a> will depend on your annual turnover. Different accounts have different free deposit amount limits. However, all include an advisory investment service to help you make the most of your business assets.</p>
<p>The bank doesn’t have a tailored student account. However it does offer a <a href="https://www.icicibank.com/Personal-Banking/account-deposit/child-education-plan/index.page?">Child Education Plan</a> to help you save up for education expenses from as early as kindergarten.</p>
<h3 id="punjab-national-bank">Punjab National Bank</h3>
<p>Like the other major Indian banks, Punjab National Bank offers products for both residents and <a href="https://www.pnbindia.in/en/ui/NRI-Services.aspx">non-residents</a>.</p>
<p>Products for residents include a <a href="https://www.pnbindia.in/en/ui/content.aspx?id=264">Current Deposit Account</a> with a free ATM debit card and free internet banking which you can open whether you’re an individual or a business customer.</p>
<h3 id="canara-bank">Canara Bank</h3>
<p>Besides basic accounts for <a href="https://www.canarabank.com/English/scripts/nriremittancefacilities.aspx">non-residents</a>, Canara Bank has a <a href="https://www.canarabank.com/English/scripts/CUrrentAccount.aspx">Current Account</a> that’s suitable for individuals and businesses alike.</p>
<p>There is also a <a href="https://www.canarabank.com/English/Scripts/JUNIORSAVINGACCOUNT.aspx">Junior Savings Account</a>. However, this is aimed at children rather than students. It’s available to anyone over 10 years old and comes with a debit card. It’s main draw is that it has a restricted monthly withdrawal limit to prevent excessive spending.</p>
<h2 id="what-are-the-costs">What are the costs?</h2>
<p>Unfortunately, banking in India is quite expensive. There are a number of fees and charges you’ll have to look out for.</p>
<h3 id="maintenance-and-card-fees">Maintenance and card fees</h3>
<p>Most bank accounts India are not free. You’ll need to pay a monthly account fee - called a maintenance fee.</p>
<p>You’ll also have to keep a minimum balance in your account, or risk a fee in the region of INR 500 (about USD$7.50). Similarly, ATM debit cards aren’t free.</p>
<h3 id="atm-fees">ATM fees</h3>
<p>The cost of maintaining India’s vast ATM network is a big issue in the industry. Because of this, most banks limit the number of ATM withdrawals you can make each month.</p>
<p>Most banks will allow only three free transactions a month, after which you’ll incur a fee in the region of INR 20 (USD$0.30) plus tax per transaction.</p>
<p>But that’s not all.</p>
<p>Indian banks don’t just charge you for making withdrawals. You may also be charged for using an ATM in other ways, including requesting a mini statement or even just making a balance enquiry.</p>
<p>Making withdrawals from an ATM abroad is even more expensive. You can expect to pay approximately INR 125 (about USD$2) per transaction, as well as other assorted service taxes and charges.</p>
<h3 id="account-closure-fees">Account closure fees</h3>
<p>Many Indian banks will let you close your account free of charge during the first fourteen days after opening.</p>
<p>However, expect to be charged an account closure fee once this period expires. The fee can tend to get higher the longer you’ve held your account.</p>
<h3 id="international-money-transfers">International money transfers</h3>
<p>International money transfers, which most Indian banks call remittances, are equally costly.</p>
<p>At the very least, you can expect to be charged a processing fee and a service tax of up to 0.12% (depending on the amount of the transfer). You’ll also need to watch out for the other bank’s charges as well as a foreign exchange fee or unfavorable exchange rate.</p>yashumittalAre you planning on moving to India permanently? Or perhaps you often travel there for pleasure? India has long been popular as a holiday destination, and with good reason. Not only are there lots of different cultures to experience and places to explore, it’s also incredibly beautiful.
https://i.imgur.com/RLHzdaO.jpg
Applying Normalize.css to Relax Your CSS File2017-10-07T22:20:00+00:002017-10-07T22:20:00+00:00https://blog.codecarrot.net/applying-normalize-css-to-relax-your-css-file<p>In this vlog will learn about <a href="https://codecarrotnet.github.io/normalize.css/">Normalize.css</a>, a new CSS tool we can use as an alternative to traditional CSS reset methods.</p>
<p>Normalize.css makes browsers render all elements more consistently and in line with modern standards. It precisely targets only the styles that need normalizing.</p>
<h2 id="video-transcription">Video Transcription</h2>
<p>In this video, we’ll learn about Normalize.css, a new CSS tool we can use as an alternative to traditional CSS reset methods. Let’s check it out.</p>
<p>Most CSS resets provide developers a baseline for styling pages by completely removing certain browser style inconsistencies, such as margins, padding, line height, heading, and font sizes.</p>
<p>But depending on your project, it’s okay to leave in some of those basic default browser styles.</p>
<p>What Normalize.css does is, it preserves useful browser default styles instead of removing all default styles from every element. It also corrects common bugs like display settings for HTML5 elements, font size rendering, and form element styling.</p>
<p>All HTML elements will render consistently and in line with modern web standards.</p>
<p>You can download Normalize.css at <a href="https://codecarrotnet.github.io/normalize.css/">codecarrotnet.github.io/normalize.css</a>. Or grab the files on GitHub at <a href="https://github.com/codecarrotnet/normalize.css">github.com/codecarrotnet/normalize.css</a>.</p>
<p>Save the file in your project folder, then link in your HTML file right above your main style sheet. Or you can import it from your main style sheet and you’re all set.</p>
<p><strong>Pro Tip:</strong> You can even use the hosted <a href="https://codecarrotnet.github.io/normalize.css/css/normalize.min.css">normalize.min.css</a> file.</p>
<p>There are some advantages to use Normalize.css over other reset methods. Since it preserves useful default styles, there’s no need to overwrite a lot of element styles. Headings and paragraphs, for example, preserve their default styles consistently across the browsers.</p>
<p>Another neat feature is that, it also makes form elements cross-browser consistent and styleable.</p>
<p>The normalized style sheet is small in size and it’s modular, so it makes it easy for us to see exactly which elements need specific styles, and we can also remove entire sections of the CSS file if we do not need them in our project.</p>
<p>The CSS file also has detailed in-line documentation explaining why each rule was added and how it affects each browser.</p>
<p>Normalize.css is not necessarily a better solution over other reset techniques. It’s just an alternative method that, depending on your project, might be the best fit.</p>
<p>With other full CSS resets, you begin from no styles whatsoever and, build up from there.</p>
<p>Normalize.css lets you start somewhere in the middle, in a state that’s consistent in all browsers, then you build up or down as you need.</p>
<p>If you’ve been using CSS resets for a while, give Normalize.css a try. You might realize that your site might require fewer fixes for browser compatibility than you thought. As with any tool or framework, read the documentation first to make sure it’s the right solution for you.</p>
<hr />
<h2 id="a-quick-view-of-normalizecss-file">A quick view of normalize.css file</h2>
<iframe src="https://www.facebook.com/plugins/video.php?href=https%3A%2F%2Fwww.facebook.com%2Fcodecarrotinc%2Fvideos%2F405700103275010%2F&show_text=0&width=560" width="100%" height="298" style="border:none;overflow:hidden" scrolling="no" frameborder="0" allowtransparency="true" allowfullscreen="true"></iframe>yashumittalIn this vlog will learn about Normalize.css, a new CSS tool we can use as an alternative to traditional CSS reset methods.
https://cdn.codecarrot.net/images/659592657.png
What is a vlog and how can it help my business?2017-10-07T16:57:00+00:002017-10-07T16:57:00+00:00https://blog.codecarrot.net/what-is-a-vlog-and-how-can-it-help-my-business<p>It’s a strange-looking word and if you have never seen it before, you may be wondering, what is a vlog? A vlog is the shortened, colloquial term for a video blog. In other words, vlogging is the act of producing and publishing frequent video content on an owned website or channel on a sharing platform. Vlogging is becoming increasingly popular because it’s a cost-effective tactic that drives visibility and increases online engagement with customers.</p>
<p>Here’s everything you need to know if you’re considering vlogging as a marketing strategy for your business.</p>
<h2 id="the-basics-what-is-a-vlog">The basics: What is a vlog?</h2>
<p>When you blog and use videos as your primary content medium, you are vlogging. Before addressing the benefits of starting a vlog, you have to understand standard blogging.</p>
<p>The Oxford Dictionary defines a blog in the following way:</p>
<blockquote>
“A regularly updated website or web page, typically one run by an individual or small group, that is written in an informal or conversational style.”
</blockquote>
<p>Yes, I know that definition seems a bit vague, but the truth is, blogs are different for every person and every brand. The best way to think of a blog is a series of messages between you (or your brand) and an audience. Blogs can live on a website that you own and control, or they can live on rented space as with Facebook or Tumblr. It’s important to understand the flexibility of a blog because this same flexibility applies to a vlog.</p>
<div class="callout">
Vlogs are not uniform.
</div>
<p>They don’t consist of the same topics, style, length, consistency or message. Some vlogs live on a website, while others are purely found on video-sharing sites like YouTube or Vimeo. Some discuss brand-related topics such as introductions to new products and how-to videos, while others are story-driven with personalities covering peripheral topics. Outside of video content, a vlog can be anything you want it to be.</p>
<h2 id="why-should-i-care-about-vlogging">Why should I care about vlogging?</h2>
<p>Video content is a powerful way to communicate with your target audience and an engaging way to increase brand visibility. In short, it’s a great way to market your business. What makes it so great? Just a few of the reasons are listed below.</p>
<h3 id="vlogs-are-easy-to-digest">Vlogs are easy to digest.</h3>
<p>Video content is more engaging. According to statistics shared by Hubspot, approximately “75 percent of online video viewers have interacted with an online video ad this month.” Not only that, 92 percent of mobile users said they share video content. Needless to say, video content is one of the best ways for your brand to communicate with your audience.</p>
<p>Video is unique in that it is consumed using multiple senses (sight and hearing). This is important because people learn and retain information in a number of different ways, visually and auditorily being two of the most popular. Creating video content, which caters to both, increases the likelihood that your audience will understand and retain the information you want them to remember.</p>
<h3 id="vlogs-are-affordable">Vlogs are affordable.</h3>
<p>Vlogging is an affordable avenue to use to help your small business grow. There are very few entry costs when starting a vlog, and you can maximize the ROI of video content by recycling the content from social media, email marketing, and other amplification platforms.</p>
<div class="callout">
Most vlogs involve a person talking directly to the audience through a camera.
</div>
<p>This typically means the costs of producing a vlog is the time of the person in the video and the cost of the camera (webcam, digital camera, smartphone, etc.). Some vlogs include post-production and editing, which can increase cost, but frugal businesses can produce vlogs without spending anything substantial.</p>
<h3 id="vlogs-help-develop-rapport">Vlogs help develop rapport.</h3>
<p>One of the most difficult parts of marketing is developing a connection with your audience. Trust is not something that consumers easily give away. However, video content is a great way for you to personalize your message and start to develop a rapport with customers.</p>
<div class="callout">
Vlogs let you put a face to your business and give personality to your brand voice and marketing message.
</div>
<h2 id="how-do-i-get-started-with-vlogging">How do I get started with vlogging?</h2>
<p>Creating a successful vlog takes time and commitment. The success of your vlog and the benefits of using video content are directly tied to the effort your business puts into it. With this in mind, you can help increase the chances that your vlog will succeed by following a few simple tips.</p>
<h3 id="decide-what-to-vlog-about">Decide what to vlog about.</h3>
<p>Before launching a vlog, decide what your vlog will be about. Most businesses use vlogs to communicate important information, like FAQ and tutorials, to their consumers. But don’t limit your creativity. A vlog can be anything you want it to be, so think outside the box and create one that is informative and engaging. After all, consumers aren’t likely to get excited about sharing your FAQ video.</p>
<p>One of the best ways to find a direction is to look at other successful vlogs. Rand Fishkin from Moz has a popular vlog called “Whiteboard Friday,” in which he discusses different SEO topics by drawing out explanations on a whiteboard. By seeing what works for other vloggers, you can better set your vlog up to succeed.</p>
<h3 id="decide-who-your-vlogger-is">Decide who your vlogger is.</h3>
<p>Vlogs are a great way for your small business to personally connect with your target audience. Your vlogger is a representation of your brand, so it’s important to think critically about who you want to represent your company. Some vlogs are created by the small business owner, while others use professional personalities.</p>
<p>Both of these options have value. The owner understands the business and is passionate about the product or service, while the professional personality can be an influencer in the vertical or an actor who can increase the quality of the video. Regardless of the route, take your time to decide who should be your vlogger.</p>
<h3 id="embed-the-videos-on-your-website">Embed the videos on your website.</h3>
<p><img src="https://i.imgur.com/hz27U3x.jpg" alt="What Is A Vlog YouTube" /></p>
<p>Many vloggers solely host their videos on one video-sharing platform. While sites like YouTube offer an easy way to produce, edit, and promote videos, you don’t control the environment. That means you are restricted to the constraints of the platform. YouTube can manipulate your content, decide whether to show your video in search results, and place ads over your videos, which can hurt your viewers’ experiences.</p>
<blockquote>
It’s true — YouTube, Vimeo and other similar platforms are great for increasing your video’s visibility, but you should have an owned medium to house your videos as well.
</blockquote>
<p>If you embed the videos on your website, you control the environment. You can add popups to your page to increase email subscribers, you can dictate your content and, best of all, you own the website and can track and retarget the traffic.</p>
<h4 id="vlog-consistently">Vlog consistently.</h4>
<p>Much like with blogging, the best way to increase your chance of success is to be consistent. Most vlogs are not an overnight success, and the best vlogs have a repository with hundreds of video entries.</p>
<div class="callout">
If you’re going to try vlogging, you shouldn’t expect to see massive results right away.
</div>
<p>In fact, it might take months before you notice a major boost in subscribers, traffic or engagement. Don’t fret, though. If you’re diligent about posting and committed to growing your vlog, you can be successful.</p>
<h2 id="promote-your-vlog">Promote your vlog.</h2>
<p>“If you build it, they will come” isn’t applicable to vlogs. You should develop a promotion strategy to drive views and shares of your vlogs. This strategy could include paid ads, utilization of email lists, or any number of other digital marketing initiatives.</p>
<p>One of my favorite strategies for promoting video is through the use of public relations outreach. Press coverage by bloggers or influencers in your space who have covered topics relevant to your vlog can be invaluable. Reach out to them through email or social media. But don’t just tweet them your video, develop a real relationship with that person and share your vlog when the time is right.</p>
<h2 id="final-thoughts-about-vlogging">Final thoughts about vlogging</h2>
<p>Businesses can benefit greatly by integrating vlogs into their digital marketing initiative. Because vlogs don’t require a large investment, you can try vlogging without a lot of risks. The value of video content is going to continue to increase, and more and more users are going to be looking for content that is more engaging than typical blog articles.</p>yashumittalIt’s a strange-looking word and if you have never seen it before, you may be wondering, what is a vlog? A vlog is the shortened, colloquial term for a video blog. In other words, vlogging is the act of producing and publishing frequent video content on an owned website or channel on a sharing platform. Vlogging is becoming increasingly popular because it’s a cost-effective tactic that drives visibility and increases online engagement with customers.
https://i.imgur.com/EwNGx2f.jpg
Google Counts Site Speed As A Ranking Factor2017-10-06T15:16:10+00:002017-10-06T15:16:10+00:00https://blog.codecarrot.net/google-counts-site-speed-as-ranking-factor<p>Site speed is now a ranking factor in Google’s algorithm, and is already in place for U.S. searchers. But Google also cautions web site owners not to sacrifice relevance in the name of faster web pages, and even says this new ranking factor will impact very few queries.</p>
<h2 id="why-page-speed-matters">Why Page Speed Matters</h2>
<p>The first warning that site speed was on Google’s radar came last November, when Cutts said there was “strong lobbying” inside Google to account for site speed as a new ranking factor. Speaking at SMX West last month, Google’s Maile Ohye showed a slide indicating that delays of under a half-second impact business metrics.</p>
<p>In addition to the numerous studies over the years that show Internet users prefer fast pages, Singhal says Google ran its own testing on how users respond to page speed, including experiments on Google.com. Singhal and Cutts point to a June 2009 blog post on the Google Research Blog that talked about how Google purposely slowed down its search results to measure the impact on search behavior.</p>
<blockquote>
Our experiments demonstrate that slowing down the search results page by 100 to 400 milliseconds has a measurable impact on the number of searches per user of -0.2% to -0.6% (averaged over four or six weeks depending on the experiment). That’s 0.2% to 0.6% fewer searches for changes under half a second!
</blockquote>
<p>“When we slow our own users down [on Google.com], we see less engagement,” Singhal says. “Users love fast sites. A faster web is a good thing all around.”</p>
<h2 id="how-google-measures-page-speed">How Google Measures Page Speed?</h2>
<p>Singhal says there are two primary ways Google will measure page speed:</p>
<ol>
<li>How a page responds to Googlebot</li>
<li>Load time as measured by the Google Toolbar</li>
</ol>
<iframe width="100%" height="315" src="https://www.youtube.com/embed/SO4YuDAkplU?rel=0" frameborder="0" allow="autoplay; encrypted-media" allowfullscreen=""></iframe>
<h2 id="where-page-speed-fits-in-googles-algorithm">Where Page Speed Fits in Google’s Algorithm</h2>
<p>Google’s algorithm has about 200 different ranking factors, and even though Google is taking the unusual step of publicly announcing a new factor, Cutts says site owners shouldn’t overestimate the impact of page speed on rankings.</p>
<p>“Quality should still be the first and foremost concern [for site owners],” Cutts says. “This change affects outliers; we estimate that fewer than 1% of queries will be impacted. If you’re the best resource, you’ll probably still come up.”</p>
<p>Singhal says the focus remains on improving the user experience on Google.com, and the company can’t do that if it gets the relevance of search results wrong. “We want to return faster sites,” he says, “but not at the expense of relevance.”</p>
<hr />
<h2 id="using-site-speed-in-web-search-ranking-google-blog">Using site speed in web search ranking (GOOGLE BLOG)</h2>
<p>You may have heard that here at Google we’re obsessed with speed, in our products and on the web. As part of that effort, today we’re including a new signal in our search ranking algorithms: site speed. Site speed reflects how quickly a website responds to web requests.</p>
<p>Speeding up websites is important — not just to site owners, but to all Internet users. Faster sites create happy users and we’ve seen in our internal studies that when a site responds slowly, visitors spend less time there. But faster sites don’t just improve user experience; recent data shows that improving site speed also reduces operating costs. Like us, our users place a lot of value in speed — that’s why we’ve decided to take site speed into account in our search rankings. We use a variety of sources to determine the speed of a site relative to other sites.</p>
<p>If you are a site owner, webmaster or a web author, here are some free tools that you can use to evaluate the speed of your site:</p>
<ul>
<li><a href="//code.google.com/speed/page-speed/">Page Speed</a>, an open source Firefox/Firebug add-on that evaluates the performance of web pages and gives suggestions for improvement.</li>
<li><a href="//developer.yahoo.com/yslow/">YSlow</a>, a free tool from Yahoo! that suggests ways to improve website speed.</li>
<li><a href="//www.webpagetest.org/">WebPagetest</a> shows a waterfall view of your pages’ load performance plus an optimization checklist.</li>
<li>In <a href="//www.google.com/webmasters/tools">Webmaster Tools</a>, Labs > Site Performance shows the speed of your website as experienced by users around the world as in the chart below. We’ve also blogged about site performance.</li>
</ul>
<p><img src="https://cdn.codecarrot.net/images/Picture-of-graph-ferf3333C83.png" alt="Site performance" /></p>
<ul>
<li>Many other tools on <a href="//code.google.com/speed">code.google.com/speed</a>.</li>
</ul>
<iframe width="100%" height="315" src="https://www.youtube.com/embed/pNKnhBIVj4w?rel=0" frameborder="0" allow="autoplay; encrypted-media" allowfullscreen=""></iframe>
<p>While site speed is a new signal, it doesn’t carry as much weight as the relevance of a page. Currently, fewer than 1% of search queries are affected by the site speed signal in our implementation and the signal for site speed only applies for visitors searching in English on Google.com at this point. We launched this change a few weeks back after rigorous testing. If you haven’t seen much change to your site rankings, then this site speed change possibly did not impact your site.</p>
<p>We encourage you to start looking at your site’s speed (the tools above provide a great starting point) — not only to improve your ranking in search engines, but also to improve everyone’s experience on the Internet.</p>
<hr />
<h2 id="final-thoughts">Final Thoughts</h2>
<p>Page speed is in place now as a ranking factor on Google.com, and has been for a couple weeks. If your site was going to be impacted, it probably would’ve happened already. Google plans to monitor the results of this change and eventually expand the use of page speed as a ranking factor in other countries.</p>yashumittalSite speed is now a ranking factor in Google’s algorithm, and is already in place for U.S. searchers. But Google also cautions web site owners not to sacrifice relevance in the name of faster web pages, and even says this new ranking factor will impact very few queries.
https://cdn.codecarrot.net/images/ac1fafb4cef5bb6bf83b03a08c3d20d3.jpg
Protect online privacy with these 6 tools and tricks2017-10-06T14:30:00+00:002017-10-06T14:30:00+00:00https://blog.codecarrot.net/protect-online-privacy-with-these-6-tools-and-tricks<p>Web designers and developers have an extra level of responsibility to their clients (and themselves) to protect online privacy. If you buy domain names, host websites, or even have conversations about proprietary information and private clients, you need to seriously consider how you protect your privacy online, including your personal information.</p>
<div class="callout">
Web designers and developers should take special steps to help clients maintain online privacy.
</div>
<p>Whether it’s about actual security — or just avoiding spammers, junk mailers and telemarketers — there are steps to reduce the odds of personal information getting into the wrong hands.</p>
<h2 id="6-ways-to-protect-online-privacy">6 ways to protect online privacy</h2>
<p>Here are a few tactics you can use to protect everyone’s privacy and keep them from the everyday annoyances of pest marketing.</p>
<ol>
<li>Use contact forms instead of email addresses.</li>
<li>Privatize WHOIS records.</li>
<li>Rent a spot at a coworking space.</li>
<li>Use separate emails for personal and professional correspondence.</li>
<li>Set up a separate phone number.</li>
</ol>
<p>Ready to learn more about how to protect your privacy online (and your clients’, too)? Let’s dive in!</p>
<h2 id="1-use-contact-forms-instead-of-email-addresses">1. Use contact forms instead of email addresses</h2>
<p>You can’t put an email address on a website without it being swarmed by spam bots looking to shove one more address into their gaping maws. Unless you’ve got a throwaway address and a rock-solid spam filter, your clients will grow to hate you if you put email addresses on their websites.</p>
<div class="callout">
Use a contact form to let visitors reach them.
</div>
<p>While it might fall prey to spammers as well, the number is much, much smaller than the filthy rotten spammers clogging up our email inboxes every day. If you use WordPress, look into the Ninja Forms plugin to create a contact form.</p>
<p>On my own website, I rarely get unwanted contact form spam — about two every months. Believe me, I still get spam because I made the mistake of posting my work email in the wild a few times several years ago, but the contact form spam is few and far between.</p>
<h2 id="2-privatize-your-whois-records">2. Privatize your WHOIS records</h2>
<p>When you register a domain name with any domain registrar, you can choose to mask your WHOIS records with the private registration service. You should do this for a few reasons. For starters, once you register a domain name, you’re going to be bombarded with countless emails from companies asking if they can design your website, do your social media, or help you with your email marketing. You can stop all that and gain an additional measure of online privacy.</p>
<p>Public WHOIS records also open up your clients to fraud, such as those frightening looking FINAL NOTICE ON YOUR DOMAIN NAME! messages. I’ve had clients call me in a panic because they received an angry-looking email saying their domain name was in danger of expiring, and they’re wondering if they should pay the exorbitant fee to save it. I had to assure them that, no, they weren’t going to lose their domain, and no, it certainly wasn’t going to cost (insert exorbitant fee here) to renew it.</p>
<p>This also helps to protect you from attempts to steal your domains, and from domain-related spam.</p>
<h2 id="3-rent-a-spot-at-a-coworking-space">3. Rent a spot at a coworking space</h2>
<p>Hot desking is another way to separate your professional and personal lives. This is where you pay for a non-assigned desk at a coworking space. You’ve got a spot, but the location will change every day, sort of like a seat at your favorite coffee shop.</p>
<p>I worked in a coworking space when I first moved to Orlando. It was a pretty nice setup. I was right in the heart of downtown, had access to their meeting facilities, and could even use their mailing address for deliveries. It was also a great way to network and meet other startup professionals.</p>
<p>Too many solo developers and designers (myself included) keep a home office. While it’s convenient, and nothing beats rolling out of bed at 7:45 and being “at work” by 8, you’ll actually have more privacy for your business if you’re in a coworking space, compared to working in a regular coffee shop. It’s also a decent alternative to working out of your house or getting a PO box — at least you get to get out and meet people.</p>
<div class="callout">
Avoid lamenting, “I’m so lonely!”
</div>
<p>Of course, the big concern is privacy — can you make private phone calls, and will you have access to a VPN? In my case, the latter was easily solved. I already own VPN software, so I never have to worry about my “location,” since I always appear to be somewhere else. Otherwise, your IP address will give away your location, which could be a problem for online privacy.</p>
<p>The coworking space also had private “phone booths,” which were really just closets with small desks. You could take phone calls inside these rooms and be assured of privacy. If you need to make sure your calls are über-private, but you can’t get that in your coworking space, then you need to ask whether a coworking space is right for you.</p>
<h2 id="4-use-separate-emails-for-professional-and-personal-correspondence">4. Use separate emails for professional and personal correspondence</h2>
<p>I think most of us have a few different emails — work, home, Yahoo!, Gmail, even Hotmail (does anyone still have an Excite email?) — and we use them for things like communicating with clients, or that one throwaway email when we download white papers or request free samples.</p>
<blockquote>
If you don’t have one, consider setting up a separate public email for things like web registration — assuming you didn’t make your WHOIS details private.
</blockquote>
<p>This way, you’re not leaving your regular email open to the spammers who will no doubt start flooding you the moment they find your poor unsuspecting email just sitting out there in the open, all alone.</p>
<p>Instead, they’ll fall for the email you did use, and you can pretty much ignore everything that comes in. Just don’t forget to check it once in awhile, because that’s how you’ll be notified about pending domain expirations and changes to your terms of service. Set up a special filter that flags all emails from your DNS registrar and web host, just in case.</p>
<h2 id="5-set-up-a-separate-phone-number">5. Set up a separate phone number</h2>
<p>I have several phone numbers available — including Google Voice, Skype, and my cell phone — all used for different purposes. And to be honest, I hardly answer my Skype number, so I use that for things where people are likely to call and spam me. I’ve made the mistake of leaving my Skype when I’m not normally using it, and it’s just a pain with online privacy. I get calls from people who got my number from my WHOIS records, or found it in one of the instances where I gave that number and not one of my private ones. So I know to never use my real phone number in public, and to never answer the phone when it’s not a number I recognize.</p>
<h2 id="be-vigilant-about-protecting-privacy-online">Be vigilant about protecting privacy online</h2>
<p>Online privacy is hard to maintain, given the number of intrusions constantly trying to worm their way into our awareness. But you can cut down on a lot of them if you just think about how to protect your privacy online — use a PO box, get a throwaway email address, and get a free online phone number. And don’t forget contact forms on your website. Your online privacy, and that of your clients’, can remain intact and untouched.</p>yashumittalWeb designers and developers have an extra level of responsibility to their clients (and themselves) to protect online privacy. If you buy domain names, host websites, or even have conversations about proprietary information and private clients, you need to seriously consider how you protect your privacy online, including your personal information.
https://cdn.codecarrot.net/images/jason-blackeye-198848.jpg
Light blog traffic? Why no one visits your site and what to do about it2017-10-06T13:31:10+00:002017-10-06T13:31:10+00:00https://blog.codecarrot.net/light-blog-traffic-no-one-visits-site<p>If you have a blog website and want to light up your blog traffic, go ahead read the article but if you don’t have and want to get one, <a href="//www.codecarrot.net/">click here</a>.</p>
<p>If you’ve ever clicked a link to a new website only to watch your web browser sputter and stall, you know that a slow website is a pain. In fact, when websites take a long time to load, some visitors cut and run.</p>
<div class="callout">
As a small business owner, the performance of your website matters.
</div>
<p>Without a doubt, the appearance of your site is critical, and having quality content is imperative. But site speed makes the first impression — both with search engines and potential customers.</p>
<h2 id="site-speed-a-primer">Site speed: A primer</h2>
<p>There are several reasons why site speed matters. Faster sites provide a better experience for your site visitors and customers. And faster sites might actually get more traffic, because the algorithms that power search engines like Google consider <a href="/google-counts-site-speed-as-ranking-factor">speed-based performance metrics</a>.</p>
<p>Terms to know:</p>
<ul>
<li><strong>Page speed</strong>, sometimes referred to as <strong>load time:</strong> the amount of time (in seconds) it takes a specific page to go from initiation (i.e., visitor clicking on link) to all page content being fully loaded in the visitor’s browser window.</li>
<li><strong>Site speed:</strong> similar to page speed, but this takes into account multiple pages on a site.</li>
<li><strong>Search engine:</strong> a website (e.g., Google) that uses software to identify keywords on other sites.</li>
</ul>
<p>Modern search engines aren’t just interested in keywords and links; they are designed to deliver an exceptional user experience. That’s why website optimization should be part of your SEO strategy as well.</p>
<blockquote>
Think of your website as a virtual welcome mat for your business.
</blockquote>
<p>Nearly half (47 percent) of consumers expect sites to load in just a couple seconds. In fact, page abandonment increases with page load time. In other words, the slower your website is, the more likely visitors are to leave your site without exploring more content (or buying anything).</p>
<p><img src="https://cdn.codecarrot.net/images/welcome-on-board-mat.jpeg" alt="Welcome on Board mat" /></p>
<p>At <a href="//www.codecarrot.net/">CodeCarrot</a>, our developers obsess over performance data so we can provide the best possible outcomes for our customers.</p>
<p><strong>Pro tip:</strong> Avoid creating huge pages on your website. Consider splitting your content into multiple, smaller pages if possible.</p>
<h2 id="if-you-remember-one-thing-about-site-speed-">If you remember one thing about site speed …</h2>
<p>As a small business owner, you might not think twice about the speed of your website. You might not care about the speed of your site, as long as it looks pretty good. But guess what? Google cares about the performance of your site. And potential customers — most of whom are accessing the web from their mobile phones — don’t have time to wait around.</p>
<blockquote>
If you’re going to bother with a website, you need one that is fast, modern and designed for mobile devices.
</blockquote>
<p>If you have doubts about your existing site, try out the user experience yourself on a variety of devices. If you like numbers, test your own site on Lighthouse.</p>
<h2 id="want-to-make-your-website-fast">Want to make your website fast?</h2>
<p>You don’t want your website visitors to leave your website because your website is too slow. Why don’t we make it fast for you?</p>
<p>Let’s make your <strong>website like flash</strong> with <a href="//www.codecarrot.net/">CodeCarrot</a>.</p>
<p><a href="//www.codecarrot.net/"><img src="https://cdn.codecarrot.net/images/ac1fafb4cef5bb6bf83b03a08c3d20d3.png" alt="make your website like flash with codecarrot" /></a></p>yashumittalIf you have a blog website and want to light up your blog traffic, go ahead read the article but if you don’t have and want to get one, click here.
https://cdn.codecarrot.net/images/man-sitting-alone-in-stadium.jpg
Make the Perfect Responsive Grid with CSS2017-10-06T11:07:00+00:002017-10-06T11:07:00+00:00https://blog.codecarrot.net/make-the-perfect-responsive-grid-with-css<p>Knowing how to make a responsive grid is an essential part of web development.</p>
<p>Whether you’re creating a portfolio page for a photographer, an e-commerce site, or a landing page, it’s all going to be based on a grid layout. Grids are everywhere.</p>
<p>If you know how to build a good, responsive grid layout, you’ll immediately stand out as a front-end web developer.</p>
<p>Let’s get right into it with a quick overview of just what a grid is:</p>
<h2 id="what-is-a-grid-layout">What is a grid layout?</h2>
<p>The grid is a tried-and-true method of organizing visual elements in media.</p>
<p>Designers have implemented grids since the first days of print newspapers and advertisements.</p>
<p>Using a grid creates an aesthetically pleasing composition that is easy for the brain to take in and comprehend. So it’s something that you definitely want to use in your websites.</p>
<p>A grid design will divide up the area into columns. Between the columns is a space, or gutter.</p>
<p>Usually you want a total of twelve columns because you can then divide the space into factors of two or three.</p>
<p>You can see this practice in effect on the Studiopress website theme:</p>
<p><img src="https://i.imgur.com/ZxGs2yB.png" alt="website-grid-illustration" /></p>
<p>The columns don’t all have to be the same width, of course. You might want some columns to span two columns, and others to span four, six, or more.</p>
<p>Just make sure that all the elements on the page begin and end at one of the columns.</p>
<p>In addition, you can divide up your vertical area into different zones, with each zone having a different combination of column widths.</p>
<p>Not as complicated as it initially sounded, right? So now that we know the basics, what’s the best way to build responsive grids in your website?</p>
<h2 id="methods-to-create-a-responsive-grid">Methods to create a responsive grid</h2>
<p>Lately there’s been a lot of talk about flexbox and CSS grid layout.</p>
<p>Before these new CSS technologies, you had to use the CSS float property. You created some floated column elements, sprinkled in a bunch of percentage widths and media queries and you were good to go.</p>
<p>(And before float grids, HTML tables were the only option. But we don’t talk about those 😉 )</p>
<p>When I was learning front-end web development, I started out using a responsive framework, Zurb Foundation. Many of you may use Bootstrap.</p>
<p>Responsive frameworks make building websites a lot easier. They’re a huge time-saver!</p>
<p>However, although they may save you time, relying on them too much isn’t a good thing. Especially if you don’t know exactly what they’re doing.</p>
<p>Try to understand how the underlying scaffolding works under the hood of frameworks. It’s not as easy as tossing some column classes into your div’s, but you will understand CSS principles better.</p>
<p><em>Bottom line: it will make you a better web developer.</em></p>
<h3 id="our-mini-project">Our mini-project</h3>
<p>We’re going to dive into how to build a simple 2-column grid, using three different methods:</p>
<ul>
<li>float,</li>
<li>flexbox,</li>
<li>and CSS grid layout.</li>
</ul>
<p>I’ll be explaining each step using code snippets and some graphics.</p>
<h2 id="planning-out-the-grid">Planning out the grid</h2>
<p>The grid we want to make is a basic two-column grid. It has a main content area and a sidebar, like many website designs.</p>
<p>When building a layout, one of the first things you need to decide is how it will look responsively. Meaning, how will the layout change when viewing it on desktop, versus viewing it on tablet or mobile.</p>
<p>One strategy I use when starting a build is to write down how the design will change across devices. Here are my notes for this exercise:</p>
<p>On <strong>mobile</strong>, we want the columns to stack, with the main content on top and the sidebar under it. Both will be at 100% width.</p>
<p>On <strong>tablet</strong>, we want the columns to be side by side, with each one taking up 50% width.</p>
<p>On <strong>desktop</strong>, we want the main content column to take up 2/3 width and the sidebar to take up 1/3 width.</p>
<p>And this is what we want the grid to look like at each of those breakpoints:</p>
<p><img src="https://i.imgur.com/Bx17CZU.png" alt="grid-breakpoints" /></p>
<p>It’s a little extra work ahead of time, but this plan will save you time because you know what you need to build. This technique is especially useful when you work on bigger and more complicated projects.</p>
<p>Now we have the basic information we need in order to start making our grid!</p>
<h2 id="float-grid">Float grid</h2>
<p>You might be wondering why we’re covering float grids, since flexbox and CSS grid are taking over. I’m still including it here because there could be some edge cases where you’d need to know float, especially with older Internet Explorer browsers.</p>
<p>The float property in CSS was originally intended for uses like allowing text to flow around an image. Giving the image a float: left ruleset would make the image align, or “float,” on the left side of the parent element.</p>
<p><img src="https://i.imgur.com/YHXoCey.png" alt="image-float" /></p>
<h2 id="making-a-grid-with-float">Making a grid with float</h2>
<p>To create a grid, you would give multiple elements a float property, which would make all of them align to one side, either right or left.</p>
<div class="language-css highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="nc">.column</span> <span class="p">{</span>
<span class="nl">display</span><span class="p">:</span> <span class="nb">block</span><span class="p">;</span>
<span class="nl">float</span><span class="p">:</span> <span class="nb">left</span><span class="p">;</span>
<span class="p">}</span>
</code></pre></div></div>
<p>Seems pretty straightforward, right?</p>
<p>However, one annoying aspect about float is that it takes the element out of the normal flow of the document.</p>
<p>This image below shows what happens when the blue floated columns are taken out of the normal display. The gray parent div will then collapse to the height it would be if it had no children.</p>
<p><img src="https://cdn.codecarrot.net/images/float-grid-parent-height-shorter.png" alt="float-grid-parent-height-shorter" /></p>
<p>You can fix this problem in a couple of ways.</p>
<p>You can add a <code class="highlighter-rouge">display:</code> table ruleset to the parent element. Or you can clear the floats by adding an <code class="highlighter-rouge">:after</code> pseudo-element to the parent with the following styles to clear the floats.</p>
<div class="language-css highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="nc">.parent</span><span class="nd">:after</span> <span class="p">{</span>
<span class="nl">clear</span><span class="p">:</span> <span class="nb">both</span><span class="p">;</span>
<span class="nl">content</span><span class="p">:</span> <span class="s1">""</span><span class="p">;</span>
<span class="nl">display</span><span class="p">:</span> <span class="nb">block</span><span class="p">;</span>
<span class="p">}</span>
</code></pre></div></div>
<p>One other note is that if you’re using padding and margins (which is basically always) you’ll need to set the box-sizing: border-box on every element.</p>
<p>This declaration includes padding and margins when calculating the final width and height of elements. It ensures that elements won’t go off the page.</p>
<div class="language-css highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="o">*,</span> <span class="o">*</span><span class="nd">:after</span><span class="o">,</span> <span class="o">*</span><span class="nd">:before</span> <span class="p">{</span>
<span class="nl">-webkit-box-sizing</span><span class="p">:</span> <span class="n">border-box</span><span class="p">;</span>
<span class="nl">-moz-box-sizing</span><span class="p">:</span> <span class="n">border-box</span><span class="p">;</span>
<span class="nl">box-sizing</span><span class="p">:</span> <span class="n">border-box</span><span class="p">;</span>
<span class="p">}</span>
</code></pre></div></div>
<h3 id="using-media-queries-to-make-the-grid-responsive">Using media queries to make the grid responsive</h3>
<p>To make the grid responsive, we will utilize <a href="https://developer.mozilla.org/en-US/docs/Web/CSS/Media_Queries/Using_media_queries">media queries</a>. Using those, we will be able to tell the grid to have a specific layout at certain device widths.</p>
<p>From our notes, we want both main and sidebar elements to be 100% width for mobile, then both 50% side by side on tablet, and then 2/3 and 1/3 width side by side on desktop.</p>
<p>In the HTML we would create the parent div, with two child column divs with classes denoting if they are the main or sidebar section.</p>
<div class="language-html highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="nt"><div</span> <span class="na">class=</span><span class="s">"parent"</span><span class="nt">></span>
<span class="nt"><div</span> <span class="na">class=</span><span class="s">"column main"</span><span class="nt">></div></span>
<span class="nt"><div</span> <span class="na">class=</span><span class="s">"column sidebar"</span><span class="nt">></div></span>
<span class="nt"></div></span>
</code></pre></div></div>
<p><strong>On mobile:</strong></p>
<p>In the CSS, using the mobile-first approach, we would by default set both columns to 100%.</p>
<div class="language-css highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="nc">.column</span> <span class="p">{</span>
<span class="nl">display</span><span class="p">:</span> <span class="nb">block</span><span class="p">;</span>
<span class="nl">width</span><span class="p">:</span> <span class="m">100%</span><span class="p">;</span>
<span class="p">}</span>
</code></pre></div></div>
<p><strong>On tablet:</strong></p>
<p>Then for widths for tablet and greater, we will float the columns to the left and make them 50% width.</p>
<div class="language-css highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="k">@media</span> <span class="n">only</span> <span class="n">screen</span> <span class="n">and</span> <span class="p">(</span><span class="n">min-width</span><span class="p">:</span> <span class="m">641px</span><span class="p">)</span> <span class="p">{</span>
<span class="nc">.column</span> <span class="p">{</span>
<span class="nl">width</span><span class="p">:</span> <span class="m">50%</span><span class="p">;</span>
<span class="nl">float</span><span class="p">:</span> <span class="nb">left</span><span class="p">;</span>
<span class="p">}</span>
<span class="p">}</span>
</code></pre></div></div>
<p><strong>On desktop:</strong></p>
<p>For desktop we will add another media query changing the widths of the main and sidebar content to 2/3 and 1/3.</p>
<div class="language-css highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="k">@media</span> <span class="n">only</span> <span class="n">screen</span> <span class="n">and</span> <span class="p">(</span><span class="n">min-width</span><span class="p">:</span> <span class="m">1025px</span><span class="p">)</span> <span class="p">{</span>
<span class="nc">.main</span> <span class="p">{</span>
<span class="nl">width</span><span class="p">:</span> <span class="m">66.66%</span><span class="p">;</span>
<span class="p">}</span>
<span class="nc">.sidebar</span> <span class="p">{</span>
<span class="nl">width</span><span class="p">:</span> <span class="m">33.33%</span><span class="p">;</span>
<span class="p">}</span>
<span class="p">}</span>
</code></pre></div></div>
<p>It seems relatively simple, doesn’t it? Floats aren’t terrible– they were all we had for quite a while.</p>
<p>But as we move on to flexbox, I think you’ll see how float grids are a bit hacky, and flexbox is more intuitive.</p>
<h2 id="flexbox-grid">Flexbox grid</h2>
<p>To create a responsive grid using flexbox, we will use the same HTML as above, with a parent div that has two child column divs.</p>
<p>The first thing you’ll have to do is declare that the parent should use flexbox:</p>
<div class="language-css highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="nc">.parent</span> <span class="p">{</span>
<span class="nl">display</span><span class="p">:</span> <span class="n">flex</span><span class="p">;</span>
<span class="p">}</span>
</code></pre></div></div>
<p>Then set the flex property on the column divs:</p>
<div class="language-css highlighter-rouge"><div class="highlight"><pre class="highlight"><code> <span class="nc">.column</span> <span class="p">{</span>
<span class="nl">flex</span><span class="p">:</span> <span class="m">1</span><span class="p">;</span>
<span class="p">}</span>
</code></pre></div></div>
<p>The <code class="highlighter-rouge">flex: 1</code> declaration means that each column div will have the same width as the other columns. It’s kind of like a ratio.</p>
<p>If you wanted the first column to be double the width of the other column, you would set the first column’s flex to 2. And the second column’s flex value would be half of that, 1.</p>
<p>That’s all you need to get started!</p>
<p>Flexbox is pretty intelligent, and it will automatically divide up the grid space equally between the columns no matter how many you have.</p>
<p>Compare the above CSS with what we had to use for the float grid, and I think you’ll agree with me that flexbox is simpler.</p>
<h2 id="making-the-flex-grid">Making the flex grid</h2>
<p>Now, to make our two-column responsive grid, we’ll do what we did for the float grid and set our default styles for mobile first.</p>
<h3 id="for-mobile">For mobile:</h3>
<p>We don’t need flexbox on mobile, only on tablet and desktop, so the parent div doesn’t need the display: flex declaration yet.</p>
<p>We want the column divs to be 100% of the width. You can explicitly set a width: 100% declaration on the columns, if you want.</p>
<p>Or you can just not declare a width style. The div will generally default to <code class="highlighter-rouge">display:</code> block and automatically be 100% width.</p>
<h3 id="for-tablet">For tablet:</h3>
<p>Starting on tablet we’ll add in flexbox, and use media queries for styles on tablet width and up.</p>
<p>First, we’ll create the flexbox and set the parent to use <code class="highlighter-rouge">display:</code> flex.</p>
<p>We want the columns to be equally-spaced at this width, so we’ll use the flex: 1 declaration for all the column divs. The 1 means that the columns will be the same width relative to one another.</p>
<div class="language-css highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="k">@media</span> <span class="n">only</span> <span class="n">screen</span> <span class="n">and</span> <span class="p">(</span><span class="n">min-width</span><span class="p">:</span> <span class="m">641px</span><span class="p">)</span> <span class="p">{</span>
<span class="nc">.parent</span> <span class="p">{</span>
<span class="nl">display</span><span class="p">:</span> <span class="n">flex</span><span class="p">;</span>
<span class="p">}</span>
<span class="nc">.column</span> <span class="p">{</span>
<span class="nl">flex</span><span class="p">:</span> <span class="m">1</span><span class="p">;</span>
<span class="p">}</span>
<span class="p">}</span>
</code></pre></div></div>
<h3 id="for-desktop">For desktop:</h3>
<p>On desktop, we want the main content to take up 2/3 of the available width. The sidebar will take up the remaining 1/3.</p>
<p>To accomplish this, we will increase the flex value of the main column to be 2. The sidebar flex will remain at the 1 set on tablet, so it doesn’t need another declaration for desktop.</p>
<div class="language-css highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="k">@media</span> <span class="n">only</span> <span class="n">screen</span> <span class="n">and</span> <span class="p">(</span><span class="n">min-width</span><span class="p">:</span> <span class="m">1025px</span><span class="p">)</span> <span class="p">{</span>
<span class="nc">.main</span> <span class="p">{</span>
<span class="nl">flex</span><span class="p">:</span> <span class="m">2</span><span class="p">;</span>
<span class="p">}</span>
<span class="p">}</span>
</code></pre></div></div>
<p>This means that the main content will be double the width of the sidebar.</p>
<p>Because there are two columns, the main content will be 2/3 width, and the sidebar will be half that, 1/3 width.</p>
<h2 id="flexbox-is-powerful-and-intuitive">Flexbox is powerful and intuitive</h2>
<p>You can immediately see just how little CSS flexbox needs. And the grid it makes is the exact same as the float grid.</p>
<p>What I love about flexbox is that it just works. It’s intuitive.</p>
<p>After wrestling with CSS float for years, I couldn’t believe how insanely easy it was to make a grid.</p>
<p>Flexbox also has more advanced properties that you can take advantage of:</p>
<ul>
<li>Align the column items both horizontally or vertically (yes, vertically!!).</li>
<li>Center the items or make them extend to the left and right edges of the grid parent.</li>
<li>Change the order of items at different breakpoints.</li>
</ul>
<p>You’ll never have to use floats again. Unless you’re wrapping text around an image, of course.</p>
<p>Ready for some more fun? Let’s move on to the last grid method:</p>
<h2 id="css-grid-layout">CSS grid layout</h2>
<p>CSS grid is the newest method for building grids. It is similar to, yet very different from flexbox.</p>
<p>According to Rachel Andrew, the go-to expert on CSS grid, they each have strengths:</p>
<ul>
<li><strong>Flexbox</strong> is useful for elements arranged in one direction, either in a row or a column.</li>
<li><strong>CSS grid</strong> is useful for arrangements involving rows and columns.</li>
</ul>
<p>Why CSS grid is better <a href="/should-i-use-grid-or-flexbox">(Grid or Flexbox)</a> for a typical website layout involving a header, footer, content, and sidebar, as opposed to flexbox.</p>
<p>Currently, the main drawback to CSS grid is that it’s not universally supported by all browsers.</p>
<p>Older versions of Chrome, iOS Safari, and Android do not support it at all. And IE and Edge support is spotty.</p>
<p>If you want to use CSS grid, you have a couple options:</p>
<ul>
<li>You can use it and include some CSS fallbacks for browsers that don’t support it.</li>
<li>Or you can use flexbox and wait until browser support is more ubiquitous.</li>
</ul>
<h3 id="how-css-grid-works">How CSS grid works</h3>
<p>Like flexbox, CSS grid requires that you set a display property on the parent element. In this case we’ll be declaring <code class="highlighter-rouge">display:</code> grid.</p>
<p>However, there is one major difference CSS grid has. Instead of setting the grid settings on each of the child elements, we set the grid template on the parent as well.</p>
<p>To set the grid template, we will declare the number of columns and/or rows you want to have, and the size of each.</p>
<p>To accomplish this, use the <code class="highlighter-rouge">grid-template-columns</code> property if you have multiple columns, and <code class="highlighter-rouge">grid-template-rows</code> for multiple rows.</p>
<p>The property is then followed by a length value for each of the child elements.</p>
<p>For a grid with two columns, we would just use <code class="highlighter-rouge">grid-template-columns</code> property.</p>
<p>The <code class="highlighter-rouge">grid-template-columns</code> property would then have two values, one for each of the columns:</p>
<div class="language-css highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="nc">.parent</span> <span class="p">{</span>
<span class="nl">display</span><span class="p">:</span> <span class="n">grid</span><span class="p">;</span>
<span class="py">grid-template-columns</span><span class="p">:</span> <span class="m">1</span><span class="n">fr</span> <span class="m">1</span><span class="n">fr</span><span class="p">;</span>
<span class="p">}</span>
</code></pre></div></div>
<h2 id="what-the-heck-is-an-fr">What the heck is an “fr”?!</h2>
<p>The “fr,” short for fraction, is a new unit of measurement. It denotes what fraction of available space will be used by each item in the grid.</p>
<p>It’s actually similar to the flex number– both represent the relative width of one child element to the others.</p>
<h2 id="making-the-css-grid">Making the CSS grid</h2>
<p>Here’s how we will style the grid, going from the mobile-first approach once again.</p>
<p><strong>On mobile:</strong></p>
<p>As usual, the child columns will stack on mobile, so we won’t set any CSS grid styles.</p>
<p><strong>On tablet:</strong></p>
<p>We want two child elements of equal width to one another for tablet.</p>
<div class="language-css highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="nc">.parent</span> <span class="p">{</span>
<span class="nl">display</span><span class="p">:</span> <span class="n">grid</span><span class="p">;</span>
<span class="py">grid-template-columns</span><span class="p">:</span> <span class="m">1</span><span class="n">fr</span> <span class="m">1</span><span class="n">fr</span><span class="p">;</span>
<span class="p">}</span>
</code></pre></div></div>
<p><strong>On desktop:</strong></p>
<p>We will do a similar ratio of the main column being twice the width of the sidebar column, which calculates out to 2/3 and 1/3 once again.</p>
<div class="language-css highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="k">@media</span> <span class="n">only</span> <span class="n">screen</span> <span class="n">and</span> <span class="p">(</span><span class="n">min-width</span><span class="p">:</span> <span class="m">1025px</span><span class="p">)</span> <span class="p">{</span>
<span class="nc">.parent</span> <span class="p">{</span>
<span class="py">grid-template-columns</span><span class="p">:</span> <span class="m">2</span><span class="n">fr</span> <span class="m">1</span><span class="n">fr</span><span class="p">;</span>
<span class="p">}</span>
<span class="p">}</span>
</code></pre></div></div>
<p>Pretty cool that we don’t have to set any grid styles on the actual columns, just the parent!</p>
<h2 id="css-grid-is-incredibly-powerful">CSS grid is incredibly powerful</h2>
<p>Like flexbox, CSS grid can do much, much more than just creating a two column grid.</p>
<p>You can use CSS grid to create much more complicated layouts of varying widths, heights and arrangements. I’ve really just scratched the surface of what CSS grid is capable of.</p>
<h2 id="in-closing">In closing</h2>
<p>If you’re left wondering which method is best for you, I personally think flexbox is the best option right now.</p>
<p>It’s been around long enough that it has good browser support, and it’s just a good, efficient way to create grids. Also, it won’t get completely replaced by CSS grid, because it has strengths that would work well in tandem with CSS grid.</p>
<p>Lastly, CSS grid is still working towards getting more browser support. But you should start learning it now, even a little bit. It won’t be long before CSS grid becomes the industry standard for building website layouts.</p>
<p>Do you have a favorite? Have you gotten stuck trying to learn flexbox or CSS grid? Feel free to leave a comment below.</p>yashumittalKnowing how to make a responsive grid is an essential part of web development.
https://i.imgur.com/yb636Q1.jpg
10 Amazing Examples of CSS, SVG & Canvas Masks In Action2017-10-06T11:07:00+00:002017-10-06T11:07:00+00:00https://blog.codecarrot.net/10-amazing-examples-of-css-svg-canvas-masks-in-action<p>You can do some amazing things with SVG masks. This technique has been around for years but only recently made its way into mainstream web development.</p>
<p>I’ve scoured the web to find the below demos of custom clipping masks & SVG/canvas masks. These examples show just how far you can push masks on the web, and ultimately what they may offer developers going forward.</p>
<h2 id="text-masking">Text Masking</h2>
<iframe src="https://www.facebook.com/plugins/video.php?href=https%3A%2F%2Fwww.facebook.com%2Fcodecarrotinc%2Fvideos%2F405456726632681%2F&show_text=0&width=560" width="100%" height="350" style="border:none;overflow:hidden" scrolling="no" frameborder="0" allowtransparency="true" allowfullscreen="true"></iframe>
<p>For a clean example of text masking in action check out the above video. It uses actual page text in HTML so you can easily alter this text to read whatever you want.</p>
<p>All the magic happens in CSS with properties like background-clip. You can apply these to pretty much any text on any page, but they won’t show unless you have a clear background.</p>
<p>The zooming effect is also created purely in CSS which makes this code snippet even more impressive.</p>
<h2 id="cutout-mask-polygons">Cutout Mask Polygons</h2>
<iframe src="https://www.facebook.com/plugins/video.php?href=https%3A%2F%2Fwww.facebook.com%2Fcodecarrotinc%2Fvideos%2F405456253299395%2F&show_text=0&width=560" width="100%" height="350" style="border:none;overflow:hidden" scrolling="no" frameborder="0" allowtransparency="true" allowfullscreen="true"></iframe>
<p>The animation in the video is created by using JavaScript for the complex animations but all of the masking is handled through a canvas element. It’s a surprisingly complex idea so trying to follow along with the code will be tough.</p>
<p>But the above polygon masking effect is one of the more unique designs I’ve seen. It takes shapes designed in CSS and uses JavaScript to create these shapes as page elements for masking a background image.</p>
<p>This runs a consistent animation and runs on a JS-powered Canvas element which behaves like a container for the SVG/XML content. Pretty crazy stuff but it’s fun to see what masks can do!</p>
<h2 id="image-masking">Image Masking</h2>
<iframe src="https://www.facebook.com/plugins/video.php?href=https%3A%2F%2Fwww.facebook.com%2Fcodecarrotinc%2Fvideos%2F405470743297946%2F&show_text=0&width=560" width="100%" height="350" style="border:none;overflow:hidden" scrolling="no" frameborder="0" allowtransparency="true" allowfullscreen="true"></iframe>
<p>This cut & dry example shows what a CSS image mask looks like. You get to see the before & after of the above image mask created by Vincent De Oliveira.</p>
<p>Note the actual black textured mask is just a PNG file. But it’s layered over an image dynamically in CSS to create a masked photo effect.</p>
<p>You could do this with any texture you want so long as it’s exported with transparency. There’s plenty of details on the mask property and while it does support .svg files, you might find it easier to start with PNGs.</p>
<h2 id="button-hovers">Button Hovers</h2>
<iframe src="https://www.facebook.com/plugins/video.php?href=https%3A%2F%2Fwww.facebook.com%2Fcodecarrotinc%2Fvideos%2F405455986632755%2F&show_text=0&width=560" width="100%" height="350" style="border:none;overflow:hidden" scrolling="no" frameborder="0" allowtransparency="true" allowfullscreen="true"></iframe>
<p>Ever thought about customizing your button hover effects? Well this code snippet proves you can with a bit of creativity and some CSS masking.</p>
<p>Again the code all runs on a pre-defined image mask and each button has its own mask effect. The coolest part is the hover animation which doesn’t just show the mask, but rather animates it into view.</p>
<p>This is certainly an experimental bit of code, but it looks phenomenal in WebKit browsers and hopefully this technique could become a staple in a few years.</p>
<h2 id="svg-text-mask">SVG Text Mask</h2>
<iframe src="https://www.facebook.com/plugins/video.php?href=https%3A%2F%2Fwww.facebook.com%2Fcodecarrotinc%2Fvideos%2F405466729965014%2F&show_text=0&width=560" width="100%" height="350" style="border:none;overflow:hidden" scrolling="no" frameborder="0" allowtransparency="true" allowfullscreen="true"></iframe>
<p>Here’s a slightly different example of a text mask effect created by developer Marco Barría.</p>
<p>Instead of this defining custom SVG images the code actually uses an SVG element. It’s still built on top of plain HTML text content but it runs with a dynamic SVG filter.</p>
<p>This is a bit more technical but also grants much more control to the developer. Instead of messing around with Illustrator to create SVG files you can code inline SVGs right in your HTML doc.</p>
<h2 id="canvas-text-mask">Canvas Text Mask</h2>
<iframe src="https://www.facebook.com/plugins/video.php?href=https%3A%2F%2Fwww.facebook.com%2Fcodecarrotinc%2Fvideos%2F405474049964282%2F&show_text=0&width=560" width="100%" height="242" style="border:none;overflow:hidden" scrolling="no" frameborder="0" allowtransparency="true" allowfullscreen="true"></iframe>
<p>With this canvas example by Calvin Davis, you’ll notice it uses raw HTML for the content, but the text itself isn’t selectable.</p>
<p>Instead it’s rendered on the page using a Canvas element which can abstract text outside the DOM. This makes it behave more like an image so you’ll see this effect where the text masks over the background, but it doesn’t feel like text.</p>
<p>Some designers may not like this for lack of usability so if you want selectable text, I wouldn’t bother with this setup.</p>
<p>But it’s a cool example of how far you can push typography with canvas shapes.</p>
<h2 id="animated-gradient">Animated Gradient</h2>
<iframe src="https://www.facebook.com/plugins/video.php?href=https%3A%2F%2Fwww.facebook.com%2Fcodecarrotinc%2Fvideos%2F405454003299620%2F&show_text=0&width=560" width="100%" height="350" style="border:none;overflow:hidden" scrolling="no" frameborder="0" allowtransparency="true" allowfullscreen="true"></iframe>
<p>Another really cool text effect is this animated gradient created by developer Svante Richter.</p>
<p>It uses all SVG code in the HTML page, so it’s creating masks dynamically. This SVG setup works by taking over the entire page and giving it a gradient background, then masking this background only through the text.</p>
<p>Since the gradient can animate via CSS it’ll seem as if the text is the only part animating. Pretty cool effect and it’s something you might consider adding to an experimental website or landing page.</p>
<h2 id="animated-clipping-mask">Animated Clipping Mask</h2>
<iframe src="https://www.facebook.com/plugins/video.php?href=https%3A%2F%2Fwww.facebook.com%2Fcodecarrotinc%2Fvideos%2F405453293299691%2F&show_text=0&width=560" width="100%" height="350" style="border:none;overflow:hidden" scrolling="no" frameborder="0" allowtransparency="true" allowfullscreen="true"></iframe>
<p>This abstract clipping mask animation uses JS-powered bubbles generated randomly to mask over an image. It uses a canvas element along with animated clipping masks put together to form a cohesive SVG blob thing.</p>
<p>It may not seem like much, but developer Neil McCallion wrote some pretty sweet code, and the final result is definitely strange.</p>
<p>The masking happens mostly in the canvas element, but it’s controlled through JavaScript. It’s a fun way to blend two images with an abstract SVG animation.</p>
<p>Again this may not serve many purposes on a real-world website, but it’s a cool experiment for tinkering with masks.</p>
<h2 id="svg-bg-mask">SVG BG Mask</h2>
<iframe src="https://www.facebook.com/plugins/video.php?href=https%3A%2F%2Fwww.facebook.com%2Fcodecarrotinc%2Fvideos%2F405450713299949%2F&show_text=0&width=560" width="100%" height="350" style="border:none;overflow:hidden" scrolling="no" frameborder="0" allowtransparency="true" allowfullscreen="true"></iframe>
<p>On the flip side here’s a masking effect you could run on almost any website.</p>
<p>This uses a background gradient alongside a hero header to create a complex masking effect that still blends perfectly.</p>
<p>Developer Ryna Rudenko pushed the envelope with this pen using a raw canvas element with most masking effects layered in the HTML.</p>
<p>Not only is this mask practical and usable in a large header, but it’s also really well crafted and runs solely on HTML5 & CSS3. A prime example of modern web standards put to good use.</p>
<h2 id="css--svg-masks">CSS & SVG Masks</h2>
<iframe src="https://www.facebook.com/plugins/video.php?href=https%3A%2F%2Fwww.facebook.com%2Fcodecarrotinc%2Fvideos%2F405450223299998%2F&show_text=0&width=560" width="100%" height="350" style="border:none;overflow:hidden" scrolling="no" frameborder="0" allowtransparency="true" allowfullscreen="true"></iframe>
<p>This complete gallery of SVG masks really drives home just how much you can do with pure CSS.</p>
<p>It’s a demo showcasing a bunch of different masking techniques that all use the same photo, different formats. Plus each example includes sample codes right on the page that you can test for yourself — although it’s just as easy to copy the code from CodePen’s editor.</p>
<p>But this little pen acts more like a guided intro to different image masking effects you can do. Awesome place to start if you want to dive into SVGs & masks with simple demos.</p>
<p><strong>NOTE:</strong> All these videos have recorded from the CodePen authors.</p>yashumittalYou can do some amazing things with SVG masks. This technique has been around for years but only recently made its way into mainstream web development.
https://cdn.codecarrot.net/images/hub-share34rVWE34rrf34.png
Ready to Start your Own Business?2017-10-05T20:56:00+00:002017-10-05T20:56:00+00:00https://blog.codecarrot.net/ready-to-start-your-own-business<p>One thing many people learn from starting their own business is that you have to be in the right mindset from the very beginning. If you have the drive then all the rest should fall into place. But there are key questions you should be asking yourself before you even think about quitting your day job.</p>
<h2 id="1-are-you-the-right-sort-of-person-to-start-up-a-business">1. Are you the right sort of person to start up a business?</h2>
<p>Not every one will have the right temperament to pursue this type of career. It requires dedication and a lot of hard work. Stress is a common occurrence as you ride the highs and lows that your new business brings with it. You need to be able to handle both, in a calm manner. Also, it can be quite lonely in the early stages if you’re working by yourself or even if you start your company with one or two others. You will need to build the business up before you can afford to hire more staff, so be prepared to work in a very small team for a while. If you are coming from a corporate company environment then the change will seem monumental. Make sure that it’s what you really want.</p>
<h2 id="2-what-are-your-reasons-for-starting-your-own-business">2. What are your reasons for starting your own business?</h2>
<p>What do you hope to get out of it? An escape from the corporate world and rat race? A way to make lots of money in the quickest time possible? An easy way of making sure you get lots of time off work to do your own thing? Get a pen and paper and make a list, it will really help you think it through. But whatever your reasons just bear one thing in mind, success doesn’t come without hard work. If you’re looking for the easy life, this isn’t it. Of course, some of the perks above can be obtained once you are on the road to success, it just takes a bit of time. Remember that a business can easily fail as well as succeed and so be prepared for both.</p>
<h2 id="3-is-there-really-a-risk">3. Is there really a risk?</h2>
<p>All businesses have an element of risk and new ones more so than any other. It’s a common perception unjustly spoken that founders have a gigantic level of risk when starting a business, but I can’t understand why that is. Granted, you have to leave a stable job, with guaranteed income and exchange it for something where the revenue streams may not be up and running – but as long as you have a great idea and real dedication then you should learn quickly. Not only do you get a real life MBA, but also the potential to get high rewards for your time and investment. Ask yourself ‘If it doesn’t work what can I do?’ If you’ve got qualifications and a good level of work experience behind you then you can always go back into another job in your industry. Would you be sad if you looked back on your life and weren’t able to say that you gave it a go?</p>
<h2 id="4-does-your-idea-offer-something-unique-will-people-want-it-and-can-it-make-money">4. Does your idea offer something unique, will people want it, and can it make money?</h2>
<p>This is key. Your idea must be hot! It must satisfy a gap in the market which will address a customer need and be unique enough to succeed in the early stages against potential competition. Think about how are you better, where you think the market is going and how will it get there? Your vision must also have the ability to do what all businesses are created for, make profit. The Internet used to be full of ideas which had no hope of achieving profit, these quickly fell by the wayside. Now you need to be more realistic. Ask yourself ‘will my idea make money?’ and if the answer is yes then it has a good chance of lasting the distance. Get someone experienced involved at an early stage to look over your idea and give you some indication of its potential.</p>
<h2 id="5-innovate-then-implement">5. Innovate then implement</h2>
<p>If one hundred per cent of people have ideas, 30 per cent of these are good enough to succeed as a profitable business, 10 per cent of these ideas are in the hands of those with the motivation and entrepreneurship to take them forward, and 10 per cent of these will actually become a business. That’s a total of 0.3 per cent. On the positive side, remember that if you have a great idea then a lot of people may have had the same one, but very few of them will have the motivation or ability to make it a success.</p>
<h2 id="6-what-does-your-instinct-tell-you">6. What does your instinct tell you?</h2>
<p>This is difficult to put into words. It’s not scientific, it doesn’t have analysis behind it, it is just a feeling. An emotion so strong and overwhelming that you just know your idea will work and no one can demotivate you from implementing it. In fact, you will probably be willing to spend all your free time on it and implement it as quickly as possible. Do you want your idea to work, or do you know it will work?</p>
<h2 id="7-are-you-prepared-to-fail-fail-again-and-then-succeed">7. Are you prepared to fail, fail again and then succeed?</h2>
<p>There will be lots of time when things do not go your way and you lose heart. Perhaps a competitor has just arrived on the scene with a virtually identical product, a major client did not deliver, one of your key team members leaves, or you’re simply not getting any customers. This is the ‘test’ that all entrepreneur face where hard work and dedication will pay off. Just remember that when you think you’re at the bottom, something will come along and reward you for your persistence, giving you the lucky break you deserve.</p>
<p>Being an entrepreneur is a rewarding choice of career and if you decide that it’s for you then it’s a decision that could change your life. And the best thing about it is that it gets easier as you go along. Good luck!</p>yashumittalOne thing many people learn from starting their own business is that you have to be in the right mindset from the very beginning. If you have the drive then all the rest should fall into place. But there are key questions you should be asking yourself before you even think about quitting your day job.
https://i.imgur.com/j3shyHw.jpg
Glue - A Terminal for Sublime Text2017-10-05T19:52:30+00:002017-10-05T19:52:30+00:00https://blog.codecarrot.net/glue-a-terminal-for-sublime-text<p><a href="//gluedocs.readthedocs.io/en/latest/">Glue</a> is a plugin that provides an interface to your shell from the <a href="//www.sublimetext.com/">Sublime Text editor</a>. It features command entry within the Sublime Text editor window, standard output display in an editor view, and it works with most system utilities. This includes any compiled or interpreted source that you develop which effectively allows you to create Sublime Text extensions in any programming language that your system supports.</p>
<p>Here’s how you get started with it.</p>
<hr />
<h2 id="install-glue-in-your-sublime-text-editor">Install Glue in Your Sublime Text Editor</h2>
<p>Glue works in Sublime Text versions 2 and 3 and these install instructions apply for either version.</p>
<h3 id="install-with-package-control">Install with Package Control</h3>
<p>If you are using [Package Control](//packagecontrol.io/, the install is simple. Open the Command Palette in your Sublime Text editor with the menus <code class="highlighter-rouge">Tools > Command Palette</code> and then type install in the text entry field. Select the option <code class="highlighter-rouge">Package Control - Install Package</code>. Next, type ‘glue’ in the text input box and select the ‘Glue’ plugin option that is displayed in the Command Palette. The install automatically takes place. You will see a confirmation in the status bar at the bottom of the editor window.</p>
<h3 id="install-with-git">Install with Git</h3>
<p>Open your <code class="highlighter-rouge">Packages</code> directory with the Sublime Text menu items <code class="highlighter-rouge">Preferences > Browse Packages</code>. Then git clone the Glue repository as a new directory named ‘Glue’ in your Packages directory with the following command:</p>
<p><strong>OR</strong></p>
<h3 id="install-manually">Install Manually</h3>
<p>If you like to do things the good ole’ fashion way, download the source repository from GitHub <code class="highlighter-rouge">(tar.gz | zip)</code>. Decompress the archive and rename it “Glue”.</p>
<p>Then, open your Sublime Text Packages directory using the <code class="highlighter-rouge">Preferences > Browse Packages</code> menu items and move the entire <code class="highlighter-rouge">Glue</code> directory into your Packages directory.</p>
<hr />
<h2 id="confirm-your-install">Confirm Your Install</h2>
<p>Glue should automatically load in your editor after you install with any of the above approaches. You can confirm that it is installed by opening a project, right clicking in the sidebar and selecting the menu item <code class="highlighter-rouge">Open Glue Terminal</code>.</p>
<h2 id="confirm-your-path">Confirm Your PATH</h2>
<p>The next step is to confirm that your PATH is properly set in Glue. Glue assigns a default user PATH from your environment PATH variable. In general the PATH is correct, but on some installs it may require a bit of assistance.</p>
<p>First, check the PATH that Glue is using by entering the following command on the Glue command line:</p>
<div class="highlighter-rouge"><div class="highlight"><pre class="highlight"><code>$ glue path
</code></pre></div></div>
<p>This will display a colon-delimited PATH string for Unix/Linux users and a semicolon delimited PATH string for Windows users. If the PATH doesn’t match your existing system PATH, you can set a new Glue PATH string. This does not modify your existing system PATH.</p>
<p>To do this, open the Glue user settings JSON file by navigating to <code class="highlighter-rouge">Preferences > Package Settings > Glue > Glue Settings - User</code>. If you have not already entered settings in this file, it will appear as an empty buffer in Sublime Text. Create a JSON file with the following syntax:</p>
<div class="highlighter-rouge"><div class="highlight"><pre class="highlight"><code>{
"glue_userpath": "your path string here"
}
</code></pre></div></div>
<p>Unix (including Mac OSX) and Linux users should enter a colon delimited string. Windows users should include semicolons as delimiters.</p>
<p>Here is an example for Unix/Linux users:</p>
<div class="highlighter-rouge"><div class="highlight"><pre class="highlight"><code>{
"glue_userpath" : "/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin"
}
</code></pre></div></div>
<p>and for Windows users:</p>
<div class="highlighter-rouge"><div class="highlight"><pre class="highlight"><code>{
"glue_userpath": "C:\\Windows\\system32;C:\\Windows;C:\\Windows\\System32\\Wbem"
}
</code></pre></div></div>
<p>Windows users should escape their backward slashes as shown above.</p>
<hr />
<h2 id="use-glue">Use Glue</h2>
<p>Glue works with many of your favorite system utilities and allows you to extend what you can do inside the Sublime Text editor window. Here are a few examples:</p>
<h3 id="glue--grep">Glue + grep</h3>
<div class="highlighter-rouge"><div class="highlight"><pre class="highlight"><code>$ grep "def" *.py
</code></pre></div></div>
<p><img src="https://cdn.codecarrot.net/images/grep-examplebQ52OZGjH.png" alt="Screenshot of the terminal opening in sublime text using glue with grep" /></p>
<h3 id="glue--git">Glue + git</h3>
<div class="highlighter-rouge"><div class="highlight"><pre class="highlight"><code>$ git init
$ git add .
$ git commit -m "'initial commit'"
</code></pre></div></div>
<p><img src="https://cdn.codecarrot.net/images/git-example45yHF45.png" alt="Screenshot of the terminal opening in sublime text using glue with git" /></p>
<h3 id="glue--curl">Glue + cURL</h3>
<div class="highlighter-rouge"><div class="highlight"><pre class="highlight"><code>$ curl -sS //raw.githubusercontent.com/chrissimpkins/naked/master/lib/Naked/app.py
</code></pre></div></div>
<p><img src="https://cdn.codecarrot.net/images/curl-example43fFERY45.png" alt="Screenshot of the terminal opening in sublime text using glue with curl" /></p>
<h3 id="glue--your-own-scripts">Glue + Your Own Scripts</h3>
<div class="highlighter-rouge"><div class="highlight"><pre class="highlight"><code>$ node test.js
$ python test.py
$ ruby test.rb
$ ./test.sh
</code></pre></div></div>
<p><img src="https://cdn.codecarrot.net/images/scripting-language-example34GFDretr334.png" alt="Screenshot of the terminal opening in sublime text using glue with your own scrips" /></p>
<hr />
<h2 id="glue-commands">Glue Commands</h2>
<p>Glue includes its own set of built in commands that let you navigate around your directory structure, manipulate the editor (e.g. create new buffers, open files by wildcard), and perform other useful tasks:</p>
<table>
<thead>
<tr>
<th>Command</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>cd</td>
<td>change directory</td>
</tr>
<tr>
<td>exit</td>
<td>exit the Glue terminal</td>
</tr>
<tr>
<td>glue browse</td>
<td>open URL or local project file in default browser</td>
</tr>
<tr>
<td>glue clear</td>
<td>clear text in the Glue view</td>
</tr>
<tr>
<td>glue finder</td>
<td>reveal current directory (default) or optional path in finder</td>
</tr>
<tr>
<td>glue help</td>
<td>view help documentation in Glue view</td>
</tr>
<tr>
<td>glue localhost</td>
<td>open default web browser to local server</td>
</tr>
<tr>
<td>glue new</td>
<td>open a new Sublime Text buffer</td>
</tr>
<tr>
<td>glue open</td>
<td>open one or more project files by filepath</td>
</tr>
<tr>
<td>glue path</td>
<td>display the system PATH setting that is used by Glue</td>
</tr>
<tr>
<td>glue user</td>
<td>display alphabetized list of your Glue user extensions</td>
</tr>
<tr>
<td>glue wco</td>
<td>open one or more files by wildcard pattern</td>
</tr>
</tbody>
</table>
<hr />
<h2 id="extend-glue">Extend Glue</h2>
<p>You can extend the built-in Glue commands with aliases that support system utilities, your own compiled executables, shell scripts, and source from any scripting language that is supported on your machine.</p>
<p>These Glue aliases can be called from the command line with the syntax:</p>
<div class="highlighter-rouge"><div class="highlight"><pre class="highlight"><code>$ glue <your-command> [optional args]
</code></pre></div></div>
<p>They are incredibly simple to develop and require absolutely no programming knowledge (but can be hooked into anything that you develop with the capability to process data from the standard input stream).</p>
<p>Here are the steps to create your own extensions:</p>
<h3 id="create-the-glue-commands-directory">Create the Glue-Commands Directory</h3>
<p>Create a <code class="highlighter-rouge">Glue-Commands</code> directory inside your Sublime Text <code class="highlighter-rouge">Packages</code> directory. You can open your Sublime Text Packages directory with the menu item <code class="highlighter-rouge">Preferences > Browse Packages</code>.</p>
<h3 id="create-a-gluejson-file">Create a glue.json File</h3>
<p>Create a <code class="highlighter-rouge">glue.json</code> file inside the Glue-Commands directory.</p>
<h3 id="define-your-glue-extensions">Define Your Glue Extensions</h3>
<p>Commands are defined in the <code class="highlighter-rouge">glue.json</code> file with a simple mapping of JSON key:value pairs using the following syntax</p>
<div class="highlighter-rouge"><div class="highlight"><pre class="highlight"><code>{
"<command-name-1>": "<system command string 1>",
"<command-name-2>": "<system command string 2>",
[...]
}
</code></pre></div></div>
<p>You have the option to include replacement tags in your system command string that allow you to pass command line arguments, the text in your clipboard, or the current working directory path to the aliased command:</p>
<h3 id="glue-extension-replacement-tags">Glue Extension Replacement Tags</h3>
<table>
<thead>
<tr>
<th>Tag</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>``</td>
<td>additional arguments that you include on the command line</td>
</tr>
<tr>
<td>``</td>
<td>the contents of the clipboard</td>
</tr>
<tr>
<td>``</td>
<td>the working directory path</td>
</tr>
</tbody>
</table>
<h2 id="javascript-minifier-extension-example">JavaScript Minifier Extension Example</h2>
<p>Here is an example that will take you through each of these steps to create a command that will minify and obfuscate a JavaScript file, and then save it in the same directory with the new path <code class="highlighter-rouge"><filename>-min.js</code>:</p>
<p>If you are following along, you can download YUICompressor from <a href="//github.com/yui/yuicompressor">the GitHub repository</a>. You will need to have Java version 1.4+ installed to use it. Unpack the repository and move the yuicompressor-2.4.8.jar file to a directory for safe keeping (you will run it from this directory).</p>
<p>Next, create a shell script named minijs.sh. Include the following script and modify the YUI_PATH variable with the actual path to your YUICompressor jar file:</p>
<h3 id="javascript-minifier-shell-script">JavaScript Minifier Shell Script</h3>
<div class="highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="c">#!/bin/sh</span>
<span class="c"># Modify YUI_PATH with the path to the yuicompressor jar file</span>
<span class="nv">YUI_PATH</span><span class="o">=</span><span class="s2">"path/to/yuicompressor-2.4.8.jar"</span>
<span class="k">if</span> <span class="o">[</span> <span class="nv">$# </span><span class="nt">-eq</span> 0 <span class="o">]</span><span class="p">;</span> <span class="k">then
</span><span class="nb">echo</span> <span class="s2">"Please include the file path(s) for the file(s) that you would like to compress."</span> 1>&2
<span class="nb">exit </span>1
<span class="k">fi
for </span>file <span class="k">in</span> <span class="s2">"</span><span class="nv">$@</span><span class="s2">"</span><span class="p">;</span>
<span class="k">do
if</span> <span class="o">[</span> <span class="nt">-f</span> <span class="s2">"</span><span class="nv">$file</span><span class="s2">"</span> <span class="o">]</span><span class="p">;</span> <span class="k">then
</span>java <span class="nt">-jar</span> <span class="s2">"</span><span class="nv">$YUI_PATH</span><span class="s2">"</span> <span class="nt">-o</span> <span class="s2">"</span><span class="k">${</span><span class="nv">file</span><span class="p">%%.*</span><span class="k">}</span><span class="s2">-min.js"</span> <span class="s2">"</span><span class="nv">$file</span><span class="s2">"</span>
<span class="k">if</span> <span class="o">((</span> <span class="nv">$?</span> <span class="o">))</span><span class="p">;</span> <span class="k">then
</span><span class="nb">echo</span> <span class="s2">"</span><span class="nv">$file</span><span class="s2"> was not able to be minified"</span>
<span class="nb">exit </span>1
<span class="k">else
</span><span class="nb">echo</span> <span class="s2">"</span><span class="nv">$file</span><span class="s2"> was minified to </span><span class="k">${</span><span class="nv">file</span><span class="p">%%.*</span><span class="k">}</span><span class="s2">-min.js"</span>
<span class="k">fi
else
</span><span class="nb">echo</span> <span class="s2">"Unable to find the javascript file '</span><span class="nv">$file</span><span class="s2">'."</span>
<span class="k">fi
done</span><span class="p">;</span>
<span class="nb">exit </span>0
</code></pre></div></div>
<p>Next, create a Glue extension that will serve as an alias for the call to this shell script when you use the <code class="highlighter-rouge">glue minijs command</code>. We’ll include the `` template tag so that we can pass filepath arguments to our script. Insert the following in your <code class="highlighter-rouge">glue.json</code> file that you generated above:</p>
<div class="highlighter-rouge"><div class="highlight"><pre class="highlight"><code>{
"minijs" : "/path/to/minijs.sh { {args} }"
}
</code></pre></div></div>
<p>To use your new Sublime Text feature, launch Glue in your editor and minify JS files in the working directory with a command like this:</p>
<div class="highlighter-rouge"><div class="highlight"><pre class="highlight"><code>$ glue minijs awesome.js
</code></pre></div></div>
<p>The minified file is saved as <code class="highlighter-rouge">awesome-min.js</code> in the same directory.</p>
<p>You can use the same technique with any compiled application or interpreted script that accepts the standard input stream and returns the data to be displayed for the user in the standard output stream. Glue provides the interface with your shell to take care of the rest.</p>
<h2 id="learn-more">Learn More</h2>
<p>The Glue documentation is available <a href="//gluedocs.readthedocs.org/">here</a>.</p>yashumittalGlue is a plugin that provides an interface to your shell from the Sublime Text editor. It features command entry within the Sublime Text editor window, standard output display in an editor view, and it works with most system utilities. This includes any compiled or interpreted source that you develop which effectively allows you to create Sublime Text extensions in any programming language that your system supports.
https://cdn.codecarrot.net/images/maxresdefault13fef3.jpg
Why It’s a Learning Curve (Not a Line)2017-10-05T18:31:00+00:002017-10-05T18:31:00+00:00https://blog.codecarrot.net/why-its-a-learning-curve-not-a-line<p>Learning anything new can be exciting, but it can also be tough. We go into it with the expectation that we’re going to spend a certain amount of time every day or week learning something about a specific topic. We are all striving for some degree of mastery over the topic we choose. If you’re anything like me, then you will feel frustrated when your study time doesn’t yield the same amount of learning as it did the day before, but this is natural and part of the process. Learning is not linear.</p>
<h2 id="learning-by-repetition">Learning by repetition</h2>
<p>Some things we learn simply by doing them repeatedly. I’d be willing to bet that you can add 2 and 3 in your head and not even think about it. But why is that? It’s because you’ve done it so much over the course of your life that you don’t even have to think about it. Quite a bit of coding is like that. If you continue long enough, through repetition, you will begin to be able to do things easily that you had to make a concerted effort to accomplish before. Likely as not, you will be unable to pinpoint an exact time when it made sense to you. Somehow, over the course of repetition, it just does.</p>
<h2 id="scaling-the-cliffs">Scaling the cliffs</h2>
<p>By contrast, some ideas are more abstract. There will likely come a time in your learning when you notice things becoming significantly more difficult. These tend to happen when concepts come into play. You’ve learned the basic building blocks, but now you must put them together to architect a solution to a problem. In my experience, this feels a bit like standing at the bottom of a cliff. It is here that I’ve felt the most frustration in my learning process.</p>
<p>There is good news, though. It can be overcome, and you can climb that cliff! I have personally experienced situations where I simply could not grasp a concept. I may have heard twenty explanations and seen twenty examples on the same topic. For some unknown reason, it might be the twenty-first explanation and twenty-first example that makes it all clear for me. In most cases, there is nothing incredibly different between that example and ones I’ve seen before. I’ve been known to sit in my office and audibly say “Oh!” when it finally hits me, and the concept crystallizes in a way that it just never has before. The great thing about these moments is that once you understand the idea, it’s difficult to forget.</p>
<p>When you understand a concept, your learning isn’t as much of a curve as it is a vertical leap
upwards.</p>
<h2 id="the-thing-we-should-unlearn">The thing we should unlearn</h2>
<p>Humans are not born believing that they can never be smarter. That is something we learn during our lifetime, and it’s something we should all unlearn. If you’ve ever seen a child tackle a puzzle, then you’ll have some idea of what I mean. A child will become bored with an easy problem but engaged with a tough problem. By contrast, an adult will likely throw up their hands in frustration and walk away from the problem. The instinct we are born with is that we can get the solution with enough time, effort, and resources.</p>
<p>Alfred Binet who was the inventor of the first practical IQ test believed that intelligence was changeable. In his book Modern Ideas about Children we can find this quote: “A few modern philosopher’s assert that an individual’s intelligence is a fixed quantity, a quantity which cannot be increased. We must protest and react against this brutal pessimism… With practice, training, and above all, method, we manage to increase our attention, our memory, our judgment and literally to become more intelligent than we were before.”</p>
<p>You might be working on a piece of code or coming to terms with an idea you haven’t fully grasped yet. You might think to yourself “I’m not smart enough to do this.” I’ve thought that many times to myself. I still think it when I get stuck. I’m comforted to know that my inability to solve the problem is likely not permanent. That’s something that can change with time, effort, and resources.</p>
<h2 id="memorizing-is-mostly-wasteful">Memorizing is mostly wasteful</h2>
<p>People have asked me repeatedly what I would suggest are the most important things to memorize when learning to program. My answer: practically nothing. Anything that might be important enough to memorize will happen naturally through repetition as stated before. If you’re not using a particular thing in your programs often enough to learn it through repetition, then it’s also not worth putting in the effort to memorize it.</p>
<p>To go back to my mathematics example, you probably did at some point memorize 2 + 3. My guess, though, is that you didn’t memorize 29,083,983 + 12. And why is that? It’s because you understand the idea behind addition. You know how addition works as a concept so you can use it on any numbers given to you. This is an example of memorization being wasteful.</p>
<p>Programmers, in general, do not rely on memorizing every construct, every parameter, every object, method, and class. Instead, we use our resources combined with the concepts we’ve learned to produce the result. This is why documentation is so incredibly valuable, and you’ll hear programmers talk about it a lot. I’m betting very few people memorize every recipe in a cookbook. If we want to cook something different, we read the cookbook. This is the same idea. If a programmer had to memorize everything about even one language, we’d have no programmers.</p>
<h2 id="keep-moving">Keep moving</h2>
<p>Don’t stop learning. Even if you’ve been stuck on a problem or project for weeks, don’t quit learning. You might need to go back and review some of your basic building blocks. You might need a different source as a change of pace. Try reading an explanation on Medium or look up something on YouTube. Maybe even just do some generic Googling. You could even try learning something else about the language/platform/IDE and come back to where you got stuck. Keep pushing against that wall. Eventually, you will have a breakthrough, and it will probably be something you won’t easily forget. It is worth the time and effort even if you do not see immediate results.</p>
<p>Programming can be tough to learn, but also incredibly fun and more creative than non-programmers likely understand. If you’re interested and dedicated enough, you will see progress. The next step you take could be the one that is your breakthrough point, but you’ll never know if you don’t take that step.</p>yashumittalLearning anything new can be exciting, but it can also be tough. We go into it with the expectation that we’re going to spend a certain amount of time every day or week learning something about a specific topic. We are all striving for some degree of mastery over the topic we choose. If you’re anything like me, then you will feel frustrated when your study time doesn’t yield the same amount of learning as it did the day before, but this is natural and part of the process. Learning is not linear.
https://cdn.codecarrot.net/images/joe-neric-223562.jpg
How to win an argument2017-10-05T17:52:00+00:002017-10-05T17:52:00+00:00https://blog.codecarrot.net/how-to-win-an-argument<blockquote>
"The only way to get the best of an argument is to avoid it"
<blockquote>
That’s Principle #1 from the section “Win People to Your Way of Thinking”. Carnegie points out that as soon as you start arguing with someone, you’ve lost the fight. Have you ever been won over by someone who argues with you? I know I haven’t.
Basically, every single one of us gets defensive when we’re attacked – even if we know we’re wrong. Nine times out of ten, you’ll dig your heals in and fight back.
So if you’re trying to convince someone, the last thing you should do is argue with them.
## It’s all about the Good Will
Sure, you may win an argument. But will that person have good will towards you? Probably not. They’ll probably resent the fact that you were right and that you proved it to them.
If you really want to convince somebody of something, before you start an argument, take a quick step back from the situation and try to see things from their point of view. Why do they think the way they do? Why should they switch to your point of view?
</blockquote></blockquote>yashumittal"The only way to get the best of an argument is to avoid it"
https://cdn.codecarrot.net/images/How-to-win-Arguments.jpg
How To Write Product Descriptions To Increase Sales2017-10-05T17:25:00+00:002017-10-05T17:25:00+00:00https://blog.codecarrot.net/how-to-write-product-descriptions-to-increase-sales<p>Ecommerce manager and online store owners often ask about product descriptions. What should they say? How long should they be? What format is best? How do I make them rank high in search engines?</p>
<p>It’s no wonder they are worried — the quality of a product description can make or break a sale, especially if it doesn’t include the information a shopper needs to make a purchase decision. Providing key product details is critical if you want the shopper to click “Add to Cart” and differentiate your ecommerce website from the competition.</p>
<p>Whether your products have a specific function, like a camera, or a personal purpose, like fashion, all products exist to enhance or improve the purchaser’s quality of life in one way or another. As the shopper browses, they instinctively imagine having each product in hand, using it and enjoying it.</p>
<p>The more powerful the customer’s fantasy of owning the product, the more likely they are to buy it. Therefore, I like to think of product descriptions as storytelling and psychology, incorporating the elements of both prose writing and journalism. A “good” product description will not do. Competition is getting too fierce. It must be great!</p>
<p>Journalists utilize the Who, What, Where, When, Why and How method for getting across the facts of their stories, and following this process is the first step in crafting a compelling product description:</p>
<ul>
<li><strong>Who is this product for?</strong> The target audience can be a gender (women or men), an age group (college kids, retirees), a lifestyle demographic (new mothers, car enthusiasts) or some other defined group of people.</li>
<li><strong>What are the product’s basic details?</strong> This includes attributes such as dimensions, materials, product features and functions.</li>
<li><strong>Where would someone use this product?</strong> Is it meant for indoor or outdoor use, for your car or your home?</li>
<li><strong>When should someone use the product?</strong> Is it meant to be used during a certain time of day, seasonally or for a specific type of occasion? Just as important is pointing out if a product can or should be used every day or year-round, as that will speak to its long-term value.</li>
<li><strong>Why is this product useful or better than its competitors?</strong> This can be anything from quality to value to features — really think about the benefits that will speak to customers. Also consider how images can complement your product copy.</li>
<li><strong>How does the product work?</strong> This may not be necessary for every product, but if you are selling anything with moving parts or electronics, it’s a must-have.</li>
</ul>
<p>Use those questions as your product description template when you want to accurately describe your best items.</p>
<p>The next step is determining the best format for the above information. Since some shoppers only scan text on websites, it’s a good idea to have a list of bullet points that cover the most important product details. Bullet points should generally be used for specs (like dimensions) or short phrases (like features) so that they are quick and easy to read.</p>
<p>Unfortunately, bullet points aren’t the best way to tell a product’s story and convince shoppers that they’re looking at a great deal. They look cold and clinical on the page instead of engaging the shopper’s emotions or imagination. This is a job for prose! By writing a paragraph (three or more sentences) or two about the product, you can set the scene and help the shopper realize why their life up to this point has been incomplete without it. It may seem daunting, but after some practice, it will become second nature and even (gasp!) fun.</p>
<p>This is your opportunity to be a little creative and establish a voice (personality and tone) for your brand — whether that be serious, casual or even irreverent. Just imagine you’re at a party, telling someone you’ve just met about the product. How would you describe it so that they’d understand how great it truly is?</p>
<p>This voice permeates every aspect of your online marketing: social media, SEO, paid search — every customer touchpoint. Unique, compelling copy makes your products more relevant for search engines and other marketing mediums that value original content.</p>
<p>In fact, following this simple formula below is a great way to writing compelling product descriptions:</p>
<p><strong>[Paragraph(s) of Prose] + [Bulleted List of Specs or Product Features] = [Engaging Product Description]</strong></p>
<p>“But this is going to take a long time,” you might be thinking, especially if you rely on product descriptions from your distributors or manufacturers. And you’re right, this isn’t a quick process. But, if you can commit to writing a dozen or so product descriptions a day using the formula above, you’ll begin to see a variety of benefits:</p>
<ul>
<li><strong>An increase in conversion rate:</strong> Shoppers will be more confident in their purchase</li>
<li><strong>A decrease in cart abandonment:</strong> Again, increased confidence in purchase</li>
<li><strong>A lower return rate:</strong> Shopper expectations of products are more likely to be met</li>
<li><strong>Fewer calls from shoppers:</strong> They’ll have fewer questions about your products</li>
<li><strong>Better organic search rankings:</strong> More unique and original text content on your website</li>
</ul>
<p>Now let’s take a look at how eight real online stores sell more with product description perfection, with tidbits you can take from their expertise to increase your own conversions.</p>
<h2 id="be-short--sweet-to-be-effective">Be Short & Sweet to be Effective</h2>
<p>Writing short & sweet is a great formula which works every well. Product pages combine conversational paragraph-long descriptions that engage their fans, as well as quick bullet-points on need-to-know specs for any shoppers just scanning the page.</p>
<h2 id="use-storytelling-to-your-advantage">Use Storytelling to Your Advantage</h2>
<p>Does your product have a backstory that’s particularly special to you? Chances are it will be particularly special and endearing to your audience, too. Use that story in your product description to add more character to your item, engage your audience and win hearts and minds.</p>
<h2 id="boost-a-little-bit-to-sell-more">Boost a Little Bit to Sell More</h2>
<p>Take the product description formula above one step further. Is your product differentiated through a founder’s expertise? Is your product better because of years of testing? Is it hand-crafted?</p>
<p>Call that out!</p>
<p>Tell a better story in your short product description paragraph by including tidbits of detail that prove why your product is better than rest. Don’t be afraid to name drop, either.</p>
<h2 id="talk-the-technical-talk-to-win-trust">Talk the Technical Talk to Win Trust</h2>
<p>If you have a more technical product, don’t be afraid to get in the weeds with your product description. Prove to your customer your brand’s expertise in the industry by providing all possible details they’d need to know –– before they ever even have to ask.</p>
<h2 id="know-when-to-show-and-not-tell">Know When to Show and Not Tell</h2>
<p>Text isn’t always the best way to describe your product. If you are getting too wordy, think about how you can simplify.</p>
<p>Images carry weight and are better remembered by customers. If possible, show off your product in a visual that explain exactly what it does.</p>
<h2 id="know-when-to-show-tell-and-describe">Know When to Show, Tell and Describe</h2>
<p>Other than graphics, videos can be an extremely effective way to showcase how to use a product or why it is better than others. Use videos, graphics and text to drive the point home.</p>
<h2 id="dont-be-afraid-to-go-your-own-way">Don’t Be Afraid to Go Your Own Way</h2>
<p>While a short paragraph description on a product page is a best practice - know when that isn’t what your audience wants. Every industry and every online business is unique. Do you know your customer well enough to know they won’t read that product description? Are all of your customers scanners?</p>
<p>Pull out the content that is most important to them, and find engaging, visual ways to get all the relevant information to them without any headache. Your buyer personas should inform the overall form and approach towards your product descriptions — include the website design on the page.</p>
<h2 id="go-big-or-go-home">Go Big or Go Home</h2>
<p>Finally, this last example just blew me away. This is a great example of how far you can take the perfect product description formula above and really hit a homerun.</p>
<p>Simply writing out bullets, they used the their bullet-pointed list to create a storyline throughout the product page.</p>
<p>The page is long, but engaging and visual. It answers all questions a new parent might have. And, it still uses a simple paragraph to really drive the product home in an engaging, smart voice particular to the brand.</p>
<p>In all, it is important to first know your audience in order to determine what kind of content will best speak to them to increase conversions.</p>
<p>The ecommerce product description formula works for most brands, but it is only a starting point.</p>
<p>Think visually. Add graphics and optimize your product images. A/B test copy and get personal on those pages. Look in Google Search Console to identify popular terms so you can improve SEO traffic to the product page. People like to buy from people they trust –– and building trust is different based on what you are selling.</p>
<p>From the moment you use a website builder and construct your site’s design, think about how images and descriptions can work in harmony to tell your story to customers.</p>
<p>A stroller might not sell well if the description tells of how it was thought up overnight and then handmade. Similarly, a handmade leather playing card case might not sell well if all you show are the technical specs.</p>
<p>Know your audience. Know your product. And then, show and tell with your online shop descriptions!</p>yashumittalEcommerce manager and online store owners often ask about product descriptions. What should they say? How long should they be? What format is best? How do I make them rank high in search engines?
https://i.imgur.com/06sJREd.png
How to deal with abusive customers2017-10-05T14:30:00+00:002017-10-05T14:30:00+00:00https://blog.codecarrot.net/how-to-deal-with-abusive-customers<p>Copping complaints from customers is all part of being in business. But if they start turning feral, dishing out physical or verbal abuse, it’s time to take charge and tame the beast.</p>
<p>Most people who have worked in a job that involves dealing with the public either face to face or over the phone will have experienced an exchange with an abusive customer at some point or another. If you’re ever faced with such a scenario, maintain your professionalism and try to work toward a resolution.</p>
<p>Being physically abused by a customer might be the stuff of headlines, but verbal abuse can be common in industries where expectations and emotions run high.</p>
<p>Fear, frustration or stress can all tip customers over the edge. Add drugs or alcohol into the mix and you had better look out.</p>
<p><img src="https://i.imgur.com/DJJ5iA1.jpg" alt="Sticking your tongue out is not the answer" /></p>
<p><em>Sticking your tongue out is not the answer.</em></p>
<h2 id="here-are-the-10-ways-to-handle-abusive-customers">Here are the 10 ways to handle abusive customers:</h2>
<h3 id="manner">Manner</h3>
<p>Always maintain a polite and professional manner during any exchange with a customer. If you are sworn at or exposed to personal attacks on your character, resist the urge to retaliate with abuse or use phrases like “potty mouth” or “didn’t your parents teach you any manners.”</p>
<h3 id="explain">Explain</h3>
<p>Ask the abusive customer to calm down in a respectful manner and explain that you’re there to help. Tell them it’s going to be more difficult to resolve the issue while tempers are flared and that you’re more likely to be able to address any concerns if any discussion is conducted in a civilized fashion.</p>
<h3 id="empathize">Empathize</h3>
<p>Tell your abusive customer that you can understand their frustration and that you would be upset if you were in their position – if they have a valid complaint. If you feel that their complaint is spurious, empathy will not be necessary.</p>
<h3 id="honesty">Honesty</h3>
<p>Be honest about what you can do. If you’re unsure about how to deal with the complaint, don’t try to bluff your way through the situation. This will only serve to enrage your customer further and could end up getting you into trouble further down the line, either with your boss or legally. Explain that you’re unsure of how to deal with the situation and find out from your superiors, colleagues or a lawyer where you stand.</p>
<h3 id="refer-to-policies">Refer to Policies</h3>
<p>If a customer is complaining about an issue that’s covered in any contract you have with them, respectfully refer the customer to the clause that supports your position. Then, politely explain that it was their responsibility to review the terms and conditions of your relationship before entering into any agreement.</p>
<h3 id="escalate">Escalate</h3>
<p>If it becomes clear that you are unable to deal with an abusive customer effectively, don’t be afraid of passing the problem on to your manager or a colleague who is more experienced at negotiating with angry clients.</p>
<h3 id="issue-a-warning">Issue a Warning</h3>
<p>If your customer repeatedly uses foul language and/or threatens you, advise them that you do not have to, nor will you, tolerate being spoken to in such a manner. Explain again that you are there to help, but warn them that you will terminate the call if you’re on the phone or call security or the police if you’re discussing the situation in person.</p>
<h3 id="silent-treatment">Silent Treatment</h3>
<p>Don’t try to talk over or interrupt your abusive customer when they are in mid-flow. This is only likely to make the customer angrier. Let them finish what they are saying. If this involves a long, drawn-out rant, so be it. Remain silent for a few seconds after they have run out of things to say and then state your position. If the customer interrupts, tell them that you have listened carefully and would be grateful if they could extend you the same courtesy.</p>
<h3 id="state-your-position">State Your Position</h3>
<p>If the discussion is going nowhere, state your position firmly but politely and advise your customer to make a complaint to any trade body or ombudsman who regulates your industry if she won’t accept your decision.</p>
<h3 id="terminate-the-conversation">Terminate the Conversation</h3>
<p>If all else fails and you’re unable to get through to your abusive customer, end the discussion. If you’re on the phone, explain politely that you feel you can go no further with the conversation and that you’re going to hang up. If you’re dealing with the customer face to face, ask them to leave your premises.</p>yashumittalCopping complaints from customers is all part of being in business. But if they start turning feral, dishing out physical or verbal abuse, it’s time to take charge and tame the beast.
https://i.imgur.com/IbEMQmx.jpg
6 Powerful Sports Marketing Promotions That Are Better Than Google2017-10-05T13:57:00+00:002017-10-05T13:57:00+00:00https://blog.codecarrot.net/6-powerful-sports-marketing-promotions-that-are-better-than-google<p>Anyone who has tried to promote a new product will know how difficult it is to obtain media coverage.</p>
<p>Yet some organizations have now worked out how to get great coverage without relying on a finicky media, and they’re doing it in a unique and powerful way.</p>
<p>5 years ago, Ashton Kutcher hit 1 million followers on Twitter and the world was astonished to learn how a single person could potentially influence so many people. Before then, it took large, corporate media concerns to have that potential. Now, just five years later, Kutcher is at 15.7 million followers and several other celebrities and athletes have followed suit.</p>
<p>So clearly things have changed. The social landscape has changed – and companies need to change their approach to securing the attention of prospective customers. It’s no longer a dependence on big media or a huge Google Adwords budget. Businesses have new choices – choices that are more authentic and trustworthy in the minds of potential customers.</p>
<p>One of the best new marketing strategies is to work with influential people that have large social followings. As influential people increasingly build their own media platforms and reach, brands must consider how to best pair their product offerings with the influencers that can best promote them.</p>
<p>As it turns out, not only is this more effective than most digital advertising, the campaigns go well beyond the promotion period because prospective customers are more likely to remember the campaign since it features someone they trust and respect.</p>
<p>To learn more about this trend, my company did some research on how sports influencers want to work with brands to promote their products and services</p>
<h2 id="no-need-for-fancy-drinks---just-drink-water">No Need for Fancy Drinks - Just Drink Water</h2>
<p>Jackie Joyner-Kersee, three-time gold Olympic gold medalist and one of the all-time greatest athletes in the women’s heptathlon and long jump, is concerned about the consumption of sugary drinks that lead to obesity and unhealthy lifestyles.</p>
<p>“I want to work with a company emphasizing how cool it is to drink water.</p>
<p>I would like to focus on the positive aspects of why drinking water is so important. I will utilize some of my athletic friends to post on social channels about why they drink water and share stories about how water has made a difference in their training.”</p>
<p><strong>Impact:</strong> Imagine working with Kersee to promote nearly anything related to sports. She’d move the awareness needle – and your product with it.</p>
<h2 id="bmx-around-the-world">BMX Around The World</h2>
<p>“BMX “Flatland” pro rider Jorge ‘Viki’ Gomez and a fellow rider created the “BMXplore Tour,” traveling around the world and performing aerobatics with their bikes for all to enjoy. He would like to see the tour extended through 2014:”</p>
<p>“The idea is to visit places where BMX has never been seen before and to inspire people with new ways of expressing art and the use of a bicycle, meanwhile promoting a young and healthy lifestyle. The sponsors receive brand visibility and awareness through social media, in a new and modern way for the growing market in sports, travel and fashion.”</p>
<p><strong>Impact:</strong> Not only will Gomez be promoting the products he likes around the world, he’ll cement them in the minds of his followers through social media.</p>
<h2 id="a-fitness-campaign-for-baby-boomers">A Fitness Campaign for Baby Boomers</h2>
<p>World Champion, #1 in the world, and 17-time US National Tennis Champion and performance coach, Bob Litwin, would like to reach a demographic rarely targeted by sporting gear manufacturers: baby boomers.</p>
<p>“Baby boomers want to stay fit, feel younger and have fun. I’d like to see a sports manufacturer, like NIKE, Adidas or Babolat, create an influencer marketing campaign where players 60 and over can share their stories about growing younger through fitness. Boomers are growing at a faster rate than all other age groups combined and they outspend other generations by an estimated $400 billion a year. With health care plummeting and old age knocking at our doors, it’s time to create an influencer marketing campaign that shows baby boomers defeating aging, getting fit and living brand new stories.”</p>
<p><strong>Impact:</strong> To date, I haven’t seen many brands targeting physically active Boomers, but a campaign with active, fit, influential boomers promoting the benefits of physical activity and your product, is a winner.</p>
<h2 id="create-your-very-own-sports-reality-documentary">Create Your Very Own Sports Reality Documentary</h2>
<p>Long-time runner, triathlete and health-oriented mom of three Janice Smith believes that developing a long-term relationship with a brand is essential for sports influencers:</p>
<p>“A brand could fly me to a fun place to participate in an event that I wouldn’t normally be able to attend, say Hawaii for the Ironman championships, and provide me with virtual coaching and equipment. [My fans and I could get excited about the event and sponsor] as I Tweet/Facebook/Instagram/blog about my entire experience starting with my training, and ending with my race recap.”</p>yashumittalAnyone who has tried to promote a new product will know how difficult it is to obtain media coverage.
https://i.imgur.com/7DtzjkN.jpg
Part 1 - Bootstrap 4 vs Zurb Foundation 6.4 - The Grid2017-10-05T10:05:00+00:002017-10-05T10:05:00+00:00https://blog.codecarrot.net/part-1-bootstrap-4-vs-zurb-foundation-6-4-the-grid<h2 id="what-is-a-grid-in-web-design-anyway">What is a Grid in web design anyway?</h2>
<p>A Grid is the most important tool-set in any responsive layout of a website design. It creates a basic structure which you can use to define the layouts of the website and consists of the so called invisible lines through which your design elements can be placed. The most important feature of a grid structure is that it helps you to do effective alignment and have consistency in your design with minimal effort. According to <a href="//developer.mozilla.org/en-US/docs/Learn/CSS/CSS_layout/Grids">Mozilla Developer Network</a></p>
<p><em>A grid is simply a collection of horizontal and vertical lines creating a pattern against which we can line up our design elements. They help us to create designs where elements don’t jump around or change width as we move from page to page, providing greater consistency on our websites. A grid will typically have <strong>columns, rows</strong>, and then gaps between each row and column — commonly referred to as <strong>gutters</strong>.</em></p>
<p>I am assuming that by now you would have understood what a grid actually is and what it does? Now let’s compare the grid system of the top two open source web frameworks that are available to you.</p>
<hr />
<h2 id="bootstrap-4-flex-grid--flexbox-utilities">Bootstrap 4: Flex Grid & Flexbox Utilities</h2>
<p>Bootstrap uses a powerful mobile-first flexbox based grid system which helps them build layouts of all shapes and sizes and this is all happening because of their twelve column grid system. This 12 column grid system creates sensible breakpoints for their layouts and interfaces and you can combine them with flexbox alignment utilities which makes responsive layouts easy. Auto-layout columns are also supported. There is also a special class .no-gutters which helps you remove the gutters between columns in their predefined grid classes and thus lets you create an edge-to-edge design.</p>
<p>Using their built-in grid sass variables and maps, you can also customise the number of grid tiers using <code class="highlighter-rouge">$grid-breakpoints</code> and <code class="highlighter-rouge">$container-max-widths</code> variables respectively. The number of grid columns can also be modified by Sass variables.</p>
<p><img src="https://cdn.codecarrot.net/images/1-UdaGt7GH9biKJ2hi07Cb4g.png" alt="text editor - bootstrap grid customization" /></p>
<h2 id="foundation-6-xy-grid--flexbox-utilities">Foundation 6: XY Grid & Flexbox Utilities</h2>
<p><em>Disclaimer: This section is bigger than the bootstrap section, just because XY Grid has lots of extra features compared to bootstrap. Please note that I am not being biased. If you want to suggest an update to the bootstrap section, with some more code, demo’s or images… just let me know in the comments section below. I will happily update.</em></p>
<p>Amazingly, this is an invention actually considering that this is the first web framework supporting all these features. XY Grid is a fully reworked new grid system in v6.4+ which has lots of options including multiple grid types that includes margin grid, padding grid, frame grid, block grid and vertical grid. Here X is the Horizontal direction whereas Y is the Vertical direction. It also supports auto sizing. Believe it or not, XY Grid is a huge advancement in Grids. The things that differentiate XY Grid from others a list apart is that it supports both types of grid gutters, margin and padding respectively. Confused? Why two grid types instead of one. Well I am attaching some images to help you understand the differences between a Margin and Padding Grid.</p>
<table>
<tbody>
<tr>
<td>![Margin: No</td>
<td>Padding: No](https://cdn.codecarrot.net/images/1-P6-CHj0q4taLgKELO2_LTw.png)</td>
</tr>
<tr>
<td>*Margin: No</td>
<td>Padding: No*</td>
</tr>
</tbody>
</table>
<table>
<tbody>
<tr>
<td>![Margin: Yes</td>
<td>Padding: N](https://cdn.codecarrot.net/images/1-UMLCBi1UwIsVsMi0b2uF2g.png)</td>
</tr>
<tr>
<td>*Margin: Yes</td>
<td>Padding: N*</td>
</tr>
</tbody>
</table>
<table>
<tbody>
<tr>
<td>![Margin: No</td>
<td>Padding: Yes](https://cdn.codecarrot.net/images/1-bQ52OZGjHOiCtX4BBtsV8A.png)</td>
</tr>
<tr>
<td>*Margin: No</td>
<td>Padding: Yes*</td>
</tr>
</tbody>
</table>
<table>
<tbody>
<tr>
<td>![Margin: Yes</td>
<td>Padding: Yes](https://cdn.codecarrot.net/images/1-m0HAfzuUY9Ve06ih39CLbQ.png)</td>
</tr>
<tr>
<td>*Margin: Yes</td>
<td>Padding: Yes*</td>
</tr>
</tbody>
</table>
<p>I hope by now, you understand why having such a flexible and multi grid gutter based system is great for defining layouts. But hey, that’s not all. XY Grid has been inspired from upcoming CSS Grid and thus supports both Vertical and Horizontal Based Grid Systems. Isn’t that cool?</p>
<p><strong>Flexbox Utilities:</strong> Flexbox helps you use horizontal and vertical alignment painlessly, through the flexbox based CSS properties like <code class="highlighter-rouge">[align-items](//devdoks.github.io/)</code>, <code class="highlighter-rouge">[align-self](//devdoks.github.io/)</code>, and <code class="highlighter-rouge">[justify-content](//devdoks.github.io/)</code>. Foundation includes a handful of classes for these properties, which will work on any flexbox-enabled component.</p>
<p>Grid customisation is easy in Foundation. You can also build grids semantically with a powerful set of sass mixins, which you can then use in your own code to build a semantic grid. You can change the maximum width of a grid container via <code class="highlighter-rouge">$grid-container</code>. The number of columns used in the grid can be changed by <code class="highlighter-rouge">$grid-columns variable</code>, whereas responsive breakpoints can be easily changed with <code class="highlighter-rouge">$breakpoints</code>, <code class="highlighter-rouge">$print-breakpoint</code>, and <code class="highlighter-rouge">$breakpoint-classes</code> respectively.</p>
<p><img src="https://cdn.codecarrot.net/images/1-wMogsQp1VJf2Es21YwfyUg.png" alt="Foundation 6: Grid customisation" /></p>
<p><strong>Responsive Gutters:</strong> The grid gutter aka the space between two columns within the flow of the page (X or Y direction) and the space between the edge of the grid and the edge of the page is responsive. By default, responsive gutters helps the page to have narrow edges in mobile devices whereas it becomes wider on larger screens. This can be easily customised though with <code class="highlighter-rouge">$grid-margin-gutters</code> and <code class="highlighter-rouge">$grid-padding-gutters respectively</code>.</p>
<p><img src="https://cdn.codecarrot.net/images/1-p8yyphOrjlwLPIIDgsFN-g.png" alt="Foundation 6: Grid Gutters customisation" /></p>
<p><strong>Frame Grid:</strong> But that’s not all, Frame Grid in XY Grid incorporates the grid frame exclusively from Foundation for Apps for App Style Layouts. Well when you lay things out horizontally, the browser defaults to 100% of available width, its common no? Obviously! But it’s not the case when you are laying things out vertically, In this case what you need is to specify a height for the grid and there are couple of extremely common cases for heights, and in fact foundation has included a helper class for exactly this case, <code class="highlighter-rouge">.grid-frame</code>. The first common case is for an outer grid, typically your application layout is where you want to take up exactly the height of the viewport aka the browser window. This is exactly what <code class="highlighter-rouge">.grid-frame</code> does when applied to a vertical grid outside of any other grid. The other common case is when you are nesting a vertical grid inside of a cell in an existing grid — in this case, you would typically want the vertical grid to take up 100% of the cell, so that the Grid Frame inside of a <code class="highlighter-rouge">.cell</code> sets the height of the grid to exactly 100% of the available height.</p>
<p>There is one more frame grid utility that you should know about — the <code class="highlighter-rouge">.cell-block</code> classes. When you’re creating an application style layout with fixed height, you still need to handle overflowing content somehow and <code class="highlighter-rouge">.cell-block</code> lets you delegate the scrolling of the cells within your grid, and thus you are able to create an independently scrolling blocks of content within your layout. That being said, you probably don’t want that on mobile, instead you would like to have such functionality that in mobile view - the content just doesn’t scroll, and instead that content should take up the full height it needs (the normal browser state) and frame grid makes it super easy. Instead of using <code class="highlighter-rouge">.grid-frame</code>, you just need to replace it with <code class="highlighter-rouge">.medium-grid-frame</code> and it will stack on mobile.</p>
<h2 id="extra-css-grid">Extra: CSS Grid</h2>
<p>Just heard the news that <a href="//twitter.com/gregwhitworth/status/903616284998254595">CSS Grid will be shiped (in a customer release)</a> in Microsoft Edge so this article can’t be closed without talking about the future of the web! So I would like to give a short intro to the amazing capabilities of <strong>CSS Grid</strong>. CSS Grid Layout is without a doubt, the most powerful layout system available in CSS. It is a 2-dimensional grid system, that means that it can handle both direction simultaneously, unlike flexbox which is largely a 1-dimensional system. In layman’s terms, Flexbox can only produce <code class="highlighter-rouge">grid-x</code> and grid-y whereas CSS Grid can also produce <code class="highlighter-rouge">grid-xy</code> independently from <code class="highlighter-rouge">grid-x</code> and <code class="highlighter-rouge">grid-y</code>. Isn’t that awesome? If in case you are still in doubt, here is a small example of the fun things we can do with CSS Grids. Just have a look once at <code class="highlighter-rouge">grid-template-areas</code> block in the CSS section.</p>yashumittalWhat is a Grid in web design anyway?
https://cdn.codecarrot.net/images/1-o9BJ_DkWp-M0iaZdASQV_A.png
How to Make Your Own Online Videos2017-10-05T07:57:00+00:002017-10-05T07:57:00+00:00https://blog.codecarrot.net/how-to-make-your-own-online-videos<p>When it comes to making videos to promote your business—to engage your audience, to showcase your products—professional quality usually demands professional prices.</p>
<p>But sometimes you don’t need Hollywood production values in your videos. Sometimes you just need good videos that you can turn around fast and for free (or at least fairly cheap).</p>
<p>If you haven’t thought about incorporating video into your marketing strategy, you should consider it—video is an incredibly versatile format after all:</p>
<ul>
<li><strong>Videos can live in several places:</strong> The same video can potentially be used on Facebook, Instagram, Twitter, YouTube, Tumblr, embedded on your website/blog, etc.</li>
<li><strong>Videos make for eye-catching social media posts/ads:</strong> Audiences can read, watch, and listen, so video can engage them in a different way than static imagery. Plus, videos play automatically on some channels like Facebook.</li>
<li><strong>Videos can be repurposed into new videos and from other content formats:</strong> Video content can be clipped down, expanded upon, or converted into new videos or GIFs. You can also take infographics, blog posts, photos, and other types of content, and turn them into videos.</li>
</ul>
<p>Not only that, but video’s share of total bandwidth is predicated to grow to encompass more than 80 percent of all consumer internet traffic by 2020, making it the content format of the future.</p>
<p>The best part is that just because you don’t have the budget, doesn’t mean you can’t reap the benefits of video content.</p>
<h2 id="how-to-make-videos-without-hiring-a-professional">How to Make Videos Without Hiring a Professional</h2>
<p>While it definitely helps, you don’t necessarily need expensive equipment or even your own original footage to produce videos.</p>
<p>All you need is a concept in mind and an idea of what you want to use the video for.</p>
<p>From there, it’s a matter of:</p>
<ol>
<li>Creating a rough storyboard of how you plan for it to flow and writing a script if you need one.</li>
<li>Finding or creating the footage or audio you need.</li>
<li>Editing it together in one of the many apps in this post, depending on your needs.</li>
<li>Packaging it up and uploading it as a social media post, ad, YouTube video, etc.</li>
</ol>
<h2 id="where-to-look-for-free-stock-footage-and-music">Where to Look For Free Stock Footage and Music</h2>
<p>When you think about it, you don’t really need a camera to make your own videos.</p>
<p>You can repurpose existing photography, get what you need from stock footage sites, and even shoot your own footage with your phone if you really need to.</p>
<p>There’s a lot of places you can look for great free stock footage, fitting music and cool sound effects.</p>
<p>Depending on how the content is licensed, however, you might need to credit the creator of the footage you borrow or pay to use it for commercial purposes. For details on how and when to do this, check out the <a href="https://wiki.creativecommons.org/wiki/Best_practices_for_attribution">Creative Commons</a> best practices for attribution and be sure to take a closer look at the conditions for use on each of the following sites.</p>
<h2 id="free-stock-videos">Free Stock Videos</h2>
<ul>
<li><strong><a href="https://www.videvo.net/">Videvo</a>:</strong> Completely free high quality HD footage and motion graphics.</li>
<li><strong><a href="https://videos.pexels.com/">Pexels</a>:</strong> Free photos and videos from around the world.</li>
<li><strong><a href="https://www.wedistill.io/">Distil</a>:</strong> 10 new high quality videos for commercial use every 10 days, delivered to your inbox.</li>
<li><strong><a href="https://pixabay.com/">Pixabay</a>:</strong> Tons of vibrant videos, photos, and animations you can use.</li>
</ul>
<h2 id="public-domain-not-subject-to-copyright">Public Domain (not subject to copyright)</h2>
<ul>
<li><strong><a href="https://www.pond5.com/free">Pond5</a>:</strong> Home to lots of historic footage.</li>
<li><strong><a href="https://archive.org/details/movies">Archive.org</a>:</strong> Footage of games, films, historic moments, etc.</li>
<li><strong><a href="https://www.nasa.gov/multimedia/videogallery/index.html">NASA</a>:</strong> Footage and photos of space.</li>
<li><strong><a href="https://www.criticalpast.com/">Critical Past</a>:</strong> Vintage videos.</li>
</ul>
<h2 id="free-music-and-audio">Free Music and Audio</h2>
<ul>
<li><strong><a href="https://freesound.org/">Freesound.org</a>:</strong> A variety of sounds you can use at no cost.</li>
<li><strong><a href="https://www.looperman.com/">Looperman</a>:</strong> Acapella vocals, music, and sounds you can use if you credit the creator.</li>
<li><strong><a href="https://www.conversesamplelibrary.com/">Converse Sample Library</a>:</strong> Plenty of cool music and rhythms for you to sample.</li>
<li><strong><a href="https://www.youtube.com/audiolibrary/music">YouTube Audio Library</a>:</strong> A great resource for good quality music and sound effects meant for creators.</li>
</ul>
<h2 id="paid-stock-music-and-footage">Paid Stock Music and Footage</h2>
<p>While you do have to pay, <a href="https://audiojungle.net/">Audio Jungle</a> and <a href="https://videohive.net/">Video Hive</a> are popular places to find sounds, music, video effects and stock footage to use and sample. They also offer free music, video templates, and more every month if you subscribe.</p>
<h2 id="free-tools-to-help-you-make-your-own-videos">Free Tools to Help You Make Your Own Videos</h2>
<p>While you can record video natively in most video hosting platforms like Facebook, Instagram, and YouTube, there are plenty of apps for producing quick, good-looking videos for different occasions and in a short span of time.</p>
<p>I highly recommended giving the following tools a try, many of which are free and some of which come with their own library of stock imagery and other assets for you to use.</p>
<h3 id="quik-by-go-pro-produce-simple-product-videos"><a href="https://quik.gopro.com/en/">Quik by Go Pro</a>: Produce Simple Product Videos</h3>
<p>Go Pro is famous as a camera company for helping people capture awe-inspiring moments in action.</p>
<p>Quik is a video editing app by them that lets you easily import and rearrange images and footage, adding text and music as you like.</p>
<p>While it’s meant for weaving together memories from your last vacation, it’s also a great way to create simple product videos, especially if all you have is product photos.</p>
<p>With this app, you can create an engaging slideshow or a short video in no time at all.</p>
<h3 id="giphy-turn-your-videos-into-gifs"><a href="https://giphy.com/create/gifeditor">Giphy</a>: Turn Your Videos into GIFs</h3>
<p>GIFs are (arguably) just videos without sound. And with Giphy you can either convert your existing videos into GIFs or edit/caption existing GIFs.</p>
<p>Giphy is also a great place to find cinemagraphs, which are essentially photos with a single isolated element in motion.</p>
<p>You should take advantage of the fact that GIFs loop endlessly and can be used to create engaging memes to complement your social media strategy.</p>
<p><img src="https://i.imgur.com/vZ30oxD.gif" alt="Throwing money" /></p>
<h3 id="power-director-a-robust-video-editor-for-your-phone"><a href="https://play.google.com/store/apps/details?id=com.cyberlink.powerdirector.DRA140225_01&hl=en">Power Director</a>: A Robust Video Editor For Your Phone</h3>
<p>If you’d like to shoot and edit videos all on your phone, Power Director is an app that comes with a lot of the useful features.</p>
<p>The advantage of a mobile video editor like this is that you can record new footage and audio straight from your phone and directly import it into your work in your progress, making it easy to do things like voiceovers.</p>
<h2 id="tips-for-making-engaging-videos">Tips for Making Engaging Videos</h2>
<p>The assets and tools above make videos easier to create, but there’s a lot more to know about using these videos effectively in your marketing.</p>
<p>For one, videos that provoke an emotional reaction tend to perform better and have more viral potential, especially on Facebook. Since social videos are often watched with the sound off, <strong>captions also go a long way in increasing viewership</strong>.</p>
<p><strong>Thumbnails also matter a lot</strong> as they are essentially the “headline” of your video that entices people to watch. Use <a href="https://www.canva.com/">Canva</a> to easily create eye-catching thumbnails for your videos if you’re going to upload your videos to YouTube or another platform that pits you against other videos.</p>
<p>Finally, since it’s not just how you create the videos but how you upload them too, you should be wary of the specifications for each channel, which I’ve linked to below:</p>
<ul>
<li><a href="https://www.youtube.com/channel/UCIAktdRKgMZMkNbJY44spqA">YouTube</a></li>
<li><a href="https://facebook.com/codecarrotinc">Facebook</a></li>
<li><a href="https://instagram.com/codecarrot">Instagram</a></li>
<li><a href="https://twitter.com/codecarrotnet">Twitter</a></li>
</ul>
<h2 id="do-it-yourself-video">Do It Yourself Video</h2>
<p>Whether you’re making videos or another type of content, quality is inevitably how you compete. But it doesn’t necessarily have to cost you a lot.</p>
<p><strong>Entrepreneurs and creators can always make up for what they lack in resources with resourcefulness.</strong></p>
<p>So if you have a hunch that videos can take your marketing to the next level, don’t let the perceived costs and amount of effort stop you. You can get started for free using these resources and work your way up from there.</p>yashumittalWhen it comes to making videos to promote your business—to engage your audience, to showcase your products—professional quality usually demands professional prices.
https://i.imgur.com/VCCvHZq.jpg
Ruby on Rails for E-commerce2017-10-05T06:48:00+00:002017-10-05T06:48:00+00:00https://blog.codecarrot.net/ruby-on-rails-for-ecommerce<p>An online store is a good business model. Customers visit your website, browse, put items in the basket, and transfer money to your account. Whereas it might look simple from the outside, many things can go wrong inside your business, especially from the technological perspective.</p>
<h2 id="choosing-the-right-technology">Choosing The Right Technology</h2>
<p>The technology that you use in the e-commerce platform development will determine the platform’s performance, stability and security, that is the factors that are vital to your customers. If the website crashes every other step of a customer’s journey, the loading times exceed 15 seconds, or the payment gate seems to be dodgy, you can’t expect many customers to buy products from you. If you don’t want this scenario to come true, you should pay attention to a range of factors and requirements that are important when choosing the framework for an e-commerce store.</p>
<h2 id="flexibility">Flexibility</h2>
<p>Trends and technologies are constantly evolving, and your platform should be evolving too. If you want to stay on top of things, you should take into consideration that you might scale your store up some time after the kickoff, or that you will need to implement new features as the business grows. That’s why the platform should be flexible enough to accommodate the changes you will want to implement. It should be possible and easy (!) to develop the platform and adjust its structure to your needs. If the framework you choose for the development is not flexible enough, every single change will be a pain for the dev team and yourself.</p>
<h2 id="stability-and-performance">Stability And Performance</h2>
<p>Stability and performance are some of the key factors determining whether users will buy from you or not. People hate to wait for anything, and it also applies to the online environment. If your website is slow, users will simply abandon it. The same goes for stability – when your potential customers can’t achieve their goal (buying a product) fast, they will go shop at one of your competitors. The framework should provide a stable and performant ecosystem for your platform, even when the number of users becomes really high.</p>
<h2 id="payment-integrations">Payment Integrations</h2>
<p>Secure payments are essential for a good shopping experience. When customers submit sensitive personal data, such as a credit card number, they want to be certain that the data will not be collected and processed for purposes other than completing the transaction. Anything that suggests otherwise is bound to prevent them from buying at your store. Users also value convenient payment options. If they proceed to the last step and don’t find a payment gate they usually use, it may stop them from finalising the transaction. Therefore, the framework should make it easy to integrate it with many payment processors.</p>
<h2 id="the-number-of-ready-solutions">The Number of Ready Solutions</h2>
<p>When you start building an online store, it is good to have some out-of-the-box functionalities so that the development team doesn’t need to write all modules from scratch. If the framework you choose provides ready-to-implement packages that will enable you to add products, configure the checkout, or integrate payment gates, you will save loads of development time. On top of that, using proven modules that have already worked in a ton of projects gives you a guarantee that they will work from the get-go.</p>
<h2 id="ease-of-deployment">Ease of Deployment</h2>
<p>Building an e-commerce platform is a long process that will require much effort from your team. After months of code writing and testing, you want to kick off with the platform fast and with ease. You don’t want any problems on the run-up to the commercial launch. That’s why the framework should offer an easy way to deploy the application. If all the processes which are part of deployment are automated, the dev team can quickly put your app into production.</p>
<h2 id="admin-page-offered-by-the-framework">Admin Page Offered by The Framework</h2>
<p>Whereas the interface of your online store will adjust to user needs, the admin page usually remains in the form the framework offers it. Maybe you don’t need your dashboard to be beautifully designed, but it must be easy to navigate, and you need to find what you’re looking for easily.</p>
<h2 id="ruby-on-rails-spree-for-your-e-commerce">Ruby on Rails’ Spree for your e-commerce</h2>
<p><a href="/pros-cons-ruby-on-rails">Ruby on Rails is our technology of choice because it’s mature, has an active community supporting it, and provides out-of-the-box solutions that make the development process easier and faster</a>. We’ve built dozens of applications in RoR, and many of those projects involved developing an e-commerce platform. Ruby on Rails gives you a reliable framework intended for building online stores: Spree. Spree is the most popular e-commerce solution for RoR, supported by the community and constantly updated to better fit your needs. Does it fulfil the requirements of a good framework?</p>
<h2 id="mature-codebase">Mature Codebase</h2>
<p><a href="//github.com/spree/spree">Spree</a> was created in 2007, and since then, over 700 developers have contributed to the codebase. The community actively supports the framework by adding new repositories and creating more and more features that can be directly implemented in the platform. The codebase is mature, and contributors make a lot of effort to provide the highest possible quality. It all translates into the exceptional stability of the framework. That’s why it’s been used by many companies, for instance, Chipotle Mexican Grill, Second Life, Bonobos, Fortnum and Mason.</p>
<h2 id="ready-functionalities">Ready Functionalities</h2>
<p><a href="/why-spree-is-a-good-choice-for-your-store">Spree offers basic out-of-the-box shop functionalities essential for every e-commerce platform.</a> The features important from a customer’s point of view but hard to write from scratch are available in Spree as ready-to-use packages:</p>
<ul>
<li><strong>Managing products.</strong> You can add products in distinct variants, such as colours, sizes etc. You will be able to upload images for products and for their specific versions separately. The packages also allow managing the stocks of the created products.</li>
<li><strong>Managing tax zones.</strong> This feature is especially important when you run an international business. Spree offers a well-developed system for managing taxes. It allows creating many tax categories (e.g. food, clothes, or electronics) various tax zones (e.g. EU, USA) and also to easily combine zones with categories.</li>
<li><strong>Managing shipments.</strong> You can create different shipping methods and use different delivery methods for different zones, making it easy to integrate the system with local logistics companies.</li>
<li><strong>Managing promotion campaigns.</strong> You can apply a promotion to a specific order if a predefined condition is met (for instance if the total value of the basket is higher than $100, or a specific product was added to the cart). It also facilitates applying promo codes.</li>
</ul>
<p>Taking into consideration the sheer number of functionalities and the amount of complexity that Spree offers, its performance is very good.</p>
<h2 id="easy-payment-integrations">Easy Payment Integrations</h2>
<p>Spree offers a wide range of payment integrations, including the most popular services such as Stripe, PayPal, or SagePay, but also smaller providers. It has a highly flexible payment integration model, enabling you to provide your customers with multiple payment methods during checkout. The biggest advantage is that if gives developers a built-in service for managing payment gates. As a result, they don’t need to write code – clicking through it will be enough to make it work.</p>
<h2 id="documented-admin-dashboard">Documented Admin Dashboard</h2>
<p>Even though you might feel a little bit confused when you first see the admin dashboard, it won’t take you long to familiarise yourself with it. The dashboard offers numerous functionalities that can be overwhelming at the beginning, but you will definitely appreciate the wide range of options it offers. On top of that, <a href="//guides.spreecommerce.org/user/">the admin page is solidly documented</a> making navigating through the platform easy, especially during the first use.</p>
<h2 id="easy-deployment">Easy Deployment</h2>
<p>Just like with any other Ruby on Rails app, the deployment doesn’t cause any problems. It’s quick and easy. We’ve tested it on our Docker flow many times, and we haven’t come across any major issues.</p>
<h2 id="things-to-consider-before-development">Things to Consider Before Development</h2>
<p>Despite the maturity of the codebase and the stability of the framework, like any other technology, developing in Spree involves some risks, and problems may occur. However, if you know those risks in advance, you will know what to expect and how to handle the problems that might ensue.</p>
<p>The first thing you should consider is the framework’s integration with JavaScript. If you’re using Ember or React on the front end, it can take a little bit more time to connect the technologies. Spree’s out-of-the-box API is not well-suited for rich <a href="/the-history-of-javascript">Javascript</a> applications, and developers need to modify it slightly before connecting the customer’s side with Spree. It might get especially complicated with Ember. On top of that, search engines in Ember or React might sometimes refuse to work smoothly with such applications. Secondly, if you want to implement some non-standard functionalities (e.g. replacing the multi-page checkout with a single-page checkout) in your online store, you should know that introducing deep modifications to Spree can take a lot of development time and might require more experienced programmers. Still, introducing deep changes into Spree is possible. Another thing is that payments that need a 3D-secure verification will also involve more development work and testing. It is doable, but problems can occur, and the dev team will have to put more effort into making it all work. Finally, you might encounter some performance issues the performance if you don’t use external services such as CloudFront.</p>
<h2 id="is-ruby-on-rails-good-for-my-e-commerce">Is Ruby on Rails Good for My E-commerce?</h2>
<p>The question above is a question that everyone will need to answer considering their own needs and circumstances. We hope that the article will help you make an informed decision. If you have more questions concerning RoR, Spree, or good pubs to visit in London, pop <a href="mailto:contact@codecarrot.net">us a message</a> or start a <a href="//codecarrot.net/">chat with us</a>. We’ll be more than happy to help!</p>yashumittalAn online store is a good business model. Customers visit your website, browse, put items in the basket, and transfer money to your account. Whereas it might look simple from the outside, many things can go wrong inside your business, especially from the technological perspective.
https://cdn.codecarrot.net/images/make-e-commerce-platforms.png
Relax, Advertising on Facebook Just Got a Lot Easier2017-10-05T00:57:00+00:002017-10-05T00:57:00+00:00https://blog.codecarrot.net/relax-advertising-on-facebook-just-got-a-lot-easier<p>I can’t be the only person who finds Facebook advertising confusing. All the features make it a very powerful advertising platform, but they also add complexity. One of the things I used to get particularly frustrated by is pixels.</p>
<p>Pixels are common across most advertising platforms. They’re used to drop a cookie that will track visitors on your website so you can advertise to them later. This is called retargeting. Once you advertise to past website visitors, pixels can also be used to track their behaviour when they’re back on your website. This helps you measure the effectiveness of your ads.</p>
<p>Facebook used to have a custom audience pixel for retargeting website visitors, and conversion pixels for tracking website conversions such as sales. While each advertising account had only one custom audience pixel, you could create many conversion pixels—one for each web page you wanted to track conversions on.</p>
<p>The thing is, although these pixels are confusing, they make advertising on Facebook much more effective. Not only do you know exactly who you’re advertising to, you also have a better understanding of how your ads are performing. All in all, you can make your messaging much more effective, leading to a better return on your advertising dollars.</p>
<p>In 2015, Facebook took a huge step towards to simplifying this process by introducing the new Facebook Pixel. One pixel to replace all of them. The new pixel is now the only pixel you need. It has retargeting, optimization, and tracking all built in one.</p>
<p>If you’ve been using the old pixels (and good for you if you have!) they will still work for the time being. Your old custom audience pixel has already been upgraded to the new pixel, but your conversion pixels will be phased out in the second half of 2016.</p>
<p><img src="https://i.imgur.com/fp3TzBM.png" alt="new facebook pixel" /></p>
<p>My recommendation is to switch everything over now rather than leaving it to the last minute. And if you’ve never used any Facebook pixels before, it’s the perfect time to start.</p>
<h2 id="how-to-use-the-new-facebook-pixel">How to Use the New Facebook Pixel</h2>
<p>The new pixel holds a lot of value for ecommerce stores. It offers three core functions to help you get a better return on investment.</p>
<ol>
<li>Website Custom Audiences</li>
</ol>
<p>Website Custom Audiences are how Facebook helps you retarget website visitors. If you have the Facebook pixel installed, it will track the movements of any visitors on your website who are simultaneously logged into Facebook. It will record which pages on your site they visit, which pages they don’t visit, and when they visit. Using this data, you can advertise to very targeted groups of people.</p>
<p>To be clear, Facebook doesn’t let you choose a specific website visitor and advertise to them. Instead, you can advertise to groups of users (website custom audiences) based on shared behaviour. A few examples include:</p>
<ul>
<li>people who have visited your website in the past 24 hours</li>
<li>people who have visited your website in the past 180 days but have not been back in 30 days</li>
<li>people who have visited a specific page on your website</li>
<li>people who have visited a specific page on your website but not another specific page.</li>
</ul>
<p>You can define Website Custom Audiences based on which pages they did or did not visit, and by when they visited your website. You can choose a timeframe of between 1 and 180 days.</p>
<p>Audiences are created independently from ads. Once an audience is created you can choose when to advertise to it and which ads to use. Or you can let it percolate for future use.</p>
<h2 id="2-custom-conversions">2. Custom Conversions</h2>
<p>One of the most exciting parts of the new pixel is the ability to <a href="https://www.facebook.com/business/help/780705975381000">create Custom Conversions</a> the same way you create Custom Audiences. A Custom Conversion is created by selecting a completion page and naming the conversion. Typically the completion page is some kind of thank you page. For example:</p>
<ul>
<li>Thank you for shopping, your order is on the way</li>
<li>Thanks for signing up, you’ll receive your first email from us shortly</li>
<li>Thanks for your comment, here’s your free download</li>
</ul>
<p>This means that you can create Custom Conversions independently of your ads, and then choose when to use them in the future.</p>
<p>Because the new pixel already fires on all your website pages, it can easily track when someone visits a completion page—especially people who have clicked on your ads.</p>
<p>You can also choose the type of conversion, such as “Purchase” and add a monetary value. For example, if you create a Custom Conversion that tracks visitors to an ebook download page, you can include the cost of the ebook. This feature will help you figure out if your ad campaigns are profitable. If you charge $20 for your ebook, but you’re spending $25 for every purchase that comes from Facebook ads, you’ll probably want to make some changes to that campaign.</p>
<p>The interesting thing about Custom Conversions is that once one is created, it will be tracked for all your ads, whether you choose to optimize for it or not. All your Custom Conversions are always being tracked. At any time, you can create a report for one of your ads that will show the conversion rate for any of your Custom Conversions.</p>
<p>If you want to optimize your ad for a custom conversion, choose “Website Conversion”, type in your domain, and then select the one you’re looking for.</p>
<p><img src="https://i.imgur.com/s0ESue5.png" alt="Screenshot of choosing campaign objective" /></p>
<p>The drawback of Custom Conversions is that you’re limited to 20, and at this time, none of them can be deleted. If you’re tracking a lot of different completion pages, you could run into a wall. For that, you’ll need Standard Events.</p>
<h2 id="3-standard-events">3. Standard Events</h2>
<p>Standard Events are an advanced feature of the new Facebook pixel. If you only use Website Custom Audiences and Custom Conversions, you’re in great shape. In the <a href="https://en.wikipedia.org/wiki/Pareto_principle">80-20</a> of Facebook advertising, you’ll already be doing the simple things that have the biggest impact.</p>
<p>Standard Events function similarly to the old conversion pixels. You can create <a href="https://www.facebook.com/business/a/add-pixel-standard-events">Standard Events</a> with the new pixel, but much like the old pixel, they require a bit of extra code. One major perk of Standard Events is that they help get passed the limit of 20 Custom Conversions.</p>
<p>While Custom Conversions are tied to a URL (usually for some kind of thank you or completion page), Standard Events don’t need to be. Instead, conversions can be tracked by adding an additional line of the code to the page of interest.</p>
<p>There are nine conversion types you can use with Standard Events, each with its own line of code. This code will tell Facebook what to track, and will be inserted into the new Facebook pixel code—but only on the page you want to track conversions on.</p>
<p><img src="https://i.imgur.com/Bp0YUUU.png" alt="facebook Standard events" /></p>
<h2 id="adding-the-new-facebook-pixel-to-your-website">Adding the New Facebook Pixel to Your Website</h2>
<p>The new Facebook pixel works similarly to the old custom audience pixel. It needs to be in the head section of your index page so that it appears on every page on your website. No matter what page gets loaded, the pixel will fire and track where the visitor is.</p>
<p>First, if you haven’t already, you’ll need to create your Pixel. Start by visiting the <a href="https://www.facebook.com/ads/manager/account/">Ads Manager</a>. Once there, click on the Ads Manager menu and select “Pixels” under “Assets”.</p>
<p><img src="https://i.imgur.com/eo3lqv0.png" alt="facebook ads manager" /></p>
<p>If you haven’t created a Pixel already, you’ll be prompted to create one now.</p>
<p><img src="https://i.imgur.com/jhMMcPr.png" alt="Create pixel on facebook screenshot" /></p>
<p>Name your Pixel and click “Create Pixel”.</p>
<p><img src="https://i.imgur.com/tOfXfRu.png" alt="Name your pixel screenshot" /></p>
<p>Your Pixel code will now pop up. In order for your pixel to work properly, it needs to be displayed on every page of your website. The best place to put the code is in the <head></head> section of your index page.</p>
<p>If you <a href="https://www.codecarrot.net/">get your store</a>, the process is much simpler. Scroll through the code and look for a string of 15 numbers. That’s your Pixel ID. Copy this number. If you need any help with your website, <a href="https://www.codecarrot.net/">team at CodeCarrot</a> is happy to help you.</p>yashumittalI can’t be the only person who finds Facebook advertising confusing. All the features make it a very powerful advertising platform, but they also add complexity. One of the things I used to get particularly frustrated by is pixels.
https://i.imgur.com/akkEAvd.jpg
What Can Bots (and Can’t) Do for Your Online Store2017-10-04T23:57:00+00:002017-10-04T23:57:00+00:00https://blog.codecarrot.net/what-can-bots-and-cant-do-for-your-online-store<p>Chatbots are essentially programs pretending to be people that you can interact with through text or even voice.</p>
<div class="callout">
It’s hard to talk about "conversational commerce" without mentioning chatbots.
</div>
<p>Essentially, you can talk to these chatbots in your messaging apps, <strong>much like you would any other contact in your list</strong>, to get the day’s news or even get something done.</p>
<p>In the context of conversational commerce, where messaging apps become a bridge between consumers and businesses, chatbots seem to be the best answer for ecommerce business owners to manage thousands of one-to-one conversations with customers.</p>
<p>But for many online business owners who don’t need to manage that many customer conversations at a time, “outsourcing” customer support to a robot just isn’t worth sacrificing the quality of each individual shopper’s experience or what you as a business owner could learn from them.</p>
<p>These smaller online businesses are often run by one or two people who, thanks to a bit of automation, are more than capable of juggling several conversations with their customers at any given time.</p>
<p>Instead, ecommerce businesses should look at conversational commerce as an opportunity to couple intimacy and automation to help them <strong>deliver a more personal customer experience through messaging apps</strong>.</p>
<blockquote>
Conversational commerce is bringing back the business-to-customer dialogue where it’s been missing most: shopping online.
</blockquote>
<h2 id="customer-service-where-businesses-still-need-a-human-touch">Customer Service: Where Businesses Still Need a Human Touch</h2>
<p>While the chatbot hasn’t evolved to the point where it could completely pass for a real person yet, the messaging app has evolved to improve a part of business that never quite carried over from brick-and-mortar to the online store: Sales and customer support.</p>
<p>And it’s only possible now because messaging apps as a whole have experienced explosive growth compared to most social apps, offering users a more engaged and private communication channel than any social network.</p>
<p>Among these messaging apps, Facebook Messenger presents one of the largest opportunities right now.</p>
<p>Since its launch in 2011, Facebook Messenger has grown to 900 million users, far outstripping most other messaging apps. That makes it one of the best platforms for businesses looking to explore conversational commerce as a channel for selling to and supporting customers directly.</p>
<p>Integrating Facebook Messenger as a channel gives you a persistent line of communication that customers can access when they visit your website—creating a conversation that stays with them as they move from desktop to tablet to smartphone in a multi-device world.</p>
<p>In one chat with a customer, you can:</p>
<ul>
<li>Help someone make a purchase decision.</li>
<li>Handle any objections personally.</li>
<li>Upsell or cross-sell other products.</li>
<li>Offer discount codes.</li>
<li>Answer questions about “out of stock” products and notify customers when they’re available again.</li>
<li>Get customer feedback.</li>
<li>Deliver shipping notifications.</li>
<li>…All at the fast pace of instant messaging.</li>
</ul>
<p>By coupling hands-on service with some degree of automation—shipping notifications and auto-responders, for example—you can manage customer relationships more easily and on a more personal level.</p>
<p>That’s not to say bots don’t have a place in business. Far from it—chatbots are already fulfilling their promise of creating more time for business owners, albeit in a different way.</p>
<h2 id="marketing--operations-where-bots-are-at-their-best">Marketing & Operations: Where Bots Are at Their Best</h2>
<p>While chatbot AI isn’t quite smart enough to become the “face” of your brand in a sales or customer service role, it is at a point where it can take on some of the many burdens that come with running a business—particularly when it comes to executing tasks for marketing and operations.</p>
<p>While many chatbots out there leave a lot to be desired, the best ones right now work because they serve a specialized function.</p>
<p>These bots usually offer a user experience that starts you off with a few options or yes/no questions, before branching off to ask you further questions as required or executing an action based on the information that it’s gathered.</p>
<h2 id="conversational-commerce-is-changing-ecommerce-for-both-businesses-and-consumers">Conversational Commerce Is Changing Ecommerce For Both Businesses and Consumers</h2>
<p>The easiest way to think of “conversational commerce” is as a way to turn dialogue—the natural back-and-forth exchange of information—into a way for people, apps, businesses and bots to interface with each other in meaningful ways.</p>
<p>While the concept of building artificially intelligent chatbots isn’t new, the amount of attention, buy-in and innovation around them at present is a product of messaging apps overtaking social networks when it comes to where we actively invest our time.</p>
<p>Because when you think about it, the deepest and most personal form of engagement a customer can have with a business online isn’t a Like on Facebook, an email opt-in or even a purchase.</p>
<p>It’s a <strong>conversation</strong>.</p>
<p>You need a place to add the chatbot and let your visitors and users engage with them, let’s <a href="https://www.codecarrot.net/">build a website</a> for you and put chatbot in use.</p>yashumittalChatbots are essentially programs pretending to be people that you can interact with through text or even voice.
https://i.imgur.com/AUcXVDo.png
Don’t Do A Startup If You Don’t Have Answers To These Questions?2017-10-04T20:56:00+00:002017-10-04T20:56:00+00:00https://blog.codecarrot.net/dont-do-a-startup-if-you-dont-have-answers-to-these-questions<blockquote>
You will never lose the battle because you fought it, you will lose it because you didn’t knew how to fight?
</blockquote>
<p>The most fundamental thing which one has to have if s/he wants to perform any task is that he should have necessary skills and tools to deliver it. Let me make you understand by a knife analogy , we never give a knife in our kid’s hand why so ? it’s because they don’t have the necessary skill-set to handle it properly, so chances are that they may end up hurting themselves or someone around. Their intelligence & awareness has not developed to understand how to use knife properly and for what purpose. So even though s/he has the tool they don’t have the necessary training to operate it in a way it is required.</p>
<blockquote>
Having resources doesn’t guarantee that you can succeed. You have to have a necessary training to make it through
</blockquote>
<p>Hope you are still with me, today we will together try to understand what fundamental things one has to take care of before s/he decides to start on his new venture(Startup)</p>
<ol>
<li>Do you have necessary fundamental knowledge Of what you want to do?</li>
<li>Do you have go to market strategy in place? business model has to be well planned before jumping to product development.</li>
<li>Do you have the full time founding team to execute the business plan?</li>
<li>Have you got the conviction to pull it off when things will go extremely bad?</li>
<li>Do you have the necessary budget or funds in place to smoothly run the operation till you reach the Product Market Fit Stage?</li>
<li>Do you have the guts, to bluntly accept that it’s not your cup of tea and pivot or to move on to do what you are best doing at?</li>
<li>Last but not the least have you identified the real problem which is worth solving irrespective of it’s market size. if yes than you are obviously on the right track, embrace your failures and carry on you will definitely love the journey if not the destiny.</li>
</ol>
<p>Signing-off with a wonderful food for thought based on my practical experiences</p>
<h2 id="at-last">At last</h2>
<p>Be realistic with yourself and own what you want to do, learn the basics if you don’t know, be the salesman, get the user requirement by going out and talking to them, have first hand experience of what you are trying to do, be patient and be prepared for all the failures which you will face and be ready to pivot your business model as per market needs and user feedback. Learn at every stage and act on that basis and you will definitely be a successful human being if not the richest</p>yashumittalYou will never lose the battle because you fought it, you will lose it because you didn’t knew how to fight?
https://i.imgur.com/QEdISF5.jpg
Entrepreneurs - Don’t Neglect Your Health!2017-10-04T18:40:00+00:002017-10-04T18:40:00+00:00https://blog.codecarrot.net/entrepreneurs-dont-neglect-your-health<p>Millions of people dream to work on their dream project and few of those bravo’s who have the courage and conviction goes on to venture into their startup, but very few of them manage to sustain. Do you know why ? Well one of the key factor which plays a vital role in keeping startup/businesses in a healthy state is that their founders and key team members are physically and emotionally healthy.</p>
<p>Being an experienced player I can easily say that health is the most neglected part of our daily life, this is one topic which I feel needs to be addressed by all my fellow entrepreneurs if they want to stay long in this game.</p>
<p>I strongly feel that:</p>
<div class="callout">
Having dreams to build your own startup is not sufficient , you need to build your health to sustain your dreams and build a healthy startup
</div>
<h2 id="where-is-the-problem-why-we-dont-focus-on-our-own-well-being-no-time-is-not-a-villain">Where is the problem why we don’t focus on our own well-being? No time is not a Villain</h2>
<blockquote>
Don't fool yourself by the statement "I am Busy", instead be effective with your time management & be effectively busy.
</blockquote>
<p>There must be the reason why lot of startup entrepreneurs who are hustling very often ignore their own <strong>health</strong>. I think there is a serious problem in time management. Entrepreneurs specially who have started-up struggle hard to priorities their time and health comes last in their to do list. You will very often listen them complaining about lack of time, but personally I don’t think time is an issue. Poor time management skill is what driving this super humans crazy.</p>
<p>We do become the boss in planning our day but that boss has no control over their own <strong>wellbeing</strong>. What is the point of being a boss of our own destiny when we are not taking good care of our body, which is supposed to enjoy the perk of all our hard work. The journey which is the whole essence of being an <strong>entrepreneur</strong> is not being enjoyed fully. The freedom which we longed for as an entrepreneur is now becoming the dangerous evil, this very freedom has started to act against us.</p>
<h2 id="what-is-the-solution">What is the solution</h2>
<p>We can’t simply complain about lack of time and move ahead, specially if you are founder of any organization, your are not alone, you are accountable for people who are putting their trust on you, and if you are not healthy enough how can you delegate the responsibilities in a healthy manner. Being an unhealthy founder can only lead to an unhealthy organisation. Your behaviour, your managerial skills , your emotional quotient all gets affected if your are not healthy. So there is no other alternative , keep health as your super-most priority in your to-do list and spare an hour or so engaging in activities which can lubricate your body , fuel it with right food , right exercise so that your thought process also gets right.</p>
<h2 id="cliche-but-it-is-very-effective-for-every-human-being">Cliche: But it is very effective for every human being</h2>
<blockquote>
Early to bed, early to rise,
Keeps you healthy wealthy and wise
</blockquote>
<p>But it is not crime if you are a night warrior but make sure you spare an hour from your regular time to play some sports, or engage in dance , 10–15 min of yoga & meditation will help you de-stress yourself and if you can change your habit and start rising early you will do wonderfully well for sure.</p>
<h2 id="my-personal-tips-it-worked-for-me-so-sharing">My Personal Tips: It worked for me so sharing</h2>
<p>I am not a fitness celebrity or big shot for that matter but still I feel as a responsible fellow entrepreneur it’s my responsibility to share my experiences.</p>
<ol>
<li><strong>Start Your Day Early: Experience early morning beauty of our nature</strong></li>
</ol>
<p>It’s universally proven that the best way to keep yourself healthy and energized is to start your day early & experience the beauty of our mother nature while taking a walk for min 15–20 min. Feel the fresh air and greeneries around you and connect with them, you will have a best solo time being close to the nature. Also morning hours gives you an opportunity to be social if you share your morning journey with your close friends or partner.</p>
<ol>
<li><strong>5 Min of Yoga & 15 Min of Meditation Can do wonders</strong></li>
</ol>
<p>Our age old Yogic practices has been with us from ages but with the technological advancement it has been loosing its shine. If you can invest 20 minutes daily on yoga and meditation keeping your gadget aside , it will prove to be your best investment decision. It will keep you in right shape and right frame of mind to make better decisions at your workplace. You will have the best experiences when your eyes are closed. Close it now how you felt blissful right.</p>
<ol>
<li><strong>Be emotionally healthy</strong></li>
</ol>
<p>Everyone knows that if you are physically ill you need to consult your doctor , take medicine and you will be alright. But nobody give a damn if they are emotionally stressed, feeling low or depressed , we never consult or talk to specialist for it . The largest bread of new age entrepreneur are fighting from depression, they feel isolated and do not speak their plight out. Sometimes they just need some dose of encouragement from the fellow being but they hesitate to speak out about their weakness and want to present the better picture to the world outside, which is really very precarious . This emotional need of yours has to be taken care with highest priority if you are going through some mental trauma. Go and consult your doctor , speak up to whom you trust, don’t take all the burden alone , engage in more social activities instead of burning your energy on social media. Being emotionally fit should be the topmost priority if your running your startup or any business for that matter. You need to invest your time in activities which brings smile on your face, it can be your hobby or profession.</p>
<p>Do spare time for your family they are your biggest health booster, they are your true treasure. If you can value your time you can get all the time to love and be loved. A healthy relationship boosts your EQ and you become more empathic and caring with the people around you. Emotionally fit person gets larger acceptability in their workplace and society so go out and practice empathy you will have no problem whatsoever.</p>yashumittalMillions of people dream to work on their dream project and few of those bravo’s who have the courage and conviction goes on to venture into their startup, but very few of them manage to sustain. Do you know why ? Well one of the key factor which plays a vital role in keeping startup/businesses in a healthy state is that their founders and key team members are physically and emotionally healthy.
https://i.imgur.com/ItymoS9.jpg
Why Avoid Using Free public WiFi?2017-10-04T17:52:00+00:002017-10-04T17:52:00+00:00https://blog.codecarrot.net/why-avoid-using-free-public-wifi<p>Free WiFi is great! Isn’t it? Umm. Not really. Many people don’t know & just don’t comprehend the meaning of free wifi. Because when you log in or sign up for a free WiFi service, you are giving up some part of your private life (In a digital sense). There is a saying “If you are not paying for a product, you are the product”. Free Public WiFi’s are same. They take something from you to give something very cheap.</p>
<iframe width="100%" height="315" src="https://www.youtube.com/embed/XcghUy-8VRA?rel=0" frameborder="0" allow="autoplay; encrypted-media" allowfullscreen=""></iframe>
<h2 id="why-avoid-using-free-public-wifi">Why avoid using Free public WiFi</h2>
<p>Rather than explaining why you shouldn’t use it, we want to explain what exactly happens when we connect to free WiFi on the street / Malls / Coffee Shops. Free WiFi’s are usually given out by business who have a ton of money to shed on attracting more customers and users to enhance their profit. That is their basic “motto” of free WiFi. There are very few instances where you don’t need to input some or the other credentials and this is where your data is compromised. You are asked to input your Mobile Number / Email where your mobile number is sent an SMS with a code to insert in the Sign-Up page for the free WiFi.</p>
<p>In short, you are compromising your own privacy and security. And then you wonder how you get so many SPAM Emails/Calls/SMS. It is just plain pure business, these companies also sell your data to other companies.</p>
<p>Other than this, Free Public WiFi’s are completely insecure, any one on the same WiFi access point can eavesdrop on your network and see what you are doing. Moreover, if you should avoid logging into your private accounts on social media less alone banking apps. There is a much higher chance of you getting hacked than you getting lost in the Bermuda Triangle. Many Free WiFi routers have a highly proficient Firewalls but that won’t stop an experienced professional and this is why it is advised to avoid using Free public WiFi.</p>
<h2 id="how-to-be-safe-while-using-free-wifi">How to be safe while using Free WiFi?</h2>
<ul>
<li>Keep everything updated.</li>
<li>Use HTTPS everywhere.</li>
<li>Use a VPN</li>
<li>Avoid using social media and emails.</li>
<li>Stay away completely from Banking web sites & Apps.</li>
</ul>yashumittalFree WiFi is great! Isn’t it? Umm. Not really. Many people don’t know & just don’t comprehend the meaning of free wifi. Because when you log in or sign up for a free WiFi service, you are giving up some part of your private life (In a digital sense). There is a saying “If you are not paying for a product, you are the product”. Free Public WiFi’s are same. They take something from you to give something very cheap.
https://cdn.codecarrot.net/images/free-wifi-sign-board.jpg
How Mobile Technology is Impacting The Humanity?2017-10-03T19:42:00+00:002017-10-03T19:42:00+00:00https://blog.codecarrot.net/how-mobile-technology-is-impacting-the-humanity<p>We as a new age entrepreneur are blessed to be a part of this 21st century revolution which has been mostly ruled by Mobile device and mobile apps. We are easily the most well equipped and most comfortable generation as compared to our ancestors , fathers and forefathers. All credit goes to Mobile and mobility software solutions which has made possible for the people to connect in seconds, transacts at will without investing too much time and energy. They can now multitask and plan it right at their fingertips, billions of dollar are being transacted because of mobile app based fin-tech solutions. All the thanks to mobile app developer community and to the entire ecosystem of mobility.</p>
<p>Lets understand how mobile app ecosystem has shaped the current and how it will impact our future.</p>
<h2 id="communication-increased-accountability--productivity">Communication: Increased Accountability & Productivity</h2>
<p>The biggest contribution of mobility to the humanity is that it has completely removed the communication gap in every aspect of human existence. In split of a seconds contents/information are being transacted from source to destination. Also the records are being maintained where there is no chance of loosing any information which has been communicated , so eventually there is no way parties involved in communication can complaint of information loss resulting in more reliable and efficient system. WhatsApp has slowly become the most widely accepted mobility solutions among small and large business community for quick communication. The biggest plus point of this mobile age solutions are that they are scalable and fits into your pocket.</p>
<h2 id="tv-in-your-pocket-on-demand-entertainment">TV in Your Pocket: On Demand Entertainment</h2>
<p>In my childhood days we used to seek permissions to visit our neighbourhood for watching our favourite shows like mowgli, Sigma, Ramayana, Mahabharata etc, then one fine days my siblings and me got super excited when TV became the new member of our family. We were happy to change channels manually to tune into our favourite shows but now in my mid 30’s I can literally see people pulling to pocket TV avaialble right inside their handset and in 5–10 years TV will be replaced by compact and smart cutomisable tv. You can not only view your favourite shows but also record and watch later if you are short of time. Earlier we used to listen song using radio, TV, music player, CD player but now all this has been replaced completely by of our handset, now you carry 1000’s of curated music in your pocket and listen it at will . So mobile has not only entertained us but also helping us plan our time to do so. Mobile has given us freedom to be entertained and work simultaneously.</p>
<h2 id="paperless-and-quick-banking-solutions">Paperless And Quick Banking Solutions</h2>
<p>In this age of instant gratification standing in queue is no more preferred by youth for their banking related solution and issues. Banking apps have given the comfort of transacting and raising issues right from their mobile applications available at user mobile phone. Payment wallet is slowly replacing cash to a digital currency which can be exchanged for whatever thing you can imagine to buy or transact, human emotions are exception though but still mobile has started to control that too. All financial transactions are being done digitally saving paper and helping us go green.</p>
<blockquote>
You are not really digitally smart if you are not on smartphone.
</blockquote>
<h2 id="commerce-has-now-become-e-commerce">Commerce Has Now Become e-Commerce</h2>
<p>Trading has been existent right from our Neolithic and Paleolithic age. But in this digital age it has transformed entirely now the barter system has been replaced by Digital currency like bitcoin. Now you don’t have to travel miles away to transact, you see the product in your e-Commerce application make informed decision to buy out the product and pay the amount digutally. Bitcoin is slowly revolutionizing the financial and banking sector and is widely accepted in exchange of goods of your choice. Earlier commerce was done physically exchanging goods for goods, now we are buying and selling digitally called as e-Commerce. This journey from barter to e-Commerce has been largely possible because of mobile commerce.</p>
<p>Some other prominent impact this pocket size gadget is making</p>
<ul>
<li>Relationships are being made and broken over mobile apps. It’s a bit of concern which is going to become worse with time. Our future generations will be most vulnerable emotionally as they will be the least socially educated peoples. Their intellect will be superefficient but they will also be super stresses due to mobile addictions.</li>
<li>If not used wisely mobile can be more lethal than consuming drugs. so please use it with greater responsibility</li>
<li>There are too much personal information out there floating in the digital world which makes us more vulnerable generation as far as our personal safety and security is concerned. Our privacy is now becoming a thing of past</li>
</ul>
<p>With every advancement we human beings are making in this digital era we just need to be more responsible in handling and putting this gadget to use, after all we have invented this for our betterment and comfort. If we can use it judiciously we will make this world even more better place to live, on a flipside it can become the single most reason for human destruction too.</p>
<p>I will sign-off by giving you a food for thought :</p>
<blockquote>
It’s good to be digitally connected but we can’t ignore the value of being physically present for our loved ones. Emotion after all is beyond digital comprehension
</blockquote>yashumittalWe as a new age entrepreneur are blessed to be a part of this 21st century revolution which has been mostly ruled by Mobile device and mobile apps. We are easily the most well equipped and most comfortable generation as compared to our ancestors , fathers and forefathers. All credit goes to Mobile and mobility software solutions which has made possible for the people to connect in seconds, transacts at will without investing too much time and energy. They can now multitask and plan it right at their fingertips, billions of dollar are being transacted because of mobile app based fin-tech solutions. All the thanks to mobile app developer community and to the entire ecosystem of mobility.
https://cdn.codecarrot.net/images/1-OIP5qWiRRiMLXO75vxka-g.jpeg
Hello World App in Vue.js2017-10-03T18:34:00+00:002017-10-03T18:34:00+00:00https://blog.codecarrot.net/hello-world-app-in-vue-js<p><img src="https://i.imgur.com/FZZxhHj.png" alt="Vuejs website screenshot" /></p>
<p>Vue.js is a progressive framework for building user interfaces. This is lean, this is fast, and unlike frameworks like React and Angular, it’s straightforward to get started. Here we will build a simple Hello World app, and it will just take 2 minutes for the whole process:</p>
<p>First of all please Import this JavaScript file: <a href="https://unpkg.com/vue">unpkg.com/vue</a>
This fetches the latest version of Vue.js.</p>
<p>Then we will create a wrapper root div which will hold the app</p>
<div class="language-html highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="nt"><div</span> <span class="na">id=</span><span class="s">"app-root"</span><span class="nt">></span>
<span class="c"><!-- HTML inside. --></span>
<span class="nt"></div></span>
</code></pre></div></div>
<p>Then, we will create a new Vue Instance, this will be an object, and then we will pass the above HTML into the DOM through an el key and app-root as value</p>
<div class="language-js highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="k">new</span> <span class="nx">Vue</span><span class="p">({</span>
<span class="na">el</span><span class="p">:</span> <span class="dl">'</span><span class="s1">#app-root</span><span class="dl">'</span>
<span class="p">});</span>
</code></pre></div></div>
<h2 id="hello-world">Hello World!</h2>
<p>Now, let’s insert a data key, and its value will be object. This object will then contain a title key with a value Hello World or anything you would like.</p>
<div class="language-js highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="k">new</span> <span class="nx">Vue</span><span class="p">({</span>
<span class="na">el</span><span class="p">:</span> <span class="dl">'</span><span class="s1">#app-root</span><span class="dl">'</span><span class="p">,</span>
<span class="na">data</span><span class="p">:</span> <span class="p">{</span>
<span class="na">title</span><span class="p">:</span> <span class="dl">'</span><span class="s1">Hello World!</span><span class="dl">'</span>
<span class="p">}</span>
<span class="p">});</span>
</code></pre></div></div>
<p>Now, we will add a <code class="highlighter-rouge">p</code> tag, and inside it, we will wrap <code class="highlighter-rouge">title</code> with two curly braces. This is how Vue declaratively render’s the data. The Syntax {{}} is called <strong>String Interpolation</strong>.</p>
<div class="language-html highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="nt"><div</span> <span class="na">id=</span><span class="s">"app-root"</span><span class="nt">></span>
<span class="nt"><p></span> <span class="nt"></p></span>
<span class="nt"></div></span>
</code></pre></div></div>
<h2 id="form-input">Form Input</h2>
<p>Now we will pass an input tag with Vue <a href="https://vuejs.org/v2/guide/events.html">Event handler</a> <code class="highlighter-rouge">v-on</code> and pass <code class="highlighter-rouge">changeTitle</code> method inside it.</p>
<div class="language-html highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="nt"><div</span> <span class="na">id=</span><span class="s">"app-root"</span><span class="nt">></span>
<span class="nt"><input</span> <span class="na">type=</span><span class="s">"text"</span> <span class="na">v-on:input=</span><span class="s">"changeTitle"</span><span class="nt">></span>
<span class="nt"><p></span> <span class="nt"></p></span>
<span class="nt"></div></span>
</code></pre></div></div>
<p>Now, we will create a methods object, insert a <code class="highlighter-rouge">changeTitle</code> function, pass the default javascript event argument. Within this object, we will pass <code class="highlighter-rouge">this.title</code> and equate it to <code class="highlighter-rouge">event.target.value</code>.</p>
<div class="language-js highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="k">new</span> <span class="nx">Vue</span><span class="p">({</span>
<span class="na">el</span><span class="p">:</span> <span class="dl">'</span><span class="s1">#app-root</span><span class="dl">'</span><span class="p">,</span>
<span class="na">data</span><span class="p">:</span> <span class="p">{</span>
<span class="na">title</span><span class="p">:</span> <span class="dl">'</span><span class="s1">Hello World!</span><span class="dl">'</span>
<span class="p">},</span>
<span class="na">methods</span><span class="p">:</span> <span class="p">{</span>
<span class="nx">changeTitle</span><span class="p">(</span><span class="nx">event</span><span class="p">)</span> <span class="p">{</span>
<span class="k">this</span><span class="p">.</span><span class="nx">title</span> <span class="o">=</span> <span class="nx">event</span><span class="p">.</span><span class="nx">target</span><span class="p">.</span><span class="nx">value</span><span class="p">;</span>
<span class="p">}</span>
<span class="p">}</span>
<span class="p">});</span>
</code></pre></div></div>yashumittal
https://i.imgur.com/8KPSlKh.png
What is git?2017-10-03T18:25:00+00:002017-10-03T18:25:00+00:00https://blog.codecarrot.net/what-is-git<h2 id="what-is-git">What is Git?</h2>
<p><img src="https://cdn.codecarrot.net/images/what-is-git.svg" alt="What is Git?" /></p>
<p><strong>Performance / Security / Flexibility / Version control with Git</strong></p>
<p>By far, the most widely used modern version control system in the world today is Git. Git is a mature, actively maintained open source project originally developed in 2005 by Linus Torvalds, the famous creator of the Linux operating system kernel. A staggering number of software projects rely on Git for version control, including commercial projects as well as open source. Developers who have worked with Git are well represented in the pool of available software development talent and it works well on a wide range of operating systems and IDEs (Integrated Development Environments).</p>
<p>Having a distributed architecture, Git is an example of a DVCS (hence Distributed Version Control System). Rather than have only one single place for the full version history of the software as is common in once-popular version control systems like CVS or Subversion (also known as SVN), in Git, every developer’s working copy of the code is also a repository that can contain the full history of all changes.</p>
<p>In addition to being distributed, Git has been designed with performance, security and flexibility in mind.</p>
<h2 id="performance">Performance</h2>
<p>The raw performance characteristics of Git are very strong when compared to many alternatives. Committing new changes, branching, merging and comparing past versions are all optimized for performance. The algorithms implemented inside Git take advantage of deep knowledge about common attributes of real source code file trees, how they are usually modified over time and what the access patterns are.</p>
<p>Unlike some version control software, Git is not fooled by the names of the files when determining what the storage and version history of the file tree should be, instead, Git focuses on the file content itself. After all, source code files are frequently renamed, split, and rearranged. The object format of Git’s repository files uses a combination of delta encoding (storing content differences), compression and explicitly stores directory contents and version metadata objects.</p>
<p>Being distributed enables significant performance benefits as well.</p>
<p>For example, say a developer, Alice, makes changes to source code, adding a feature for the upcoming 2.0 release, then commits those changes with descriptive messages. She then works on a second feature and commits those changes too. Naturally these are stored as separate pieces of work in the version history. Alice then switches to the version 1.3 branch of the same software to fix a bug that affects only that older version. The purpose of this is to enable Alice’s team to ship a bug fix release, version 1.3.1, before version 2.0 is ready. Alice can then return to the 2.0 branch to continue working on new features for 2.0 and all of this can occur without any network access and is therefore fast and reliable. She could even do it on an airplane. When she is ready to send all of the individually committed changes to the remote repository, Alice can “push” them in one command.</p>
<h2 id="security">Security</h2>
<p>Git has been designed with the integrity of managed source code as a top priority. The content of the files as well as the true relationships between files and directories, versions, tags and commits, all of these objects in the Git repository are secured with a cryptographically secure hashing algorithm called SHA1. This protects the code and the change history against both accidental and malicious change and ensures that the history is fully traceable.</p>
<p>With Git, you can be sure you have an authentic content history of your source code.</p>
<p>Some other version control systems have no protections against secret alteration at a later date. This can be a serious information security vulnerability for any organization that relies on software development.</p>
<h2 id="flexibility">Flexibility</h2>
<p>One of Git’s key design objectives is flexibility. Git is flexible in several respects: in support for various kinds of nonlinear development workflows, in its efficiency in both small and large projects and in its compatibility with many existing systems and protocols.</p>
<p>Git has been designed to support branching and tagging as first-class citizens (unlike SVN) and operations that affect branches and tags (such as merging or reverting) are also stored as part of the change history. Not all version control systems feature this level of tracking.</p>
<h2 id="version-control-with-git">Version control with Git</h2>
<p>Git is the best choice for most software teams today. While every team is different and should do their own analysis, here are the main reasons why version control with Git is preferred over alternatives:</p>
<h3 id="git-is-good">Git is good</h3>
<p>Git has the functionality, performance, security and flexibility that most teams and individual developers need. These attributes of Git are detailed above. In side-by-side comparisons with most other alternatives, many teams find that Git is very favorable.</p>
<h3 id="git-is-a-de-facto-standard">Git is a de facto standard</h3>
<p>Git is the most broadly adopted tool of its kind. This is makes Git attractive for the following reasons. At Atlassian, nearly all of our project source code is managed in Git.</p>
<p>Vast numbers of developers already have Git experience and a significant proportion of college graduates may have experience with only Git. While some organizations may need to climb the learning curve when migrating to Git from another version control system, many of their existing and future developers do not need to be trained on Git.</p>
<p>In addition to the benefits of a large talent pool, the predominance of Git also means that many third party software tools and services are already integrated with Git including IDEs, and our own tools like DVCS desktop client Sourcetree, issue and project tracking software, Jira, and code hosting service, Bitbucket, <a href="//github.com/mittalyashu/">Github</a>.</p>
<p>If you are an inexperienced developer wanting to build up valuable skills in software development tools, when it comes to version control, Git should be on your list.</p>
<h3 id="git-is-a-quality-open-source-project">Git is a quality open source project</h3>
<p>Git is a very well supported open source project with over a decade of solid stewardship. The project maintainers have shown balanced judgment and a mature approach to meeting the long term needs of its users with regular releases that improve usability and functionality. The quality of the open source software is easily scrutinized and countless businesses rely heavily on that quality.</p>
<p>Git enjoys great community support and a vast user base. Documentation is excellent and plentiful, including books, tutorials and dedicated web sites. There are also podcasts and video tutorials.</p>
<p>Being open source lowers the cost for hobbyist developers as they can use Git without paying a fee. For use in open-source projects, Git is undoubtedly the successor to the previous generations of successful open source version control systems, SVN and CVS.</p>
<h3 id="criticism-of-git">Criticism of Git</h3>
<p>One common criticism of Git is that it can be difficult to learn. Some of the terminology in Git will be novel to newcomers and for users of other systems, the Git terminology may be different, for example, revert in Git has a different meaning than in SVN or CVS. Nevertheless, Git is very capable and provides a lot of power to its users. Learning to use that power can take some time, however once it has been learned, that power can be used by the team to increase their development speed.</p>
<p>For those teams coming from a non-distributed VCS, having a central repository may seem like a good thing that they don’t want to lose. However, while Git has been designed as a distributed version control system (DVCS), with Git, you can still have an official, canonical repository where all changes to the software must be stored. With Git, because each developer’s repository is complete, their work doesn’t need to be constrained by the availability and performance of the “central” server. During outages or while offline, developers can still consult the full project history. Because Git is flexible as well as being distributed, you can work the way you are accustomed to but gain the additional benefits of Git, some of which you may not even realise you’re missing.</p>
<p>Now that you understand what version control is, what Git is and why software teams should use it, read on to discover the benefits Git can provide across the whole organization.</p>
<p>Learn <a href="//devdoks.github.io/">git command</a>.</p>yashumittalWhat is Git?
https://cdn.codecarrot.net/images/6-30-12_Git.jpg
Creating Images in Go2017-10-02T20:32:00+00:002017-10-02T20:32:00+00:00https://blog.codecarrot.net/creating-images-in-go<p>This post is continuation of <a href="/vector-operations-in-go">Vector Operations in Go</a>.</p>
<h2 id="foreword">Foreword</h2>
<p>Before moving forward with implementing a camera model, it would be good to have some sort of debugging tool. When writing a ray tracer, that tool is a rendered image.</p>
<p>Go has a built-in <a href="//golang.org/pkg/image/">image</a> package, that allows to easily create images, and save them as files on the disk.</p>
<h2 id="design">Design</h2>
<p>The scene will be represented by a struct. Internally it will store the width and height of the desired image, as well as a pointer to an instance of <code class="highlighter-rouge">image.RGBA</code>.</p>
<div class="language-go highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="k">type</span> <span class="n">Scene</span> <span class="k">struct</span> <span class="p">{</span>
<span class="n">Width</span><span class="p">,</span> <span class="n">Height</span> <span class="kt">int</span>
<span class="n">Img</span> <span class="o">*</span><span class="n">image</span><span class="o">.</span><span class="n">RGBA</span>
<span class="p">}</span>
</code></pre></div></div>
<h2 id="initialization">Initialization</h2>
<p>In order to initialize the scene, we need to initialize the <code class="highlighter-rouge">image.RGBA</code> with the given dimensions. In Go this is done by creating an <code class="highlighter-rouge">image.Rect</code> struct and passing it to the <code class="highlighter-rouge">image.NewRGBA</code> function.</p>
<p>The whole code required to initialize the scene will be done in the NewScene function. The function should accept two integers as arguments, that represent the width and height of the image:</p>
<div class="language-go highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="k">func</span> <span class="n">TestNewSceneReturnsANewScene</span><span class="p">(</span><span class="n">t</span> <span class="o">*</span><span class="n">testing</span><span class="o">.</span><span class="n">T</span><span class="p">)</span> <span class="p">{</span>
<span class="n">scene</span> <span class="o">:=</span> <span class="n">NewScene</span><span class="p">(</span><span class="m">4</span><span class="p">,</span> <span class="m">4</span><span class="p">)</span>
<span class="n">rect</span> <span class="o">:=</span> <span class="n">image</span><span class="o">.</span><span class="n">Rect</span><span class="p">(</span><span class="m">0</span><span class="p">,</span> <span class="m">0</span><span class="p">,</span> <span class="m">4</span><span class="p">,</span> <span class="m">4</span><span class="p">)</span>
<span class="n">assert</span><span class="o">.</span><span class="n">Equal</span><span class="p">(</span><span class="n">t</span><span class="p">,</span> <span class="m">4</span><span class="p">,</span> <span class="n">scene</span><span class="o">.</span><span class="n">Width</span><span class="p">,</span> <span class="s">"sets width of the scene"</span><span class="p">)</span>
<span class="n">assert</span><span class="o">.</span><span class="n">Equal</span><span class="p">(</span><span class="n">t</span><span class="p">,</span> <span class="m">4</span><span class="p">,</span> <span class="n">scene</span><span class="o">.</span><span class="n">Height</span><span class="p">,</span> <span class="s">"sets height of the scene"</span><span class="p">)</span>
<span class="n">assert</span><span class="o">.</span><span class="n">True</span><span class="p">(</span><span class="n">t</span><span class="p">,</span> <span class="n">assert</span><span class="o">.</span><span class="n">ObjectsAreEqualValues</span><span class="p">(</span><span class="n">rect</span><span class="p">,</span> <span class="n">scene</span><span class="o">.</span><span class="n">Img</span><span class="o">.</span><span class="n">Bounds</span><span class="p">()),</span>
<span class="s">"creates an image.RGBA with proper bounds"</span><span class="p">)</span>
<span class="p">}</span>
<span class="k">func</span> <span class="n">NewScene</span><span class="p">(</span><span class="n">width</span> <span class="kt">int</span><span class="p">,</span> <span class="n">height</span> <span class="kt">int</span><span class="p">)</span> <span class="o">*</span><span class="n">Scene</span> <span class="p">{</span>
<span class="k">return</span> <span class="o">&</span><span class="n">Scene</span><span class="p">{</span>
<span class="n">Width</span><span class="o">:</span> <span class="n">width</span><span class="p">,</span>
<span class="n">Height</span><span class="o">:</span> <span class="n">height</span><span class="p">,</span>
<span class="n">Img</span><span class="o">:</span> <span class="n">image</span><span class="o">.</span><span class="n">NewRGBA</span><span class="p">(</span><span class="n">image</span><span class="o">.</span><span class="n">Rect</span><span class="p">(</span><span class="m">0</span><span class="p">,</span> <span class="m">0</span><span class="p">,</span> <span class="n">width</span><span class="p">,</span> <span class="n">height</span><span class="p">)),</span>
<span class="p">}</span>
<span class="p">}</span>
</code></pre></div></div>
<p>The assert library exposes some nifty helper functions, like <a href="//godoc.org/github.com/stretchr/testify/assert#ObjectsAreEqualValues">ObjectsAreEqualValues</a> which does a deep equality check of an object’s values.</p>
<h2 id="test-helpers">Test helpers</h2>
<p>In order to test the following functions, I needed to write two helper functions to generate a new <code class="highlighter-rouge">image.RGBA</code> and fill the image with a random color:</p>
<div class="language-go highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="k">func</span> <span class="n">generateImage</span><span class="p">(</span><span class="n">w</span><span class="p">,</span> <span class="n">h</span> <span class="kt">int</span><span class="p">,</span> <span class="n">pixelColor</span> <span class="n">color</span><span class="o">.</span><span class="n">RGBA</span><span class="p">)</span> <span class="o">*</span><span class="n">image</span><span class="o">.</span><span class="n">RGBA</span> <span class="p">{</span>
<span class="n">img</span> <span class="o">:=</span> <span class="n">image</span><span class="o">.</span><span class="n">NewRGBA</span><span class="p">(</span><span class="n">image</span><span class="o">.</span><span class="n">Rect</span><span class="p">(</span><span class="m">0</span><span class="p">,</span> <span class="m">0</span><span class="p">,</span> <span class="m">4</span><span class="p">,</span> <span class="m">4</span><span class="p">))</span>
<span class="k">for</span> <span class="n">x</span> <span class="o">:=</span> <span class="m">0</span><span class="p">;</span> <span class="n">x</span> <span class="o"><</span> <span class="m">4</span><span class="p">;</span> <span class="n">x</span><span class="o">++</span> <span class="p">{</span>
<span class="k">for</span> <span class="n">y</span> <span class="o">:=</span> <span class="m">0</span><span class="p">;</span> <span class="n">y</span> <span class="o"><</span> <span class="m">4</span><span class="p">;</span> <span class="n">y</span><span class="o">++</span> <span class="p">{</span>
<span class="n">img</span><span class="o">.</span><span class="n">Set</span><span class="p">(</span><span class="n">x</span><span class="p">,</span> <span class="n">y</span><span class="p">,</span> <span class="n">pixelColor</span><span class="p">)</span>
<span class="p">}</span>
<span class="p">}</span>
<span class="k">return</span> <span class="n">img</span>
<span class="p">}</span>
<span class="k">func</span> <span class="n">randomColor</span><span class="p">()</span> <span class="n">color</span><span class="o">.</span><span class="n">RGBA</span> <span class="p">{</span>
<span class="n">rand</span> <span class="o">:=</span> <span class="n">rand</span><span class="o">.</span><span class="n">New</span><span class="p">(</span><span class="n">rand</span><span class="o">.</span><span class="n">NewSource</span><span class="p">(</span><span class="n">time</span><span class="o">.</span><span class="n">Now</span><span class="p">()</span><span class="o">.</span><span class="n">Unix</span><span class="p">()))</span>
<span class="k">return</span> <span class="n">color</span><span class="o">.</span><span class="n">RGBA</span><span class="p">{</span><span class="kt">uint8</span><span class="p">(</span><span class="n">rand</span><span class="o">.</span><span class="n">Intn</span><span class="p">(</span><span class="m">255</span><span class="p">)),</span> <span class="kt">uint8</span><span class="p">(</span><span class="n">rand</span><span class="o">.</span><span class="n">Intn</span><span class="p">(</span><span class="m">255</span><span class="p">)),</span> <span class="kt">uint8</span><span class="p">(</span><span class="n">rand</span><span class="o">.</span><span class="n">Intn</span><span class="p">(</span><span class="m">255</span><span class="p">)),</span> <span class="m">255</span><span class="p">}</span>
<span class="p">}</span>
</code></pre></div></div>
<p>I use these helpers to generate expected <code class="highlighter-rouge">image.RGBA</code> objects for <code class="highlighter-rouge">ObjectsAreEqualValues</code>.</p>
<h2 id="traversing-the-image">Traversing the image</h2>
<p>For each pixel of the image, I want to set a specific color. This can be done simply enough by a double for loop, but we can expose a convenience function on <code class="highlighter-rouge">Scene</code>, called <code class="highlighter-rouge">EachPixel</code>. Go allows us to specify functions as arguments for other functions. We will leverage this fact by requiring a single argument in <code class="highlighter-rouge">EachPixel</code> — a function with the following signature <code class="highlighter-rouge">func(int, int) color.RGBA</code>. The two <code class="highlighter-rouge">int</code> values are the x and y coordinates of the image (which will be used later on for calculating a pixel in the image plane). The full implementation of the <code class="highlighter-rouge">EachPixel</code> function looks like this:</p>
<div class="language-go highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="k">func</span> <span class="p">(</span><span class="n">s</span> <span class="o">*</span><span class="n">Scene</span><span class="p">)</span> <span class="n">EachPixel</span><span class="p">(</span><span class="n">colorFunction</span> <span class="k">func</span><span class="p">(</span><span class="kt">int</span><span class="p">,</span> <span class="kt">int</span><span class="p">)</span> <span class="n">color</span><span class="o">.</span><span class="n">RGBA</span><span class="p">)</span> <span class="p">{</span>
<span class="k">for</span> <span class="n">x</span> <span class="o">:=</span> <span class="m">0</span><span class="p">;</span> <span class="n">x</span> <span class="o"><</span> <span class="n">s</span><span class="o">.</span><span class="n">Width</span><span class="p">;</span> <span class="n">x</span><span class="o">++</span> <span class="p">{</span>
<span class="k">for</span> <span class="n">y</span> <span class="o">:=</span> <span class="m">0</span><span class="p">;</span> <span class="n">y</span> <span class="o"><</span> <span class="n">s</span><span class="o">.</span><span class="n">Height</span><span class="p">;</span> <span class="n">y</span><span class="o">++</span> <span class="p">{</span>
<span class="n">s</span><span class="o">.</span><span class="n">setPixel</span><span class="p">(</span><span class="n">x</span><span class="p">,</span> <span class="n">y</span><span class="p">,</span> <span class="n">colorFunction</span><span class="p">(</span><span class="n">x</span><span class="p">,</span> <span class="n">y</span><span class="p">))</span>
<span class="p">}</span>
<span class="p">}</span>
<span class="p">}</span>
<span class="k">func</span> <span class="n">TestSceneEachPixelSetsEachPixelToTheProvidedFunctionReturn</span><span class="p">(</span><span class="n">t</span> <span class="o">*</span><span class="n">testing</span><span class="o">.</span><span class="n">T</span><span class="p">)</span> <span class="p">{</span>
<span class="n">scene</span> <span class="o">:=</span> <span class="n">NewScene</span><span class="p">(</span><span class="m">4</span><span class="p">,</span> <span class="m">4</span><span class="p">)</span>
<span class="n">c</span> <span class="o">:=</span> <span class="n">randomColor</span><span class="p">()</span>
<span class="n">scene</span><span class="o">.</span><span class="n">EachPixel</span><span class="p">(</span><span class="k">func</span><span class="p">(</span><span class="n">x</span><span class="p">,</span> <span class="n">y</span> <span class="kt">int</span><span class="p">)</span> <span class="n">color</span><span class="o">.</span><span class="n">RGBA</span> <span class="p">{</span> <span class="k">return</span> <span class="n">c</span> <span class="p">})</span>
<span class="n">img</span> <span class="o">:=</span> <span class="n">generateImage</span><span class="p">(</span><span class="m">4</span><span class="p">,</span> <span class="m">4</span><span class="p">,</span> <span class="n">c</span><span class="p">)</span>
<span class="n">assert</span><span class="o">.</span><span class="n">True</span><span class="p">(</span><span class="n">t</span><span class="p">,</span> <span class="n">assert</span><span class="o">.</span><span class="n">ObjectsAreEqualValues</span><span class="p">(</span><span class="n">img</span><span class="p">,</span> <span class="n">scene</span><span class="o">.</span><span class="n">Img</span><span class="p">),</span>
<span class="s">"sets every pixel of the image to the provided values"</span><span class="p">)</span>
<span class="p">}</span>
</code></pre></div></div>
<p>The <code class="highlighter-rouge">setPixel</code> function is just an adapter for Go’s built-in <code class="highlighter-rouge">image.RGBA.Set</code>.</p>
<h2 id="saving-the-image">Saving the image</h2>
<p>Finally I want to save the image to a PNG file. As one might suspect, Go provides such a function in the <code class="highlighter-rouge">image/png</code> package, called <code class="highlighter-rouge">png.Encode</code>. Again, I’ve built an adapter for this function, that takes a filename, under which it should save the image.</p>
<div class="language-go highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="k">func</span> <span class="p">(</span><span class="n">s</span> <span class="o">*</span><span class="n">Scene</span><span class="p">)</span> <span class="n">Save</span><span class="p">(</span><span class="n">filename</span> <span class="kt">string</span><span class="p">)</span> <span class="p">{</span>
<span class="n">f</span><span class="p">,</span> <span class="n">err</span> <span class="o">:=</span> <span class="n">os</span><span class="o">.</span><span class="n">Create</span><span class="p">(</span><span class="n">filename</span><span class="p">)</span>
<span class="k">if</span> <span class="n">err</span> <span class="o">!=</span> <span class="no">nil</span> <span class="p">{</span>
<span class="nb">panic</span><span class="p">(</span><span class="n">err</span><span class="p">)</span>
<span class="p">}</span>
<span class="k">defer</span> <span class="n">f</span><span class="o">.</span><span class="n">Close</span><span class="p">()</span>
<span class="n">png</span><span class="o">.</span><span class="n">Encode</span><span class="p">(</span><span class="n">f</span><span class="p">,</span> <span class="n">s</span><span class="o">.</span><span class="n">Img</span><span class="p">)</span>
<span class="p">}</span>
<span class="k">func</span> <span class="n">TestSceneSavePanicsWhenFileCannotBePersisted</span><span class="p">(</span><span class="n">t</span> <span class="o">*</span><span class="n">testing</span><span class="o">.</span><span class="n">T</span><span class="p">)</span> <span class="p">{</span>
<span class="n">scene</span> <span class="o">:=</span> <span class="n">NewScene</span><span class="p">(</span><span class="m">4</span><span class="p">,</span> <span class="m">4</span><span class="p">)</span>
<span class="n">c</span> <span class="o">:=</span> <span class="n">randomColor</span><span class="p">()</span>
<span class="n">scene</span><span class="o">.</span><span class="n">EachPixel</span><span class="p">(</span><span class="k">func</span><span class="p">(</span><span class="n">x</span><span class="p">,</span> <span class="n">y</span> <span class="kt">int</span><span class="p">)</span> <span class="n">color</span><span class="o">.</span><span class="n">RGBA</span> <span class="p">{</span> <span class="k">return</span> <span class="n">c</span> <span class="p">})</span>
<span class="n">assert</span><span class="o">.</span><span class="n">Panics</span><span class="p">(</span><span class="n">t</span><span class="p">,</span> <span class="k">func</span><span class="p">()</span> <span class="p">{</span>
<span class="n">scene</span><span class="o">.</span><span class="n">Save</span><span class="p">(</span><span class="s">"/etc/temp.png"</span><span class="p">)</span>
<span class="p">},</span> <span class="s">"panics when the file cannot be persisted"</span><span class="p">)</span>
<span class="p">}</span>
</code></pre></div></div>
<p>Several interesting things happen in this code:</p>
<ul>
<li><code class="highlighter-rouge">os.Create(filename)</code> — the function has multiple returns; this is a common pattern for [error handling in Go](//blog.golang.org/error-handling-and-go:
<ul>
<li>f — the file descriptor</li>
<li>err — any error that may have happened during the file creation, for example insufficient privileges</li>
</ul>
</li>
<li><code class="highlighter-rouge">defer f.Close()</code> — the <a href="//tour.golang.org/flowcontrol/12">defer keyword</a> delays execution of the passed code until the surrounding function returns; in this case, the file won’t close until the Save function finishes executing it’s commands</li>
<li><code class="highlighter-rouge">assert.Panics</code> — another nice feature of the assert library, instead of taking expected/actual values of the assertion, it takes a function that is supposed to panic (raise an exception), if the function does panic it passes the test; this is similar to RSpec’s <code class="highlighter-rouge">expect { subject }.to raise_error StandardError</code>.</li>
</ul>
<h2 id="putting-it-all-together">Putting it all together</h2>
<p>Here’s a simple main function that fills the image with values based on the current pixel:</p>
<div class="language-go highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="k">package</span> <span class="n">main</span>
<span class="k">import</span> <span class="p">(</span>
<span class="s">"fmt"</span>
<span class="s">"image/color"</span>
<span class="s">"time"</span>
<span class="s">"github.com/szeliga/goray/engine"</span>
<span class="p">)</span>
<span class="k">func</span> <span class="n">main</span><span class="p">()</span> <span class="p">{</span>
<span class="k">var</span> <span class="n">width</span> <span class="o">=</span> <span class="m">200</span>
<span class="k">var</span> <span class="n">height</span> <span class="o">=</span> <span class="m">200</span>
<span class="n">scene</span> <span class="o">:=</span> <span class="n">engine</span><span class="o">.</span><span class="n">NewScene</span><span class="p">(</span><span class="n">width</span><span class="p">,</span> <span class="n">height</span><span class="p">)</span>
<span class="n">scene</span><span class="o">.</span><span class="n">EachPixel</span><span class="p">(</span><span class="k">func</span><span class="p">(</span><span class="n">x</span><span class="p">,</span> <span class="n">y</span> <span class="kt">int</span><span class="p">)</span> <span class="n">color</span><span class="o">.</span><span class="n">RGBA</span> <span class="p">{</span>
<span class="k">return</span> <span class="n">color</span><span class="o">.</span><span class="n">RGBA</span><span class="p">{</span>
<span class="kt">uint8</span><span class="p">(</span><span class="n">x</span> <span class="o">*</span> <span class="m">255</span> <span class="o">/</span> <span class="n">width</span><span class="p">),</span>
<span class="kt">uint8</span><span class="p">(</span><span class="n">y</span> <span class="o">*</span> <span class="m">255</span> <span class="o">/</span> <span class="n">height</span><span class="p">),</span>
<span class="m">100</span><span class="p">,</span>
<span class="m">255</span><span class="p">,</span>
<span class="p">}</span>
<span class="p">})</span>
<span class="n">scene</span><span class="o">.</span><span class="n">Save</span><span class="p">(</span><span class="n">fmt</span><span class="o">.</span><span class="n">Sprintf</span><span class="p">(</span><span class="s">"./renders/%d.png"</span><span class="p">,</span> <span class="n">time</span><span class="o">.</span><span class="n">Now</span><span class="p">()</span><span class="o">.</span><span class="n">Unix</span><span class="p">()))</span>
<span class="p">}</span>
</code></pre></div></div>
<h2 id="this-code-produces-the-following-image">This code produces the following image:</h2>
<p><img src="https://cdn.codecarrot.net/images/167567322689978.png" alt="Image produced by the code execuated by go" /></p>
<p>That’s all regarding creating and saving images in Go. Next up, a basic camera model, stay tuned.</p>yashumittalThis post is continuation of Vector Operations in Go.
https://cdn.codecarrot.net/images/create-image-in-golang.png
Why should you learn Go?2017-10-02T04:32:00+00:002017-10-02T04:32:00+00:00https://blog.codecarrot.net/why-should-you-learn-go<blockquote>
“Go will be the server language of the future.” — Tobias Lütke, Shopify
</blockquote>
<p>In past couple of years, there is a rise of new programming language: <strong><a href="//golang.org/">Go or GoLang</a></strong>. Nothing makes a developer crazy than a new programming language, right? So, I started learning Go before 4 to 5 months and here I am going to tell you about why you should also learn this new language.</p>
<p>I am not going to teach you, how you can write “Hello World!!” in this article. There are lots of other articles online for that. <strong>I am going the explain current stage of computer hardware-software and why we need new language like Go?</strong> Because if there isn’t any problem, then we don’t need solution, right?</p>
<div data-type="vimeo" data-video-id="69237265"></div>
<h2 id="hardware-limitations">Hardware limitations</h2>
<p><a href="//www.investopedia.com/terms/m/mooreslaw.asp">Moore’s law</a> is failing.</p>
<p>First Pentium 4 processor with 3.0GHz clock speed was introduced back in 2004 by Intel. Today, my Mackbook Pro 2016 has clock speed of 2.9GHz. So, nearly in one decade, there is no too much gain in the raw processing power. You can see the comparison of increasing the processing power with the time in below chart.</p>
<p><img src="https://cdn.codecarrot.net/images/1-Azz7YwzYYR6lDKFj8iIGZg.png" alt="comparison of increasing the processing power" /></p>
<p>From the above chart you can see that the single-thread performance and the frequency of the processor remained steady for almost a decade. If you are thinking that adding more transistor is the solution, then you are wrong. This is because at smaller scale some quantum properties starts to emerge (like tunneling) and because it actually costs more to put more transistors (why?) and the number of transistors you can add per dollar starts to fall.</p>
<p>So, for the solution of above problem,</p>
<ul>
<li>Manufacturers started adding more and more cores to the processor. Nowadays we have quad-core and octa-core CPUs available.</li>
<li>We also introduced hyper-threading.</li>
<li>Added more cache to the processor to increase the performance.</li>
</ul>
<p>But above solutions have its own limitations too. We cannot add more and more cache to the processor to increase performance as cache have physical limits: the bigger the cache, the slower it gets. Adding more core to the processor has its cost too. Also, that cannot scale to indefinitely. These multi-core processors can run multiple threads simultaneously and that brings concurrency to the picture. We’ll discuss it later.</p>
<p>So, if we cannot rely on the hardware improvements, the only way to go is more efficient software to increase the performance. But sadly, modern programming language are not much efficient.</p>
<blockquote>
“Modern processors are a like nitro fueled funny cars, they excel at the quarter mile. Unfortunately modern programming languages are like Monte Carlo, they are full of twists and turns.” — David Ungar
</blockquote>
<h2 id="go-has-goroutines-">Go has goroutines !!</h2>
<p>As we discussed above, hardware manufacturers are adding more and more cores to the processors to increase the performance. All the data centers are running on those processors and we should expect increase in the number of cores in upcoming years. More to that, today’s applications using multiple micro-services for maintaining database connections, message queues and maintain caches. So, the software we develop and the programming languages should support concurrency easily and they should be scalable with increased number of cores.</p>
<p>But, most of the modern programming languages(like Java, Python etc.) are from the ’90s single threaded environment. Most of those programming languages supports multi-threading. But the real problem comes with concurrent execution, threading-locking, race conditions and deadlocks. Those things make it hard to create a multi-threading application on those languages.
For an example, creating new thread in Java is not memory efficient. As every thread consumes approx 1MB of the memory heap size and eventually if you start spinning thousands of threads, they will put tremendous pressure on the heap and will cause shut down due to out of memory. Also, if you want to communicate between two or more threads, it’s very difficult.</p>
<p>On the other hand, Go was released in 2009 when multi-core processors were already available. That’s why Go is built with keeping concurrency in mind. Go has goroutines instead of threads. They consume almost 2KB memory from the heap. So, you can spin millions of goroutines at any time.</p>
<p><img src="https://cdn.codecarrot.net/images/1-NFojvbkdRkxz0ZDbu4ysNA.jpeg" alt="How Goroutines work?" /></p>
<p><strong>Other benefits are:</strong></p>
<ul>
<li>Goroutines have growable segmented stacks. That means they will use more memory only when needed.</li>
<li>Goroutines have a faster startup time than threads.</li>
<li>Goroutines come with built-in primitives to communicate safely between themselves (channels).</li>
<li>Goroutines allow you to avoid having to resort to mutex locking when sharing data structures.</li>
<li>Also, goroutines and OS threads do not have 1:1 mapping. A single goroutine can run on multiple threads. Goroutines are multiplexed into small number of OS threads.</li>
</ul>
<blockquote>
You can see Rob Pike’s excellent talk concurrency is not parallelism to get more deep understanding on this.
</blockquote>
<ul>
<li><a href="//blog.golang.org/concurrency-is-not-parallelism">Concurrency is not parallelism</a></li>
</ul>
<p>All the above points, make Go very powerful to handle concurrency like Java, C and C++ while keeping concurrency execution code strait and beautiful like Earlang.</p>
<p><img src="https://cdn.codecarrot.net/images/1-xbsHBQJReC5l_VO4XgNSIQ.png" alt="Go takes good of both the worlds. Easy to write concurrent and efficient to manage concurrency" /></p>
<h2 id="go-runs-directly-on-underlying-hardware">Go runs directly on underlying hardware.</h2>
<p>One most considerable benefit of using C, C++ over other modern higher level languages like Java/Python is their performance. Because C/C++ are compiled and not interpreted.</p>
<p>Processors understand binaries. Generally, when you build an application using Java or other JVM-based languages when you compile your project, it compiles the human readable code to byte-code which can be understood by JVM or other virtual machines that run on top of underlying OS. While execution, VM interprets those bytecodes and convert them to the binaries that processors can understand.</p>
<p><img src="https://cdn.codecarrot.net/images/1-TVR-VLVg68KwCOLjqQmQAw.png" alt="Execution steps for VM based languages" /></p>
<p>While on the other side, C/C++ does not execute on VMs and that removes one step from the execution cycle and increases the performance. It directly compiles the human readable code to binaries.</p>
<p><img src="https://cdn.codecarrot.net/images/1-ii6xUkU_PchybiG8_GnOjA.png" alt="Human readable code process shown" /></p>
<p>But, freeing and allocating variable in those languages is a huge pain. While most of the programming languages handle object allocation and removing using Garbage Collector or Reference Counting algorithms.</p>
<p>Go brings best of both the worlds. Like lower level languages like C/C++, Go is compiled language. That means performance is almost nearer to lower level languages. It also uses garbage collection to allocation and removal of the object. So, more malloc() and free() statements!!! Cool!!!</p>
<h2 id="code-written-in-go-is-easy-to-maintain">Code written in Go is easy to maintain.</h2>
<p>Let me tell you one thing. Go does not have crazy programming syntax like other languages have. It has very neat and clean syntax.</p>
<p>The designers of the Go at google had this thing in mind when they were creating the language. As google has the very large code-base and thousands of developers were working on that same code-base, code should be simple to understand for other developers and one segment of code should has minimum side effect on another segment of the code. That will make code easily maintainable and easy to modify.</p>
<p>Go intentionally leaves out many features of many features of modern OOP languages.</p>
<ul>
<li><strong>No classes.</strong> Every thing is divided into packages only. Go has only structs instead of classes.</li>
<li><strong>Does not support inheritance.</strong> That will make code easy to modify. In other languages like Java/Python, if the class ABC inherits class XYZ and you make some changes in class XYZ, then that may produce some side effects in other classes that inherit XYZ. By removing inheritance, Go makes it easy to understand the code also (as there is no super class to look at while looking at a piece of code).</li>
<li>No have constructors.</li>
<li>No annotations.</li>
<li>No generics.</li>
<li>No exceptions.</li>
</ul>
<p>Above changes make Go very different from other languages and it makes programming in Go different from other. You may not like some points from above. But, it is not like you can not code your application without above features. All you have to do is write 2–3 more lines. But on the positive side, it will make your code cleaner and add more clarity to your code.</p>
<p><img src="https://cdn.codecarrot.net/images/1-nlpYI256BR71xMBWd1nlfg.png" alt="Code readability vs, Efficiency." /></p>
<p>Above graph displays that Go is almost as efficient as C/C++, while keeping the code syntax simple as Ruby, Python and other languages. That is a win-win situation for both humans and processors!!!</p>
<p>Unlike other new languages like Swift, it’s syntax of Go is very stable. It remained same since the initial public release 1.0, back in year 2012. That makes it backward compatible.</p>
<h2 id="go-is-backed-by-google">Go is backed by Google.</h2>
<ul>
<li>I know this is not a direct technical advantage. But, Go is designed and supported by Google. Google has one of the largest cloud infrastructures in the world and it is scaled massively. Go is designed by Google to solve their problems of supporting scalability and effectiveness. Those are the same issues you will face while creating your own servers.
More to that Go is also used by some big companies like Adobe, BBC, IBM, Intel (Source: <a href="//github.com/golang/go/wiki/GoUsers">//github.com/golang/go/wiki/GoUsers</a>)</li>
</ul>
<h2 id="conclusion">Conclusion</h2>
<p>Even though Go is very different from other object-oriented languages, it is still the same beast. Go provides you high performance like C/C++, super efficient concurrency handling like Java and fun to code like Python/Perl.</p>
<p>If you don’t have any plans to learn Go, I will still say hardware limit puts pressure to us, software developers to write super efficient code. Developer needs to understand the hardware and make their program optimize accordingly. The optimized software can run on cheaper and slower hardware (like IOT devices) and overall batter impact on end user experience.</p>yashumittal“Go will be the server language of the future.” — Tobias Lütke, Shopify
https://cdn.codecarrot.net/images/DSC03466.jpg
Vector Operations in Go2017-10-01T23:32:00+00:002017-10-01T23:32:00+00:00https://blog.codecarrot.net/vector-operations-in-go<h2 id="foreword">Foreword</h2>
<p>I was always thrilled about learning new stuff, and recently that new stuff happened to be Go.</p>
<p>Why Go? I was hesitating between Rust, Elixir and Go. After some googling I found out that Go is the fastest of the three and the most mature one.</p>
<p>I’ve always enjoyed implementing raytracing algorithms, it is the most rewarding kind of programming, when after hours of brain-twisting programming you can see the result in a form of a beautiful, rendered image.</p>
<p>I’ve also found that implementing raytracers is the fastest way to learn a new language, because it touches on all the basic concepts:</p>
<ul>
<li>collections</li>
<li>file I/O</li>
<li>concurrency</li>
<li>packaging and architecture</li>
<li>branching, looping, recursion</li>
</ul>
<p>The project will be written using TDD where it is possible. For testing I will be using the following packages:</p>
<ul>
<li><code class="highlighter-rouge">testing</code> - the Go test package</li>
<li><code class="highlighter-rouge">testify</code> - from stretchr, mainly the <code class="highlighter-rouge">assert</code> package</li>
</ul>
<p>Vectors are the core mathematical tool hiding inside the ray tracing algorithm. They allow us to describe relations in 3 dimensional space.</p>
<p>In this blog post I will describe all of the needed vector operations that will be used in GoRay.</p>
<h2 id="vector-representation-in-go">Vector representation in Go</h2>
<p>First thing I need to do, is define how vectors will be represented in the code. I’m coming from a highly object oriented language (ruby), so naturally I picked a thing that ressembles objects the most - struct (this may not be the Go way, so if you have any other propositions, please ping me).</p>
<p>So let’s define a struct that will represent a 3 dimensional vector with coordinates (x, y, z):</p>
<div class="language-go highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="k">go</span>
<span class="k">package</span> <span class="n">core</span>
<span class="k">import</span> <span class="s">"math"</span>
<span class="c">// Vector - struct holding X Y Z values of a 3D vector</span>
<span class="k">type</span> <span class="n">Vector</span> <span class="k">struct</span> <span class="p">{</span>
<span class="n">X</span><span class="p">,</span> <span class="n">Y</span><span class="p">,</span> <span class="n">Z</span> <span class="kt">float64</span>
<span class="p">}</span>
</code></pre></div></div>
<p><em>Note that the struct’s name and all of the coordinates are written in capital letters. That’s because in Go, only stuff that’s written in capital letters gets exported when your package is imported somewhere. Lowercase functions, structs, etc. are available only inside the package.</em></p>
<h2 id="operations-on-vectors">Operations on vectors</h2>
<p>Go allows us to define methods on structs, which seems like a perfect candidate for defining all of the needed vector operations.</p>
<p>Methods are plain Go functions, but they are defined with a receiver that comes before the function name.</p>
<p>We can define a method on a receiver in two ways:</p>
<ul>
<li>Pointer receiver
<div class="language-go highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="k">go</span>
<span class="k">func</span> <span class="p">(</span><span class="n">a</span> <span class="o">*</span><span class="n">Vector</span><span class="p">)</span> <span class="n">Add</span><span class="p">(</span><span class="n">b</span> <span class="n">Vector</span><span class="p">)</span> <span class="n">Vector</span> <span class="p">{</span>
<span class="n">a</span><span class="o">.</span><span class="n">X</span> <span class="o">+=</span> <span class="n">b</span><span class="o">.</span><span class="n">X</span>
<span class="n">a</span><span class="o">.</span><span class="n">Y</span> <span class="o">+=</span> <span class="n">b</span><span class="o">.</span><span class="n">Y</span>
<span class="n">a</span><span class="o">.</span><span class="n">Z</span> <span class="o">+=</span> <span class="n">b</span><span class="o">.</span><span class="n">Z</span>
<span class="k">return</span> <span class="n">a</span>
<span class="p">}</span>
</code></pre></div> </div>
</li>
<li>Value receiver
<div class="language-go highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="k">go</span>
<span class="k">func</span> <span class="p">(</span><span class="n">a</span> <span class="n">Vector</span><span class="p">)</span> <span class="n">Add</span><span class="p">(</span><span class="n">b</span> <span class="n">Vector</span><span class="p">)</span> <span class="n">Vector</span> <span class="p">{</span>
<span class="n">a</span><span class="o">.</span><span class="n">X</span> <span class="o">+=</span> <span class="n">b</span><span class="o">.</span><span class="n">X</span>
<span class="n">a</span><span class="o">.</span><span class="n">Y</span> <span class="o">+=</span> <span class="n">b</span><span class="o">.</span><span class="n">Y</span>
<span class="n">a</span><span class="o">.</span><span class="n">Z</span> <span class="o">+=</span> <span class="n">b</span><span class="o">.</span><span class="n">Z</span>
<span class="k">return</span> <span class="n">a</span>
<span class="p">}</span>
</code></pre></div> </div>
</li>
</ul>
<p>The core difference between these two is that, the one that is defined on a pointer receiver, will mutate the actual object it was called on. Analogically a method called on a value receiver will not mutate the receiver, because it will operate on a copy of the original receiver.</p>
<p>All of the methods that will be presented in this post are defined on a value receiver. A new <code class="highlighter-rouge">Vector</code> will be returned where applicable.</p>
<p>This type of notation allows for a verbose representation of the equations used in the ray tracing algorithm.</p>
<p>With the technicalities out of the way, let’s move on to implementing the actual vector operations.</p>
<h2 id="adding-two-vectors">Adding two vectors</h2>
<p>This operation is achieved by adding the corresponding coefficients of two vectors together.</p>
<p>Geometrically it looks like this:</p>
<p><img src="https://cdn.codecarrot.net/images/addition1506789318.png" alt="Geometric definition of adding two vectors" /></p>
<div class="language-go highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="k">go</span>
<span class="k">func</span> <span class="p">(</span><span class="n">a</span> <span class="n">Vector</span><span class="p">)</span> <span class="n">Add</span><span class="p">(</span><span class="n">b</span> <span class="n">Vector</span><span class="p">)</span> <span class="n">Vector</span> <span class="p">{</span>
<span class="k">return</span> <span class="n">Vector</span><span class="p">{</span>
<span class="n">X</span><span class="o">:</span> <span class="n">a</span><span class="o">.</span><span class="n">X</span> <span class="o">+</span> <span class="n">b</span><span class="o">.</span><span class="n">X</span><span class="p">,</span>
<span class="n">Y</span><span class="o">:</span> <span class="n">a</span><span class="o">.</span><span class="n">Y</span> <span class="o">+</span> <span class="n">b</span><span class="o">.</span><span class="n">Y</span><span class="p">,</span>
<span class="n">Z</span><span class="o">:</span> <span class="n">a</span><span class="o">.</span><span class="n">Z</span> <span class="o">+</span> <span class="n">b</span><span class="o">.</span><span class="n">Z</span><span class="p">,</span>
<span class="p">}</span>
<span class="p">}</span>
<span class="k">func</span> <span class="n">TestAdd</span><span class="p">(</span><span class="n">t</span> <span class="o">*</span><span class="n">testing</span><span class="o">.</span><span class="n">T</span><span class="p">)</span> <span class="p">{</span>
<span class="n">result</span> <span class="o">:=</span> <span class="n">Vector</span><span class="p">{</span><span class="m">1.</span><span class="p">,</span> <span class="m">1.</span><span class="p">,</span> <span class="m">1.</span><span class="p">}</span><span class="o">.</span><span class="n">Add</span><span class="p">(</span><span class="n">Vector</span><span class="p">{</span><span class="m">2.</span><span class="p">,</span> <span class="m">2.</span><span class="p">,</span> <span class="m">2.</span><span class="p">})</span>
<span class="n">assert</span><span class="o">.</span><span class="n">Equal</span><span class="p">(</span><span class="n">t</span><span class="p">,</span> <span class="n">Vector</span><span class="p">{</span><span class="m">3.</span><span class="p">,</span> <span class="m">3.</span><span class="p">,</span> <span class="m">3.</span><span class="p">},</span> <span class="n">result</span><span class="p">,</span> <span class="s">"should add correctly"</span><span class="p">)</span>
<span class="p">}</span>
</code></pre></div></div>
<h2 id="subtracting-two-vectors">Subtracting two vectors</h2>
<p>Subtraction is similar to addition, with the difference that we add a negated vector:</p>
<p><img src="https://cdn.codecarrot.net/images/4f89-b0b4-f7fce53f.png" alt="Geometric definition of subtracting two vectors" /></p>
<p>Analogically to addition of two vectors, we subtract the corresponding coefficients of two vectors:</p>
<div class="language-go highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="k">go</span>
<span class="k">func</span> <span class="p">(</span><span class="n">a</span> <span class="n">Vector</span><span class="p">)</span> <span class="n">Sub</span><span class="p">(</span><span class="n">b</span> <span class="n">Vector</span><span class="p">)</span> <span class="n">Vector</span> <span class="p">{</span>
<span class="k">return</span> <span class="n">Vector</span><span class="p">{</span>
<span class="n">X</span><span class="o">:</span> <span class="n">a</span><span class="o">.</span><span class="n">X</span> <span class="o">-</span> <span class="n">b</span><span class="o">.</span><span class="n">X</span><span class="p">,</span>
<span class="n">Y</span><span class="o">:</span> <span class="n">a</span><span class="o">.</span><span class="n">Y</span> <span class="o">-</span> <span class="n">b</span><span class="o">.</span><span class="n">Y</span><span class="p">,</span>
<span class="n">Z</span><span class="o">:</span> <span class="n">a</span><span class="o">.</span><span class="n">Z</span> <span class="o">-</span> <span class="n">b</span><span class="o">.</span><span class="n">Z</span><span class="p">,</span>
<span class="p">}</span>
<span class="p">}</span>
<span class="k">func</span> <span class="n">TestSub</span><span class="p">(</span><span class="n">t</span> <span class="o">*</span><span class="n">testing</span><span class="o">.</span><span class="n">T</span><span class="p">)</span> <span class="p">{</span>
<span class="n">result</span> <span class="o">:=</span> <span class="n">Vector</span><span class="p">{</span><span class="m">3.</span><span class="p">,</span> <span class="m">3.</span><span class="p">,</span> <span class="m">3.</span><span class="p">}</span><span class="o">.</span><span class="n">Sub</span><span class="p">(</span><span class="n">Vector</span><span class="p">{</span><span class="m">1.</span><span class="p">,</span> <span class="m">1.</span><span class="p">,</span> <span class="m">1.</span><span class="p">})</span>
<span class="n">assert</span><span class="o">.</span><span class="n">Equal</span><span class="p">(</span><span class="n">t</span><span class="p">,</span> <span class="n">Vector</span><span class="p">{</span><span class="m">2.</span><span class="p">,</span> <span class="m">2.</span><span class="p">,</span> <span class="m">2.</span><span class="p">},</span> <span class="n">result</span><span class="p">,</span> <span class="s">"should subtract correctly"</span><span class="p">)</span>
<span class="p">}</span>
</code></pre></div></div>
<h2 id="multiplying-vector-by-scalar">Multiplying vector by scalar</h2>
<p>Multiplying by a scalar can be interpreted as scaling the vector (modifying it’s length). This operation is also pretty straightforward, as we have to multiply each coefficient by the scalar:</p>
<p><img src="https://cdn.codecarrot.net/images/scaling1506789318751.png" alt="Geometric definition of scaling a vector" /></p>
<div class="language-go highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="k">go</span>
<span class="k">func</span> <span class="p">(</span><span class="n">a</span> <span class="n">Vector</span><span class="p">)</span> <span class="n">MultiplyByScalar</span><span class="p">(</span><span class="n">s</span> <span class="kt">float64</span><span class="p">)</span> <span class="n">Vector</span> <span class="p">{</span>
<span class="k">return</span> <span class="n">Vector</span><span class="p">{</span>
<span class="n">X</span><span class="o">:</span> <span class="n">a</span><span class="o">.</span><span class="n">X</span> <span class="o">*</span> <span class="n">s</span><span class="p">,</span>
<span class="n">Y</span><span class="o">:</span> <span class="n">a</span><span class="o">.</span><span class="n">Y</span> <span class="o">*</span> <span class="n">s</span><span class="p">,</span>
<span class="n">Z</span><span class="o">:</span> <span class="n">a</span><span class="o">.</span><span class="n">Z</span> <span class="o">*</span> <span class="n">s</span><span class="p">,</span>
<span class="p">}</span>
<span class="p">}</span>
<span class="k">func</span> <span class="n">TestMultiplyByScalar</span><span class="p">(</span><span class="n">t</span> <span class="o">*</span><span class="n">testing</span><span class="o">.</span><span class="n">T</span><span class="p">)</span> <span class="p">{</span>
<span class="n">result</span> <span class="o">:=</span> <span class="n">Vector</span><span class="p">{</span><span class="m">3.</span><span class="p">,</span> <span class="m">3.</span><span class="p">,</span> <span class="m">3.</span><span class="p">}</span><span class="o">.</span><span class="n">MultiplyByScalar</span><span class="p">(</span><span class="m">2.</span><span class="p">)</span>
<span class="n">assert</span><span class="o">.</span><span class="n">Equal</span><span class="p">(</span><span class="n">t</span><span class="p">,</span> <span class="n">Vector</span><span class="p">{</span><span class="m">6.</span><span class="p">,</span> <span class="m">6.</span><span class="p">,</span> <span class="m">6.</span><span class="p">},</span> <span class="n">result</span><span class="p">,</span>
<span class="s">"should multiply each component by given scalar"</span><span class="p">)</span>
<span class="p">}</span>
</code></pre></div></div>
<p><em>As a bonus, we also get division by a scalar, by multiplying by <code class="highlighter-rouge">1/s</code>.</em></p>
<h2 id="dot-product-of-two-vectors">Dot product of two vectors</h2>
<p>The dot product is the first operation that doesn’t return a Vector. It returns a scalar value of type float64.</p>
<p>This operation is particularly important in the context of the ray tracing algorithm, because of it’s common use in the equations.</p>
<p>It’s algebraic definition is the following:</p>
<p><img src="https://cdn.codecarrot.net/images/algebraic_dot_product.svg" alt="Dot product algebraic definition" /></p>
<p>It’s a simple equation, we multiply corresponding coefficients of both vectors, and then sum those multiplications. But this definition isn’t of much use in context of the ray tracing algorithm. What we need here is the geometric definition:</p>
<p><img src="https://cdn.codecarrot.net/images/geometric_dot_product.svg" alt="Dot product geometric definition" /></p>
<p>The notation <code class="highlighter-rouge">||A||</code> means length of vector A (more on that in a sec). <code class="highlighter-rouge">θ</code> is the angle between the vectors. The fact that we use the cosine function gives us some interesting cases:</p>
<ol>
<li>When the vectors are orthogonal, then the angle between them is 90°. This means that the cosine is 0 and the whole dot product is 0</li>
<li>When the vectors are codirectional, then the angle between them is 0°. This means that the cosine is 1 and the dot product evaluates to:</li>
</ol>
<p><img src="https://cdn.codecarrot.net/images/geometric_dot_product_codirectional.svg" alt="Dot product geometric definition" /></p>
<p>This two cases give us a way to determine if two rays are orthogonal or co-directional, which has a huge meaning when evaluating materials of objects.</p>
<p>With the theoretical stuff out of the way, let’s proceed with the implementation:</p>
<div class="language-go highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="k">go</span>
<span class="k">func</span> <span class="p">(</span><span class="n">a</span> <span class="n">Vector</span><span class="p">)</span> <span class="n">Dot</span><span class="p">(</span><span class="n">b</span> <span class="n">Vector</span><span class="p">)</span> <span class="kt">float64</span> <span class="p">{</span>
<span class="k">return</span> <span class="n">a</span><span class="o">.</span><span class="n">X</span><span class="o">*</span><span class="n">b</span><span class="o">.</span><span class="n">X</span> <span class="o">+</span> <span class="n">a</span><span class="o">.</span><span class="n">Y</span><span class="o">*</span><span class="n">b</span><span class="o">.</span><span class="n">Y</span> <span class="o">+</span> <span class="n">a</span><span class="o">.</span><span class="n">Z</span><span class="o">*</span><span class="n">b</span><span class="o">.</span><span class="n">Z</span>
<span class="p">}</span>
<span class="k">func</span> <span class="n">TestDotProductOfTwoPerpendicularVectors</span><span class="p">(</span><span class="n">t</span> <span class="o">*</span><span class="n">testing</span><span class="o">.</span><span class="n">T</span><span class="p">)</span> <span class="p">{</span>
<span class="n">result</span> <span class="o">:=</span> <span class="n">Vector</span><span class="p">{</span><span class="m">1.</span><span class="p">,</span> <span class="m">0.</span><span class="p">,</span> <span class="m">0.</span><span class="p">}</span><span class="o">.</span><span class="n">Dot</span><span class="p">(</span><span class="n">Vector</span><span class="p">{</span><span class="m">0.</span><span class="p">,</span> <span class="m">1.</span><span class="p">,</span> <span class="m">0.</span><span class="p">})</span>
<span class="n">assert</span><span class="o">.</span><span class="n">Equal</span><span class="p">(</span><span class="n">t</span><span class="p">,</span> <span class="m">0.</span><span class="p">,</span> <span class="n">result</span><span class="p">,</span> <span class="s">"dot product of two perpendicular vectors is 0"</span><span class="p">)</span>
<span class="p">}</span>
<span class="k">func</span> <span class="n">TestDotProductOfTwoParallelVectors</span><span class="p">(</span><span class="n">t</span> <span class="o">*</span><span class="n">testing</span><span class="o">.</span><span class="n">T</span><span class="p">)</span> <span class="p">{</span>
<span class="n">result</span> <span class="o">:=</span> <span class="n">Vector</span><span class="p">{</span><span class="m">1.</span><span class="p">,</span> <span class="m">0.</span><span class="p">,</span> <span class="m">0.</span><span class="p">}</span><span class="o">.</span><span class="n">Dot</span><span class="p">(</span><span class="n">Vector</span><span class="p">{</span><span class="m">1.</span><span class="p">,</span> <span class="m">0.</span><span class="p">,</span> <span class="m">0.</span><span class="p">})</span>
<span class="n">assert</span><span class="o">.</span><span class="n">Equal</span><span class="p">(</span><span class="n">t</span><span class="p">,</span> <span class="m">1.</span><span class="p">,</span> <span class="n">result</span><span class="p">,</span> <span class="s">"dot product of two parallel vectors is 1"</span><span class="p">)</span>
<span class="p">}</span>
</code></pre></div></div>
<p>Pretty simple, eh?</p>
<h2 id="length-of-a-vector">Length of a vector</h2>
<p>As stated earlier, we denote the length of a vector A like this <code class="highlighter-rouge">- ||A||</code>. It’s algebraic definition is following:</p>
<p><img src="https://cdn.codecarrot.net/images/vector_length.svg" alt="Vector length algebraic definition" /></p>
<p>As you can see, it’s basically a dot product of a vector with itself, under a square root.</p>
<p>So we can use the already implemented <code class="highlighter-rouge">Dot</code> method, to implement this one:</p>
<div class="language-go highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="k">go</span>
<span class="k">func</span> <span class="p">(</span><span class="n">a</span> <span class="n">Vector</span><span class="p">)</span> <span class="n">Length</span><span class="p">()</span> <span class="kt">float64</span> <span class="p">{</span>
<span class="k">return</span> <span class="n">math</span><span class="o">.</span><span class="n">Sqrt</span><span class="p">(</span><span class="n">a</span><span class="o">.</span><span class="n">Dot</span><span class="p">(</span><span class="n">a</span><span class="p">))</span>
<span class="p">}</span>
<span class="k">func</span> <span class="n">TestLength</span><span class="p">(</span><span class="n">t</span> <span class="o">*</span><span class="n">testing</span><span class="o">.</span><span class="n">T</span><span class="p">)</span> <span class="p">{</span>
<span class="n">assert</span><span class="o">.</span><span class="n">Equal</span><span class="p">(</span><span class="n">t</span><span class="p">,</span> <span class="m">3.</span><span class="p">,</span> <span class="n">Vector</span><span class="p">{</span><span class="m">3.</span><span class="p">,</span> <span class="m">0.</span><span class="p">,</span> <span class="m">0.</span><span class="p">}</span><span class="o">.</span><span class="n">Length</span><span class="p">(),</span>
<span class="s">"calculates the length(magnitude) correctly for Vector{3., 0., 0.}"</span><span class="p">)</span>
<span class="n">assert</span><span class="o">.</span><span class="n">Equal</span><span class="p">(</span><span class="n">t</span><span class="p">,</span> <span class="m">6.</span><span class="p">,</span> <span class="n">Vector</span><span class="p">{</span><span class="m">6.</span><span class="p">,</span> <span class="m">0.</span><span class="p">,</span> <span class="m">0.</span><span class="p">}</span><span class="o">.</span><span class="n">Length</span><span class="p">(),</span>
<span class="s">"calculates the length(magnitude) correctly for Vector{6., 0., 0.}"</span><span class="p">)</span>
<span class="n">assert</span><span class="o">.</span><span class="n">Equal</span><span class="p">(</span><span class="n">t</span><span class="p">,</span> <span class="m">6.324555320336759</span><span class="p">,</span> <span class="n">Vector</span><span class="p">{</span><span class="m">6.</span><span class="p">,</span> <span class="m">2.</span><span class="p">,</span> <span class="m">0.</span><span class="p">}</span><span class="o">.</span><span class="n">Length</span><span class="p">(),</span>
<span class="s">"calculates the length(magnitude) correctly for Vector{6., 2., 0.}"</span><span class="p">)</span>
<span class="p">}</span>
</code></pre></div></div>
<h2 id="cross-product-of-two-vectors">Cross product of two vectors</h2>
<p>Unlike the dot product, the cross product returns a new vector, that is perpendicular to the other two.</p>
<p>Additionally this operation is defined in <code class="highlighter-rouge">R3</code></p>
<p>The cross product can be also used for calculating a surface normal (the surface that is defined by the two vectors).</p>
<p><img src="https://cdn.codecarrot.net/images/cross_product.png" alt="Cross product" /></p>
<p>The cross product formula is somewhat hard to remember:</p>
<p><img src="https://cdn.codecarrot.net/images/cross_product.svg" alt="Cross product formula" /></p>
<p>The implementation looks like this:</p>
<div class="language-go highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="k">go</span>
<span class="k">func</span> <span class="p">(</span><span class="n">a</span> <span class="n">Vector</span><span class="p">)</span> <span class="n">Cross</span><span class="p">(</span><span class="n">b</span> <span class="n">Vector</span><span class="p">)</span> <span class="n">Vector</span> <span class="p">{</span>
<span class="k">return</span> <span class="n">Vector</span><span class="p">{</span>
<span class="n">X</span><span class="o">:</span> <span class="n">a</span><span class="o">.</span><span class="n">Y</span><span class="o">*</span><span class="n">b</span><span class="o">.</span><span class="n">Z</span> <span class="o">-</span> <span class="n">a</span><span class="o">.</span><span class="n">Z</span><span class="o">*</span><span class="n">b</span><span class="o">.</span><span class="n">Y</span><span class="p">,</span>
<span class="n">Y</span><span class="o">:</span> <span class="n">a</span><span class="o">.</span><span class="n">Z</span><span class="o">*</span><span class="n">b</span><span class="o">.</span><span class="n">X</span> <span class="o">-</span> <span class="n">a</span><span class="o">.</span><span class="n">X</span><span class="o">*</span><span class="n">b</span><span class="o">.</span><span class="n">Z</span><span class="p">,</span>
<span class="n">Z</span><span class="o">:</span> <span class="n">a</span><span class="o">.</span><span class="n">X</span><span class="o">*</span><span class="n">b</span><span class="o">.</span><span class="n">Y</span> <span class="o">-</span> <span class="n">a</span><span class="o">.</span><span class="n">Y</span><span class="o">*</span><span class="n">b</span><span class="o">.</span><span class="n">X</span><span class="p">,</span>
<span class="p">}</span>
<span class="p">}</span>
<span class="k">func</span> <span class="n">TestCrossProduct</span><span class="p">(</span><span class="n">t</span> <span class="o">*</span><span class="n">testing</span><span class="o">.</span><span class="n">T</span><span class="p">)</span> <span class="p">{</span>
<span class="n">result</span> <span class="o">:=</span> <span class="n">Vector</span><span class="p">{</span><span class="m">1.</span><span class="p">,</span> <span class="m">0.</span><span class="p">,</span> <span class="m">0.</span><span class="p">}</span><span class="o">.</span><span class="n">Cross</span><span class="p">(</span><span class="n">Vector</span><span class="p">{</span><span class="m">0.</span><span class="p">,</span> <span class="m">1.</span><span class="p">,</span> <span class="m">0.</span><span class="p">})</span>
<span class="n">assert</span><span class="o">.</span><span class="n">Equal</span><span class="p">(</span><span class="n">t</span><span class="p">,</span> <span class="n">Vector</span><span class="p">{</span><span class="m">0.</span><span class="p">,</span> <span class="m">0.</span><span class="p">,</span> <span class="m">1.</span><span class="p">},</span> <span class="n">result</span><span class="p">,</span>
<span class="s">"cross product returns a vector perpendicular to the other two"</span><span class="p">)</span>
<span class="p">}</span>
</code></pre></div></div>
<h2 id="normalizing-a-vector">Normalizing a vector</h2>
<p>Also called calculating a unit vector - versor:</p>
<p><img src="https://cdn.codecarrot.net/images/vector_normalization.svg" alt="Vector normalization formula" /></p>
<p>All we have to do, is divide (multiply by 1 / x) each of the vectors components by the length of the vector:</p>
<div class="language-go highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="k">go</span>
<span class="k">func</span> <span class="p">(</span><span class="n">a</span> <span class="n">Vector</span><span class="p">)</span> <span class="n">Normalize</span><span class="p">()</span> <span class="n">Vector</span> <span class="p">{</span>
<span class="k">return</span> <span class="n">a</span><span class="o">.</span><span class="n">MultiplyByScalar</span><span class="p">(</span><span class="m">1.</span> <span class="o">/</span> <span class="n">a</span><span class="o">.</span><span class="n">Length</span><span class="p">())</span>
<span class="p">}</span>
<span class="k">func</span> <span class="n">TestNormalize</span><span class="p">(</span><span class="n">t</span> <span class="o">*</span><span class="n">testing</span><span class="o">.</span><span class="n">T</span><span class="p">)</span> <span class="p">{</span>
<span class="n">assert</span><span class="o">.</span><span class="n">Equal</span><span class="p">(</span><span class="n">t</span><span class="p">,</span> <span class="n">Vector</span><span class="p">{</span><span class="m">1.</span><span class="p">,</span> <span class="m">0.</span><span class="p">,</span> <span class="m">0.</span><span class="p">},</span> <span class="n">Vector</span><span class="p">{</span><span class="m">10.</span><span class="p">,</span> <span class="m">0.</span><span class="p">,</span> <span class="m">0.</span><span class="p">}</span><span class="o">.</span><span class="n">Normalize</span><span class="p">(),</span>
<span class="s">"returns a unit vector (versor) from the given vector"</span><span class="p">)</span>
<span class="n">assert</span><span class="o">.</span><span class="n">Equal</span><span class="p">(</span><span class="n">t</span><span class="p">,</span> <span class="n">Vector</span><span class="p">{</span><span class="m">0.</span><span class="p">,</span> <span class="m">1.</span><span class="p">,</span> <span class="m">0.</span><span class="p">},</span> <span class="n">Vector</span><span class="p">{</span><span class="m">0.</span><span class="p">,</span> <span class="m">10.</span><span class="p">,</span> <span class="m">0.</span><span class="p">}</span><span class="o">.</span><span class="n">Normalize</span><span class="p">(),</span>
<span class="s">"returns a unit vector (versor) from the given vector"</span><span class="p">)</span>
<span class="n">assert</span><span class="o">.</span><span class="n">Equal</span><span class="p">(</span><span class="n">t</span><span class="p">,</span> <span class="n">Vector</span><span class="p">{</span><span class="m">0.</span><span class="p">,</span> <span class="m">0.</span><span class="p">,</span> <span class="m">1.</span><span class="p">},</span> <span class="n">Vector</span><span class="p">{</span><span class="m">0.</span><span class="p">,</span> <span class="m">0.</span><span class="p">,</span> <span class="m">10.</span><span class="p">}</span><span class="o">.</span><span class="n">Normalize</span><span class="p">(),</span>
<span class="s">"returns a unit vector (versor) from the given vector"</span><span class="p">)</span>
<span class="p">}</span>
</code></pre></div></div>
<h2 id="summary">Summary</h2>
<p>Now that we have the basic math implemented, we will move to the more exciting stuff. Stay tuned.</p>
<p>This post is continue to <a href="/creating-images-in-go">Creating Images in Go</a>.</p>yashumittalForeword
https://cdn.codecarrot.net/images/imgFig9.gif
Var vs Const vs Let in Javascript2017-10-01T14:10:00+00:002017-10-01T14:10:00+00:00https://blog.codecarrot.net/var-vs-const-vs-let-in-javascript<p>Traditionally, the way variable declarations work has been that weird part of programming in JavaScript. Variables creation depend on how you declare them, and ES6 offers options to make controlling scope easier. This article will look to clear on why those classic <code class="highlighter-rouge">var</code> declarations can be confusing and will also introduce block-level bindings aka <code class="highlighter-rouge">const</code> and <code class="highlighter-rouge">let</code>.</p>
<p>Variable declarations using var get treated as if they are at the top of the function (or global scope, if declared outside of a function) regardless of where the actual declaration occurs; this is called hoisting. See the example below to see what hoisting does:</p>
<div class="language-js highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="kd">function</span> <span class="nx">getValue</span><span class="p">(</span><span class="nx">condition</span><span class="p">)</span> <span class="p">{</span>
<span class="k">if</span> <span class="p">(</span><span class="nx">condition</span><span class="p">)</span> <span class="p">{</span>
<span class="kd">var</span> <span class="nx">value</span> <span class="o">=</span> <span class="dl">"</span><span class="s2">blue</span><span class="dl">"</span><span class="p">;</span>
<span class="c1">// other code</span>
<span class="k">return</span> <span class="nx">value</span><span class="p">;</span>
<span class="p">}</span> <span class="k">else</span> <span class="p">{</span>
<span class="c1">// value exists here with a value of undefined</span>
<span class="k">return</span> <span class="kc">null</span><span class="p">;</span>
<span class="p">}</span>
<span class="c1">// value exists here with a value of undefined</span>
<span class="p">}</span>
</code></pre></div></div>
<p>If you are new to JavaScript, you might think that the variable value only to be created if the condition evaluates to true. In fact, this is not how JavaScript engines work behind the scenes; the variable value gets created regardless as the engine changes the <code class="highlighter-rouge">getValue</code> function to look something like this:</p>
<div class="language-js highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="kd">function</span> <span class="nx">getValue</span><span class="p">(</span><span class="nx">condition</span><span class="p">)</span> <span class="p">{</span>
<span class="kd">var</span> <span class="nx">value</span><span class="p">;</span>
<span class="k">if</span> <span class="p">(</span><span class="nx">condition</span><span class="p">)</span> <span class="p">{</span>
<span class="nx">value</span> <span class="o">=</span> <span class="dl">"</span><span class="s2">blue</span><span class="dl">"</span><span class="p">;</span>
<span class="c1">// other code</span>
<span class="k">return</span> <span class="nx">value</span><span class="p">;</span>
<span class="p">}</span> <span class="k">else</span> <span class="p">{</span>
<span class="k">return</span> <span class="kc">null</span><span class="p">;</span>
<span class="p">}</span>
<span class="p">}</span>
</code></pre></div></div>
<p>The declaration of value is hoisted to the top, while the initialization remains in the same spot. That means the variable value is still accessible from within the else clause. It happens to be like this as the variable would just have a value of undefined the other way around as it hasn’t been initialized.</p>
<p>It is obvious and understandable that will not be easy for new JavaScript developers to learn declaration hoisting, but please note that misunderstanding this unique behavior can end up causing bugs. To resolve this ES6 introduced block level scoping options to make the controlling a variable’s lifecycle a little more powerful.</p>
<h2 id="block-level-declarations">Block-Level Declarations</h2>
<p>Block-level declarations are the ones that declare variables that are far outside of a given block scope. Block scopes, also known as lexical scopes, are created either inside of a function or inside of a block (indicated by the <code class="highlighter-rouge">{</code> and <code class="highlighter-rouge">}</code> characters). Block scoping is how many C-based languages work, and the introduction of block-level declarations in ECMAScript 6 is intended to bring that same flexibility (and uniformity) to JavaScript.</p>
<h2 id="let-declaration">Let Declaration</h2>
<p>The let declaration syntax is the same as <code class="highlighter-rouge">var</code>. You can replace var with let to declare a variable, this will limit the variable’s scope to only that current code block. Since let declarations are not hoisted to the top of the enclosing block, you may want always to place let declarations first in the block, so that they are available to the entire block. Here’s a quick example:</p>
<div class="language-js highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="kd">function</span> <span class="nx">getValue</span><span class="p">(</span><span class="nx">condition</span><span class="p">)</span> <span class="p">{</span>
<span class="k">if</span> <span class="p">(</span><span class="nx">condition</span><span class="p">)</span> <span class="p">{</span>
<span class="kd">let</span> <span class="nx">value</span> <span class="o">=</span> <span class="dl">"</span><span class="s2">blue</span><span class="dl">"</span><span class="p">;</span>
<span class="c1">// other code</span>
<span class="k">return</span> <span class="nx">value</span><span class="p">;</span>
<span class="p">}</span> <span class="k">else</span> <span class="p">{</span>
<span class="c1">// value doesn't exist here</span>
<span class="k">return</span> <span class="kc">null</span><span class="p">;</span>
<span class="p">}</span>
<span class="c1">// value doesn't exist here</span>
<span class="p">}</span>
</code></pre></div></div>
<p>Here below is the screenshot that shows the difference between var and let (Check the comments within the code block).</p>
<p><img src="https://cdn.codecarrot.net/images/1-14x2AVmAVC2NmkS7u4pK6g.png" alt="difference between var and let" /></p>
<p>As you can see, the getValue function with <code class="highlighter-rouge">let</code> behaves similar to other programming languages. As, variable value is declared using let instead of var , the declaration isn’t hoisted to the top of the function definition, and the variable value is no longer accessible once execution flows out of the if block. If condition evaluates to false, then value is never declared or initialized.</p>
<h2 id="no-redeclaration">No Redeclaration</h2>
<p>If a identifier has already been defined within the scope, then using identifier in a let declaration inside that scope throws an error. Check below:</p>
<div class="language-js highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="kd">var</span> <span class="nx">count</span> <span class="o">=</span> <span class="mi">30</span><span class="p">;</span>
<span class="c1">// Error: `count` has already been declared.</span>
<span class="kd">let</span> <span class="nx">count</span> <span class="o">=</span> <span class="mi">40</span><span class="p">;</span>
</code></pre></div></div>
<p>In this example, the count is declared twice: once with var and once with let. As let will not redefine an identifier that already exists in the same scope, the let declaration will throw an error.
On the other hand, no error shows up if the let declaration creates a new variable with the same name as a variable in its containing scope, check the code below:</p>
<div class="language-js highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="kd">var</span> <span class="nx">count</span> <span class="o">=</span> <span class="mi">30</span><span class="p">;</span>
<span class="k">if</span> <span class="p">(</span><span class="nx">condition</span><span class="p">)</span> <span class="p">{</span>
<span class="c1">// Does not throw an error</span>
<span class="kd">let</span> <span class="nx">count</span> <span class="o">=</span> <span class="mi">40</span><span class="p">;</span>
<span class="c1">// more code</span>
<span class="p">}</span>
</code></pre></div></div>
<p>This let declaration does not throw any error as it creates a new variable called count within the if statement, instead of creating the count in the surrounding block. Inside the if block, this new variable shadows the global count, which prevents access to it until execution leaves the block.</p>
<h2 id="constant-declarations">Constant Declarations</h2>
<p>Also, you can define variables in ES6 with the <code class="highlighter-rouge">const</code> declaration syntax. Variables that are declared using the const keyword are considered constants, which means that their values can’t be changed once set. Thus, each const variable must be initialized on the declaration, as shown below:</p>
<div class="language-js highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="c1">// Valid constant</span>
<span class="kd">const</span> <span class="nx">maxItems</span> <span class="o">=</span> <span class="mi">30</span><span class="p">;</span>
<span class="c1">// Syntax error: missing initialization</span>
<span class="kd">const</span> <span class="nx">name</span><span class="p">;</span>
</code></pre></div></div>
<p>The <code class="highlighter-rouge">maxItems</code> variable is initialized, so its const declaration should work without any problems. The <code class="highlighter-rouge">name</code> variable, however, would cause a syntax error if you tried to run the program containing this code, because name is not initialized.</p>yashumittalTraditionally, the way variable declarations work has been that weird part of programming in JavaScript. Variables creation depend on how you declare them, and ES6 offers options to make controlling scope easier. This article will look to clear on why those classic var declarations can be confusing and will also introduce block-level bindings aka const and let.
https://cdn.codecarrot.net/images/maxresdefault.jpg
What is functions in Javascript?2017-10-01T12:10:00+00:002017-10-01T12:10:00+00:00https://blog.codecarrot.net/what-is-a-function-in-javascript<h2 id="defined">Defined</h2>
<ul>
<li>A function is a subprogram designed to perform a particular task.</li>
<li>Functions are executed when they are called <em>(invoked)</em>.</li>
<li>Values can be passed into functions.</li>
<li>Functions always <code class="highlighter-rouge">return</code> a value.</li>
<li>In JavaScript, Functions are Function objects.</li>
</ul>
<h2 id="function-syntax">Function Syntax</h2>
<p>There are multiple ways to define a function in JavaScript. Two we’ll explore in this article are function declarations, and function expressions
A Function Declaration defines a named function. Think of a declaring a function as equal to declaring a variable. Instead of using <code class="highlighter-rouge">var</code> though, you use the <code class="highlighter-rouge">function</code> keyword, followed by the name of the function:</p>
<div class="language-js highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="kd">function</span> <span class="nx">name</span><span class="p">(</span><span class="nx">parameters</span><span class="p">){</span>
<span class="nx">statements</span>
<span class="p">}</span>
</code></pre></div></div>
<p><strong>Function Expressions</strong> can be named functions or anonymous. An anonymous function is a function that has no name. In the example below, we are setting the return value of an anonymous function to the <code class="highlighter-rouge">name</code> variable.</p>
<div class="language-js highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="kd">let</span> <span class="nx">name</span> <span class="o">=</span> <span class="kd">function</span><span class="p">(</span><span class="nx">parameters</span><span class="p">){</span>
<span class="nx">statements</span>
<span class="p">}</span>
</code></pre></div></div>
<h2 id="function-parameters-vs-arguments">Function Parameters vs. Arguments</h2>
<p>When working with functions, you may have heard the <em>terms parameters</em> and <em>arguments</em> used interchangeably.</p>
<p>When defining a function, we can pass in up to 255 parameters. Parameters input and separated by commas in the <code class="highlighter-rouge">()</code>. Here’s an example with three parameters:</p>
<div class="language-js highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="kd">function</span> <span class="nx">threeParams</span><span class="p">(</span><span class="nx">param1</span><span class="p">,</span> <span class="nx">param2</span><span class="p">,</span> <span class="nx">param3</span><span class="p">){</span>
<span class="nx">statements</span>
<span class="p">}</span>
</code></pre></div></div>
<p>Arguments, on the other hand, are the values the function receives from each parameter when the function is invoked.</p>
<p>It’s important to understand this subtle difference in terminology.</p>
<blockquote>
**Note:** If you’re using Google Chrome, open up your developer console so you can explore the below examples along with me. **[WINDOWS]: Ctrl + Shift + J [MAC]: Cmd + Opt + J**
</blockquote>
<h2 id="running-a-function">Running a Function</h2>
<p>Functions execute when the function is called. This process is known as invocation. You can invoke a function by referencing the function name, followed by <code class="highlighter-rouge">()</code>.</p>
<p>Lets look at the example below. We have a function named <code class="highlighter-rouge">logIt</code>. This function requires one parameter, <code class="highlighter-rouge">name</code>. The function will then log that name back to the console.</p>
<div class="language-js highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="kd">function</span> <span class="nx">logIt</span><span class="p">(</span><span class="nx">name</span><span class="p">){</span>
<span class="nx">console</span><span class="p">.</span><span class="nx">log</span><span class="p">(</span><span class="nx">name</span><span class="p">);</span>
<span class="p">}</span>
</code></pre></div></div>
<p>To invoke our function, we call it, while passing in the singular parameter. Here I am calling this function with the name Dave:</p>
<div class="language-js highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="nx">logIt</span><span class="p">(</span><span class="dl">'</span><span class="s1">Dave</span><span class="dl">'</span><span class="p">);</span>
</code></pre></div></div>
<p>A function with no parameters is simply invoked with an empty set of parenthesis:</p>
<div class="language-js highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="kd">function</span> <span class="nx">logIt2</span><span class="p">(){</span>
<span class="nx">console</span><span class="p">.</span><span class="nx">log</span><span class="p">(</span><span class="dl">'</span><span class="s1">Log it 2</span><span class="dl">'</span><span class="p">);</span>
<span class="p">}</span>
<span class="nx">logIt2</span><span class="p">();</span>
</code></pre></div></div>
<h2 id="returning-from-a-function">Returning from a function</h2>
<p>Every function in JavaScript returns <code class="highlighter-rouge">undefined</code> unless otherwise specified. We can test this by creating and invoking an empty function:</p>
<div class="language-js highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="kd">function</span> <span class="nx">test</span><span class="p">(){};</span>
<span class="nx">test</span><span class="p">();</span>
<span class="c1">// undefined</span>
</code></pre></div></div>
<p>As expected, we get <code class="highlighter-rouge">undefined</code> returned.</p>
<p>We can use the <code class="highlighter-rouge">return</code> keyword to specify what we want a function to return. Look at the example below:</p>
<div class="language-js highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="kd">function</span> <span class="nx">test</span><span class="p">(){</span>
<span class="k">return</span> <span class="kc">true</span><span class="p">;</span>
<span class="p">};</span>
<span class="nx">test</span><span class="p">();</span>
<span class="c1">// true</span>
</code></pre></div></div>
<p>In this example we tell the function to return <code class="highlighter-rouge">true</code>. when we invoke the function, we get <code class="highlighter-rouge">true</code> displayed in the console.</p>
<p>Another important rule of the return statement is that it stops a functions execution immediately.</p>
<p>Consider this example where we have two return statements in our test function:</p>
<div class="language-js highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="kd">function</span> <span class="nx">test</span><span class="p">(){</span>
<span class="k">return</span> <span class="kc">true</span><span class="p">;</span>
<span class="k">return</span> <span class="kc">false</span><span class="p">;</span>
<span class="p">};</span>
<span class="nx">test</span><span class="p">();</span>
<span class="c1">// true</span>
</code></pre></div></div>
<p>The first return statement immediately stops execution of our function and causes our function to return <code class="highlighter-rouge">true</code>. The code on line three: <code class="highlighter-rouge">return false;</code> is <em>never</em> executed.</p>
<p>Something else to understand about the <code class="highlighter-rouge">return</code> statement is that it’s value is returned to the caller of the function. Let’s look at an example:</p>
<div class="language-js highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="kd">let</span> <span class="nx">double</span> <span class="o">=</span> <span class="kd">function</span><span class="p">(</span><span class="nx">num</span><span class="p">)</span> <span class="p">{</span>
<span class="k">return</span> <span class="nx">num</span> <span class="o">*</span> <span class="mi">2</span><span class="p">;</span>
<span class="p">}</span>
</code></pre></div></div>
<p>Above we have a function expression. The variable <code class="highlighter-rouge">double</code> is being assigned to the returned value of this anonymous function. When we invoke the function we can see this assignment in action:</p>
<div class="language-js highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="kd">let</span> <span class="nx">test</span> <span class="o">=</span> <span class="nx">double</span><span class="p">(</span><span class="mi">3</span><span class="p">);</span>
<span class="nx">console</span><span class="p">.</span><span class="nx">log</span><span class="p">(</span><span class="nx">test</span><span class="p">);</span>
<span class="c1">// 6</span>
</code></pre></div></div>
<p>Awesome! The <code class="highlighter-rouge">return</code> variable not only returns values from a function, but it assigns them to whatever called the function!</p>
<h2 id="functions-are-objects">Functions are Objects</h2>
<p>In JavaScript, anything that is not a primitive type ( <code class="highlighter-rouge">undefined</code>, <code class="highlighter-rouge">null</code>, <code class="highlighter-rouge">boolean</code>, <code class="highlighter-rouge">number</code>, or <code class="highlighter-rouge">string</code>) is an object. Objects in JavaScript are <em>extremely</em> versatile. Because of this, we can even pass a function as a parameter into another function.</p>
<p>When a function accepts another function as a parameter, or returns a function, it is called a higher-order function. You’ve probably already used a bunch of higher order functions and don’t even know it: <code class="highlighter-rouge">Array.prototype.map</code> and <code class="highlighter-rouge">Array.prototype.filter</code> are higher order functions (Just to name a couple). <em>More on this topic in a future article.</em></p>
<h2 id="what-to-remember">What to remember</h2>
<p>That’s a lot of information. Here’s what you should remember:</p>
<ul>
<li>A function is a <em>subprogram</em> designed to perform a particular task.</li>
<li>Functions are executed when they are called <em>(invoked)</em>.</li>
<li>Values can be passed into functions.</li>
<li>Functions always <code class="highlighter-rouge">return</code> a value.</li>
<li>In JavaScript, Functions are Function objects.</li>
</ul>yashumittalDefined
https://cdn.codecarrot.net/images/1-CYNSrbMqn5nsYiWo7of1og.jpeg
Comparison between Vue, React and Angular2017-10-01T11:40:00+00:002017-10-01T11:40:00+00:00https://blog.codecarrot.net/comparison-between-vue-react-and-angular<p>Angular is a popular, fully-fledged JavaScript framework used to build modern web applications. React and VueJS are up-and-coming JavaScript libraries, and are used to build web-interfaces.</p>
<h3 id="comparison-between-3-different-frameworks-by-developer-experience">Comparison between 3 different frameworks by Developer Experience</h3>
<table>
<thead>
<tr>
<th>Developer Experience</th>
<th><a href="//angular.io/">AngularJs</a></th>
<th><a href="//vuejs.org/">Vue</a></th>
<th><a href="//facebook.github.io/react/">ReactJs</a></th>
</tr>
</thead>
<tbody>
<tr>
<td>Client-side routing</td>
<td>X</td>
<td>X</td>
<td> </td>
</tr>
<tr>
<td>Client-side routing, State-based routing</td>
<td>X</td>
<td> </td>
<td> </td>
</tr>
<tr>
<td>Command line interface (CLI)</td>
<td> </td>
<td>X</td>
<td>X</td>
</tr>
<tr>
<td>Concurrency (synchronization), immutable data</td>
<td>X</td>
<td>X</td>
<td> </td>
</tr>
<tr>
<td>Data binding & change detection/tracking, no dirty checks (good), getters/setters (bad)</td>
<td> </td>
<td>X</td>
<td> </td>
</tr>
<tr>
<td>Languages, ES6 JavaScript</td>
<td>X</td>
<td>X</td>
<td> </td>
</tr>
<tr>
<td>Languages, Typescript</td>
<td>X</td>
<td>X</td>
<td> </td>
</tr>
<tr>
<td>Lazy (on-demand) loading of client-side code</td>
<td>X</td>
<td> </td>
<td> </td>
</tr>
<tr>
<td>Modularized, route-specific CSS</td>
<td>X</td>
<td>X</td>
<td> </td>
</tr>
<tr>
<td>Module marketplace</td>
<td> </td>
<td> </td>
<td>X</td>
</tr>
<tr>
<td>No build process is required</td>
<td> </td>
<td>X</td>
<td> </td>
</tr>
<tr>
<td>Observables for databinding a.k.a. KVO</td>
<td>X</td>
<td> </td>
<td> </td>
</tr>
<tr>
<td>Orders module dependencies</td>
<td>X</td>
<td> </td>
<td> </td>
</tr>
<tr>
<td>Preloads client-side data</td>
<td>X</td>
<td> </td>
<td> </td>
</tr>
<tr>
<td>Reload app on file changes</td>
<td>X</td>
<td> </td>
<td>X</td>
</tr>
<tr>
<td>Single source of truth, central state management</td>
<td> </td>
<td>X</td>
<td>X</td>
</tr>
<tr>
<td>Someone is paid to develop and support it</td>
<td>X</td>
<td> </td>
<td>X</td>
</tr>
<tr>
<td>Templating, parsable HTML, no imperative code allowed</td>
<td>X</td>
<td>X</td>
<td> </td>
</tr>
<tr>
<td>There is a book about it</td>
<td>X</td>
<td> </td>
<td>X</td>
</tr>
<tr>
<td>Two-way data binding</td>
<td>X</td>
<td> </td>
<td>X</td>
</tr>
<tr>
<td>Typed</td>
<td>X</td>
<td>X</td>
<td> </td>
</tr>
<tr>
<td>Virtual, shadow DOM</td>
<td> </td>
<td>X</td>
<td>X</td>
</tr>
<tr>
<td>You can still use the technology if you sue the vendor</td>
<td>X</td>
<td>X</td>
<td> </td>
</tr>
</tbody>
</table>
<h3 id="comparison-between-3-different-frameworks-by-user-experience">Comparison between 3 different frameworks by User Experience</h3>
<table>
<thead>
<tr>
<th>User Experience</th>
<th><a href="//angular.io/">AngularJs</a></th>
<th><a href="//vuejs.org/">Vue</a></th>
<th><a href="//facebook.github.io/react/">ReactJs</a></th>
</tr>
</thead>
<tbody>
<tr>
<td>Derived, computed properties</td>
<td> </td>
<td>X</td>
<td> </td>
</tr>
<tr>
<td>Realtime data sync (?)</td>
<td>X</td>
<td> </td>
<td> </td>
</tr>
</tbody>
</table>yashumittalAngular is a popular, fully-fledged JavaScript framework used to build modern web applications. React and VueJS are up-and-coming JavaScript libraries, and are used to build web-interfaces.
https://cdn.codecarrot.net/images/body-596e08d3eb603.jpg
Numbers in JavaScript2017-10-01T11:09:00+00:002017-10-01T11:09:00+00:00https://blog.codecarrot.net/numbers-in-javascript<p>Computer’s and data, these two words have an awesome relationship with each other. Inside the computer’s world, there is only data. Read the data, modify the data, create a new data — simply put, data is everything according to me when it comes to Programming.</p>
<p>Data is stored as long sequences of bits. Bits are those two-valued things, which are described as zeros and ones. Yes those binary numbers, whatever you write in JavaScript, the JavaScript engines like Google’s V8 (Chrome) and Mozilla’s SpiderMonkey(Firefox) internally compile them to zeroes and ones aka Binary Numbers. Computer’s only understand binary, we write in JavaScript, that code get’s compiled in regular binary. “Write JavaScript, Compile it in Binary, Repeat.”</p>
<p>A typical modern computer has more than 30 billion bits in its volatile data storage. If you want to work with such quantities of bits without getting lost in it, you can separate them into chunks that represent pieces of information. In a JavaScript environment, those chunks are called values. Although all values are made of bits, they play different roles to each other.</p>
<p>Every value has a type that determines its role. There were six basic types of values in JavaScript: numbers, strings, Booleans, objects, functions, and undefined values. With ES6, a new type was born, called Symbol. In this article we will cover <strong>Numbers</strong> in JavaScript.</p>
<h2 id="numbers">Numbers</h2>
<p>Values of the number type are, unsurprisingly those numeric values. In JavaScript, we write them like this:</p>
<div class="language-js highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="kd">var</span> <span class="nx">number</span> <span class="o">=</span> <span class="mi">12</span><span class="p">;</span>
<span class="nx">console</span><span class="p">.</span><span class="nx">log</span><span class="p">(</span><span class="nx">number</span><span class="p">);</span> <span class="c1">//=> 12</span>
</code></pre></div></div>
<p>As I said before no magic here, this will cause the bit pattern for the number 12 to come into existence inside the computer’s memory. Unlike other programming languages. JavaScript uses a fixed number of bits, 64 of them to be precise. Here’s what MDN says:</p>
<p>According to the ECMAScript standard, there is only one number type: the <a href="//en.wikipedia.org/wiki/Double_precision_floating-point_format">double-precision 64-bit binary format IEEE 754 value</a>(number between -(253 -1) and 253 -1). There is no specific type for integers. In addition to being able to represent floating-point numbers, the number type has three symbolic values: +Infinity, -Infinity, and <a href="//developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/NaN">NaN</a> (not-a-number).</p>
<p>In JavaScript, numbers are represented as 64-bit floating point, the same as Java’s double. There is no separate integer type, so please remember that 1 and 1.0 are the same value. A number literal can be an integer, floating point, or (integer) hexadecimal. Please note that JavaScript interprets numeric constants as hexadecimal if they are preceded by 0x.</p>
<div class="language-js highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="kd">let</span> <span class="nx">x</span> <span class="o">=</span> <span class="mf">3.14</span><span class="p">;</span> <span class="c1">// Integer, a number with decimals</span>
<span class="kd">let</span> <span class="nx">y</span> <span class="o">=</span> <span class="mi">34</span><span class="p">;</span> <span class="c1">// Floating point, A number without decimals</span>
<span class="kd">let</span> <span class="nx">z</span> <span class="o">=</span> <span class="o">=</span> <span class="mh">0xFF</span><span class="p">;</span> <span class="c1">// HexaDecimal, `z` will be 255</span>
<span class="c1">// Let's print/log them</span>
<span class="nx">console</span><span class="p">.</span><span class="nx">log</span><span class="p">(</span><span class="nx">x</span><span class="p">);</span>
<span class="nx">console</span><span class="p">.</span><span class="nx">log</span><span class="p">(</span><span class="nx">y</span><span class="p">);</span>
<span class="nx">console</span><span class="p">.</span><span class="nx">log</span><span class="p">(</span><span class="nx">z</span><span class="p">);</span>
</code></pre></div></div>
<p>Extra large or extra small numbers can also be written with scientific (exponent) notation:</p>
<div class="language-js highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="kd">let</span> <span class="nx">a</span> <span class="o">=</span> <span class="mf">2.998e8</span><span class="p">;</span> <span class="c1">// 2.998 × 10^8 = 299,800,000</span>
<span class="kd">let</span> <span class="nx">b</span> <span class="o">=</span> <span class="mi">123</span><span class="nx">e</span><span class="o">-</span><span class="mi">5</span><span class="p">;</span> <span class="c1">// 123 x 10^-5 = 0.00123</span>
<span class="c1">// Let's print/log them</span>
<span class="nx">console</span><span class="p">.</span><span class="nx">log</span><span class="p">(</span><span class="nx">a</span><span class="p">);</span>
<span class="nx">console</span><span class="p">.</span><span class="nx">log</span><span class="p">(</span><span class="nx">b</span><span class="p">);</span>
</code></pre></div></div>
<p>The main thing to do with numbers is arithmetic. Arithmetic operations such as addition or multiplication take two number values and produce a new number from them. Here is what they look like in JavaScript:</p>
<div class="language-js highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="kd">let</span> <span class="nx">c</span> <span class="o">=</span> <span class="mi">100</span> <span class="o">+</span> <span class="mi">4</span> <span class="o">*</span> <span class="mi">11</span><span class="p">;</span>
<span class="nx">console</span><span class="p">.</span><span class="nx">log</span><span class="p">(</span><span class="nx">c</span><span class="p">);</span> <span class="c1">//=> 144</span>
</code></pre></div></div>
<p>Does that example mean “add 4 and 100, and multiply the result by 11”, or is the multiplication done before the adding? As you might have guessed, the multiplication happens first. But as in mathematics, you can change this by wrapping the addition in parentheses.</p>
<div class="language-js highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="kd">let</span> <span class="nx">d</span> <span class="o">=</span> <span class="p">(</span><span class="mi">100</span> <span class="o">+</span> <span class="mi">4</span><span class="p">)</span> <span class="o">*</span> <span class="mi">11</span><span class="p">;</span>
<span class="nx">console</span><span class="p">.</span><span class="nx">log</span><span class="p">(</span><span class="nx">d</span><span class="p">);</span> <span class="c1">//=> 1144</span>
</code></pre></div></div>
<p>Here are how will you do mathematical operations for addition, subtraction, multiplication, division, and remainder in JavaScript respectively.</p>
<table>
<thead>
<tr>
<th>Operator</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>+</td>
<td>addition</td>
</tr>
<tr>
<td>-</td>
<td>Subtraction</td>
</tr>
<tr>
<td>*</td>
<td>Multiplication</td>
</tr>
<tr>
<td>/</td>
<td>Division</td>
</tr>
<tr>
<td>%</td>
<td>Remainder</td>
</tr>
</tbody>
</table>
<p><strong>Special Numbers:</strong> There are three special values in JavaScript that are considered as numbers but don’t behave like normal numbers. The first two are Infinity and -Infinity, which represents the positive and negative infinities.</p>
<p><strong>Note:</strong> Infinity — 1 is still Infinity, and so on. The value Infinity represents all values greater than <code class="highlighter-rouge">1.79769313486231570e+308</code>.</p>
<p>I would urge you that you should not have trust in infinity-based computation as this isn’t mathematically solid, and it will quickly lead to our next special number: NaN.</p>
<p>NaN would stand for “not a number”. For example, when you are trying to calculate 0 / 0 (zero divided by zero), Infinity — Infinity, or any number of other numeric operations that don’t return an explicit, and meaningful result.</p>
<p><strong>Testing against NAN:</strong> NaN would compare unequal values (via ==, !=, ===, and !==… Don’t worry we will talk about these logical operators soon) to any other value — including to another NaN value. Use <code class="highlighter-rouge">Number.isNaN()</code> or <code class="highlighter-rouge">isNaN()</code> to explicitly determine whether value is NaN or not. You can also perform a self-comparison: NaN and only NaN will compare unequal to itself.</p>
<div class="language-js highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="nx">console</span><span class="p">.</span><span class="nx">log</span><span class="p">(</span><span class="kc">NaN</span> <span class="o">===</span> <span class="kc">NaN</span><span class="p">);</span> <span class="c1">// false</span>
<span class="nx">console</span><span class="p">.</span><span class="nx">log</span><span class="p">(</span><span class="nb">Number</span><span class="p">.</span><span class="kc">NaN</span> <span class="o">===</span> <span class="kc">NaN</span><span class="p">);</span> <span class="c1">// false</span>
<span class="nx">console</span><span class="p">.</span><span class="nx">log</span><span class="p">(</span><span class="nb">isNaN</span><span class="p">(</span><span class="kc">NaN</span><span class="p">));</span> <span class="c1">// true</span>
<span class="nx">console</span><span class="p">.</span><span class="nx">log</span><span class="p">(</span><span class="nb">isNaN</span><span class="p">(</span><span class="nb">Number</span><span class="p">.</span><span class="kc">NaN</span><span class="p">));</span> <span class="c1">// true</span>
<span class="kd">function</span> <span class="nx">valueIsNaN</span><span class="p">(</span><span class="nx">v</span><span class="p">)</span> <span class="p">{</span>
<span class="k">return</span> <span class="nx">v</span> <span class="o">!==</span> <span class="nx">v</span><span class="p">;</span>
<span class="p">}</span>
<span class="nx">console</span><span class="p">.</span><span class="nx">log</span><span class="p">(</span><span class="nx">valueIsNaN</span><span class="p">(</span><span class="mi">1</span><span class="p">));</span> <span class="c1">// false</span>
<span class="nx">console</span><span class="p">.</span><span class="nx">log</span><span class="p">(</span><span class="nx">valueIsNaN</span><span class="p">(</span><span class="kc">NaN</span><span class="p">));</span> <span class="c1">// true</span>
<span class="nx">console</span><span class="p">.</span><span class="nx">log</span><span class="p">(</span><span class="nx">valueIsNaN</span><span class="p">(</span><span class="nb">Number</span><span class="p">.</span><span class="kc">NaN</span><span class="p">));</span> <span class="c1">// true</span>
</code></pre></div></div>yashumittalComputer’s and data, these two words have an awesome relationship with each other. Inside the computer’s world, there is only data. Read the data, modify the data, create a new data — simply put, data is everything according to me when it comes to Programming.
https://cdn.codecarrot.net/images/bundle-of-numbers6.jpg
Strings and ES6 Template Strings in JavaScript2017-10-01T07:40:00+00:002017-10-01T07:40:00+00:00https://blog.codecarrot.net/strings-and-es6-template-strings-in-javascript<p><img src="https://cdn.codecarrot.net/images/1-3zyOAYB2AfNIC_7O7F_ZNQ.png" alt="strings and template strings" /></p>
<h2 id="strings">Strings</h2>
<p>In ECMAScript 5 and below, A string literal could only be wrapped in single quotes or double quotes. It can contain zero or more characters. The <code class="highlighter-rouge">\</code> (backslash) is the escape character. JavaScript was built at a time when Unicode was a 16-bit character set, so all characters in JavaScript are 16 bits wide. The escape sequences allow you to insert characters into strings that are not normally permitted, such as backslashes, quotes, and control characters.</p>
<div class="language-js highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="kd">let</span> <span class="nx">a</span> <span class="o">=</span> <span class="dl">"</span><span class="s2">I am a double quoted string</span><span class="dl">"</span><span class="p">;</span>
<span class="kd">let</span> <span class="nx">b</span> <span class="o">=</span> <span class="dl">'</span><span class="s1">I am a single quoted string</span><span class="dl">'</span><span class="p">;</span> <span class="c1">// I like this more.</span>
<span class="nx">console</span><span class="p">.</span><span class="nx">log</span><span class="p">(</span><span class="nx">a</span><span class="p">);</span> <span class="c1">//=> I am a double quoted string</span>
<span class="nx">console</span><span class="p">.</span><span class="nx">log</span><span class="p">(</span><span class="nx">b</span><span class="p">);</span> <span class="c1">//=> I am a single quoted string</span>
</code></pre></div></div>
<p><strong>Concatenation:</strong> Strings are immutable. Once you add them, they can never be changed. That said, it is very easy to make a new string by concatenating other strings together with the + operator.</p>
<div class="language-js highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="kd">let</span> <span class="nx">videos</span> <span class="o">=</span> <span class="dl">'</span><span class="s1">Cat </span><span class="dl">'</span> <span class="o">+</span> <span class="dl">'</span><span class="s1">Videos </span><span class="dl">'</span> <span class="o">+</span> <span class="dl">'</span><span class="s1">on the web.</span><span class="dl">'</span><span class="p">;</span>
<span class="nx">console</span><span class="p">.</span><span class="nx">log</span><span class="p">(</span><span class="nx">videos</span><span class="p">);</span> <span class="c1">//=> Cat Videos on the web.</span>
</code></pre></div></div>
<h2 id="template-strings">Template Strings</h2>
<p>Also known as Template literals, ECMAScript 6’s template literals provide syntax for creating domain-specific languages (DSLs) for working with content in a safer way than the solutions available in ECMAScript 5 (and below).</p>
<p>In Technical terms, To allow developers to solve more complex problems, this scheme extends the ECMAScript syntax with syntactic sugar to allow libraries to provide DSLs that easily produce, query, and manipulate content from other languages that are immune or resistant to injection attacks such as XSS, SQL Injection, etc.</p>
<p>That said, in reality, template literals are simply ECMAScript 6’s answer to the following features that JavaScript lacked in ECMAScript 5 and in earlier versions:</p>
<ul>
<li><strong>Multiline strings:</strong> A formal concept of multiline strings</li>
<li><strong>Basic string formatting:</strong> The ability to substitute parts of the string for values contained in variables</li>
<li><strong>HTML escaping:</strong> The ability to transform a string so it is safe to insert into HTML</li>
</ul>
<p>The working community of ES6 decided that instead of adding more functionality to JavaScript’s already existing strings, they will provide template literals that would represent an entirely new approach to solving these problems. In simple terms, template literals just act like those regular strings but delimited by backticks <code class="highlighter-rouge">(`)</code> instead of double or single quotes. For example, consider the following:</p>
<div class="language-js highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="kd">let</span> <span class="nx">message</span> <span class="o">=</span> <span class="s2">`Hello world!`</span><span class="p">;</span>
<span class="nx">console</span><span class="p">.</span><span class="nx">log</span><span class="p">(</span><span class="nx">message</span><span class="p">);</span> <span class="c1">//=> Hello world!</span>
<span class="nx">console</span><span class="p">.</span><span class="nx">log</span><span class="p">(</span><span class="k">typeof</span> <span class="nx">message</span><span class="p">);</span> <span class="c1">//=> string</span>
<span class="nx">console</span><span class="p">.</span><span class="nx">log</span><span class="p">(</span><span class="nx">message</span><span class="p">.</span><span class="nx">length</span><span class="p">);</span> <span class="c1">//=> 12</span>
</code></pre></div></div>
<p>As you can see, the above code shows how the variable message contains a normal JavaScript string. The template literal syntax is used to create the string value, which is then assigned to the message variable. If you want to use a backtick within a string, you can just escape it with a backslash <code class="highlighter-rouge">(\)</code>, as like below:</p>
<div class="language-js highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="kd">let</span> <span class="nx">message2</span> <span class="o">=</span> <span class="s2">`</span><span class="se">\`</span><span class="s2">Hello</span><span class="se">\`</span><span class="s2"> world!`</span><span class="p">;</span>
<span class="nx">console</span><span class="p">.</span><span class="nx">log</span><span class="p">(</span><span class="nx">message2</span><span class="p">);</span> <span class="c1">// `Hello` world!</span>
<span class="nx">console</span><span class="p">.</span><span class="nx">log</span><span class="p">(</span><span class="k">typeof</span> <span class="nx">message2</span><span class="p">);</span> <span class="c1">// string</span>
<span class="nx">console</span><span class="p">.</span><span class="nx">log</span><span class="p">(</span><span class="nx">message2</span><span class="p">.</span><span class="nx">length</span><span class="p">);</span> <span class="c1">// 14</span>
</code></pre></div></div>
<p><strong>NOTE:</strong> There’s no need to escape either double or single quote inside the template literals.</p>
<p><strong>Multiline Strings:</strong> Since the first version of the language, JavaScript community has been wanting a way to create multiline strings. But unfortunately, when you’re using double or single quotes, strings must be completely contained on a single line.</p>
<p>That said, JavaScript does have a workaround for creating multiline strings. You can create multiline strings by using a backslash <code class="highlighter-rouge">(\)</code> before a newline. Here’s an example:</p>
<div class="language-js highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="kd">var</span> <span class="nx">message3</span> <span class="o">=</span> <span class="dl">"</span><span class="s2">Multiline </span><span class="se">\</span><span class="s2">
string</span><span class="dl">"</span><span class="p">;</span>
<span class="nx">console</span><span class="p">.</span><span class="nx">log</span><span class="p">(</span><span class="nx">message3</span><span class="p">);</span>
</code></pre></div></div>
<p>As you see, this string has no newlines present when printed to the console because the backslash is treated as a continuation rather than a newline. If you want to show a newline within the output, you’d need to manually include it:</p>
<div class="language-js highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="kd">var</span> <span class="nx">message4</span> <span class="o">=</span> <span class="dl">"</span><span class="s2">Multiline </span><span class="se">\n\</span><span class="s2">
string</span><span class="dl">"</span><span class="p">;</span>
<span class="nx">console</span><span class="p">.</span><span class="nx">log</span><span class="p">(</span><span class="nx">message4</span><span class="p">);</span>
</code></pre></div></div>
<p>Other pre-ECMAScript 6 attempts to create multiline strings usually relied on arrays or string concatenation, such as the following:</p>
<div class="language-js highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="kd">var</span> <span class="nx">message5</span> <span class="o">=</span> <span class="p">[</span>
<span class="dl">"</span><span class="s2">Multiline </span><span class="dl">"</span><span class="p">,</span>
<span class="dl">"</span><span class="s2">string</span><span class="dl">"</span>
<span class="p">].</span><span class="nx">join</span><span class="p">(</span><span class="dl">"</span><span class="se">\n</span><span class="dl">"</span><span class="p">);</span>
<span class="kd">var</span> <span class="nx">message6</span> <span class="o">=</span> <span class="dl">"</span><span class="s2">Multiline </span><span class="se">\n</span><span class="dl">"</span> <span class="o">+</span>
<span class="dl">"</span><span class="s2">string</span><span class="dl">"</span><span class="p">;</span>
<span class="nx">console</span><span class="p">.</span><span class="nx">log</span><span class="p">(</span><span class="nx">message5</span><span class="p">);</span>
<span class="nx">console</span><span class="p">.</span><span class="nx">log</span><span class="p">(</span><span class="nx">message6</span><span class="p">);</span>
</code></pre></div></div>
<p>In pre-ECMAScript 6 era, creating multiline strings for arrays found to be very useful for <strong>HTML escaping</strong>, and/or proper indentation of your HTML within JavaScript.</p>
<p>You would simply do something like:</p>
<div class="language-js highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="kd">var</span> <span class="nx">oldTemplate</span> <span class="o">=</span> <span class="p">[</span>
<span class="dl">'</span><span class="s1"><div class="callout"></span><span class="dl">'</span><span class="p">,</span>
<span class="dl">'</span><span class="s1"><p>Foo Bar Baz are awesome</p></span><span class="dl">'</span><span class="p">,</span>
<span class="dl">'</span><span class="s1"></div></span><span class="dl">'</span>
<span class="p">].</span><span class="nx">join</span><span class="p">(</span><span class="dl">''</span><span class="p">);</span>
<span class="nx">console</span><span class="p">.</span><span class="nx">log</span><span class="p">(</span><span class="nx">oldTemplate</span><span class="p">);</span>
</code></pre></div></div>
<p>This may seem useful to you and make some sense but honestly, come ECMAScript 6, this sounds like you are just faking into the DOM. Clearly, not a great way! Here’s how you do them in ES6.</p>
<div class="language-js highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="kd">var</span> <span class="nx">newTemplate</span> <span class="o">=</span> <span class="s2">`
<div class="callout">
<p>Foo Bar Baz are awesome</p>
</div>
`</span><span class="p">;</span>
<span class="nx">console</span><span class="p">.</span><span class="nx">log</span><span class="p">(</span><span class="nx">newTemplate</span><span class="p">);</span>
</code></pre></div></div>
<p><strong>Making Substitutions:</strong> To this point, template literals may just look like to you as fancier versions of normal JavaScript strings. But, the real difference between the two is in template literal substitutions. It allows you to embed any valid JavaScript expression inside a template literal and output the result as part of the string. Here’s how:</p>
<div class="language-js highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="kd">let</span> <span class="nx">friendsName</span> <span class="o">=</span> <span class="dl">"</span><span class="s2">Nicolas Coden</span><span class="dl">"</span>
<span class="kd">let</span> <span class="nx">friendsMessage</span> <span class="o">=</span> <span class="s2">`My friend </span><span class="p">${</span><span class="nx">friendsName</span><span class="p">}</span><span class="s2"> is a genius.`</span><span class="p">;</span>
<span class="nx">console</span><span class="p">.</span><span class="nx">log</span><span class="p">(</span><span class="nx">friendsMessage</span><span class="p">);</span>
<span class="c1">//=> My friend Nicolas Coden is a genius.</span>
</code></pre></div></div>
<p>The substitution <code class="highlighter-rouge">${friendsName}</code> accesses the local variable name and inserts it into the friendsMessage string. The message variable would then holds the result for the substitution.</p>
<blockquote>
A template literal can access any variable accessible in the scope in which it is defined. Attempting to use an undeclared variable in a template literal throws an error in strict and non-strict modes.
</blockquote>
<p>As all substitutions are just JavaScript expressions, you can substitute more than just simple variable names. You can easily embed calculations, function calls, and more.</p>yashumittal
https://cdn.codecarrot.net/images/1-3zyOAYB2AfNIC_7O7F_ZNQ.png
Top 5 Reasons - Why Most Of The Startups Fail?2017-09-30T23:56:00+00:002017-09-30T23:56:00+00:00https://blog.codecarrot.net/top-5-reasons-why-most-of-the-startups-fails<p>Being a <strong>startup</strong> founder myself and with a prior experience of building a startup from scratch and sharing both successful moments and moments of failure one great learning has been that we can’t pin point any specific reason for the startup failures. There can be more than 50–100 reasons which can lead to startup not able pulling it off and eventually have to shut the shop or pivot to different business model or restructure the entire startup business.</p>
<p>Let’s first understand what actually startup looks like , One of the most practical and relevant definition of startup has been given by <em>Eric Ries</em>. He said</p>
<blockquote>
A startup is a human institution designed to deliver a new product or service under conditions of extreme uncertainty.
</blockquote>
<p>So one thing is very clear that startup comes into existence with a purpose to solve . They not only have to define the problem statement but also need the financial support to experiment with their business model and reach the right market-fit stage till then it’s all the test of founders and team members character and coordination with each other, how the entire team allign with a startup’s vision plays the pivotal role in sustaining the bad phase which is unavoidable.</p>
<h2 id="what-stats-say-about-startup-failure">What stats say about startup failure:</h2>
<p>As per stats related to small startup failures are</p>
<ul>
<li>A bit more than 50 percent of small businesses fail in the first four years.</li>
<li>In fact, of all small businesses started in 2011:</li>
<li>4 percent made it to the second year</li>
<li>3 percent made it to the third year</li>
<li>9 percent made it to the fourth year</li>
<li>3 percent made it to the fifth year</li>
</ul>
<p>But being a founder you don’t need to give too much thought to numbers , yes it’s important but as an entrepreneur we need to be prepared to hustle hard and need to have first-hand failure experience.</p>
<blockquote>
We can only succeed when we successfully learn to handle our failures
</blockquote>
<p><strong>CBInsights</strong> compiled the list of startup failure post-mortems, after studying many startups against certain failure post-mortem points and concluded that , One — there is rarely one reason for a single startup’s failure. And two — across all these failures, the reasons are very diverse. They listed 20 reasons for startup not able to succeed out of which we will discuss Top 5 relevant reasons which results to startup failures based on my personal experience and the research CBinsights team came up with.</p>
<h2 id="top-5-reasons-for-startup-failures">Top 5 Reasons for Startup Failures:</h2>
<ol>
<li><strong>Product Market Fit:</strong> Product/Solutions built was not what a market needed in that phase of market context. To be more precise startup built the solutions which wan not solving the problems relevant to the existing market. Their Idea or solution were not competent</li>
<li><strong>No Financial Fuel:</strong> This is a common problem when any startup starts without having a clear cut financial bandwidth to start and also they have the lack of financial backup to sustain the phase where they were building the product and testing it to make it market-fit.</li>
<li><strong>Wrong Team:</strong> Startup lacked in right founding team combination with the diverse field experience and skill-sets to pull the first MVP themselves. Founders conflict pops out due to lack of clarity in purpose and with ability to sustain financial challenges leading to separation and the death of the startup in first 6 month itself.</li>
<li><strong>Can’t sustain the competition:</strong> After passing the litmus test of first 12 months, and finding the sustainable revenue model they struggled to compete with their peer competitors who entered into the same market with more preparation or with more financial power to outcompete them. Due to ignorance & lack of pro-active measures to outcompete their peers , lack of competitive and market analysis in being future proof lead to their demise.</li>
<li><strong>Product Pricing Was Not Right:</strong> One of the biggest mistake the product marketing team does is that they don’t price their product right enough to suit the market in which they are competing. Due to lack of consumer need analysis and some abrupt decisions to quickly capture the market startups ignores the essence of pricing their product/services right. As per CBInsights</li>
</ol>
<p><strong>“Pricing is a dark art when it comes to startup success and startup post-mortems highlight this difficulty in pricing a product was not too high or too low to make money in context of the particular costs of a company. Delight IO saw this struggle in multiple ways, writing, “Our most expensive monthly plan was US$300. Customers who churned never complained about the price. We just didn’t deliver up to their expectation. We originally price by the number of recording credits. Since our customers had no control on the length of the recordings, most of them were very cautious on using up the credits. Plans based on the accumulated duration of recordings make much more sense for us and the number of subscription showed.”</strong></p>
<h2 id="summary">Summary</h2>
<p>There is no denying the fact the success ratio for any startup or small businesses are 1 out of 10, but still the success of 1 startup should be an inspiration for any entrepreneur to give it a try, there will always be an option to pivot and try news way of doing a business, failures are inevitable but that experiences will play a vital role in shaping you as an individual and will prepare you for much bigger risk and even bigger rewards .</p>
<blockquote>
So don’t be bogged down by what is written instead follow your heart and write your own chapter of failures and successes.
</blockquote>yashumittalBeing a startup founder myself and with a prior experience of building a startup from scratch and sharing both successful moments and moments of failure one great learning has been that we can’t pin point any specific reason for the startup failures. There can be more than 50–100 reasons which can lead to startup not able pulling it off and eventually have to shut the shop or pivot to different business model or restructure the entire startup business.
https://i.imgur.com/n4DWb4x.jpg
How Your Android Code Compiles To Deliver .APK Package File?2017-09-30T22:32:00+00:002017-09-30T22:32:00+00:00https://blog.codecarrot.net/how-your-android-code-compiles-to-deliver-apk-package-file<p>New age programmers rely heavily on API, SDK’s , Smart Editors to write codes, but there is a lot of process which goes behind to bring forth the finished product. Technically there are following stakeholders involved to make development happen</p>
<ol>
<li>Laptop</li>
<li>Software/Editor/SDK/Frameworks/Libraries</li>
<li><a href="//www.codecarrot.net/">Programmers</a></li>
</ol>
<p>Programmer plays a vital role in setting up computers with necessary tools and software’s before they start developing any project using the editor. How your code which you write compiles and becomes an executable file is what we seldom give a thought. Today we will together decode the entire process of writing a code and getting the finished APK.</p>
<h2 id="journey-from-writing-raw-code-to-a-finished-apk-">Journey From Writing Raw Code To A Finished APK :</h2>
<h3 id="step-1-configuration-of-required-softwares">Step 1: Configuration of required software’s</h3>
<p>It includes Installing Android Studio and Configuring android <strong>SDK</strong> and <strong>JVM</strong></p>
<h3 id="step-2-coding">Step 2: Coding</h3>
<p>We import necessary libraries and configure necessary permissions and dependencies based on project requirement and start coding as per the wireframe of the product.</p>
<h3 id="step-3-compiling">Step 3: Compiling</h3>
<p>This is where we will dig deeper. When we run our code from the editor following process takes place</p>
<h3 id="a-java-compilation--packaging">A. Java Compilation & Packaging</h3>
<ol>
<li>Android java code files compiles to .class files via <strong>javac</strong> command</li>
<li><code class="highlighter-rouge">.class</code> files gets converted to <code class="highlighter-rouge">.dex</code>:</li>
</ol>
<p><code class="highlighter-rouge">.class</code> files is also known as Java byte-code this byte code further get converted to dalvik byte-codes which is the format which <strong>android OS</strong> understands here all <code class="highlighter-rouge">.class</code> files and any <code class="highlighter-rouge">.jar</code> library files compiles to single <strong>classes.dex using dx command. DEX is called as Dalvik executable files</strong>.</p>
<p>DEX files is memory efficient and loads very swiftly compared to JVM based .class files and is lightweight too .</p>
<h3 id="b-packaging-apk-file">B. Packaging <code class="highlighter-rouge">(.APK file)</code>:</h3>
<p>Packaging is done using android <strong>apkbuilder</strong> tool <strong>(APPT)</strong>. It generate a <code class="highlighter-rouge">.apk</code> file from a <strong>DEX file + non-Java libraries + zipped resources</strong>. The <code class="highlighter-rouge">classes.dex</code> file, resource files are compressed by <strong>aapt (Android Asset Packaging Tool)</strong>. This <code class="highlighter-rouge">.apk</code> file is what you run on android device and is distributed to all the major app stores after being signed for release. User gets to download this files from <strong>Google Play Store</strong> and other app stores on their android powered device.</p>
<p><img src="https://cdn.codecarrot.net/images/1-ASSbFftzD0WZ77jlkgQEHg.png" alt="Explaining the build process of an apk package file" /></p>
<h2 id="step-4-running-the-apk-files-on-android-device">Step 4: Running the .apk files on android device</h2>
<p>When apk runs following steps takes place</p>
<ol>
<li>When user clicks the app icon after installing the <code class="highlighter-rouge">.apk</code> file <strong>Zygote</strong> process is called to launch the app, it contains core libraries that are needed by an application, so basically it is an incomplete android process which runs, zygote create a duplicate copy of itself using a system call called fork. <strong>Zygote</strong> then load into new App process using main system files as shown below:</li>
</ol>
<p><img src="https://cdn.codecarrot.net/images/0-AjTy1nZWIY5rZsjB.png" alt="Zygote process to app process" /></p>
<ol>
<li>The new app process generated by fork call loads the app code stored in <strong>classes.dex</strong> file, which comes packaged with the <code class="highlighter-rouge">.apk</code> file, it filters the classes.dex file from .apk and stores it into a separate directory. Android do not copy classes.dex files directly instead it converts Dalivik byte-code in <strong>classes.dex</strong> into native <strong>machine code</strong> which android OS hardware understand.</li>
</ol>
<p>All <strong>classes.dex</strong> gets converted into an ELF shared object, this library format is called as OAT and the tool that converts the <strong>classes.dex</strong> file is called <strong>dex2oat</strong>.</p>
<p><img src="https://cdn.codecarrot.net/images/0-6Va-tD_HxV3Nj4Qo.png" alt="classes.dex to OAT version" /></p>
<p>The native OAT library version is mapped into the process as shown below and from there the android app is launched running initial android activity.</p>
<p><img src="https://cdn.codecarrot.net/images/0-zedmqQWrucsw0bqF.png" alt="App Process OAT" /></p>
<h3 id="the-detailed-android-building-process-workflow">The Detailed Android Building Process Workflow:</h3>
<p><img src="https://cdn.codecarrot.net/images/1-LbKGyabN6vr-9iR-rvnzPg.png" alt="The Detailed Android Building Process Workflow" /></p>
<h2 id="summary">Summary</h2>
<p>Mobility has been possible due to Mobile app ecosystem which works together to deliver a solution which has made end users life easy and fast going. Developer is just one part of the ecosystem there are other facilitator like open source community, phone manufacturers, network operators, internet community and agile governance which has lead to this digital revolution where mobile and it’s app has played the vital role to uplift humanity at large.</p>yashumittalNew age programmers rely heavily on API, SDK’s , Smart Editors to write codes, but there is a lot of process which goes behind to bring forth the finished product. Technically there are following stakeholders involved to make development happen
https://cdn.codecarrot.net/images/code-to-android-file1600.png
Have You Switched To Kotlin Yet?2017-09-30T22:05:00+00:002017-09-30T22:05:00+00:00https://blog.codecarrot.net/have-you-switched-to-kotlin-yet<p><img src="https://i.imgur.com/L7kNsC2.jpg" alt="java is old and kotlin is great and fast" /></p>
<blockquote>
The beauty of being a technology entrepreneur is that you always get bounty of opportunities to keep yourself upgraded and get paid for the same. You never go out of fashion.
</blockquote>
<p><img src="https://i.imgur.com/JrtAzDX.png" alt="Android loves kotlin" /></p>
<p>With more than <strong>2 billion</strong> active android devices and more than 80 % market share in mobile OS, the android has become the most preferred development platform for many mobility startups . For many software engineers android development has become the first career choice. Android has come a long way since its inception in 2007, the first commercial device was launched in 2008 as <strong>HTC Dream</strong> since than the operating system has gone through multiple major releases, with the current version being <strong>8.0 “Oreo”</strong>, released in August 2017.</p>
<p>One of the latest announcement made by google at their official event during the I/O keynote, was that they will make Kotlin an officially supporte language for Android development. Their latest Android studio version 3.0 Preview has started to ship with the latest support environment for the developer.</p>
<iframe src="https://www.facebook.com/plugins/video.php?href=https%3A%2F%2Fwww.facebook.com%2Fcodecarrotinc%2Fvideos%2F405524896625864%2F&show_text=0&width=560" width="100%" height="315" style="border:none;overflow:hidden" scrolling="no" frameborder="0" allowtransparency="true" allowfullscreen="true"></iframe>
<h2 id="kotlin--what--why-">Kotlin : What & Why ?</h2>
<p><img src="https://i.imgur.com/7zKq7Sf.png" alt="Benefits of using kotlin" /></p>
<h2 id="what">What?</h2>
<p><strong>Kotlin</strong> is an <strong>Android-compatible language that is concise, expressive, and designed to be type- and null-safe</strong>, java developer this enhanced libraries of kotlin will make your life more easy you can code more in less time, so there is nothing to worry as such, you can easily switch from classic android development mode to this advanced java based Kotlin environment which will give your more advanced tools. It has wonderful safety features in terms of null ability and immutability, which makes android app more robust , safe and optimum in working, this feature has made google to make Kotlin their preferred official language for their sdk.</p>
<h2 id="why-kotlin">Why Kotlin?</h2>
<p><strong>Kotlin</strong> is slowly becoming popular among java developers who were using the old version of it to develop android based mobile app, to answer why <strong>kotlin</strong> we need to understand what are the loop holes in conventional java which led to the new language. I will list few of those problems</p>
<h2 id="1-error-handling">1. Error Handling:</h2>
<p>Java’s biggest weakness is the way they handle null exception(NPE). Null pointer exception is very common reason for android app crashes still java has not given a damn about it and doesn’t handle it smartly. Jetbrain developed <strong>kotlin</strong> which is super efficient in overcoming NPE problem. Kotlin compiler comes with in built mechanism to handle null data via auto-cast mistake feature. In Kotlin all the variables are non-null by default which automatically stamps out the chances of occurrence of NullPointerException since it won’t be compiled</p>
<h2 id="2-memory-leaks">2. Memory Leaks:</h2>
<p>Java is more susceptible to memory leaks because of the way java handles non-static implementations of inner & anonymous inner classes ,keeping an implicit reference to the outer class making it prone to <strong>memory leakages</strong>. It’s a basic design flow in Java which is known from a long time now</p>
<p>Apart from the above said weakness lets understand the pros of <strong>kotlin</strong> which can encourage you to switch if not yet thought.</p>
<h2 id="why-you-should-switch-now">Why you should switch Now?</h2>
<ol>
<li>Kotlin is clean & concise to write</li>
<li>You have to write less codes eventually you make lesser bugs</li>
<li>If you want to port your existing java based project do not worry <strong>Kotlin</strong> is extremely flexible and <strong>interoperable</strong>, you can keep your existing code, continue to use the various Android libraries, and incrementally add Kotlin code to your project. Unlike almost any other language, Kotlin is a drop-in replacement you can use bi-directionally — you can call into the Java language from Kotlin, and you can call into Kotlin from the Java language. You cam mix java and kotlin in your project with ease</li>
<li>Kotlin programming syntaxes will not look like a ghost language , if you love oops you will find kotlin an easy fit.</li>
<li>Freedom from the big millennial problem <strong>NPE(Null Pointer Exception)</strong> & also Kotlin is Null-Safe.</li>
<li>Great Support system as it is an Open source based development platform. It’s new and fresh and also google has adopted it officially. You have very little to worry about continuing support, because JetBrains which specialize in creating some of the most used IDEs in the world is the brain behind it. Android Studio is built upon IntelliJ IDEA, an IDE built by JetBrains — the same company that created the Kotlin language. The JetBrains team has been working for years to make sure Kotlin works great with IntelliJ IDEA. Starting with Android Studio 3.0, tooling support for Kotlin is bundled directly into Android Studio.</li>
</ol>
<h2 id="summary">Summary</h2>
<p>To make more informed decision go ahead and try it yourself I can bet, you will start loving it more, the more you use it. The ease of coding and robust coding structure saves lot of your valuable time which you can spend learning more or in having awesome time with your loved ones. It is a fresh language and future too, so if want to have an excellent career Kotlin is a weapon you must add in your kitty.</p>
<p>So what are you waiting for download new android studio 3.0 add the Kotlin plugin and get your hands dirty, have a feel and share your experience here with me, I would love to hear the same.</p>yashumittal
https://i.imgur.com/L7kNsC2.jpg
The Beginners Guide to Advertise on Instagram2017-09-29T07:57:00+00:002017-09-29T07:57:00+00:00https://blog.codecarrot.net/the-beginners-guide-to-advertising-on-instagram<p>Instagram now has more than <a href="https://blog.instagram.com/post/154506585127/161215-600million">600 million users</a>. That’s a big audience. For comparison, Twitter only has <a href="https://about.twitter.com/company">313 million monthly active users</a>.</p>
<p>But it’s not the size of Instagram’s user base that makes it such an enticing marketing channel—it’s the level of engagement that brands get on the platform.</p>
<p>If you’ve ever posted anything on social media as a small brand, you know how often if feels like you’re talking to a void. Too often, no one responds. No likes, comments, retweets—you get the idea.</p>
<p>Not so with Instagram. No matter how small your audience, your posts probably still receive at least a few likes and comments—especially if you use <a href="/what-are-hashtags-and-why-you-need-to-start-using-them-on-social-media/">relevant hashtags</a>.</p>
<p>The business case for Instagram ecommerce is strong. Not only does Instagram’s engagement demolish Twitter, Pinterest, Google+, and LinkedIn, but, for brands, it even outperforms Facebook by a factor of 10.</p>
<p>It kind of makes you wonder why more brands aren’t on Instagram, right?</p>
<h2 id="the-link-problem">The “Link Problem”</h2>
<p>For a long time, the big problem with marketing on Instagram has been getting your fans on Instagram back to your website. Since you can’t place clickable links in your posts, brands have to direct Instagram follows to the link in their bio instead—and continuously update that link as they post new products.</p>
<p>Although this isn’t ideal, Instagram has still been an impactful source of traffic and sales for many companies. In fact, Instagram was the most successful source of traffic in one of our recent case studies. All that traffic came from the same “link in bio”.</p>
<p>But here’s the really exciting part. You can now include links to your website in Instagram posts — <em>if you advertise</em>. In the example below, the “Shop Now” button takes readers directly to a product page.</p>
<h2 id="introduction-to-instagram-advertising">Introduction to Instagram Advertising</h2>
<p>Instagram advertising is still quite new. Before recently, though, there was a workaround: sponsored posts.</p>
<p>In the past, if you wanted to advertise on Instagram, you had to do it by negotiating privately with Instagram influencers and asking them to promote your brand on their account. While this can be a very effective way to drive traffic and sales, it has limitations:</p>
<ul>
<li>Often expensive</li>
<li>Requires reaching out and negotiating</li>
<li>No accountability or recourse if they don’t deliver</li>
<li>Limited audience targeting</li>
</ul>
<p>Sponsored posts still have their place. Getting someone else to promote your product carries solid benefits. It provides social proof, adding a cool factor to your business, and people are more likely to buy something when someone they trust bought it first. Plus, while you don’t have a lot of control over the influencers audience, at least you don’t have to make any decisions about who to target.</p>
<p>Sponsored posts are still a great way to do influencer outreach, especially if you sell a product.</p>
<p>However, there’s now a new way.</p>
<h2 id="how-instagram-advertising-works">How Instagram Advertising Works</h2>
<p>Since late 2015, anyone can now create Instagram ads through Facebook’s self-serve advertising platform. With it, you have total control over your ads, how they appear, and who sees them. And unlike sponsored posts, your ads get posted directly from your own account. The advantages to the new method include:</p>
<ul>
<li>Scalable pricing</li>
<li>Self-serve, instant</li>
<li>Robust reporting, you’re in control</li>
<li>Highly-refined audience targeting</li>
</ul>
<p>What’s more, with Instagram’s move away from a <a href="https://blog.instagram.com/post/141107034797/160315-news">chronological feed in favor of a curated feed</a>, you never know how many of your followers will see your posts.</p>
<h2 id="types-of-ads">Types of Ads</h2>
<p>You can now run four different types of ads on Instagram.</p>
<ul>
<li><strong>Photo Ads</strong> — One simple photo in landscape or square format.</li>
<li><strong>Video Ads</strong> — Videos can be up to 60 seconds long in landscape or square format.</li>
<li><strong>Carousel Ads</strong> — Include up to 4 more photos people can view by swiping.</li>
<li><strong>Stories Ads</strong> — Advertise on Instagram stories with photo or video content.</li>
</ul>
<h2 id="campaign-objectives">Campaign Objectives</h2>
<p>Instagram Ads offers several campaign objectives. These are potential goals for your campaign that you select from a list. Don’t neglect this choice—it will influence how your ads are optimized and how you pay for them. For example, if your goal is to get people to watch your video, you probably don’t care how people click on your link.</p>
<p>You may already be familiar with campaign objectives from creating Facebook ads. Options include:</p>
<ul>
<li><strong>Awareness</strong> — Drive awareness of your business, product, app or service.
<ul>
<li>Reach</li>
<li>Reach & Frequency</li>
<li>Brand Awareness</li>
<li>Local Awareness</li>
</ul>
</li>
<li><strong>Consideration</strong> — Have potential customers learn more about your products or services.
<ul>
<li>Website Clicks</li>
<li><a href="/how-to-make-your-own-online-videos">Video Views</a></li>
<li>Reach & Frequency</li>
</ul>
</li>
<li><strong>Conversion</strong> — Increase product sales, mobile app downloads, even visitors to your store.
<ul>
<li>Website Conversions</li>
<li>Dynamic Ads on Instagram</li>
<li>Mobile App Installs</li>
<li>Mobile App Engagement</li>
</ul>
</li>
</ul>
<h3 id="targeting-options">Targeting Options</h3>
<p>Instagram ads have all the same <a href="https://business.instagram.com/advertising">targeting options</a> as Facebook ads 🙌 . These include targeting based on location, demographics, interests, behavior, lookalike audiences, and automated targeting (let Facebook decide).</p>
<p>Even better, if you have Custom Audiences, you can target them on Instagram. Custom Audiences are groups people who have already connected with your brand in some way. This could be by visiting your website, engaging with your posts on Facebook, using your app, or by sharing their contact info with you.</p>
<h2 id="how-to-create-your-first-instagram-ad">How to Create Your First Instagram Ad</h2>
<p>Let’s dive into exactly how you can create your first ad on Instagram.</p>
<h3 id="step-1---link-your-instagram-account-to-your-facebook-page">Step 1 - Link Your Instagram Account to Your Facebook Page</h3>
<p>The first step to creating an Instagram ad is to link your Instagram account to your Facebook page. You only need to this once.</p>
<p>Visit the Settings for your Facebook page and click on “Instagram Ads”.</p>
<p><img src="https://i.imgur.com/L3gpotq.png" alt="Connect Facebook Page with Instagram Account" /></p>
<p>Next, click “Add an Account” and fill in your Instagram login credentials. If you don’t already have an Instagram account, you can also create one now. When you’re finished click “Confirm”.</p>
<p><img src="https://i.imgur.com/sfO624p.png" alt="Confirm the account connecting with facebook page" /></p>
<h3 id="step-2---create-a-campaign">Step 2 - Create a Campaign</h3>
<p>Now that you’ve linked your Instagram account to your Facebook page, it’s time to head over to the Ads Manager and create your first campaign. If you’re more comfortable using Power Editor, you can also create Instagram ads there. If you already create Facebook ads, much of this process will be familiar to you.</p>
<p>In the Ads Manager, click on “+ Create Campaign” near the top left corner of the screen.</p>
<p>Next, choose your campaign objective. Be aware that not all objectives are compatible with Instagram Stories Ads.</p>
<p><img src="https://i.imgur.com/S6FbOIn.png" alt="Instagram campaign objectives screenshot" /></p>
<p>The “Conversions” objective is great choice for ecommerce businesses that want to drive sales. Note that in order to use this objective, you need to have a the <a href="/relax-advertising-on-facebook-just-got-a-lot-easier">Facebook pixel</a> installed on your website. If you don’t have one installed yet, you’ll get a message letting you know.</p>
<p><img src="https://i.imgur.com/bteum7H.png" alt="Screenshot of Conversions campaign objective" /></p>
<p><strong>Pro Tip:</strong> <a href="/relax-advertising-on-facebook-just-got-a-lot-easier">The Beginner’s Guide to the New Facebook Pixel</a></p>
<h3 id="step-3---create-your-ad-set">Step 3 - Create Your Ad Set</h3>
<p>On the Ad Set page, you’ll be able to choose “Purchase” as the type of conversion you want to optimize for.</p>
<p><img src="https://i.imgur.com/Ulht2DG.png" alt="Selecting "Purchase" conversion screenshot" /></p>
<p>Next, you can define who you want to see your ads, and how much money you want to spend. All the same targeting options are available for Instagram ads as for Facebook ads.</p>
<p>If you have any Custom Audiences already created, you can select them for targeting with your Instagram ad at this point.</p>
<p>Next, select your ad Placements. You’ll see the option to run your campaign on Instagram, as well as Facebook and Messenger.</p>
<p><img src="https://i.imgur.com/KlFVPoA.png" alt="Ad Placements screenshot" /></p>
<p>When figuring out how much you want to spend, I recommend starting low. You can always increase the budget later if your ad is performing well.</p>
<p>When you’re finished choosing who to target and how much to spend, click “Continue” in the bottom right.</p>
<p><img src="https://i.imgur.com/0l9dswg.png" alt="Instagram advertising budget screenshot" /></p>
<p>On the next screen you’ll see an option to choose your ad format. Note that the Canvas format is not compatible with Instagram. Once you’ve decided, scroll down to upload your images or videos.</p>
<p><img src="https://i.imgur.com/5Cn1k1w.png" alt="Screenshot of Instagram ad formats" /></p>
<p>After you’ve uploaded your visuals, scroll down further and you’ll see an option on the left to add text to your ad.</p>
<p>Finally, to the right of the text editor, you’ll be able to preview how your ad will look on Instagram. Here’s how my ad would look if I uploaded a picture of our office dog, Petunia. You can also see how your ad would look in any other formats selected.</p>
<p>Once everything looks good, click “Place Order”. Otherwise, go back and make changes.</p>
<h2 id="step-4---repeat">Step 4 - Repeat!</h2>
<p>The first one is always the hardest. Once you’ve created your first ad on Instagram, it’ll be much easier the second time around. In the meantime, use the <a href="https://www.facebook.com/ads/manager/account/campaigns/">Ads Manager</a> to keep track of how your first ad is performing.</p>yashumittalInstagram now has more than 600 million users. That’s a big audience. For comparison, Twitter only has 313 million monthly active users.
https://i.imgur.com/Sgt2YGH.jpg
5 things to remember when you write business email2017-09-28T21:11:00+00:002017-09-28T21:11:00+00:00https://blog.codecarrot.net/5-things-to-remember-when-you-write-business-email<p>Did you know that a huge part of your business branding efforts are related to how you write business email? We’ve all had those messages land in our inboxes where the sender didn’t make the right choices and we react accordingly — with a quick delete.</p>
<p>The subject field alone can make or break the chances of an email being opened. If you do open it, the initial impression determines whether you continue on or — as I too often do — delete!</p>
<p>Business emails shouldn’t be informal. Using proper sentence structure, appropriate tone and correct grammar are important.</p>
<div class="callout">
With every single email you send you have the opportunity to build and solidify your business relationships.
</div>
<p>It falls on you, as the author, to make sure the perception, intent and tone you wish to relay comes across to those you email. Make the wrong choices or neglect certain criteria and it’s a lost opportunity to make a good impression — and create or retain a customer.</p>
<h2 id="how-you-write-business-email-says-a-lot-about-you-and-your-company">How you write business email says a lot about you (and your company)</h2>
<p><img src="https://i.imgur.com/zF0uGvn.jpg" alt="Man working at laptop" /></p>
<p>As you know, with email you lose the benefit of eye contact, body language, a firm handshake and your sparkling smile. The person receiving the message has no idea what a great guy or gal you are to do business with, especially with first contact emails — this may be your only chance to develop that partnership.</p>
<p>Instead, you have to rely on the written word, which is why successful business emails are all about the details. I know it’s easy to get overwhelmed with specifics, but this is your business we’re talking about. Professionals take the time to pay attention to the necessary elements that will contribute to their success.</p>
<p>Make sure your message is well-received by ensuring the following five items are in place and done correctly. You’ll provide confidence to those on the other end that working with you will be a smooth and pleasant experience.</p>
<p>Follow this recipe for business email success:</p>
<h2 id="1-the-form-field">1. The Form field</h2>
<p>Surprisingly, I still receive business emails with improperly structured from fields. Make sure your name is displayed properly. For example, Yashu K. Mittal. Not yashu k mittal, yashu mittal, k. mittal, a nickname or only your email address. Proper capitalization is imperative. If your name is written in all lowercase letters, you run the risk of being perceived as a spammer or worse yet — lacking education or tech savvy.</p>
<blockquote>
Use your own domain name for your business email address to help build your brand with every email you send.
</blockquote>
<p>Free email services such as Hotmail, Gmail or Yahoo! are best used for personal communications. If you want folks to invest in doing business with you, invest in having your own domain-based email address.</p>
<h2 id="2-the-subject-line">2. The subject line</h2>
<p>A short, accurate and well-thought-out subject line is key to making sure your email is opened. Keep it to five to seven words that accurately identify the topic and context of your message. With 40 percent of emails now being opened on mobile, try to stick to 50 characters or less. And remember, proper capitalization and spelling are a must.</p>
<blockquote>
When the direction or topic of the conversation changes, change the subject line.
</blockquote>
<p>Revising the subject field to reflect the conversation’s new direction helps all involved stay organized (and reflects that you are an efficient communicator).</p>
<h2 id="3-the-greeting">3. The greeting</h2>
<p>By not including a greeting at the beginning of your email, you might be viewed as bossy or terse. Take the time to include “Hello” or “Hi,” along with the recipient’s name. You can also indicate the level of formality your message is meant to convey in how you choose to address your customer (Jane, Ms. Doe, Dr. Doe, etc.).</p>
<blockquote>
Don’t get too informal too quickly. Let the other side dictate the level of formality and follow his or her lead.
</blockquote>
<p>You can usually get a sense of how those you communicate with prefer to be addressed by how they sign their emails to you.</p>
<h2 id="4-the-body">4. The body</h2>
<p>Communicate clearly. Complete, correctly structured and capitalized sentences that reflect proper grammar and punctuation are important when writing business emails. Keep sentences short (15 to 20 words) and paragraphs to no more than three or four sentences. Emails are meant to be pithy.</p>
<blockquote>
Avoid conveying emphasis by bolding or changing font colors because it can leave too much room for interpretation.
</blockquote>
<p>Instead choose the appropriate words to indicate your intent and tone.</p>
<h2 id="5-the-closing">5. The closing</h2>
<p>Whether it be “Thank you for your time!”, “Sincerely,” “Look forward to hearing from you!” or “Warm regards,” use a closing that is consistent with the tone and formality of your message. By not including one you increase the possibility that your email will be viewed as impersonal, demanding or curt. And always close by including your name.</p>
<p>It’s a competitive world out there. But if you integrate these five elements into every business email you write, partners will see you as tech savvy, courteous and a pleasure to communicate with. And that, my friends, is money!</p>yashumittalDid you know that a huge part of your business branding efforts are related to how you write business email? We’ve all had those messages land in our inboxes where the sender didn’t make the right choices and we react accordingly — with a quick delete.
https://i.imgur.com/Ecs9yxu.jpg
42 Timeless Ideas for Attracting More Visitors to Your Website2017-09-28T17:11:00+00:002017-09-28T17:11:00+00:00https://blog.codecarrot.net/42-timeless-ideas-for-attracting-more-visitors-to-your-website<p>The latest social media fads may come and go, but some strategies for attracting an audience online will always be in style.</p>
<p>Here are 42 of my favorite timeless ideas for attracting more visitors to your website. You can bet the farm on these. They’ll be as effective in five years as they are today.</p>
<h2 id="make-your-content-irresistible">Make Your Content Irresistible</h2>
<ol>
<li>All the promotion in the world won’t build a thriving audience if your content sucks. Truly incredible content, products or services can be your best marketing tool. Everything you do online has to start with creating something incredible.</li>
<li>Don’t be afraid to say what everyone else is thinking but not saying. Other people are probably thinking about it too, and they’ll love you for being brave enough to say something.</li>
<li>Write epic shit.</li>
<li>While you’re at it, make a real case for why the world should actually give a shit about what you have to say.</li>
<li>Put your words in a different format. Go visual. Try creating an infographic or slideshare presentation.</li>
<li>Go big. Write something so incredibly thorough and valuable that people are compelled to share it.</li>
<li>Interview someone exciting. You’ll learn something and the interviewee will probably share your session if you do a great job.</li>
<li>Learn how to create a viral post, and try creating one yourself as many of our readers like Maria, Benny, Steve and Jim have done.</li>
<li>Cut out the fluff. Publish when you have something worthwhile to share, not when your calendar says you’re supposed to publish.</li>
<li>Headlines! Headlines! Headlines! They’re ridiculously important. Enough said. Try these 5 easy tips for writing catchy headlines from Jeff Goins.</li>
<li>Give away your secrets. All of them.</li>
</ol>
<h2 id="take-your-show-on-the-road">Take Your Show on The Road</h2>
<ol>
<li>Be everywhere (as my friend Pat Flynn likes to say). Make videos, create a podcast, represent on different social media platforms.</li>
<li>Write guest articles for other blogs. This is still one of the most effective and underused strategies for building your own audience. Just do it and stop making excuses.</li>
<li>Join Help a Reporter Out (HARO). Do a good job and you might just end up on the front page of Yahoo like our friend Jaime Tardy did.</li>
</ol>
<h2 id="make-your-case-clear">Make Your Case Clear</h2>
<ol>
<li>When someone comes to your site, you have to answer the question they’ll be asking themselves: “why should I spend any time on this site instead of one of the dozens of other sites I already know and love?” You have to answer this question quickly, clearly and compellingly. Your Unique Selling Proposition is the key to making your case. If you don’t have a USP, it’s time to get one. Start with our guide to finding your USP.
Keep Them Coming Back</li>
<li>The best audience is a captive one. Instead of constantly relying on other sources of traffic, create your own by getting your visitors to subscribe for updates from you (focus on email first, social media second).</li>
<li>Directly ask people to subscribe once in a while. Tell ’em what’s in it for them.</li>
<li>Create special subscriber-only content.</li>
<li>In your welcome email for new subscribers, point them to your social media profiles so they can connect with you in different ways.</li>
<li>Optimize the heck out of your email sign-up offer. Try placing email sign-up boxes in different places (in your header, sidebar, within posts, end of posts or footer). Try changing the wording, button label, call to action and offer. See what works best over time. Just keep the best interests of your audience in mind and don’t do anything you don’t appreciate yourself.</li>
</ol>
<h2 id="make-it-prettyier-and-more-functional">Make it Pretty(ier) and More Functional</h2>
<ol>
<li>Your site’s design matters more than you think. If you have a crappy looking design, you’re missing out because too many of your hard earned visitors are leaving before they read your incredible content.</li>
<li>Design for function. What do you want your site to achieve? You want to hook your visitors and keep them coming back. Design with the end goal in mind.</li>
<li>Use social proof. New visitors are looking for clues about whether your site is worth spending time on. Use validation (in the form of metrics, testimonials, “as seen in” logos, etc.) to reinforce your value.</li>
<li>Make it easy for people to share your content (try using a plugin like Digg Digg, for example).</li>
</ol>
<h2 id="play-nice-with-the-search-engines-seo">Play Nice with the Search Engines (SEO)</h2>
<ol>
<li>Optimize your headline and content URL for the search engines. Use the Google Keyword Tool to find popular keywords. Don’t worry about optimizing your content. Write for humans like normal but use keywords in your headline and content URL.</li>
<li>Make sure your site is Google friendly. Offer a sitemap, use an SEO-optimized platform (or plugin) and register for Google Webmaster Tools.</li>
<li>Focus on optimized content instead of link-building for long-term SEO success.</li>
<li>Make your site as fast as possible. Site speed is now a factor in search rankings, and a faster site will keep more people from leaving before your page loads. Consider moving to a faster webhost and leverage caching (if you’re on WordPress try using a caching plugin like Quick Cache).</li>
</ol>
<h2 id="borrow-what-works">Borrow What Works</h2>
<ol>
<li>Innovation is important, but using proven formulas is smart and effective. Don’t be afraid to borrow from what you’ve seen work elsewhere. Try to figure out how other sites are bringing in visitors and try their techniques. Don’t copy directly, just tweak things to suit your own needs and audience. (For example, thanks to Chris Brogan for the inspiration for this post)</li>
<li>Your own successes can be borrowed upon as well. Look through your old content and think about your most successful strategies. Reuse what works until it doesn’t work any longer.</li>
<li>Use past behavior to predict future results.</li>
</ol>
<h2 id="organize-group-projects">Organize Group Projects</h2>
<ol>
<li>Organize a group writing project. Each blogger writes on a central theme, and each article links to all the others in the series.</li>
<li>Start a social media promotion group. Invite people you respect. Each person can submit content for others in the group to Tweet, Like, etc. only if it’s a good fit. Organize this for free using Google Groups.</li>
<li>Organize a group survey in your niche.</li>
</ol>
<h2 id="make-a-splash">Make a Splash</h2>
<ol>
<li>The best way to rise above the noise of the billions and billions of pieces of content being shared every day is to do something remarkable.</li>
<li>Create a big ambitious group project and invite your readers to participate.</li>
<li>Set a big audacious goal for yourself and report on your progress over the months or years it takes you to get there. Chris Guillebeau is visiting every country in the world by his 35th birthday, for example. That’s a story worth tuning into.</li>
</ol>
<h2 id="launch-a-product-or-service">Launch a Product or Service</h2>
<ol>
<li>Did you know that launching a new product or service can actually help grow your audience? It’s true. Launching a product also always leads to tons of interview requests, links from other blogs, partnership inquiries, and a different kind of respect from colleagues. Plus, because your new product will generate revenue, this should be top on your list.</li>
<li>Offer an affiliate program and pay commissions to people who refer customers to your product. Reach out to these affiliates before your launch and offer to help them with content, interviews, webinars or anything else that will help them drive sales. You’ll be getting access to a whole group of customers you wouldn’t have otherwise.</li>
</ol>
<h2 id="make-friends-in-high-places">Make Friends in High Places</h2>
<ol>
<li>The most consistent source of highly desirable visitors you can tap into are links for other respected sites in your niche. To attract these links on a regular basis, you need to 1) create remarkable link-worthy content and 2) make friends with other great content creators who could link to you. Just don’tmake connecting with people online harder than it actually is.</li>
<li>Link out freely to content you admire and think your audience would appreciate. Linking out is one of the best ways to get noticed and start making friends online. Make sure you include the name of the site or content author you’re linking to increase the chances of the author learning about your link.</li>
<li>Try creating a “follow friday” or “link love wednesday” type of post on a regular basis. It’s a great way to get noticed, make friends and share useful content with your audience.</li>
</ol>
<h3 id="now-there-are-two-things-id-love-you-to-do">Now, there are two things I’d love you to do.</h3>
<p>First, choose three or more of the items on this list. Implement them in the next day or two. Come back here and report on your success.</p>
<p>If you’ve already tried some of these strategies, let us know below which are your favorite.</p>yashumittalThe latest social media fads may come and go, but some strategies for attracting an audience online will always be in style.
https://i.imgur.com/puKzjgV.jpg
Simple Strategy to Getting Things Done2017-09-28T11:10:00+00:002017-09-28T11:10:00+00:00https://blog.codecarrot.net/simple-strategy-for-getting-things-done<h2 id="get-clear-about-whats-required">Get Clear About What’s Required</h2>
<p>When people set goals, particularly at the beginning of the year when working on their New Year’s resolutions, they tend to be overly optimistic about how much is actually possible. As a result, they over-commit or make lists that are far too long.</p>
<p>I’ve fallen into this trap before. I’ve learned that to be realistic, I must take the time to break goals down and ask, “What would actually be required for me to achieve this goal? How many hours would that take?” Once I have a list of activities and estimates of the time needed to achieve each item, I pull out my calendar and start scheduling all the activities.</p>
<p>This is the point when you come face to face with reality. If you realize that there’s not enough time in the day to accomplish everything you want, it’s time to go back and prioritize your goals. Once you’ve identified the things that are most important to accomplish, schedule the activities that those goals will require, and set aside the rest of your goals for later.</p>
<h2 id="create-a-daily-schedule">Create a Daily Schedule</h2>
<p>Simply setting aside time in your calendar may not be enough to achieve your goals. I go the extra step and create a daily schedule. Additionally, I use the Rule of 5. Each day I choose 5 specific tasks that will move me toward the completion of my goals and I ensure those tasks are included in my daily schedule. Daily use of the Top 5 Priority Action post-its can help keep your daily task list front and center. So if one of my daily tasks is to work on my book, I don’t simply say, “I’ll work on my book today” – I actually designate the hours that I’ll work on my book. This has been an essential step in ensuring that things actually get done.</p>
<p>To stay motivated, I review my yearly goals once a week, and then I plan my week around those goals. I identify what I need to accomplish in the coming week to achieve my long-term goals, and then I book those activities into my calendar. Each evening before I leave my office, I finalize my schedule for the following day. When I walk in each morning, I can be productive immediately rather than wasting precious time figuring out what I’m going to do.</p>
<h2 id="focus-on-the-big-rocks">Focus on the “Big Rocks”</h2>
<p>When planning my daily schedule, sometimes I realize that I have an unreasonable amount of work on my to-do list for the next day. I know that I can’t get it all done. This is when I turn to my list of “Big Rocks” – my most important priorities. (If you are not familiar with the terminology, “Big Rocks” comes from Dr. Stephen Covey’s method of time management. Watch a video of Covey demonstrating his approach here.)</p>
<p>I keep my Big Rocks in a list on my iPad. The Big Rocks are the things I need to get done this quarter. When my daily schedule is overbooked, the Big Rocks are the things that get done.</p>
<h2 id="center-and-visualize">Center and Visualize</h2>
<p>I start each day with a meditation to help me get grounded. Before I get up from my meditation cushion, I mentally rehearse my day, visualizing and feeling myself staying focused, working efficiently, and being productive. This helps to activate the Law of Attraction, lining up the inner and outer resources to make my day go smoothly.</p>
<p>Throughout the day, I do “refreshers.” Periodically throughout the day, I’ll close my eyes and focus on my breathing for a few minutes. This helps to center me and restore a sense of calm.
In addition, whenever I begin a new segment on my schedule, I’ll take a few seconds to visualize that section of my day going smoothly. When sitting down to write, I’ll visualize my writing going well. When I prepare to make phone calls, I’ll visualize my conversations going well and achieving the desired results.</p>
<h2 id="keep-score">Keep Score</h2>
<p>To stay on track to achieve goals, it’s important to keep score. This means assessing, each day, whether or not you’ve done what was necessary to achieve your goals.</p>
<p>For score-keeping to be effective, you must have your goals and score-keeping tool somewhere where you’re going to see it. If you can’t easily see your score, you can’t reasonably assess where you are.</p>
<p>There are a number of ways to keep score. When you were little, your parents or teachers may have helped you keep score with a sticker chart, where you’d get a sticker every time you kept your commitment to do your homework, for example. Some adults find that this approach is still effective. You could also use a simple checklist that lists your various to-do items and deadlines. Checking each item off as it’s completed can be powerful.</p>
<p>I’ve also discovered that there are several phone apps that work well for keeping score. If your smartphone is a constant companion, it would be a wise move to put your scorekeeping on your phone so it’s always handy. One of my favorite apps is Don’t Break the Chain, designed with the Jerry Seinfeld motivation technique. Jerry Seinfeld wanted to write a book, so he put a big red X every day through the calendar when he actually wrote. He didn’t want to break the chain of red X’s, hence the name Don’t Break the Chain. (Click here for a list of apps reviewed by About.com.)</p>
<h2 id="celebrate-milestones">Celebrate Milestones</h2>
<p>Celebrating your progress along the way is essential to staying motivated. If you set a goal that takes nine months to achieve, it’s hard to stay motivated the entire time because there’s no payoff. So build in milestones to celebrate along the way.</p>
<p>If your goal is to lose weight, celebrate every two pounds you lose. If you’re writing a book, celebrate every 20 pages that you write. If your goal is to book 35 speaking gigs, celebrate every 5 engagements that you book. Celebrating milestones keeps you inner child excited, because it feels rewarded for all of the efforts it’s made.</p>
<h2 id="schedule-down-time">Schedule Down Time</h2>
<p>When you’re on fire to achieve your goals, it’s tempting to skip free time. (This is when you often here people say, “I’ll rest when I’m dead.”)</p>
<p>However, when you deny yourself free time, you get tired. You become less efficient. You make poorer decisions and are less creative. Your inner child can get resentful of the demanding pace, and it becomes easy to get burned out. That’s why I plan free time into my schedule to rest and rejuvenate.</p>yashumittalGet Clear About What’s Required
https://cdn.codecarrot.net/images/p1264m1066840f.jpg
Start Thinking Community!2017-09-28T11:09:00+00:002017-09-28T11:09:00+00:00https://blog.codecarrot.net/start-thinking-community<p>The idea <em>guaranteed</em> to fail in meetings with any client is a message board. Companies in general fear public dissent from real people. They say things like, “So if we ship the wrong thing, or our customer has a bad service experience – then everyone in the community is going to hear about it? That’s bad.” No, that’s good.</p>
<p>The reason they don’t like the idea is that they spend so much money on advertising, telling people how awesome they are – they don’t want to build a platform that will allow real people to compromise that illusion. But why? If you’re doing nothing wrong, people won’t have anything to complain about – and if you are doing something wrong then don’t you want to know about it so you can fix it? In my opinion a community where your customers rule is a must for any business going for perfection. Communities are human business debuggers. Why not know the problems, address them and prove that they’re fixed all in public? The idea is pure genius.</p>
<p>Okay let’s not get carried away. Many people use the word ‘community’ when talking about websites, but let’s define exactly what we’re talking about here. On Dictionary.com the word ‘community’ has the following definition:</p>
<p><strong>com·mu·ni·ty</strong>
n. pl. <strong>com·mu·ni·ties</strong></p>
<ol>
<li>A group of people living in the same locality and under the same government.</li>
<li>The district or locality in which such a group lives.</li>
<li>A group of people having common interests: the scientific community; the international business community.</li>
<li>A group viewed as forming a distinct segment of society: the gay community; the community of color.</li>
<li>Similarity or identity: a community of interests.</li>
<li>Sharing, participation, and fellowship.</li>
<li>Society as a whole; the public.</li>
</ol>
<p>To be honest, there was more to the definition but it went on to cover ecology so until plants learn to type we’ll leave it there.</p>
<p>From my point of view what defines community is interaction. Just being part of a society doesn’t mean that you interact with the rest of the people in that group. For me it’s the interaction that turns a group of people into a community.</p>
<h2 id="do-you-have-a-community-or-just-a-customer-base">Do you have a community or just a customer base?</h2>
<p>Many site owners claim they have a community but all they have is a customer base. It’s easy to see the difference between the two if you think of them in the following terms. Imagine that your brand is a planet with both satellites and asteroids orbiting around it. What the satellites and asteroids have in common is the orbit – a relationship with the brand. What’s different is that the satellite can communicate with both the planet and other satellites. An asteroid just sits alone, only aware of the planet it orbits.</p>
<p>If your customers are like the asteroid they can float into your brand’s orbit with minor disturbance – and float right back out again. That’s a pretty weak relationship; don’t you think?</p>
<h2 id="is-your-business-community-compatible">Is your business ‘community compatible’?</h2>
<p>Let’s get one thing straight, a community-based business model is not good for everyone. Some businesses are not in a position to apply the model, nor should they try.</p>
<p>Indeed most companies wouldn’t trust their customers to make important decisions either. Yet in my opinion how can a company expect to have a relationship with their customers without truly trusting them? The missing link for the food company was trust. If you don’t trust your customers then you won’t be able to build a community. It’s as simple as that.</p>
<h2 id="a-community-is-not-just-for-christmas">A community is not just for Christmas…</h2>
<p>It’s very important that you determine whether your business is truly community compatible. Because once you start, stopping is not an option. Building a community and then withdrawing from it will compromise the trust that glues your community together. And that will cause irreparable damage.</p>
<p>While attending the CustomerMade Conference in Copenhagen recently, I listened to a presentation by Paul Gerhardt, Joint-Director of the BBC Creative Archive. His presentation was about a program the BBC has whereby they allow free access for non-commercial purposes to medium-resolution versions of all of their original video content for use by the public. Needless to say, this is a huge deal. The program was in response to the overwhelming (possibly illegal) use of their material by artists and VJs in the UK. (Read the press release about the BBC Creative Archive). Mr. Gerhardt referenced the loyal, trusting audience of adults in the UK who were happy that their children had access to this. Someone asked Mr. Gerhardt what would happen if there was an overwhelming use of the material in a fashion that wasn’t inline with BBC’s values. The response? Essentially that they would consider pulling the program. Whoa! Hold up. Pull the program? A move like that could seriously compromise the trust of the program’s community who also happen to be the future loyal, trusting, adult BBC audience.</p>
<p>Granted, the BBC Creative Archive is still a hugely successful project and will most likely continue stay that way. It’s an important example though, because once you make the decision to create a community extension to your business, be aware that if you remove it the potential for damage is extremely high.</p>
<h2 id="pros-and-cons-of-community">Pros and cons of community</h2>
<p>Communities are an amazing entity to revolve your business around. They help take the guesswork out of business and product development, because if you want to know what it is that your customers want – simply ask. Furthermore, not only do your customers tell you exactly what they want, they essentially create and perpetuate the market for you. Community building is not just about slapping a mesageboard on your site, there are all kinds of inventive ways to get your customers involved in your business. FedEx for example introduced the ‘track your package’ service which enables users to see where their package is at any given moment. The transparent nature of FedEx’s shipping is a brilliant move that has been copied by others – it also makes the customer feel empowered.</p>
<p>There are downsides of course. It’s all very nice to get cosy with your customers but they may have unfavorable things to say about you and your service. The success of your community is a matter of your flexibility and ultimately depends on whether your business is truly ‘community compatible.’ Communities aren’t an ‘add-on’, like a plug-in for Photoshop. You can’t expect that by simply adding community features to your site your success is guaranteed. You have to think about how your customers want to connect with you, or indeed if they want to at all.</p>
<p>It’s also a scary ride. By allowing a community to be responsible for your development you’re essentially putting yourself in the passenger seat of your own vehicle. You can suggest where you would like to go, but ultimately the direction you go is not up to you. This can lead to a potential issue if your business becomes something you didn’t intend it to be. Or it can mean that you end up somewhere that is fantastic for your business – somewhere you would have never reached alone.</p>yashumittalThe idea guaranteed to fail in meetings with any client is a message board. Companies in general fear public dissent from real people. They say things like, “So if we ship the wrong thing, or our customer has a bad service experience – then everyone in the community is going to hear about it? That’s bad.” No, that’s good.
https://cdn.codecarrot.net/images/Community-144653342.jpg
Next step toward the online presence2017-09-27T19:56:00+00:002017-09-27T19:56:00+00:00https://blog.codecarrot.net/next-step-toward-the-online-presence<p><strong>Answer this quiz:</strong> What you will do if you are running a local bakery. After getting the business up and running over the last six months, she’s now ready to create a digital presence.</p>
<p>What do you think Reema should set up first: Social media profile or a website?</p>
<p><img src="https://i.imgur.com/wVik301.png" alt="A lady at bakery" /></p>
<h2 id="what-you-have-chosen-social-media-or-website">What you have chosen social media or website?</h2>
<p>Yes, you guessed right social media profile.</p>
<p>A social media profile is a quick, simple and cheap way for Reema to establish an online presence. This should be the first step she takes to help customers engage with her and her business.</p>
<p>After Reema has established her social media profile she can then look at longer-term investments such as building a mobile app which could help customers find out more information and place orders.</p>
<p>You can see just how important it is these days to be online, so let’s get going. The most obvious way to “go online” is with a website. Early websites weren’t much more than online brochures that described the who, what and where.</p>
<p>Today’s websites can do much more. Your site can help people do research, chat with experts, read customer reviews, watch videos, buy things, track orders - and much, much more. If you decide that a website makes sense for you, the key is to think about what your site actually needs to do in order to support your business goals. We’ve got a whole lesson coming up where we’ll talk about that in detail, but for now, don’t worry about whatever today’s shiny new technology is if it’s not going to directly contribute to your goals.</p>
<p>Of course, it’s also possible to do business online without a website. If you own a bakery for example, you want customers to be able to find you, website or not.</p>
<p>Think about the last time you had a craving for a chocolate cake. You probably searched for something like ‘bakery near me’ and reviewed your options.</p>
<p>You might see a website for a local bakery…or you might discover a good option in local listings.</p>
<p><a href="https://www.codecarrot.net/"><img src="https://i.imgur.com/V4g23VR.png" alt="Make business online with codecarrot banner" /></a></p>
<p>Some businesses use local listings to create a digital presence, using products like <a href="https://www.google.com/business/">Google My Business</a>. These types of directories let businesses publish details like descriptions, reviews, maps and images.</p>
<p>These listings are usually free, and are a good way to help your business appear on results pages when people search.</p>
<p>Beyond local listings, there may be review sites for your specific type of business where people can leave feedback—and you can respond. Rave reviews will give you the edge over the competition.</p>
<p>You can also use social media as your digital presence. People all over the world use <a href="https://facebook.com/codecarrotinc">Facebook</a>, <a href="https://twitter.com/codecarrotnet">Twitter</a>, <a href="https://plus.google.com/u/1/b/104910911502233710941/104910911502233710941">Google+</a> and <a href="https://www.instagram.com/codecarrot">Instagram</a> pages to complement—or in some cases replace—a website.</p>
<p>Another way you can reach customers online is through their mobile. You’ve probably downloaded apps or games on your mobile phone. You can create and offer these apps to customers yourself.</p>
<p>Apps can take advantage of a mobile device’s unique capabilities, like GPS, mapping and phone, to connect with customers.</p>
<p>If a customer installs your app on her mobile, the next time she’s near your shop, the app might send her a special offer, thanks to GPS.</p>
<p>Apps could even let her place an order right then, so when she comes in she can skip the queue, pick up her order and pay by tapping her mobile against the till. Mobile apps are often used as loyalty tools, to encourage existing, frequent customers to come back… and maybe get a free coffee with that sweet bun.</p>
<p>So, to recap: whether you use a website, local business listings, social media, mobile apps, or all of the above, the trick is to decide what you want customers to do, then create a home that accomplishes those goals. Together, these things work as your digital storefront: your space to interact with customers online.</p>
<p><a href="https://www.codecarrot.net/"><img src="https://i.imgur.com/MAphtcZ.png" alt="Make your business online with a website Promo" /></a></p>
<p>We’ve got lessons covering all of these areas, but for the next little while we’ll be focusing on websites: you’ll learn the basics like how websites work, how to pick and register a proper domain name, and how to make whatever you decide to do online as friendly as possible to your digital visitors AND support the goals of your business. And if you keep watching, we’ll cover all of this and more.</p>yashumittalAnswer this quiz: What you will do if you are running a local bakery. After getting the business up and running over the last six months, she’s now ready to create a digital presence.
https://i.imgur.com/LcBoDbF.jpg
How to Capture High Quality Product Photos With Your SmartPhone2017-09-27T12:05:10+00:002017-09-27T12:05:10+00:00https://blog.codecarrot.net/how-to-capture-high-quality-product-photos-with-your-smartphone<p>Before you spend money to rent a DSLR camera and a lens for your product photography, consider using the quality camera that you carry around with you all the time: your smartphone.</p>
<p>You may be thinking that using your smartphone for product photography sounds a bit crazy, but with today’s advances in technology, it’s absolutely feasible to create great product images by utilizing your smartphone’s advanced camera features and a tripod. This option is both budget and user-friendly – not to mention convenient!</p>
<p>Here’s a step-by-step guide showing you exactly which tools and apps you’ll need.</p>
<h2 id="getting-ready">Getting Ready</h2>
<h3 id="step-one-using-your-phone-as-a-camera"><strong>Step One:</strong> Using Your Phone As A Camera</h3>
<p>Most smartphones in today’s market come equipped with great cameras. If you’re one of the many consumers who have purchased one of these devices, then you have a high quality DSLR alternative right at your fingertips!</p>
<p>Below are a few smartphones that have great camera features:</p>
<h3 id="apple-iphone-5s">Apple iPhone 5S</h3>
<p><strong>Camera specs:</strong></p>
<ul>
<li>8-megapixel iSight camera</li>
<li>Video Recording HD (1080) @ 30 frames per second with audio</li>
<li>Autofocus</li>
<li>LED flash</li>
<li>Image stabilization</li>
</ul>
<h3 id="samsung-galaxy-s5">Samsung Galaxy S5</h3>
<p><strong>Camera settings:</strong></p>
<ul>
<li>16- Megapixel Camera</li>
<li>Video Recording HD (1080) @ 30 frames per second</li>
<li>Autofocus</li>
<li>LED Flash</li>
</ul>
<p>Whichever smartphone you choose to use for the photoshoot, make sure that your device has autofocus and the maximum amount of megapixels possible. Once you have identified the phone you plan to use for the photoshoot, you’re ready to move on to the rest of this tutorial and learn about how to take great images from start to finish by utilizing your smartphone’s advanced camera capabilities.</p>
<h3 id="step-two-accessories"><strong>Step Two:</strong> Accessories</h3>
<p>With all of the different accessories and gadgets that can be used with smartphones, it can be hard to decipher what you actually need to achieve great images. We recommend using a backdrop, a table, a lighting setup, a stand or tripod, and a lens to help your images stand out!</p>
<ol>
<li><strong>Backdrop</strong></li>
</ol>
<p>Use a white or light gray backdrop behind your product to give your photographs a clean and consistent look and to eliminate distractions. You can create your own backdrop easily by using a sheet, rolled paper, foam board, or a wall. It is best to make a “sweep” so that your backdrop is not only behind the product, but underneath it as well. This will greatly speed up your post production workflow!</p>
<ol>
<li><strong>Table</strong></li>
</ol>
<p>Utilize a table so that your product sits higher, which will make it easier for you to photograph your product during the photoshoot. Depending upon the type of image stabilization equipment you choose to use, it would be easy to prop your smartphone on the table as well.</p>
<ol>
<li><strong>Light</strong></li>
</ol>
<p>There are many options for lighting, but the easiest and most budget-friendly option to use is natural window light. Set up your product and equipment near a large window to allow for ample light in your frame. If natural light is difficult for you to find, try using a larger lamp or renting a softbox-type lighting kit, depending on how big your object may be.</p>
<ol>
<li><strong>Image Stabilization</strong></li>
</ol>
<p>Using soft natural lighting makes for beautiful product photos, but it often creates the need for image stabilization equipment, such as a stand or a tripod. Although smartphone cameras do contain internal image stabilization software, there will still be camera shake if you hand-hold your phone, resulting in blurry images.</p>
<p>For the best possible results, we recommend using a tripod. Here are a few great options that can be used on basically any smartphone:</p>
<p><strong>Gorilla Pod Mobile ($15)</strong></p>
<p><img src="https://cdn.codecarrot.net/images/mobile-gorillapod-new-20be_600.0000001382991666_99e0bd5c-700e-4e26-ae51-e2a78a3c6983.jpg" alt="Gorilla Pod Mobile" /></p>
<p>The Gorilla Pod Mobile product is a great combination pack that includes a mount and stand all together. This is a small and compact tripod that can easily be placed on a table as you shoot your images. It’s very flexible and can be used in multiple positions depending on the situation.</p>
<p><strong>Joby Grip Tight Mount ($20)</strong></p>
<p><img src="https://cdn.codecarrot.net/images/joby6665.jpg" alt="Joby Grip Tight Mount" /></p>
<p>If you already have a tripod or stand the Joby Grip Tight Mount is a great option for smartphones that will hold onto any mount with it’s bottom screw post! This is extremely useful because some people utilize larger and smaller tripods to photograph their images. And for price, this is a great universal portable option for you to invest in while still being able to use what you already have.</p>
<p><strong>Spiderpodium ($25)</strong></p>
<p><img src="https://cdn.codecarrot.net/images/spider6666.jpg" alt="Spiderpodium" /></p>
<p>This $25 Spiderpodium is an extremely flexible spider mount that will not only hold your smartphone, but will also prop it up on a stand too. This option is a little pricier than the Gorilla Pod and the Joby Grip Tight mounts, but its incredible versatility makes up for the increased cost. You may even find yourself using the Spiderpodium in everyday life as well. If you need to use a larger tripod, you still can—just wrap the spider legs around your tripod to use it as a mount only.</p>
<ol>
<li><strong>Lenses</strong></li>
</ol>
<p>Believe it or not, you can use external lenses with your smartphone, and having them on hand is a good idea to make it through tough lighting and focusing situations. If you want to zoom in closer to your product and create a macro product image, for example, you’re going to need a macro or telephoto lens, since your smartphone will only be able to focus from a certain distance away from your product.</p>
<p>Here are a few great lenses that can be used on smartphones:</p>
<p><strong>Photojojo iPhone & Android lenses ($20-$100)</strong></p>
<p><img src="https://cdn.codecarrot.net/images/lenses66665764.jpg" alt="Photojojo iPhone & Android lenses" /></p>
<p>This is a great inexpensive lens collection. Photojojo allows you to pick and choose which lenses you include in your package, or to simply try them all! The lenses work on iPhones and Androids to enhance your camera’s perspective.</p>
<p><strong>Olloclip iPhone 4-in-1 Lens ($70)</strong></p>
<p><img src="https://cdn.codecarrot.net/images/images-150x150.jpeg" alt="Olloclip iPhone 4-in-1 Lens" /></p>
<p>Olloclip 4-in-1 lens is a universal option with great portability and a lot of value since it contains 4 lenses all packed into 1 unit. Unfortunately, however, the Olloclip only works with the iPhone, so Android users will have to look for another option.</p>
<p><strong>Moment iPhone & Android lenses ($10-$80)</strong></p>
<p><img src="https://cdn.codecarrot.net/images/Unknown-lens-150x150.jpg" alt="Moment iPhone & Android lenses" /></p>
<p>If you’re willing to spend more and wait for the product release, check out Moment’s professional iPhone and Android smartphone lenses, which are going to be created via Kickstarter funding. You will have to pre-order the lenses, but the possibility of taking your smartphone photos to the next professional level with their extreme quality engineering, may be worth it to you!</p>
<h3 id="step-three-choosing-the-right-apps">Step Three: Choosing The Right Apps</h3>
<p>There are a plethora of camera shooting & editing applications for your smartphone, so how do you decide? One thing to remember is that apps have been designed to help you to use your smartphone to its full potential. We recommend that you start by consulting professional app reviews about which apps are the best. Apps even win awards based on these reviews for being so great!</p>
<p>Below are a few apps that have received stellar reviews:</p>
<ol>
<li><strong>Shooting</strong></li>
</ol>
<p>For shooting, we recommend that you first try to use the default camera app that comes already installed on your smartphone. If you aren’t getting the results that you want, then it’s time to try another application. Here are a few suggestions:</p>
<p><strong>Android Camera Zoom FX ($3)</strong></p>
<p>This Android-specific app has been rated #1 in camera apps for Android phones. If you’re looking for a shooting application with a few more features than the default camera app, then try <a href="//play.google.com/store/apps/details?id=slide.cameraZoom">Camera Zoom FX</a> to help boost your images to the next level.</p>
<p><strong>iPhone Camera+ ($2)</strong></p>
<p><a href="//itunes.apple.com/us/app/camera+/id329670577?mt=8">Camera+</a> is an iPhone-specific application that has been rated #1 in camera apps for iPhones. Using this application will allow you to harness your smartphone’s advanced shooting capabilities. The photos included in this tutorial were taken using this app.</p>
<ol>
<li><strong>Editing</strong></li>
</ol>
<p><strong>Free Adobe Photoshop Express</strong></p>
<p><a href="//itunes.apple.com/en/app/adobe-photoshop-express/id331975235?mt=8">Adobe Photoshop Express</a> is a free image editing application for both Android and iPhone smartphones. This quick and easy app might be all that you need in your post processing workflow.</p>
<p><strong>Photoshop Touch ($5)</strong></p>
<p><a href="//itunes.apple.com/EN/app/adobe-photoshop-touch/id495716481?mt=8">Photoshop Touch</a> is an editing app with more bells and whistles than the free “Express” version. It’s a great editing app that replicates the desktop version of Photoshop while still remaining user-friendly. The Touch program has much more functionality than the Express version.</p>
<ol>
<li><strong>Sharing</strong></li>
</ol>
<p>Sharing images via social media websites is a wonderful way to promote your products. After you’ve shot and edited your images, it’s time to share them. Many of the applications that we have mentioned are designed to help you to share your images to sites like Facebook, Instagram, and Twitter, so be sure to take advantage of those features.</p>
<h2 id="shooting-with-your-smartphone">Shooting With Your Smartphone</h2>
<h3 id="step-one-preparation">Step One: Preparation</h3>
<p><img src="https://cdn.codecarrot.net/images/shooting6670.jpg" alt="Shooting" /></p>
<p><em>The equipment that we use in this tutorial is all pictured here.</em></p>
<p>After gathering all of your accessories and applications, it’s time to use your smartphone to capture your images. For this tutorial, we will be photographing a pair of earrings with an iPhone 5S smartphone, a Joby Grip Tight mount attached to a Vivitar mini flexible tripod, and Photojojo lenses. We will shoot the images using the Camera+ app, edit the images with Photoshop Express, and store and organize the images using Dropbox.</p>
<p><img src="https://cdn.codecarrot.net/images/foam-board6671.jpg" alt="Foam Board" /></p>
<p><em>The foam board to the left bounces available light onto the “dark” side of the earrings.</em></p>
<ol>
<li><strong>Perfect your lighting.</strong></li>
</ol>
<p>First, consider your lighting situation and choose to set up your studio in an area with ample available light. We have utilized a large window to let soft natural light into our frame, as well as a small white foam board backdrop to bounce light onto the “dark” side of the earrings, as pictured above.</p>
<ol>
<li><strong>Set up your table and background.</strong></li>
</ol>
<p>After perfecting your lighting, it’s time to set up your table and white backdrop so that you have something to place your product and tripod on. We are using white seamless rolled paper for our backdrop, since earrings can very easily be displayed in a flattering manner by hanging them from the paper, as depicted below.</p>
<ol>
<li><strong>Stabilize and position your smartphone.</strong></li>
</ol>
<p>Next, mount your smartphone and position it at the proper distance from your product in order to center your product in the frame, as shown above. Because our earrings are small, we have placed our tripod and smartphone roughly one foot away from our product, as pictured in the image above. By using a Photojojo telephoto lens, we will be able to zoom close enough to capture the earrings at an optimal crop from this distance.</p>
<p><strong><em>Note:** Fill the frame with your product but leave enough space on all sides in case you need to crop the image.</em></strong></p>
<ol>
<li><strong>Take care of the extra details.</strong></li>
</ol>
<p>Before you begin shooting, make sure that your product is pristinely clean and that all price tags and strings have been removed. Dust and minor damage can be fixed in post production, but removing as many imperfections as possible before you photograph your product will save you a good deal of time later.</p>
<h3 id="step-two-capturing"><strong>Step Two:</strong> Capturing</h3>
<ol>
<li><strong>Adjust the app settings.</strong></li>
</ol>
<p>Now that your setup and product have been meticulously prepared, you need to properly adjust your camera’s settings to ensure that you receive the best results.</p>
<p><img src="https://cdn.codecarrot.net/images/camera-plus_a1c79672-ec5e-4cc8-9252-7273ed0a350b.jpg" alt="Changing the settings" /></p>
<p><em>The settings circled with red are the ones we recommend adjusting.</em></p>
<p><strong>Zoom:</strong> Make sure that you have the zoom feature turned “ON” so that the zoom feature is easily accessible to you if you need it.</p>
<p><strong>Grid:</strong> We recommend leaving the Grid function “ON” because it will help you to easily align your product in the middle of the frame.</p>
<p><strong>Live Exposure:</strong> Live exposure mode will allow you to read your camera’s auto exposure settings as the camera adjusts it. It is good to take note of your exposure settings just in case you need to change them later.</p>
<p><strong>AutoSave:</strong> This feature will allow you to specify where images are saved onto your smartphone as you capture them. The default is that images will be saved to the “Lightbox” contained within the Camera+ app, but you can change the destination if you would rather the images be sent somewhere else.</p>
<p><strong>iCloud Lightbox sync:</strong> You can also sync your iCloud to your Camera+ Lightbox so that every image that you shoot will automatically be backed up into your iCloud.</p>
<p><strong>Quality:</strong> It is very important that you set your image quality to High so that your smartphone can help you create the best images possible.</p>
<p><strong>Sharing:</strong> If you utilize Facebook, Twitter, or Flickr, try setting up this service to facilitate easy sharing after you’ve edited your images.</p>
<ol>
<li><strong>Adjust the camera settings.</strong></li>
</ol>
<p>Now that you’ve properly adjusted your application settings, it’s time to work on changing the camera’s manual exposure settings to capture the best light within your frame.</p>
<p><strong>Zoom:</strong> Pull the zoom slider at the top of the screen to adjust the frame around your product. Make sure that all of the product fits inside the frame and make sure to leave enough room on all sides so that you can crop the image if necessary in post processing.</p>
<p><strong>White Balance:</strong> To properly set the white balance according to the light temperature in your setup, touch the WB button and then touch the white background.</p>
<p><strong>Exposure:</strong> Touch the circular Exposure button and then touch your product so that the camera knows to properly expose the product.</p>
<p><strong>Focus:</strong> Touch the circular Focus button and then touch your product so that the camera knows to properly focus on the product.</p>
<p><strong>LOCK:</strong> When you are finished adjusting each of these settings, make sure to tap each one again to lock the settings in place. This will keep the camera from auto-adjusting the settings while you are taking images.</p>
<p>Take a look at your image and see if you think that it needs to be brightened or darkened in order to achieve a proper exposure. If you think that the exposure needs tweaking, touch the +/- button below the circular Focus button and pull the slider up or down to change the exposure. Our exposure needed to be brightened. We began with the screen on the left and used the exposure slider to brighten the image several stops to create the screen on the right.</p>
<p>However, we still didn’t feel like the setting 0 EV really did the earrings justice, so we bumped the exposure up again to +0.7 EV. Now it looks great!</p>
<ol>
<li><strong>Capture the image.</strong></li>
</ol>
<p>Now that all of the settings have been adjusted and you have perfected your exposure, composition, and other elements of your image, it’s time to make a photo by pressing the big round button from the menu.</p>
<p>If you’d like to get even closer, try using your lenses to capture close-up detail shots with a macro lens or use a telephoto to zoom closer to your product from a distance. Switching lenses and/or zoom lengths will allow you to capture additional angles and create multiple images for your product listings, which will raise the overall appeal of your product.</p>
<p>Since we saved our images into our Lightbox in Camera+, we will need to move the images into our phone’s “Camera Roll” to be able to edit them in Photoshop Express. To do so, touch the filmstrip at the bottom of the app, select the images you would like to save to your camera roll, and touch either “Save and Remove,” “Save and Keep,” or “Save Without Edits and Keep.”</p>
<h3 id="step-three-editing"><strong>Step Three:</strong> Editing</h3>
<p>Now that we have our images saved into our phone’s Camera Roll, we will open up our editing application, Photoshop Express, and choose the images we would like to edit in order to prepare them for the web. All digital images need a little bit of tweaking to really shine. Here are a few basic adjustments that we recommend making to enhance your images: Crop & Straighten, Sharpen, Contrast, Shadows, and Vibrance.</p>
<p>After making just those basic five adjustments, you should notice a huge quality boost in your image, as we did. Here are the before (left) and after (right) images—which one do you think looks better?</p>
<p>There you have it, folks. You have now used your smartphone to create high quality product images for your business—and with this technique, everyone wins! You win because you didn’t have to scrounge up the budget money to buy or rent a DSLR camera to make great photos.</p>
<p>But most importantly, your customers win.</p>
<p>When you provide them with wonderful product images, they will know exactly what they’re buying when they decide to purchase your product. That will make them happy, and it will make them eager to do business with you again in the future—and isn’t that what running an online business, or any business for that matter, is all about?</p>
<p>Happy smartphone shooting!</p>yashumittalBefore you spend money to rent a DSLR camera and a lens for your product photography, consider using the quality camera that you carry around with you all the time: your smartphone.
https://cdn.codecarrot.net/images/iphone-cam.jpg
11 Ways You Can Improve Your Business With Google Analytics2017-09-27T08:00:00+00:002017-09-27T08:00:00+00:00https://blog.codecarrot.net/11-ways-you-can-improve-your-business-with-google-analytics<p>Follow these 11 Ways You Can Improve Your Business With Google Analytics.</p>
<ol>
<li>How do we stack up against our competition?</li>
<li>Where in the world are we?</li>
<li>Window shoppers VS returning customers</li>
<li>Do first impressions really matter?</li>
<li>Do we need to make it compatible?</li>
<li>How big monitor do we need?</li>
<li>Where are visitors coming from?</li>
<li>Where do we rank on Google?</li>
<li>what to determine, new products, services or content?</li>
<li>What causes people to leave our website?</li>
<li>What about the goals?</li>
</ol>yashumittalFollow these 11 Ways You Can Improve Your Business With Google Analytics.
https://i.imgur.com/q1edD6T.png
When, How And Why Use Node.js as Your Backend2017-09-26T19:59:00+00:002017-09-26T19:59:00+00:00https://blog.codecarrot.net/when-how-and-why-use-nodejs-as-your-backend<p><a href="/10-top-companies-that-used-nodejs-in-production">Airbnb, LinkedIn, Walmart, Uber, and even NASA have used Node.js in production</a>. Many smaller enterprises and startups follow their lead and leverage the technology in building applications. The benefits of Node.js are countless, but you should also be aware of its constraints. Get a full picture of Node.js and avoid making serious mistakes in development that could cost you money.</p>
<h2 id="what-is-nodejs">What is Node.js?</h2>
<p>Node.js is an application runtime environment that allows you to write server-side applications in JavaScript. Thanks to its unique I/O model, it excels at the sort of scalable and real-time situations we are increasingly demanding of our servers. It’s also lightweight, efficient, and its ability to use JavaScript on both frontend and backend opens new avenues for development. It comes as no surprise that so many big companies have leveraged Node.js in production. In this article, I want to discuss when it is worth using Node.js, and in what cases it might not be the best idea.</p>
<p><img src="https://cdn.codecarrot.net/images/4hg8lh9hoxc-crew-486671-edited.jpg" alt="when use node.js backend" /></p>
<h2 id="how-is-nodejs-different-from-web-javascript">How is Node.js different from web JavaScript?</h2>
<p>There is no difference between web JavaScript and Node.js in terms of the language used. JavaScript used in browsers and in Node.js is almost exactly the same. What makes Node.js special is the different set of APIs. In browsers, you have a variety of DOM/Web APIs exposed that help you interact with UI and allow you to access the hardware to a limited extent. To compare, Node.js comes with comes with many APIs suitable for backend development, e.g. the support for file systems, http requests, streams, child processes, etc. Browsers do offer some basic support for file systems or http requests, but those are usually limited due to security concerns.</p>
<h2 id="why-is-it-worth-developing-your-project-in-nodejs">Why is it worth developing your project in Node.js?</h2>
<p>First of all, using Node.js as your server technology gives your team a great boost that comes from using the same language on both the front end and the back end. This, means that your team is more efficient and cross-functional, which, in turn, leads to lower development costs. In addition to that, it’s worth mentioning that JavaScript is the most popular programming language, so your application’s codebase will be easier to understand for more engineers. You can also reuse and share the code between the frontend and the backend parts of your application, which speeds up the development process. On top of that, the Node.js community is constantly growing – the number of StackOverflow questions is steadily increasing, so the knowledge base for the technology is widely available. The fact that the whole Node.js technology stack is open-source and free is also great news. Finally, Node offers a great package manager, npm, and the amount of available open-source tools in npm’s registry is massive and growing fast. These are just a few of many advantages of Node.js that you should consider when choosing the technology for your next project.</p>
<h2 id="good-use-cases">Good use cases</h2>
<h2 id="real-time-applications">Real time applications.</h2>
<p>Node.js is a good choice for applications that have to process a high volume of short messages requiring low latency. Such systems are called real-time applications (RTAs), and they can be easily developed with Node.js. Thanks to its specifications, Node.js will be a good choice for the real-time collaborative drawing/editing-type apps, where you can watch the document being modified live by someone else (such as Trello, Dropbox Paper or Google Docs).
The list of RTAs that can be effortlessly developed with Node.js is much longer. One of the most popular ones are live-chat and instant-messaging apps. Node will also be the right choice, if you want to create a video conference app that will work with specific hardware or VoIP. Additionally, you might want to consider Node.js for online gaming apps or e-commerce transaction software, where online data is of much importance.
Node.js is very efficient with real-time applications: it facilitates handling multiple client requests, enables sharing and reusing packages of library code, and the data sync between the client and server happens very fast.</p>
<h2 id="fast-and-scalable-environment">Fast and scalable environment.</h2>
<p>Ruby on Rails might not be sufficient in terms of speed, if you have a ton of requests. Node.js will prove useful in situations when something faster and more scalable than Rails is needed. Node’s ability to process many requests with low response times, as well as sharing things such as validation code between the client and server, make it a great fit for modern web applications that carry out lots of processing on the client’s side. For these reasons, Node.js is a popular choice among “single-page application” sites, where all the rendering is done on the client’s side, and the backend only provides a JSON API.
Node.js also comes in handy, when you want to process high volumes of IO-bound requests. It won’t really be all that efficient if a lot of CPU processing is required to serve the request. Yet, if it’s primarily just shuffling data around, then it will be quite efficient, because a single instance can serve a lot more requests with the same hardware, compared to the usual “thick” application server (like with rails).</p>
<h2 id="when-might-nodejs-not-be-the-best-idea">When might Node.js not be the best idea?</h2>
<p>Even though Node.js is – in many cases – the perfect fit for building applications, there are still some bad use cases when you shouldn’t consider using it.</p>
<h2 id="cpu-heavy-jobs">CPU-heavy jobs</h2>
<p>The first thing that comes to my mind are heavy-computing apps. Node.js is based on an event-driven, non-blocking I/O model, and uses only a single CPU core. CPU-heavy operations will just block incoming requests, rendering the biggest advantage of Node.js useless. If you are considering building CPU-heavy software, try a different, more suitable, technology that will give you better results.</p>
<h2 id="crud">CRUD</h2>
<p>Finally, using Node.js would be superfluous for simple HTML or CRUD applications in which you don’t need a separate API, and all data comes directly from the server. Your application might be marginally more scalable, but don’t expect more traffic coming to your app just because you used Node.js. In such cases, you should stick to such proven frameworks as Ruby.</p>
<h2 id="package-quality">Package quality</h2>
<p>There are more things to consider before kicking off with Node.js. Many packages for Node.js applications are available in npm. The community is vibrant, the technology is becoming more mature, and npm is the largest available repository at the moment. Yet, packages vary in their quality. Sometimes, you can still encounter issues with packages supported only by individual users and not maintained properly; for instance, when connecting your Node app to an obscure or old database system.</p>
<h2 id="where-to-start">Where to start?</h2>
<p>First of all, go to the official web page of Node.js (<a href="//nodejs.org/">nodejs.org</a>) and download the Node.js package. Later on, we need to install the Node.js package manager to install and manage the dependencies in our project easily. Visit <a href="//www.npmjs.com/">npmjs.com</a> and follow the installation instructions. Now, we are ready to write some code.</p>
<p>The best starting point for the Node.js is the official guide, from which you can learn the core concepts of Node.js. In the <a href="//nodejs.org/en/docs/guides/getting-started-guide/">Node.js</a> guide, you can find the answer to one of the most important questions: How to build a simple Node.js server?</p>
<p>Later, you can dive into the Node.js world and try out some crucial frameworks such as express.js to get an idea of how JavaScript dependencies are used (<a href="//expressjs.com/">expressjs.com</a>). Express.js allows you to build high-performance, scalable, and easily maintainable applications in JavaScript. The best learning path for express.js is to visit the official guides on the express.js web page and study the most important features such as routing, template engines, and debugging.</p>
<h2 id="wrap-up">Wrap up</h2>
<p>Both Rails and Node can achieve the same results. However, there are different situations where each one works best. With Rails, you can prototype and move fast, break things, and get a crude app in an hour. Node, on the other hand, requires more resources, but it scales better, works great with real-time tasks and is faster overall. Hopefully, the tips above will help you pick the best technology for your project.</p>yashumittalAirbnb, LinkedIn, Walmart, Uber, and even NASA have used Node.js in production. Many smaller enterprises and startups follow their lead and leverage the technology in building applications. The benefits of Node.js are countless, but you should also be aware of its constraints. Get a full picture of Node.js and avoid making serious mistakes in development that could cost you money.
https://cdn.codecarrot.net/images/pexels-photo.jpg
10 Top Companies that Used Node.js in Production (examples)2017-09-26T19:40:00+00:002017-09-26T19:40:00+00:00https://blog.codecarrot.net/10-top-companies-that-used-nodejs-in-production<p>Node.js is another trending technology that many businesses decide to embrace in production. It is especially popular in <a href="/when-how-and-why-use-nodejs-as-your-backend">real-time applications or when we seek a fast and scalable solution</a>. It has numerous advantages over other technologies and probably for that reason many big players came to use Node.js in their applications. What are these famous companies that trusted Node.js in creating their apps? We have some high profile examples.</p>
<h2 id="netflix">Netflix</h2>
<p>Netflix is the world’s leading provider of streaming media and video-on-demand. It’s a data-driven platform that uses a massive amount of A/B testing to build rich experience for its 93 million subscribers worldwide. Great numbers of unique packages every push cycle create a problem of conditional dependencies and app scalability. That’s why the company decided to leverage the lightweight and fast Node.js. One of the most important results of this was a 70-percent reduction in startup time.</p>
<h2 id="trello">Trello</h2>
<p>Trello is a project management app that we embrace in our daily work at CodeCarrot. The server side of Trello was built in Node.js. An event-driven, non-blocking server was a good solution for an instant propagation of updates, which required holding a lot of open connections. Node.js also became useful when the company was prototyping a tool for a single-page app. It was a quick way for them to get started and make sure that the everything was going in the right direction.</p>
<h2 id="paypal">PayPal</h2>
<p>PayPal, a worldwide online payments system, has also moved their backend development from Java to JavaScript and Node.js. Beforehand, the engineering teams at the company were divided into those who code for the browser and those who code for the application layer, and it didn’t work perfectly. Then, full-stack engineers came to the rescue, but that model wasn’t ideal too. Adopting Node.js solved their problems, as it allowed for writing the browser and the server applications in the same programming language – JavaScript. As a resulted, the unified team is able to understand problems at both ends and then more effectively react to customer needs.</p>
<h2 id="linkedin">LinkedIn</h2>
<p>LinkedIn, the world’s biggest business and employment-oriented social networking service, also trusted Node.js, and last year they moved their mobile app backend from Ruby on Rails to Node.js. Even though at that time it was still a very immature environment, it proved to be a smart move for the company. The new app is two to ten times faster than its predecessor, and it is also extremely lightweight. On top of that, the development was quite quick.</p>
<h2 id="walmart">Walmart</h2>
<p>Walmart is the world’s largest retailer, and it is now making headway into the online retail market. The giant has jumped on the bandwagon of working with Node.js – a relatively new and very trendy technology despite the risk that was involved in such a move. The company re-engineered the mobile app to provide sophisticated features on the client side. Walmart especially appreciated the Node.js’ famous asynchronous I/O and its single-threaded event loop models that can efficiently handle concurrent requests.</p>
<h2 id="uber">Uber</h2>
<p>Uber, a platform that connects drivers with customers in need of transportation (and now also food delivery) services, leverage many tools and programming languages in the engineering of their app. Uber’s tech stack is constantly evolving, and they’ve since introduced new technologies that proved more efficient in certain areas. That said, Node.js is still one of the crucial cogs in the company’s operation, as it enables scaling up in line with the steadily rising demand for their services.</p>
<h2 id="medium">Medium</h2>
<p>Medium is an online publishing platform that uses Node.js for their web servers. Even though at first glance the web app might seem like a simple HTML page, there is much more technology behind it. Medium is a data-driven platform that evolves together with the users and their behaviour. Node.js is particularly useful when it comes to running A/B tests to get a better comprehension of product changes and experiment with new ideas.</p>
<h2 id="groupon">Groupon</h2>
<p>Groupon, a popular online deal marketplace operating in many countries worldwide, decided to rebuild their entire web layer on top of Node.js. The initial motivation was the fact that the stack they had been using earlier became hard to maintain. Especially when as a result of their numerous acquisitions they ended up with a bunch of other stacks to manage in different parts of the world. These events led the company to unify the development across all their platforms. In a year-long, project they moved to Node.js, making it one of the largest production deployments of Node.js worldwide.</p>
<h2 id="ebay">Ebay</h2>
<p>Ebay, a multinational e-commerce company, has always been open to new technologies. The company settled on Node.js for two prime reasons: they needed an application as real-time as possible to maintain live connections with the server and a solution that could orchestrate a huge number of eBay-specific services that display information on the page. Node.js seemed to be a perfect fit.</p>
<h2 id="nasa">NASA</h2>
<p>Yes, that’s right. NASA use Node.js too. The technology is of a much greater importance than in other applications, because it saves lives, keeping astronauts safe during their dangerous space expeditions. After an accident when one of the astronauts nearly died because of the ineffective data hosted in many locations, NASA faced the challenge of moving the data related to the EVA spacesuits to one cloud database in order to reduce the access times. The new system based on Node.js decreased the number of steps in the process from 28 to 7.</p>
<h2 id="look-at-the-future">Look at the future</h2>
<p>The examples mentioned above are only the tip of the iceberg of all companies that embraced Node.js in production. There are many more big players using Node.js, e.g. Microsoft, Google, Yahoo, Mozilla or Github. The technology creates countless possibilities in development, and we’re looking forward to seeing more and more up-and-coming Node.js-based apps conquer the market.</p>
<p>See also <a href="/nodejs-vs-php-which-environment-to-choose-for-your-next-project">comparison between Node.js and PHP - Which Environment To Choose For Your Next Project?</a>.</p>yashumittalNode.js is another trending technology that many businesses decide to embrace in production. It is especially popular in real-time applications or when we seek a fast and scalable solution. It has numerous advantages over other technologies and probably for that reason many big players came to use Node.js in their applications. What are these famous companies that trusted Node.js in creating their apps? We have some high profile examples.
https://cdn.codecarrot.net/images/StockSnap_W0RUS6FWBJ-442030-edited.jpg
Node.js vs. PHP - Which Environment To Choose For Your Next Project?2017-09-26T19:29:00+00:002017-09-26T19:29:00+00:00https://blog.codecarrot.net/nodejs-vs-php-which-environment-to-choose-for-your-next-project<p>Even though both PHP and Node.js can manage apps of any complexity, they are built around different concepts and architectures. If you are an app owner choosing between these two environments, you should be aware of their major advantages and limitations.</p>
<p>Node.js and PHP are two very popular web development solutions. PHP, a scripting language created by Rasmus Lerdorf in 1994, was one of the top languages of the Web 1.0 era. The eloquent manifestation of the PHP success are CMS (Content Management Systems), such as WordPress, Joomla or Drupal that power millions of blogs and web portals. Node.js is a representative of a younger web development generation. Unlike PHP, Node.js is not a language, but a runtime environment that uses JavaScript for the server-side application development. Launched in 2009, Node.js has demonstrated the power of JavaScript in building event-based, data-driven, I/O-heavy applications for the Web 2.0 era.</p>
<h2 id="nodejs-pros">Node.js Pros</h2>
<h3 id="1-fast-server-side-solution">1. Fast Server-Side Solution</h3>
<p>Node.js leverages JavaScript event loop to create non-blocking I/O (Input/Output) applications that can easily service multiple concurrent events. Using JavaScript built-in asynchronous processing, one can create highly scalable server-side solutions that maximise the usage of a single CPU and computer memory while servicing more concurrent requests than conventional multithreaded servers. This functionality makes Node.js a great fit for asynchronous, data-driven applications and heavy I/O-bound workflows such as RTAs (Real-time Applications) or SPAs (Single-page Applications), where Node ensures excellent runtime performance.</p>
<h3 id="2-one-language-across-the-stack">2. One Language Across the Stack</h3>
<p>Many popular client-side frameworks such as Ember, React and Angular are written in JavaScript which is the main language of modern browsers. While using Node.js server-side, you have all the benefits of one scripting language across your application development stack.</p>
<p>Having the same language both on the front- and the back-end is excellent for maintainability of your application and coordination between members of your team because both frontend and backend developers work with the same JavaScript data structures, functions, idiomatic expressions, and language conventions. All that contributes to faster application development, bug fixing, and coordination within your engineering team.</p>
<h3 id="3-flexibility">3. Flexibility</h3>
<p>Node.js comes with few hard dependencies, rules and guidelines, which leaves the room for freedom and creativity in developing your applications. Being an unopinionated framework, Node.js does not impose strict conventions allowing developers to select the best architecture, design patterns, modules and features for your next project. With Node, your engineering team will have access to thousands of modules for any imaginable purposes via the NPM repository.</p>
<p><a href="/10-top-companies-that-used-nodejs-in-production"><img src="https://cdn.codecarrot.net/images/10-Top-companies-that-use-nodejs.jpg" alt="10 Top Companies that use Node.js" /></a></p>
<h2 id="nodejs-cons">Node.js Cons</h2>
<h3 id="1-less-efficient-in-handling-cpu-intensive-applications">1. Less Efficient in Handling CPU-intensive Applications</h3>
<p>Node.js is a single-threaded and event-based environment that is not as good in handling CPU intensive operations, such as generating or editing graphics, audio, and video as in managing concurrent requests. When processing large files or doing operations with graphics, Node.js applications might become unresponsive and sluggish. Whenever you are thinking about graphics apps, a multi-threaded server environment is a better option than Node.js.</p>
<h3 id="2-lack-of-maturity">2. Lack of Maturity</h3>
<p>Along with stable core libraries, like HTTP or Crypto, Node repository provides access to a bunch of third-party modules developed by the community. This ecosystem of modules is still fairly immature. It’s hard to assess the quality of a particular module before application deployment. Moreover, subtle bugs and version inconsistency may creep into applications making it difficult to maintain them. The ease of publishing your own packages paired with the lack of a reliable mechanism of module’s approval means that you should pay more attention while selecting packages to make sure that they had a recent activity such as bug fixes and updates.</p>
<h2 id="php-pros">PHP Pros</h2>
<h3 id="1-rich-code-base">1. Rich Code Base</h3>
<p>PHP has a powerful code base that includes popular platforms for building websites (WordPress, Joomla, Drupal) and web development frameworks (Laravel, Symfony) that enable Rapid Application Development. CMS (Content Management Systems), such as WordPress, make it easy to deploy a blog or an e-commerce site in a matter of minutes and allow non-developers to customise them according to their needs. Also, there are numerous PHP applications offered by hosting platforms such as the cPanel which can be installed in one click. A breadth of open-source solutions written in PHP and a strong community behind them means everything you need for your application development is at your fingertips.</p>
<h3 id="2-portable-solution">2. Portable Solution</h3>
<p>PHP is a highly portable application development solution. It can be run on almost any server (Nginx, Apache) and every platform (Windows, Linux). This means that you have to write your code only once and run it anywhere.</p>
<p>At the same time, there is a wide hosting support for PHP. A number of hosting providers offer shared hosting options for PHP, but you need a virtual server with SSH access to run Node.js applications. Therefore, PHP integration and deployment is easier for small companies or individuals who have can run and manage their applications without any knowledge of SSH (Secure Shell), console commands, and Linux server technologies which are the preferred option for Node.js.</p>
<h3 id="3-designed-for-the-web">3. Designed for the Web</h3>
<p>Unlike Java or Python and other general-purpose programming languages, PHP was designed specifically to work well on the Web. That’s why it includes all needed functionality to manage HTML, servers and databases (MySQL in particular). With a comprehensive server-side solution like PHP, there is also no need to bother about JavaScript in the browser since all pages can be easily generated and rendered on the server. This is useful if you want to avoid overloading of the client side. At the same time, heavy server-side rendering and regular requests to the server to generate and render pages might not be a good option for Single Page Applications (SPAs) with rich client-side functionality for which JavaScript is frequently a better option.</p>
<h2 id="php-cons">PHP Cons</h2>
<h3 id="1-inefficient--separation-of-concerns-soc">1. Inefficient Separation of Concerns (SoC)</h3>
<p>PHP is not a great fit for the implementation of MVC (Model-View-Controller) approach that prescribes clear Separation of Concerns (SOC) between data, behaviour and representation. MVC is a de facto best practice in web development that ensures readability, maintainability, and scalability of web applications. In PHP, however, there is a tendency to mix HTML and language syntax inside HTML files, which quickly results in the poorly maintainable code where views and business logic are not separated. As a result, it’s hard to extend PHP applications with new functionality and manage applications with a large code base.</p>
<h3 id="2-outdated-client-server-model">2. Outdated Client-Server Model</h3>
<p>PHP follows the classical client-server model where every page request initiates the application, database connection, configuration parameters and HTML rendering. This makes PHP somewhat slower in comparison to Node.js application that runs permanently and needs only to initialise once. Thanks to these features, Node.js is more suitable for state-of-the-art HTML5 features, AJAX and WebSockets. The problem may be handled in PHP via Memcached; however, this is not a standard feature of the PHP language.</p>
<p>So, How to Make the Right Choice?</p>
<p>As you have seen, both Node.js and PHP have their good and bad parts. If so, how do we make the right choice? It’s possible if we leverage our knowledge of both environment’s architectures and ecosystems.</p>
<p>In particular, asynchronous and event-based architecture of Node.js makes it a great fit for RTA (Real-Time Applications) such as instant messaging and collaborative apps (drawing and video conferencing) in which many requests are happening concurrently and where data is frequently shuffled back and forth from the server to the client.</p>
<p>Node.js support of server-side events and WebSockets makes it easy to implement pub-sub (publish-subscribe) architectures used in RTAs and quickly update the view on the client side. The same features make Node.js suitable for applications that process data from IoT (Internet of Things) and Single Page Applications (SPAs) that involve highly flexible, dynamic and heavy client-side functionality.</p>
<p>With Node.js, it’s also easier to implement web services in which the server-side functions as a REST API that provides the connection between the client and a database and where the speed of CRUD operations and asynchronous processing is of great importance.</p>
<p>In its turn, PHP is a good choice for a standardized solution such as a blog, news site, landing page or web portal. With such CMS (Content Management System) as WordPress written in PHP, you can create stable and customizable blogs without too much coding. If you need more customization, WordPress provides a well-documented API to change application’s structure, presentation, plugins, etc.</p>
<p>As a bonus, WordPress community has created thousands of customizable themes that open infinite opportunities for web designers. Whenever time is a consideration, you can develop almost any application ranging from a blog to an e-commerce site with CMS and other tools written in PHP. PHP is also a better choice if hosting support is the issue. If your client wants a shared hosting service instead of a full-fledged virtual cloud instance, PHP provides more flexibility in integration and deployment.</p>
<p>So, when choosing between Node.js and PHP, you should definitely consider what type of application you are going to build, what are the hosting requirements of your client, and what is the speed of development. If your client is looking for a standardized solution with an extensive hosting support, you should consider using PHP. On the other hand, Node.js is a better option for RTAs (Real-time Applications) such as chats, collaboration apps and SPAs (Single-page Applications).</p>yashumittalEven though both PHP and Node.js can manage apps of any complexity, they are built around different concepts and architectures. If you are an app owner choosing between these two environments, you should be aware of their major advantages and limitations.
https://cdn.codecarrot.net/images/nodejs-php2.jpg
Favicon Cheat Sheet2017-09-26T09:05:00+00:002017-09-26T09:05:00+00:00https://blog.codecarrot.net/favicon-cheat-sheet<h2 id="html">HTML</h2>
<h3 id="basics">Basics</h3>
<p>For the main favicon itself, it’s best for cross-browser compatibility not to use any HTML. Just name the file favicon.ico and place it in the root of your domain.</p>
<p><a href="//eepurl.com/c5jcAz">Click here</a> to download the Favicon Guide file in <code class="highlighter-rouge">.Ai</code> format for free.</p>
<p>This works in every desktop browser/version all the way back to IE6, except for SeaMonkey.</p>
<h3 id="optional-but-encouraged">Optional But Encouraged</h3>
<p>You probably also want the following:</p>
<ol>
<li>Touch icon for iOS 2.0+ and Android 2.1+:</li>
</ol>
<div class="highlighter-rouge"><div class="highlight"><pre class="highlight"><code><link rel="apple-touch-icon-precomposed" href="path/to/favicon-152.png">
</code></pre></div></div>
<ol>
<li>IE 10 Metro tile icon (Metro equivalent of apple-touch-icon):</li>
</ol>
<div class="highlighter-rouge"><div class="highlight"><pre class="highlight"><code><meta name="msapplication-TileColor" content="#FFFFFF">
<meta name="msapplication-TileImage" content="/path/to/favicon-144.png">
</code></pre></div></div>
<p>Replace #FFFFFF with your desired tile color.</p>
<ol>
<li>IE 11 Tile for Windows 8.1 Start Screen</li>
</ol>
<div class="highlighter-rouge"><div class="highlight"><pre class="highlight"><code><meta name="application-name" content="Name">
<meta name="msapplication-tooltip" content="Tooltip">
<meta name="msapplication-config" content="/path/to/ieconfig.xml">
</code></pre></div></div>
<p>ieconfig.xml</p>
<div class="highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="cp"><?xml version="1.0" encoding="utf-8"?></span>
<span class="nt"><browserconfig></span>
<span class="nt"><msapplication></span>
<span class="nt"><tile></span>
<span class="nt"><square70x70logo</span> <span class="na">src=</span><span class="s">"/path/to/smalltile.png"</span><span class="nt">/></span>
<span class="nt"><square150x150logo</span> <span class="na">src=</span><span class="s">"/path/to/mediumtile.png"</span><span class="nt">/></span>
<span class="nt"><wide310x150logo</span> <span class="na">src=</span><span class="s">"/path/to/widetile.png"</span><span class="nt">/></span>
<span class="nt"><square310x310logo</span> <span class="na">src=</span><span class="s">"/path/to/largetile.png"</span><span class="nt">/></span>
<span class="nt"><TileColor></span>#FFFFFF<span class="nt"></TileColor></span>
<span class="nt"></tile></span>
<span class="nt"></msapplication></span>
<span class="nt"></browserconfig></span>
</code></pre></div></div>
<h3 id="very-optional-for-the-obsessive">Very Optional, for the Obsessive</h3>
<p>If you’re obsessive, you want all this too:</p>
<ol>
<li>
<p>Largest to smallest apple-touch-icons:</p>
</li>
<li>
<p>Favicons targeted to any additional png sizes that you add that aren’t covered above:</p>
</li>
</ol>
<div class="highlighter-rouge"><div class="highlight"><pre class="highlight"><code><link rel="icon" href="/path/to/favicon-32.png" sizes="32x32">
</code></pre></div></div>
<ol>
<li>Favicon Chrome for Android</li>
</ol>
<div class="highlighter-rouge"><div class="highlight"><pre class="highlight"><code><link rel="shortcut icon" sizes="196x196" href="/path/to/favicon-196.png">
</code></pre></div></div>
<h2 id="images">Images</h2>
<p>Create at least this:</p>
<table>
<thead>
<tr>
<th>Sizes</th>
<th>Name</th>
<th>Purpose</th>
</tr>
</thead>
<tbody>
<tr>
<td>16x16 & 32x32</td>
<td>favicon.ico</td>
<td>Default required by IE. Chrome and Safari may pick ico over png, sadly.</td>
</tr>
</tbody>
</table>
<p>More about favicon.ico below. Yes, it’s 1 file with multiple sizes.</p>
<p>If you also sort of care about iOS and Android but are lazy:</p>
<table>
<thead>
<tr>
<th>Size</th>
<th>Name</th>
<th>Purpose</th>
</tr>
</thead>
<tbody>
<tr>
<td>152x152</td>
<td>favicon-152.png</td>
<td>General use iOS/Android icon, auto-downscaled by devices</td>
</tr>
</tbody>
</table>
<p>But keep in mind that icons with complex detail often don’t downscale well. Often you have to tweak subtle design details for smaller sizes.</p>
<p>If you’re obsessive, create these too:</p>
<table>
<thead>
<tr>
<th>Size</th>
<th>Name</th>
<th>Purpose</th>
</tr>
</thead>
<tbody>
<tr>
<td>32x32</td>
<td>favicon-32.png</td>
<td>Certain old but not too old Chrome versions mishandle ico</td>
</tr>
<tr>
<td>57x57</td>
<td>favicon-57.png</td>
<td>Standard iOS home screen (iPod Touch, iPhone first generation to 3G)</td>
</tr>
<tr>
<td>76x76</td>
<td>favicon-76.png</td>
<td>iPad home screen icon</td>
</tr>
<tr>
<td>96x96</td>
<td>favicon-96.png</td>
<td>GoogleTV icon</td>
</tr>
<tr>
<td>120x120</td>
<td>favicon-120.png</td>
<td>iPhone retina touch icon (Change for iOS 7: up from 114x114)</td>
</tr>
<tr>
<td>128x128</td>
<td>favicon-128.png</td>
<td>Chrome Web Store icon</td>
</tr>
<tr>
<td>128x128</td>
<td>smalltile.png</td>
<td>Small Windows 8 Star Screen Icon</td>
</tr>
<tr>
<td>144x144</td>
<td>favicon-144.png</td>
<td>IE10 Metro tile for pinned site</td>
</tr>
<tr>
<td>152x152</td>
<td>favicon-152.png</td>
<td>iPad retina touch icon (Change for iOS 7: up from 144x144)</td>
</tr>
<tr>
<td>180x180</td>
<td>favicon-180.png</td>
<td>iPhone 6 plus</td>
</tr>
<tr>
<td>195x195</td>
<td>favicon-195.png</td>
<td>Opera Speed Dial icon (Not working in Opera 15 and later)</td>
</tr>
<tr>
<td>196x196</td>
<td>favicon-196.png</td>
<td>Chrome for Android home screen icon</td>
</tr>
<tr>
<td>228x228</td>
<td>favicon-228.png</td>
<td>Opera Coast icon</td>
</tr>
<tr>
<td>270x270</td>
<td>mediumtile.png</td>
<td>Medium Windows 8 Start Screen Icon</td>
</tr>
<tr>
<td>558x270</td>
<td>widetile.png</td>
<td>Wide Windows 8 Start Screen Icon</td>
</tr>
<tr>
<td>558x558</td>
<td>largetile.png</td>
<td>Large Windows 8 Start Screen Icon</td>
</tr>
</tbody>
</table>
<h2 id="ico-file">ICO File</h2>
<p>An .ico file is a container for multiple .bmp or .png icons of different sizes. In favicon.ico, create at least these:</p>
<table>
<thead>
<tr>
<th>Size</th>
<th>Purpose</th>
</tr>
</thead>
<tbody>
<tr>
<td>16x16</td>
<td>IE9 address bar, Pinned site Jump List/Toolbar/Overlay</td>
</tr>
<tr>
<td>32x32</td>
<td>New tab page in IE, taskbar button in Win 7+, Safari Read Later sidebar</td>
</tr>
<tr>
<td>48x48</td>
<td>Windows site icons</td>
</tr>
</tbody>
</table>
<p>If you’re obsessive and don’t mind 1-3kb extra size, also include these sizes in your .ico:</p>
<table>
<thead>
<tr>
<th>Size</th>
<th>Purpose</th>
</tr>
</thead>
<tbody>
<tr>
<td>24x24</td>
<td>IE9 Pinned site browser UI</td>
</tr>
<tr>
<td>64x64</td>
<td>Windows site icons, Safari Reading List sidebar in HiDPI/Retina</td>
</tr>
</tbody>
</table>
<p>Create your .ico out of optimized .png files.</p>
<p><strong>TODO:</strong> get confirmation that IE9+ supports .ico files that contain .png files.</p>
<h2 id="svg-file">SVG File</h2>
<p>Pinned tabs in Safari 9+ use an SVG vector mask for the favicon instead of any other PNG/ICO/etc. favicons that may be present. Vector artwork in the SVG file should be black only (no shades of black or other colors) with a transparent background. Also, a fill color needs to be defined in the <link /> tag - a hex value or color shorthand will work. Here’s the markup for adding the icon:</p>
<div class="highlighter-rouge"><div class="highlight"><pre class="highlight"><code><link rel='mask-icon' href='icon.svg' color='#ff0000'>
</code></pre></div></div>
<h2 id="forcing-a-favicon-refresh">Forcing a Favicon Refresh</h2>
<p>Not normally needed. This is only for those frustrating times when you can’t get your favicon to refresh, during development:</p>
<ul>
<li>Clear the browser cache on Windows (Ctrl+F5 or Ctrl+Shift+R) and on Mac (Command + Shift + R).</li>
<li>Also close and reopen browser if IE.</li>
<li>If still stuck, try opening new tab. Or see <a href="//stackoverflow.com/questions/2208933/how-do-i-force-a-favicon-refresh">//stackoverflow.com/questions/2208933/how-do-i-force-a-favicon-refresh</a></li>
<li>Temporarily add explicit HTML markup and append a query string. Remove this when you’re done:</li>
</ul>
<div class="highlighter-rouge"><div class="highlight"><pre class="highlight"><code><link rel="shortcut icon" href="//www.yoursite.com/favicon.ico?v=2" />
<link rel="icon" sizes="16x16 32x32" href="/favicon.ico?v=2">
</code></pre></div></div>
<p>For large versioned deployments, if all site visitors need their favicon force-refreshed in an extreme situation:</p>
<ul>
<li>Add explicit HTML markup (customize the sizes part) and put your version number in the filename.</li>
</ul>
<div class="highlighter-rouge"><div class="highlight"><pre class="highlight"><code><link rel="shortcut icon" href="/favicon-v2.ico" />
<link rel="icon" sizes="16x16 32x32" href="/favicon-v2.ico">
</code></pre></div></div>
<p><strong>TODO:</strong> find edge cases where this markup doesn’t work.</p>
<h2 id="faq">FAQ</h2>
<p><strong>What about having both a default root favicon.ico and favicon.png?</strong> I think it’s actually better to provide only favicon.ico and not favicon.png, because:</p>
<ul>
<li>An .ico is a container for multiple .bmp or .png files. If you specify 1 default favicon.png, and if that favicon.png overrides the favicon.ico, you are giving up control over how the favicon looks at different resolutions and allowing the browser to do all resizing. For example, you might want the 64x64 version to contain text and the 16x16 version to not display the text at all, since at 16x16 it would be unreadable anyway.</li>
<li>
<p>There is no favicon.png in the HTML5 specification, just /favicon.ico. From <a href="//www.w3.org/TR/html5/links.html#rel-icon">//www.w3.org/TR/html5/links.html#rel-icon</a>:</p>
<ul>
<li>‘In the absence of a link with the icon keyword, for Documents obtained over HTTP or HTTPS, user agents may instead attempt to fetch and use an icon with the absolute URL obtained by resolving the URL “/favicon.ico” against the document’s address, as if the page had declared that icon using the icon keyword.’</li>
</ul>
</li>
</ul>
<p>More about this in <a href="//stackoverflow.com/questions/1344122/favicon-png-vs-favicon-ico-why-should-i-use-pngs-instead-of-icos/1344379#1344379">stackoverflow question</a> (Note: the text in the chosen answer about alpha transparency is incorrect. See the 2nd answer.)</p>
<p><strong>Is it true that favicons should be in the site root?</strong> No, that’s only if you don’t explicitly specify the browser/device-specific <link /> tags with a favicon path. <a href="//en.wikipedia.org/wiki/Favicon.ico">Learn more about favicon</a>.</p>
<p>If you don’t have favicon.ico in the root consider adding one, or returning a HTTP 204 instead. Many tools and services e.g. bookmarking sites, feed readers, web crawlers etc., request a favicon.ico from the site root, and so receive a HTTP 404 if it’s not present. In the worst case some frameworks will return a custom error page which is likely to be many times larger than the missing favicon.</p>
<p><strong>Is it true that the png has to be named favicon.png?</strong> No, this has never been true as far as I can tell from my obsessive research.</p>
<p><strong>Is it true that the ico has to be named favicon.ico?</strong> If you don’t explicitly specify its <code class="highlighter-rouge"><link></code> tag, yes. Explicitness is best, so we both name it favicon.ico and explicitly specify the <code class="highlighter-rouge"><link></code> tag.</p>
<p><strong>Why not prefix with “apple-touch-icon”?</strong> If you don’t specify <code class="highlighter-rouge"><link></code> tags, iOS looks for files prefixed with apple-touch-icon or apple-touch-icon-precomposed. Many <em>(e.g. HTML5 Boilerplate)</em> rely on this assumption, but:</p>
<ul>
<li>Explicitly specifying <code class="highlighter-rouge"><link></code> tags is clearer and supported by Apple.</li>
<li>Not hard-coding names as apple-touch-icon clears up confusion as to whether the same icons can be reused for other purposes as-is, e.g. reusing favicon-144.png for Windows pinned site.</li>
</ul>
<p><strong>Why use iOS precomposed icons?</strong></p>
<ul>
<li>iOS non-precomposed icons add rounded corners, drop shadow, and reflective shine. Sounds great in theory, but in practice the results can be very frustrating, especially to designers.</li>
<li>Non-precomposed icons don’t work with Android 2.1.</li>
</ul>
<p><strong>Why absolute paths?</strong> Some Firefox versions require absolute paths. Since all browsers support them, it’s the simplest choice.</p>
<p><strong>Why not append a query string to force-refresh for all visitors?</strong> Some proxies and load balancers can fail to read query strings in edge cases.</p>yashumittalHTML
https://cdn.codecarrot.net/images/74739.jpg
How to Make a Favicon2017-09-26T08:27:00+00:002017-09-26T08:27:00+00:00https://blog.codecarrot.net/how-to-make-a-favicon<p>One of the most frustrating and confusing elements of modern web design is the favicon. Short for “favorite icon” it’s the little picture you see in browser tabs, address bars, and possibly other places depending on your browser and operating system.</p>
<p><img src="https://cdn.codecarrot.net/images/favicon-codecarrot.PNG" alt="CodeCarrot Favicon" /></p>
<p>Favicons can be difficult to create both technically and aesthetically due to their unusual file format and small image size. Adding cross browser support can be tricky as well. Heck, there’s even confusion surrounding the pronunciation of favicon (I’ve heard it said “fah-vee-con” and “fave-eye-con”, although the former is more common). So, let’s figure this out and cut through the rubbish.</p>
<h2 id="designing-a-favicon">Designing a Favicon</h2>
<p>The first step to creating a favicon is design. A good favicon should capture the essence of your site in a glyph the size of an emoji and get across your branding in a very compact space. Most commonly, this is the logo mark for a company (rather than the full logo with text and trademarks).</p>
<p><img src="https://cdn.codecarrot.net/images/instagram-youtube-apple-favicon.PNG" alt="Instagram YouTube Apple Favicon" /></p>
<p><em>These websites use the brand’s logo mark, or at least something close to it.</em></p>
<p>It’s also a good idea to exclude any text, because favicons are far too small for words to be legible. The only exception to this rule is for iconic logo mark text. For example, Wikipedia uses its recognizable “W” and Facebook uses its well known “F”.</p>
<p><img src="https://cdn.codecarrot.net/images/wikipedia-google-facebook-favicon.PNG" alt="Wikipedia Google Facebook Favicon" /></p>
<p><em>These favicons use a single letter that’s strongly associated with their brand. In some cases, like Facebook, the letter is the logo mark itself. In this example, you’ll also notice that Disney’s favicon appears pixelated. That’s because this screenshot was taken on a retina display and they’re only using a 16×16 icon size, while the other sites offer a 32×32 size with more detail.</em></p>
<p>Favicons are so small that every pixel counts. Often times, downscaling a full size logo creates pixel artifacts that can make the logo look blurry. For a sharp and crisp result, you’ll likely need to edit the favicon at the pixel level.</p>
<p><img src="https://cdn.codecarrot.net/images/at-12.21.59-PM.png" alt="Facebook Full size logo" /></p>
<p><em>This is a portion of the full sized Facebook logo after it has been resized down to 32×32. The blurry aliasing around the edges indicate that pixel-level editing is necessary for a sharp result.</em></p>
<p>For icon editing, I like to use a bitmap image editing program like Photoshop or Pixelmator. I usually start by resizing my larger logo down to 64×64 pixels because this is the largest favicon size that I’ll need. Then, using the pencil tool, I’ll edit one pixel at a time until the favicon looks crisp. This is an extremely tedious process and could take an hour or two, but it produces the best results.</p>
<p>Once I’m happy with the 64×64 version of the icon, I’ll go through the same process to create versions at 32×32, 24×24, and 16×16. Here’s what each size is for:</p>
<ul>
<li>64×64 – Safari Reading List and Windows site icons</li>
<li>24×24 – Pinned site in IE9</li>
<li>32×32 – High DPI or “retina” displays will typically use this size</li>
<li>16×16 – Most commonly used size by browsers like IE, Safari, Chrome, and more</li>
</ul>
<p>You might find that resizing the 64×64 version to these smaller sizes is enough, but often there will be more pixel-level editing involved. Keep in mind that you can include alpha transparency in these images if you’d like to do so. This used to be an issue, but almost all browsers in use today will support transparency in a favicon.</p>
<h2 id="saving-a-favicon">Saving a Favicon</h2>
<p>Once you’re done editing your icons at each of the various sizes, save each one out to a transparent 24-bit PNG file. In Photoshop, you can do this using the “Save for Web” feature accessible via the File menu.</p>
<p>Next, you’ll need to combine all of your PNG images into a single ICO file. Alternatively, you could use a combination of PNG and ICO files, but often times even Safari and Chrome will use the ICO file anyway. In my opinion, it’s easiest to just stick with the single ICO file. ICO isn’t a commonly used file format, but there are several tools that can help you out. I like to use <a href="//www.xiconeditor.com/">X-Icon Editor</a> for this. It’s a free web-based tool and it makes it easy to upload your images into the appropriately sized slots and then export a single ICO. Just follow the numbered steps on their site. If you’re a crazy person, you could even try using their pixel-based editor, although I find it easier to make edits in a more robust tool like Photoshop.</p>
<p><img src="https://cdn.codecarrot.net/images/at-12.56.46-PM.png" alt="X-Icon Editor" /></p>
<p><em>X-Icon Editor makes it easy to upload your PNG images and then export a single ICO file in just a few steps.</em></p>
<h2 id="adding-a-favicon-to-a-website">Adding a Favicon to a Website</h2>
<p>Once you’ve exported the ICO file from a tool like X-Icon Editor, you’re ready to get it into your website. Make sure you’ve named the file <code class="highlighter-rouge">favicon.ico</code> and then simply drop it into the root of your website, right next to index.html and the other usual bits. In other words, you should be able to go to //example.com/favicon.ico and see your favicon.</p>
<p>Almost every browser will look in the root directory of your website for a file named <code class="highlighter-rouge">favicon.ico</code> and it will use it automatically. Don’t put it into a folder, otherwise the browser won’t know where to look for it. Also, for cross-browser compatibility, it’s actually best to not add any HTML or link elements that point to the favicon’s location. This technique will work for pretty much every browser all the way back to IE6.</p>
<h2 id="refreshing-a-favicon">Refreshing a Favicon</h2>
<p>For some odd reason, browsers love to cache favicons. You might find that you want to make changes to your favicon during site development, but when you upload the new ICO file, the browser won’t let go of the old one! This can be incredibly frustrating if you don’t know how to fix it.</p>
<p>In these situations, you can add some temporary HTML that points to the favicon’s location. In addition, you should add a short and meaningless query string to the end of the favicon URL, like this:</p>
<div class="highlighter-rouge"><div class="highlight"><pre class="highlight"><code><link rel="shortcut icon" href="//example.com/favicon.ico?v=2" />
</code></pre></div></div>
<p>This will make the browser think it’s a unique URL, so it will be forced to pull in the new assets. Once the favicon has been refreshed, remove this HTML completely. If you need to make additional changes to the favicon, simply use the same technique and increment the version number “v” in the query string each time. That way, the URL will always be unique and will make the browser pull the new version. Again, just be sure to remove this code before deploying your site.</p>
<h2 id="creating-more-complex-favicons">Creating More Complex Favicons</h2>
<p>This article is just meant to be a fast and easy path to creating favicons that will work nearly everywhere, but there’s always more to learn when it comes to web design and development. If you really want to dig deep into making more complex favicons, touch icons for iOS home screens, icons for Windows metro tiles, Google TV icons, and so much more, I highly recommend you read this <a href="/favicon-cheat-sheet">favicon cheat sheet</a>. It’s extremely comprehensive, it cites good sources, and it’s perfect for more obsessive designers and devs (I would include myself in that group).</p>
<p><a href="//lab.ejci.net/favico.js/"><img src="https://cdn.codecarrot.net/images/favicon-js-screenshot.png" alt="Favico.js Website screenshot" /></a></p>
<p><code class="highlighter-rouge">Favico.js</code> allows you to create dynamic favicons that can display numbered badges.</p>
<p>You may also have a need to create dynamic favicons that can change to display a numbered badge. This makes it easy to see your notifications even if the tab is not active. For this, I recommend you check out <a href="//lab.ejci.net/favico.js/">favico.js</a> which is available on Github. Be aware that cross-browser support isn’t very good just yet, but this can be a nice added feature for browsers that support it.</p>yashumittalOne of the most frustrating and confusing elements of modern web design is the favicon. Short for “favorite icon” it’s the little picture you see in browser tabs, address bars, and possibly other places depending on your browser and operating system.
https://cdn.codecarrot.net/images/bunch-of-small-Favicons.png
Stop CSS Hacking, or be Stopped2017-09-26T07:40:00+00:002017-09-26T07:40:00+00:00https://blog.codecarrot.net/stop-css-hacking-or-be-stopped<p>CSS has experienced a colourful and unusual history. From historic slow adoption to the current slow rate of development, ugly hacks have meant filling in the gaps is par for the course.</p>
<p>With CSS1, we had a simple and elegant styling language that was supposed to be friendly to even non-programmers. Hence decisions like, say, lack of variables and constants, or conditional logic. <em>(My kingdom for an “if” statement!)</em></p>
<p>Then CSS2 came along and provided us with some powerful layout tools. Except some browsers completely disagreed on how to implement them <em>(the box model and floats are two examples that come to mind)</em>. Us web designers took care of that problem however, thanks to our lovely CSS hacks and filters. Using perfectly valid CSS, we were able to exploit a browser’s parsing error and specifically serve <em>(or hide)</em> our CSS to it. Problem solved. Lucky us.</p>
<p>But now that Internet Explorer 7 is looming, we’re getting ready to deal with the first really major upgrade to a browser’s rendering engine since we’ve started using CSS-based layouts in earnest. <em>(The launch of Safari didn’t really count, since it was so capable right out of the gate.)</em> The truth is that when IE 7 comes most of our usual hacking methods are going to fail. Afraid yet?</p>
<p>Here’s the nasty little secret of CSS-based development over the past few years: we’ve had a stable target. Because of IE6’s limitations, we’ve been fairly conservative in our usage. There’s really no such thing as cutting-edge CSS, since the CSS2 spec has been final since the late 90’s and CSS3 is off somewhere in the future. Anything we’ve done to date has been able to degrade as gracefully as possible in IE, so we’ve held back on even the more interesting bits of CSS2.</p>
<p>Sure, there are great advanced demos in the form of the CSS Playground, or CSS/edge, or even various CSS Zen Garden designs. But for production-based sites that we create for clients? Conservative CSS use has reigned supreme.</p>
<p>Except … some of us have been a little more than liberal in our hack usage, haven’t we? You might argue that those hacks were necessary to make any sense of the messy browser landscape we were presented with. At the end of a long day of coding, loading that beautiful new site in Internet Explorer has always been a soul-crushing experience. Almost none of us want to spend the time necessary to wrap our minds around just how on earth IE has decided to mangle our code. A few dashes of “html” or “width” there and the problem goes away. The short term fix we applied three years ago, however, now threatens to come back and bite us in the rear.</p>
<h2 id="conditional-comments">Conditional Comments</h2>
<p>IE7 will fix a lot of traditional CSS hacks. The Internet Explorer team has publicly expressed disapproval of the whole idea of hacks, in favour of an IE-proprietary method known as conditional comments. Instead of code like this to filter a rule to Win/IE:</p>
<div class="highlighter-rouge"><div class="highlight"><pre class="highlight"><code>* html #selector {
width: 100px;
}
</code></pre></div></div>
<p>We should instead be using an HTML comment syntax to selectively serve up a link to an external CSS file, which will contain a similar rule. The syntax looks like so</p>
<div class="highlighter-rouge"><div class="highlight"><pre class="highlight"><code><!--[if IE]>
<link rel="stylesheet" href="ie-specific-file.css" />
<![endif]-->
</code></pre></div></div>
<p>And then the IE-specific CSS file in question might contain the following rule:</p>
<div class="highlighter-rouge"><div class="highlight"><pre class="highlight"><code>#selector {
width: 100px;
}
</code></pre></div></div>
<p>In theory, this system works much better than CSS hacks ever did. Instead of specifically exploiting bugs in a browser, bugs that will obviously one day get fixed, conditional comments are an officially-sanctioned feature of the browser that won’t ever go away. They validate, and even though they’re proprietary, when used with discretion they allow us to accomplish exactly the same thing as CSS hacks.</p>
<h2 id="sidebar">Sidebar</h2>
<p>The question is begged, of course: why are conditional comments implemented only in HTML, and not in CSS? I have it on good word this is something the IE team may look into for future releases. For now, we must place our conditional comments in our HTML files.</p>
<h2 id="future-updates">Future Updates</h2>
<p>But this is simply one single browser updating, and there’s a larger issue here which we’re going to have to start thinking about sooner or later. I’d prefer sooner.</p>
<p>All popular browsers are improving at a frequent clip again. We’re not stagnating anymore; the improvements are going to keep coming. CSS3 isn’t finished yet, but <a href="//www.w3.org/TR/css3-selectors/">various modules of it</a> are being implemented already. The future is just around the corner.</p>
<p>As the modern browsers update, in what other interesting and creative ways will our code break? How are we going to test them? How are we going to selectively serve up code to various versions?</p>
<p>Take Safari. Version 2.0 was recently released. Apple has no provision for installing and running multiple versions side by side however, much the same as Microsoft has always done with Internet Explorer.</p>
<p>The practical implication here is that I simply can’t test my work in Safari 1.0 any longer. How do we test now, without needing to own a separate computer for each individual version of a browser? Microsoft suggests we buy Virtual PC and multiple Windows licenses to maintain multiple versions of IE, an expensive proposition. Apple hasn’t suggested anything.</p>
<p>Causing web developers to buy more software and hardware simply to test seems an unlikely scenario; but somehow, test we must.</p>
<h2 id="versioning">Versioning</h2>
<p>And the problem will amplify over time, as more incremental updates are released, and the browser share fragments. In one sense this won’t be 1998 all over again with its 85 different versions of Netscape 4, thanks to browser auto-updating keeping most users current. But, not every user will keep up to date. I can’t count how many times I ignore the update nag message on my own machine, so they can hardly be blamed.</p>
<p>What are the odds that all those early adopters of Firefox 1.0 or 1.2 have kept updating, and made it to version 1.5? Likely not as high as we’d hope. Are we going to continue testing in each of them? How will we fix rendering issues that affect 1.0 and 1.2, but not 1.5? No CSS hack I’m aware of can address that discrepency.</p>
<p>Now, let’s be clear. Ever since CSS1, there’s been a very simple versioning control built into the language. If a browser can’t understand a selector or a rule, it simply ignores it. The theory being, as browsers add new support for a particular CSS property or selector, they’ll simply start rendering the rule they previously ignored all along.</p>
<p>Hasn’t worked out so well, has it? One fatal flaw of this method is that it assumes that support for new selectors and properties will be perfect from the start. Need I even get into the problems that have resulted in browser implementation errors? Box model, anyone?</p>
<p>The other, more subtle flaw in this method is that it assumes the fallback is good enough. Simply not rendering a rule due to lack of support, however, causes adverse side effects in styles that depend on that rule. Side effects that can translate into major usability problems for your site’s visitors.</p>
<p>The most obvious example I can give you lies within the CSS3 “text-shadow” property, which is supported only by Safari at the moment. By using the drop shadow as an outline, we can do things previously impossible, like set white text on a white background.</p>
<h2 id="text-shadow-demo">Text Shadow Demo</h2>
<p>To the left, you see the results in Safari; a perfectly legible pairing. To the right, you see almost nothing at all. This is what the text looks like in every other major browser, since they ignore the “text-shadow” property.</p>
<p>Is just ignoring the unsupported property a good enough fallback? Not in this case, and there are other potential problems in this vein. Point being, this all-or-nothing method of managing change simply doesn’t cut it. We need browser-specific filtration, to account for scenarios where the fallback causes more harm than good.</p>
<p>“A standard is a standard – you should be able to render the same code consistently in every browser,” I hear some cry. “Browser-specific authoring is a dead end.” And they have my emphatic agreement. I’d love it if the real world proved that were the case. But it’s not.</p>
<h2 id="legitimate-hack-use">Legitimate Hack Use</h2>
<p>No matter how browsers evolve over the next few years, one thing seems relatively safe to predict – there will always be differing levels of support for web standards, whether it be a difference in rendering between major browsers, or even between various versions of the same browser.</p>
<p>The legitimate need for hacks arose as we discovered major browser bugs that prevented us from adopting CSS in the first place; through the use of hacks, we were able to specifically target versions of browsers and force them to comply. Even those on the W3C CSS working group recognize the need for page authors to work around these bugs; wasn’t it Tantek Çelik who gave us the Box Model Hack, after all?</p>
<p>But our CSS hacks are meant for an older set of browsers that will become less relevant in the near future; we don’t have any new mechanisms for filtering the current stable of browsers. How will we deal with browser discrepancies going forward, in light of potential usability problems?</p>
<h2 id="coping">Coping</h2>
<p>I see a few ways.</p>
<ol>
<li>Limit yourself to only those CSS properties and selectors that you know will work across all browsers without fail. In fact, you don’t even have to wait for this, you can start today. Sure, it’s frustrating when all browsers but a single one render on your intended effect, but we’ve pretty well gotten used to that with things like “:hover” support on non-anchor elements. So, hang on to that patience, because you’ll need it.</li>
<li>Perhaps this may not even be an issue. If all browsers continually improve, and we never see another repeat of Internet Explorer’s stagnation over the past 5 years, then we simply need to be patient until the effects we seek become practical, and with any luck that won’t be long.</li>
<li>We could discover a whole new bag of hacks and filters. With the number of people hacking away at CSS these days, the chances aren’t small that sooner or later we’ll be able to exploit other bugs in other browsers, and get ourselves right back into this situation. I think a lot of people would prefer we didn’t go this route again, but it’s almost inevitable that sooner or later, the first IE7 and Firefox 1.0 hacks will rear their heads.</li>
<li>Let’s think pie-in-the-sky here: we could get a bit of recognition that this problem is legitimate, and an official W3C-sanctioned method of browser filtration. I suspect the browser manufacturers are well aware that this is a problem; the IE team has given us a method for filtering out their own browser in the form of conditional comments, after all. Suggestions for codifying a similar method within CSS have been made to the CSS working group many times over the years, and I have it on good authority that there has been at least one formal proposal made in the past on the subject, but as far as I know, nothing has developed from either.</li>
</ol>
<p>The danger in going this route echos what we learned about HTTP user agent strings in the <a href="//en.wikipedia.org/wiki/User_agent">late 90’s</a>, of course. Crappy browsers will force page authors to filter them somehow. Crappy filtering will cause browsers to pose as each other. Maybe it would be better this time around, since the base technologies have matured a little bit. Maybe it wouldn’t.</p>
<h2 id="the-reality">The Reality</h2>
<p>So what do I think is actually going to happen moving forward? Quite likely, a bit of everything.</p>
<p>Many will certainly follow the path of least resistance and simply limit themselves to code that works cross-browser. Others won’t settle for the status quo, and instead will look high and low for new hacks that target specific versions of specific browsers.</p>
<p>And maybe, just maybe, we’ll get a reliable method of filtering on a per-browser basis. I’m not holding my breath on that last one, but stranger things have happened.</p>
<h2 id="notes">Notes</h2>
<ol>
<li>The Tan Hack, or * html bug as it’s also known, causes only IE to parse the CSS within the selector to which it’s applied. It will be fixed in IE7.</li>
<li>The underscore hack causes only IE to parse the CSS within the rule to which it’s applied. It also will be fixed in IE7.</li>
</ol>yashumittalCSS has experienced a colourful and unusual history. From historic slow adoption to the current slow rate of development, ugly hacks have meant filling in the gaps is par for the course.
https://cdn.codecarrot.net/images/css-1.png
7 Ways To Make Your Business Stand Out In A Crowd Of Competitors2017-09-25T20:30:00+00:002017-09-25T20:30:00+00:00https://blog.codecarrot.net/7-ways-to-make-your-business-stand-out-in-a-crowd-of-competitors<p>In a world where the competition regularly claims to be #1, it’s difficult to differentiate and build your own identity. Difficult, but not impossible.</p>
<p>Every brand have built their identities to command a large share of the market. Effective differentiation is one of the main challenges small businesses face, as they are forced to compete against big companies.</p>
<p>Let’s look at seven ways to help your business stand out from the crowd. Each one of the following factors has worked well in countless companies. How many of them are part of your current branding strategy?</p>
<h2 id="1-get-a-website-and-blog">1. Get a website and blog</h2>
<p>Most forward thinking companies are familiar with the benefits of getting a website and start blogging. If you’re tired of being overlooked online; if you’re seeking a fresh way to share ideas, bring more awareness about your product/service and have your voice heard, get involved with corporate website and blogging.</p>
<p><a href="https://www.codecarrot.net/"><img src="https://i.imgur.com/MAphtcZ.png" alt="Make your business online with a website Promo" /></a></p>
<h2 id="2-provide-legendary-customer-service">2. Provide Legendary Customer Service</h2>
<p>Treat your customers like royalty, even if you are not in the service industry. The belief that customer service only matters in the service industry is a myth. All customers have an expectation of great service and will not put up with waiting in long lines or receiving poor responses from representatives.</p>
<h2 id="3-admit-mistakes-and-fix-problems-to-build-stronger-relationships">3. Admit Mistakes and Fix Problems to Build Stronger Relationships</h2>
<p>Customers equate experience with brands. If they have even one bad experience that remains unresolved, they will write off the brand. And negative feedback spreads like wildfire through social media and word of mouth. You need to be on top of your game to improve the customer experience, sometimes by going far out of your way.</p>
<p>One major point is to accept your mistakes, whether they are your fault or not. Customers prefer businesses that own up to their mistakes and take steps to correct them. In fact, customer relationships can actually be stronger after a problem than before, if handled well by your people.</p>
<h2 id="4-come-up-with-something-new">4. Come Up With Something New</h2>
<p>Continue to reinvent your company by adopting emerging technologies and introducing new processes, products and solutions. For example, make use of social media and mobile apps as a growing number of buyers prefer to find and work with you through their phones. All of these attention-grabbers help businesses stand out from the crowd; however, to be effective the underlying product or service must be at least up to par.</p>
<h2 id="5-embrace-corporate-social-responsibility">5. Embrace Corporate Social Responsibility</h2>
<p>While some may argue that a company’s main responsibility is to take care of its core stakeholders such as customers, employees and owners, experts believe that businesses should give back to society as well. Look at Microsoft. It has excellent CSR programs that not only help society but also keep the corporate giant in the news. CSR programs help businesses stay in customers’ minds, improve goodwill, and often bring in more revenue.</p>
<h2 id="6-offer-a-guarantee-can-you-guarantee-next-day-delivery">6. Offer a Guarantee. Can you guarantee next-day delivery?</h2>
<p>Are you confident enough in your product or service to stand behind it 100%? If so, guarantee it. Adding this type of assurance to your marketing message shows customers and prospects that you truly care about their satisfaction. Here’s the only thing you need to remember: you must back up your guarantee if and when the time comes.</p>
<p><a href="https://www.codecarrot.net/">Standing out in a crowd of competitors</a> is no easy task, and it’s getting more difficult all the time. Choose one or more of these tactics to create an advantage for your venture.</p>yashumittalIn a world where the competition regularly claims to be #1, it’s difficult to differentiate and build your own identity. Difficult, but not impossible.
https://i.imgur.com/idQ54wl.png
5 Awesome Ways To Send E-Mail Campaign2017-09-25T15:05:00+00:002017-09-25T15:05:00+00:00https://blog.codecarrot.net/5-awesome-ways-to-create-email-campaign<p>It’s no secret that email is neither the most exciting nor flashy channel. In fact, many industry leaders have been predicting the death of email for years.</p>
<p>However, despite email’s less-than-stellar reputation and predictions of its downfall, the channel endures and remains one of if not the most engaging and ROI friendly platform available to marketers.</p>
<p>But in a world that’s been sending and reading emails for years, how can you innovate within your emails and stand out from the pack?</p>
<p>Here are five examples of awesome email marketing to inspire you.</p>
<h2 id="1-nest-be-clean-and-interactive">1. Nest: Be Clean and Interactive</h2>
<p>This email from Nest delivers all the required information without feeling overloaded. Your eyes are naturally drawn to the product image with the main CTA. Moreover, a well-designed and clearly labeled CTA below the fold offers more information about the product without being too in your face or needing to navigate to a landing page. Subscribers can easily get more information if they need it, but they have all the necessary facts clearly stated up front to drive conversion.</p>
<p><a href="https://www.codecarrot.net/"><img src="https://i.imgur.com/ycXkGVX.png" alt="Nest Email Example" /></a></p>
<p><em>Best practices to leverage: Clean and clear design, interactive, well-written copy, attractive imagery</em></p>
<h2 id="2-peel-dont-be-afraid-to-experiment">2. Peel: Don’t Be Afraid to Experiment</h2>
<p>One big mistake often made within an email program is being afraid to push the e-envelope and try new things. Even if you violate some of the “best practices” often promoted regarding email design, experimenting with your emails and using design tactics to stand out from the crowd is among the best ways to build engagement with your audience.</p>
<p>In the following Peel email, the company states a simple value proposition about their product and uses the body of their email to make their point. The result is elegant, comical, and impactful.</p>
<p><a href="https://www.codecarrot.net/"><img src="https://i.imgur.com/Ucyc6sl.jpg" alt="Peel Email Example" /></a></p>
<p><em>Best practices to leverage: Creativity, experimentation, impactful design, clear imagery</em></p>
<h2 id="3-delta-be-useful">3. Delta: Be Useful</h2>
<p>The best way to keep your email program engaged is to demonstrate to your subscribers that your emails are not only well-designed or promotional, but also are actually useful. Providing information that your subscribers want and need ensures they keep coming back for more.</p>
<p>This email from Delta provides necessary information about an upcoming flight. Everything from the Delta app to packing information is easily available and accessible.</p>
<p><a href="https://www.codecarrot.net/"><img src="https://i.imgur.com/YQOq5x1.png" alt="Delta Email Example" /></a></p>
<p><em>Best practices to leverage: Provide useful information up front</em></p>
<h2 id="4-dockers-know-thy-audience-and-tell-a-story">4. Dockers: Know Thy Audience and Tell a Story</h2>
<p>Every email has an audience, and knowing your audience allows you to craft a message that creates value in your emails. Dockers knows that a good portion of their target audience is at the age where they attend numerous weddings and bachelor parties. The message they create is natural and, rather than just selling pants, they speak to a life event their audience can relate to. Storytelling is always better than straight selling.</p>
<p><a href="https://www.codecarrot.net/"><img src="https://i.imgur.com/k8n1wse.png" alt="Dockers Email Example" /></a></p>
<p><em>Best practices to leverage: Storytelling, understanding audience, targeted copy, directed content</em></p>
<h2 id="5-spotify-surprise-and-delight">5. Spotify: Surprise and Delight</h2>
<p>One of the oldest marketing strategies is to associate positive emotions with your brand. The same idea is true for email. Surprise and delight campaigns remain a hot-button marketing topic because they work. Spotify uses your “favorited and followed” artist to send out pre-sale tickets often worth their weight in gold to fans. Subscribers learn that emails from Spotify shouldn’t be ignored. The email program adds its own level of value to being a Spotify member.</p>
<p><a href="https://www.codecarrot.net/"><img src="https://i.imgur.com/LbOzY6R.png" alt="Spotify Email Example" /></a></p>
<p><em>Best practices to leverage: Storytelling, added value, surprise and delight</em></p>
<p>Sending awesome email is one of the way to increase traffic and sales on your website. If you want a website for your business or need help making your business online.</p>
<p><a href="https://www.codecarrot.net/"><img src="https://i.imgur.com/MAphtcZ.png" alt="Make your business online with a website Promo" /></a></p>yashumittalIt’s no secret that email is neither the most exciting nor flashy channel. In fact, many industry leaders have been predicting the death of email for years.
https://i.imgur.com/lhALgJb.png
10 Essential Instagram Tools for Social Media Marketing2017-09-25T14:32:00+00:002017-09-25T14:32:00+00:00https://blog.codecarrot.net/10-essential-instagram-tools-for-social-media-marketing<p>Instagram is more than just a casual pastime: It’s a powerful marketing platform for business owners everywhere.</p>
<p>With <a href="https://www.instagram.com/press/">over half a billion monthly active users</a>, Instagram has opened up huge opportunities for brands to find new customers and get their products seen. Tactics like <a href="/the-beginners-guide-to-advertising-on-instagram">running Instagram ads</a> and reaching out to influencers are effective, but, without the right tools, it can be tough to get the results that you want.</p>
<p>To help you turbocharge your Instagram account, we’ve put together a top-notch toolkit of Instagram apps that will set your business apart and drive more customers to your online store.</p>
<p>Let’s get into it.</p>
<p><a href="https://www.codecarrot.net/"><img src="https://i.imgur.com/ISrEDIW.png" alt="Make your business online with a website" /></a></p>
<h2 id="tools-for-taking-gorgeous-photos">Tools for Taking Gorgeous Photos</h2>
<p>One of the most important parts of having an effective Instagram presence is loading your feed with stunning visuals that clearly communicate your brand’s identity and the value of your products. But if you don’t have a fancy camera or professional training, taking great photos might seem out of reach.</p>
<p>Even if you aren’t a professional photographer, you can still create great Instagram content with <a href="/how-to-capture-high-quality-product-photos-with-your-smartphone">just your smartphone</a> and a few key apps:</p>
<h2 id="vsco"><a href="https://vsco.co/">VSCO</a></h2>
<h3 id="cost-free"><strong>Cost: Free</strong></h3>
<p><img src="https://i.imgur.com/pCE63BN.png" alt="VSCO" /></p>
<p>While Instagram’s default filters were once the bleeding edge of mobile photo editing, VSCO has emerged as the reigning champ of creating beautiful photos on-the-go. Part photo editing platform and part social media network, VSCO should be at the heart of every Instagram strategy.</p>
<p>VSCO has an in-depth editing suite and a slew of high quality default filters that can take your smartphone photos to a completely new level. There’s also a huge library of filters available for purchase, giving you endless potential for customizing your photos and setting them apart from the pack.</p>
<p>VSCO is available for iOS and Android.</p>
<h2 id="snapseed"><a href="https://itunes.apple.com/EN/app/snapseed/id439438619?mt=8">Snapseed</a></h2>
<h3 id="cost-free-1"><strong>Cost: Free</strong></h3>
<p><img src="https://i.imgur.com/4Tgq4CR.jpg" alt="Snapseed" /></p>
<p>Snapseed is another photo editing app that gives you the option to fine-tune your photos. While Instagram’s default filters edit your entire image at once, Snapseed lets you apply your effects with a brush so that you can perfect the details of each photo.</p>
<p>Snapseed’s Stacks are another great feature, letting you save groups of filters as a template. These Stacks can then be applied to future photos, giving your entire feed a consistent look and saving you time.</p>
<p>Snapseed is available for iOS and Android.</p>
<h2 id="afterlight"><a href="https://afterlight.us/">Afterlight</a></h2>
<h3 id="cost-099---139"><strong>Cost: $0.99 - $1.39</strong></h3>
<p><img src="https://i.imgur.com/UsAazkm.png" alt="Afterlight" /></p>
<p>Afterlight is a photo editing app that boasts a default set of 74 filters, 78 textures, and 128 frames, giving you tons of different options for tweaking your photos right off the bat. The app also includes 15 different tools for adjusting and editing your photos until you get them just right.</p>
<p>With its sleek and straightforward design, Afterlight is an easy-to-use, must-have tool for making your Instagram photos pop.</p>
<p>Afterlight is available for iOS, Android, and Windows.</p>
<h2 id="boomerang"><a href="https://itunes.apple.com/ca/app/boomerang-from-instagram/id1041596399?mt=8">Boomerang</a></h2>
<h3 id="cost-free-2"><strong>Cost: Free</strong></h3>
<p><img src="https://i.imgur.com/ezaeyNz.jpg" alt="Instagram Boomerang" /></p>
<p>Developed in-house at Instagram, Boomerang is an app for creating fun, 1-second long videos with no audio. Basically, super short GIFS that loop back and forth. While it might sound a little silly at first, the results are fun and eye-catching—perfect for making casual scrollers stop in their tracks.</p>
<p>The best part about Boomerang is that it requires little-to-no-thought to create something that looks great. Since Boomerang videos don’t require a plot or dialogue, you simply need to capture the vibe of a single moment and click share!</p>
<h2 id="tools-for-measuring-your-performance">Tools for Measuring Your Performance</h2>
<p>A successful marketing campaign on Instagram doesn’t end with sharing a photo. Diving deep into Instagram analytics is crucial for getting the most out of your business’ marketing strategy. You need to be able to analyze and refine your store’s performance every step of the way.</p>
<p>While Instagram only recently started to launch its own analytics tools, there are many platforms out there that make managing your Instagram marketing campaigns easy:</p>
<h2 id="sprout-social-website"><a href="https://sproutsocial.com/integrations/instagram">Sprout Social Website</a></h2>
<h3 id="cost-59---500month"><strong>Cost: $59 - $500/month</strong></h3>
<p><img src="https://i.imgur.com/d5FZmgp.png" alt="Sprout Social" /></p>
<p>Sprout Social is a social media management platform with extensive content scheduling and publishing tools. Sprout Social also offers in-depth Instagram analytics, giving you access to detailed reports about how your latest posts have been performing.</p>
<p>With Sprout Social’s analytics, you’ll be able to track engagement and compare the success of your store’s account against the success of other accounts that you manage.</p>
<p>Additionally, Sprout Social has tools for monitoring hashtags and comments, helping you keep your fingers on the pulse of your community and find new opportunities for engagement.</p>
<h2 id="iconosquare"><a href="https://pro.iconosquare.com/">Iconosquare</a></h2>
<h3 id="cost-2880---499year"><strong>Cost: $28.80 - $499/year</strong></h3>
<p><img src="https://i.imgur.com/uUCgcO4.png" alt="Iconosquare" /></p>
<p>Iconosquare is an analytics platform dedicated to digging deep into the performance of your content on Instagram.</p>
<p>With Iconosquare, you can track regular engagement data like followers and likes as well as get specific statistics about your followers including their location and level of social media influence. By identifying your most influential fans, you’ll be able to discover new opportunities for influencer marketing and outreach.</p>
<p>Iconosquare also gives you the chance to compare your performance against your competitors, helping you get a better idea of where you fit into your industry landscape.</p>
<h2 id="websta"><a href="https://websta.me/tag/webstagram">Websta</a></h2>
<h3 id="cost-free-3"><strong>Cost: Free</strong></h3>
<p><img src="https://i.imgur.com/GZQFTe4.png" alt="Websta" /></p>
<p>Websta is a free tool for managing your Instagram account and getting easy-to-understand analytics about your engagement and growth.</p>
<p>Websta also aggregates every hashtag on Instagram. This handy feature lets you search through all of Instagram to track down the best performing hashtags in your target audience. You can also get recommendations for hashtags that are related to the ones that you already use to help you branch out and find new audiences.</p>
<h2 id="tools-for-scheduling-your-posts">Tools for Scheduling Your Posts</h2>
<p>To grow your audience and give your current fans a reason to stick around, you need to be updating your Instagram with fresh content regularly. But, let’s face it, constantly updating your profile with new photos takes a lot of time—something most entrepreneurs are already short on.</p>
<p>Thankfully, there are a bunch of great platforms out there that give you the resources you need to schedule your posts in advance keep your profile well-stocked with great content.</p>
<h2 id="schedugram"><a href="https://schedugr.am/">Schedugram</a></h2>
<h3 id="cost-starting-at-20month"><strong>Cost: Starting at $20/month</strong></h3>
<p><img src="https://i.imgur.com/5D1goGD.png" alt="Schedugram" /></p>
<p>Schedugram is a scheduling platform with a wide variety of features, including web browser-based scheduling, for running more effective campaigns.</p>
<p>In addition to browser-based scheduling, Schedugram also comes with extensive photo editing features. Using either its built-in editor or Canva integration, you can tweak and fine-tune your photos well beyond Instagram’s default filters. Schedugram also allows for mass uploading, letting you schedule batches of photos at once and shaving time off of your social media marketing efforts.</p>
<p>Schedugram is priced on a sliding scale starting at $20/month, depending on your number of accounts and total Instagram followers.</p>
<h2 id="later"><a href="https://later.com/">Later</a></h2>
<h3 id="cost-free-with-premium-plans-starting-at-19month"><strong>Cost: Free with Premium Plans starting at $19/month</strong></h3>
<p><img src="https://i.imgur.com/hwz42Ms.png" alt="Later" /></p>
<p>Later, formerly known as Latergramme, is an intuitive mobile, tablet, and browser-based Instagram scheduling platform.</p>
<p>Later comes with a diverse set of features for planning out your campaigns including the ability to explore hashtags and share user generated content. Later even lets you organize your posts with a handy content calendar and get a preview of your Instagram feed before publishing, making it simple to visualize exactly how your strategy will unfold.</p>
<h2 id="hootsuite"><a href="https://hootsuite.com/instagram">Hootsuite</a></h2>
<h3 id="cost-free-with-pro-plans-starting-at-999month"><strong>Cost: Free with Pro Plans starting at $9.99/month</strong></h3>
<p><img src="https://i.imgur.com/cIaos1u.png" alt="Hootsuite" /></p>
<p>Hootsuite is a powerful social media management platform that can also schedule and publish Instagram posts.</p>
<p>While Hootsuite has made a name for itself by streamlining marketing for platforms like Facebook and Twitter, its Instagram tools take social media management one step further. Hootsuite lets you schedule your Instagram posts in advance, sending you a push notification when they’re due to go live. Once you’re notified, you can go straight to the app to publish your post.</p>
<h2 id="start-shooting">Start Shooting</h2>
<p>Now that you have the right tools for the job, it’s time to get out there and start taking amazing photos that really show the true value of your products!</p>yashumittalInstagram is more than just a casual pastime: It’s a powerful marketing platform for business owners everywhere.
https://i.imgur.com/90hn2l1.jpg
The DOs and DO NOTs of Brand2017-09-20T15:05:10+00:002017-09-20T15:05:10+00:00https://blog.codecarrot.net/the-dos-and-do-nots-of-brand<p>Brand is one of those things that often falls by the wayside with developers. Developers are constantly creating amazing technologies and incredible platforms that are fundamentally changing the way marketing and branding works.</p>
<p>Applications and platforms, i.e. social networking, now exist that allow consumers, i.e. users, to connect with brands for the very first time. Consumers today have the power and the tools to research, get feedback and participate. Today as a result of the platforms and technologies that YOU’VE created, and that’s beautiful irony, users have a really loud voice.</p>
<p>Why is brand important for web applications and products? Well, there are thousands and thousands and thousands of web apps out there. You’re in direct competition with them, every single one of them. You have to stand out in the crowd and get people coming back to your site.</p>
<p>If you’re developing a competing application to an incumbent you’re going to have to work ten times harder to get people to change. As sites start to use even more social currency, points systems, giving more “value” to a user, it will be harder and harder to bring them over. Bottom line: you’re going to have to work your ass off.</p>
<p>With this in mind here are some quick DOs and DO NOTs for building and managing a successful web brand:</p>
<h2 id="what-to-do">What to DO</h2>
<h3 id="do-define-your-values"><strong>DO: Define your values</strong></h3>
<p>What are you? Your values are going to be the foundation of what you are, and more importantly, what you will be – now, tomorrow and in ten years time. Set them early and set them well because they will define you for the rest of your existence. It’s really, really easy to half-ass this. Don’t, because it will come back to bite you if you do.</p>
<p>The convenient thing would be to dump all of your “values”, your product, and brand name into a blender, dump out the contents and proclaim “There, we’re done!” It’s not that easy and more importantly, what comes out won’t be an accurate representation of what you are.</p>
<p>So to do this right, take the best of what your team, vision, and product represents, in appropriate doses, and create a whole new identity. Remember, this is NOT something a single person (e.g. founder) can do on their own. Involve the team, involve friends, involve advisors. Stop trying to do it yourself, take a step back and get people involved.</p>
<p>P.S. Everyone wants to be “fun”, “ethical”, “challenging” and “revolutionary.” Skip those values from your brainstorming and consider them as given.</p>
<h3 id="do-be-emotional"><strong>DO: Be emotional</strong></h3>
<p>How are you going to get the public to love you? How are you going to get people to have that emotional connection with what you do? And let’s be clear this IS about emotion, so please BE emotional.</p>
<p>This is your baby, your blood sweat and tears that you’ve poured into your project. Your users will be able to connect emotionally if they sense the emotion, a key ingredient of loyalty, that you’ve put into your creation.</p>
<h3 id="do-be-transparent"><strong>DO: Be transparent</strong></h3>
<p>Transparency, especially at the beginning when you’re building something or when it’s just an idea, is really beautiful because it brings people into the journey. It’s why reality TV is so hard to look away from.</p>
<p>The development cycle IS dramatic, emotional and painful with “4 o’clock in the morning” caffeine-induced coding frenzies, the wins, the losses, the highs and the lows. Bring people along on that journey.</p>
<p>But remember, when things go wrong, hold your hands up and admit to it – be transparent, be human. Don’t hide behind a brand name or a product name. People will engage with that. You don’t hear people talking about Spotify’s massive data leak very often, do you. No because they came clean, notified users, fixed it and busted ass to continue making a great product.</p>
<h3 id="do-extend-your-brand"><strong>DO: Extend your brand</strong></h3>
<p>Despite what you might think, your app is not the be all and end all. Don’t believe this “if you build it, they will come” mantra, that is “weapons-grade bullonium”. It’s just not true. You have to extend the reach of what you do with content and engagement, physical and digital engagement. Build up a voice and personality around your brand.</p>
<p>Consider <a href="//www.digg.com/">Digg</a>, who are masters of brand extension in the web world. Their <a href="//blog.digg.com/">blog</a> is written by the people who are responsible for rolling out new features, managing the database, marketing the site, not just the founder or the VP of PR. Real names, real faces, real people that we as users can connect with.</p>
<p>Whenever they roll out a new piece of technology or a new development, the person responsible blogs about it, explains what they did and asks for feedback. That breeds loyalty. They take it further with <a href="//www.diggnation.com/">Diggnation</a>, <a href="//digg.com/meetup">Digg Meetups</a>, and <a href="//digg.com/dialogg/">DiggDialog</a>.</p>
<h3 id="do-bridge-the-gap-between-online-and-offline"><strong>DO: Bridge the gap between online and offline</strong></h3>
<p>Bridging the gap between online and offline with real world events breeds loyalty. There are a lot of web companies that are getting really good at hosting real world events where users meet up and are rewarded on a macro level, for example Digg or Qype here in Europe.</p>
<p>Both introduce users to each other and to the people that curate the community they’re involved in at events that are tailored to the users’ interests. Launch parties and regular user meet-ups get people talking and get people connected. That really breeds loyalty. It’s astounding what that can do in terms of competitive advantage and brand awareness.</p>
<h2 id="what-not-to-do">What NOT to DO</h2>
<h3 id="dont-ignore-your-brand"><strong>DON’T: Ignore your brand</strong></h3>
<p>As web developers, application creators and programmers, we don’t think about brand nearly as much as we should. We don’t care. We don’t think it’s important. We’re busy building our apps. We’re not focussed on brand, it’s not our core activity. But you cannot afford to ignore your brand at any point in its existence.</p>
<p>Brand loyalty is getting harder and harder to gain and, ironically, easier to lose. As marketers get savvier and people are convinced that the same product is better just because it has a certain brand, the harder you’re going to have to work to build a loyal user base.</p>
<h3 id="dont-half-ass-your-brand-development"><strong>DON’T: Half ass your brand development</strong></h3>
<p>You have to put the time and energy into this that it deserves. Do this and do it well. So many people think that brand is about product name. Cute name, great brand, done. WRONG. So wrong it hurts. And besides, we can’t even get that right.</p>
<p>So many web apps out there have thoughtless names. There’s no rationale or logic behind the names at all, they just think it is cute and memorable. It’s oh-so-fashionable to drop a vowel here and there or misspell something and be done with it. That doesn’t mean anything and it’s lazy. Don’t do that. Or if you do, have a reason for it. Give your brand development the time and energy it deserves.</p>
<h3 id="dont-put-your-interests-ahead-of-your-users"><strong>DON’T: Put your interests ahead of your users</strong></h3>
<p>I know this is hard because, ultimately, you have to pay the bills. But a reputation of looking after your users, being ethical, will put you head and shoulders above anybody else.</p>
<p>I often cite the example of Amazing Tunes, a site for unsigned artists. Sure, there are other unsigned artists sites out there, but not that give 70% of the profits back to the user and not that have a DAB radio station that artists are featured on. THAT is looking after your users. That’s the definition of an ethical web company.</p>
<h3 id="dont-be-precious-about-consistency-or-message"><strong>DON’T: Be Precious about consistency or message</strong></h3>
<p>People often say to me “The more people I give the message or brand to, the more watered down it becomes and the less consistent the message is”. Big brands are especially scared of losing the refinement of their message. But realistically, they’ve been doing it for the last 30 years because the person who answers the phone in the call centre is the first point of contact that a user has with their brand.</p>
<p>The call centre employees are representing your brand. The receptionist is representing your brand. So giving someone an account on Twitter to do the same is no different, it’s just a little bit more of a public stage. But, that’s a GOOD thing because people can see you responding to positive comments and negative comments and reacting and helping people and participating in the CONVERSATION in a very public forum.</p>
<p>Ultimately, you’re giving people the tools to go and evangelise your brand and product – don’t fight that.</p>yashumittalBrand is one of those things that often falls by the wayside with developers. Developers are constantly creating amazing technologies and incredible platforms that are fundamentally changing the way marketing and branding works.
https://cdn.codecarrot.net/images/bigstock-Brand-Branding-Marketing-Strat-90154346.jpg
How to encourage exploration on your site?2017-09-19T19:50:00+00:002017-09-19T19:50:00+00:00https://blog.codecarrot.net/how-to-encourage-exploration-on-your-site<p>YouTube has added a really nice touch to their site that encourages people to explore and view other videos. This has the obvious financial benefit to them of increasing video and page views, thus increasing advertising revenue.</p>
<p><img src="https://cdn.codecarrot.net/images/l4FGC3dPGy2VJJsIw.gif" alt="Explore the earth" /></p>
<p>When you pause a video, and you put your mouse over it, a search box appears. It’s like they’re saying “Hey, why not explore some other videos?”. It’s a really natural and interesting way to encourage folks to stay on the site.</p>
<p>It’s important to think about small and helpful ways you can encourage your site visitors to stay a bit longer and explore.</p>yashumittalYouTube has added a really nice touch to their site that encourages people to explore and view other videos. This has the obvious financial benefit to them of increasing video and page views, thus increasing advertising revenue.
https://cdn.codecarrot.net/images/a-cartoon-exploring-in-snow.jpg
The History of JavaScript2017-09-17T18:40:00+00:002017-09-17T18:40:00+00:00https://blog.codecarrot.net/the-history-of-javascript<p>The World Wide Web was originally a bunch of pages linked together by hyperlinks. Soon people wanted more interaction and so Netscape (an early browser vendor) asked Brendan Eich to develop a new language for their Navigator browser. This needed to be done quickly because of the intense competition between Netscape and Microsoft to be first to market, and Eich managed to create a prototype language in just ten days.</p>
<p>In order to do this, he borrowed various elements from other languages, including AWK, Java, Perl, Scheme, Hyper Talk, and Self. The new language was originally called Live Script, but was hastily rebranded as JavaScript so that it could benefit from the publicity that the Sun Microsystem’s Java language was attracting at the time.</p>
<p>This name has often caused some unfortunate confusion, with JavaScript often thought of as a lighter version of Java; the two languages are unrelated, although JavaScript does share some syntax with Java.</p>
<p>JavaScript made its debut in version 2 of Netscape’s Navigator browser in 1995. The following year, Microsoft reverse-engineered JavaScript to create their own version, called JScript to avoid copyright issues with Sun Microsystems who owned the Java trademark and had licensed it to Netscape. JScript shipped with version 3 of the Internet Explorer browser and was almost identical to JavaScript―it even included all the same bugs and quirks―but did have some extra Internet Explorer-only features.</p>
<p>Microsoft included another scripting language called VBScript with Internet Explorer at the same time, although this never really caught on. JavaScript (and JScript) was immediately popular. It had a low barrier to entry and was relatively easy to learn, which meant an explosion in its usage making web pages dynamic and more interactive.</p>
<p>Unfortunately, its low barrier was also a curse as it meant that people could write snippets of code without much understanding of what they were actually doing. Code could be easily copied and pasted and was often used incorrectly, leading to lots of poor code examples appearing all over the Web. JavaScript was also frequently used to create annoying pop-up adverts and for <strong>browser sniffing</strong> (the process of detecting which browser was being used to view a web page), and it started to gain a negative reputation.</p>
<p>Netscape and Sun Microsystems decided to standardize the language along with the help of the European Computer Manufacturers Association, who would host the standard. This standardized language was called ECMAScript, again, to avoid infringing on Sun’s Java trademark. This caused even more confusion, but eventually ECMAScript was used to refer to the specification, and JavaScript was (and still is) used to refer to the language itself.</p>
<p>The ECMAScript standard can be difficult to interpret in places, so the implementations of JavaScript can vary in assorted JavaScript engines. This is why some web browsers behave differently when running JavaScript programs.</p>yashumittalThe World Wide Web was originally a bunch of pages linked together by hyperlinks. Soon people wanted more interaction and so Netscape (an early browser vendor) asked Brendan Eich to develop a new language for their Navigator browser. This needed to be done quickly because of the intense competition between Netscape and Microsoft to be first to market, and Eich managed to create a prototype language in just ten days.
https://cdn.codecarrot.net/images/history-of-javascript.png
Scrolling made fun with Scrollorama2017-09-17T17:10:00+00:002017-09-17T17:10:00+00:00https://blog.codecarrot.net/scrolling-made-fun-with-scrollorama<p>Just when you thought scrolling your web page was getting boring. <a href="https://johnpolacek.github.com/scrollorama/">Scrollorama</a> has stepped the scroll game up with this remarkable jQuery Plugin. Scrollorama allows you to manipulate text when you scroll the page. You can do everything from Transitions to Zoom to Parallax.</p>
<p>Check out the <a href="https://johnpolacek.github.com/scrollorama/">Scrollorama</a> site to view some great examples and the plugin’s documentation.</p>
<p>This Plugin is great for landing pages and highly interactive web applications. Like CSS3 transitions, use your animations sparingly.</p>yashumittalJust when you thought scrolling your web page was getting boring. Scrollorama has stepped the scroll game up with this remarkable jQuery Plugin. Scrollorama allows you to manipulate text when you scroll the page. You can do everything from Transitions to Zoom to Parallax.
https://cdn.codecarrot.net/images/girl-scrolling.gif
Sublime text 3.0 Released for Download2017-09-17T12:20:30+00:002017-09-17T12:20:30+00:00https://blog.codecarrot.net/sublime-text-3-0-released-for-download<p>There is some good news for lovers of the popular code editor, Sublime Text, as it has released the new final version of Sublime Text 3.0 Build 3143, which is now available for download on Windows, Linux and MacOS. In comparison to the previous release, the program is supposed to be better in every way, which makes it easy for everyday people to work with code.</p>
<p>For those unaware, Sublime Text is a proprietary cross-platform source code editor with a Python application programming interface (API). It natively supports many programming languages and markup languages, and its functionality can be extended by users with plugins, typically community-built and maintained under free-software licenses. Sublime Text is available for Mac OS, Windows and Linux.</p>
<p>There are a lot of changes in Build 3143 that practically affect every aspect of the application, such as appearance, functionality and performance. For instance, Sublime Text 3.0 will now consume much less resources and run much faster than version 2 in every aspect, such as launching a program, opening files, swapping words into a document, or scrolling through content.</p>
<p>The new Sublime Text also has some interesting visual changes, which can be seen in the form of new icons, interface color scheme, adaptive theme and publisher fonts.</p>
<p>Don’t forget to take a look at the new Sublime icon.</p>
<p><img src="https://cdn.codecarrot.net/images/sublime-text-new-logo-preview.png" alt="New sublime text logo" /></p>
<p>In addition, compared to the last beta, 3.0 brings a completely new UI theme, a new syntax highlighting engine, Touch Bar for MacOS, touch input for Windows.</p>
<p>Sublime Text 3.0 also includes better spell check, more efficient automatic indentation, GoTo Definition, and better customization of the interface to high resolution screens. Further, in order to make Sublime Text 3.0 one of the best programming IDEs for both amateurs and professionals alike, a number of problems and bugs have also been fixed.</p>
<p>You can check the complete list of changes of Sublime Text 3.0 by <a href="//www.sublimetext.com/2to3">clicking here</a>.</p>
<p>It is worth noting that the full version of Sublime Text 3.0 is applicable not only to new customers but also to those who have purchased a license for Sublime Text 2 from February 2013 onwards. For those who have license key for Sublime Text 1 or 2 can <a href="//www.sublimetext.com/upgrade">purchase upgrades</a>.</p>
<h2 id="here-is-the-full-changelog">Here is the full changelog:</h2>
<ul>
<li>Refreshed UI theme, including full high DPI support</li>
<li>New icon</li>
<li>Added alternate theme, Adaptive, that inherits colors from the color scheme</li>
<li>Added new color schemes Breakers, Mariana and Sixteen, derived from the excellent work of Chris Kempson and Dmitri Voronianski</li>
<li>Added color scheme and theme switchers with live preview via the command palette</li>
<li>Windows: Added touch input</li>
<li>Linux: Added <a href="//www.sublimetext.com/docs/3/linux_repositories.html">repositories</a> for apt, yum and pacman</li>
<li>Mac: Added Touch Bar support</li>
<li>Mac: Support for custom color window title bars on OS X 10.10+</li>
<li>Many additions and bug fixes to the theme engine, plus <a href="//www.sublimetext.com/docs/3/themes.html">full documentation</a></li>
<li>Significant improvements to Markdown syntax highlighting, with thanks to <a href="//github.com/keith-hall">keith-hall</a></li>
<li>Significant improvements to C# syntax highlighting, with thanks to <a href="//github.com/gwenzek">gwenzek</a></li>
<li>Significant improvements to Java syntax highlighting, with thanks to <a href="//github.com/djspiewak">djspiewak</a></li>
<li>Significant improvements to Python syntax highlighting, with thanks to <a href="//github.com/FichteFoll">FichteFoll</a></li>
<li>Significant improvements for R syntax highlighting, with thanks to <a href="//github.com/randy3k">randy3k</a></li>
<li>Markdown: Improved symbol handling</li>
<li>C#: Improved symbol handling</li>
<li>Many other syntax highlighting improvements</li>
<li>Various bugs with the syntax highlighting engine have been resolved</li>
<li>Fixed several crash issues</li>
<li>Improved responsiveness when the system is under high CPU load</li>
<li>High DPI textures are used on Windows and Linux when the DPI scale is greater than 1.0</li>
<li>Improved font selection on all platforms, allowing selection of different weights by name</li>
<li>Added setting <code class="highlighter-rouge">theme_font_options</code> to control font rendering of UI elements</li>
<li>Improved auto indent rules for HTML and PHP</li>
<li>Font geometry issues that prevent bold or italics are now printed in the console</li>
<li>Fixed flash-of-white that could occur when the auto complete window is closed</li>
<li>Disable scroll animation when <code class="highlighter-rouge">animation_enabled</code> is false in settings</li>
<li>Files can now be renamed when only the case has changed</li>
<li>New windows start with an empty find history</li>
<li>Find in Files panel now responds to <code class="highlighter-rouge">find_all</code> and <code class="highlighter-rouge">replace_all</code> commands</li>
<li>Various regex handling improvements in the Find panel</li>
<li>Fixed text widgets cutting off the bottom pixel of their selection border</li>
<li>Fixed an issue with <code class="highlighter-rouge">close_windows_when_empty</code> in empty session</li>
<li>Fixed empty panes on startup when <code class="highlighter-rouge">hot_exit</code> was set to false</li>
<li>Fix Open Containing Folder on Windows with a folder containing a comma</li>
<li>Fix multi-cursor pasting when clipboard contains one or more full lines</li>
<li>Prevent UNC paths from being mangled by <code class="highlighter-rouge">edit_settings</code></li>
<li>Prevent a crash when a malformed regex is used in indentation settings</li>
<li>Improved rendering performance with a large number of gutter icons</li>
<li>Gutter icons are now sized properly on Windows and Linux high DPI screens</li>
<li>Improved sidebar performance when folders contain many thousands of files</li>
<li>Improved inline error message style</li>
<li>Fixed an issue where multiple indexing status windows could be shown</li>
<li>Windows: Font rendering defaults to DirectWrite unless using Consolas or Courier New</li>
<li>Windows: Added support for <code class="highlighter-rouge">no_antialias</code> font option when using DirectWrite</li>
<li>Windows: Improved touch pad scrolling</li>
<li>Windows: Improved file change detection robustness</li>
<li>Windows: Improved font selection logic</li>
<li>Windows: <code class="highlighter-rouge">Fix ctrl+`</code> shortcut for UK (ISO) keyboards</li>
<li>Windows: Improved fallback font handling in UI elements</li>
<li>Windows: The subl executable on OS X and plugin_host.exe on Windows are now signed</li>
<li>Windows: sublime_text.exe now has CompanyName set in VERSIONINFO</li>
<li>Mac: Handle layout changes due to macOS Sierra tabs</li>
<li>Mac: Improved default web browser detection</li>
<li>Mac: OS X 10.11 and macOS 10.12+ default to using San Francisco for the UI font</li>
<li>Mac: Fixed file change notifications from freezing UI on macOS Sierra</li>
<li>Mac: the user’s default shell is executed and environmental variables are set in the plugin Python environment</li>
<li>Linux: Update X11 selection on clipboard every time selection changes</li>
<li>Linux: Improved <code class="highlighter-rouge">MOD3</code> modifier key handling</li>
<li>minihtml: Added support for borders</li>
<li>minihtml: Respects <code class="highlighter-rouge">font_options</code> from the settings</li>
<li>minihtml: Fixed layout of html popups on Windows and Linux under High DPI</li>
<li>minihtml: Fixed crash when doctype is present</li>
<li>minihtml: Fixed a crash from non-existent CSS vars</li>
<li>minihtml: Fixed a crash triggered by bad image paths</li>
<li>API: Add <code class="highlighter-rouge">View.text_to_window()</code> and <code class="highlighter-rouge">View.layout_to_window()</code></li>
<li>API: All API functions now accept and return device-independent-pixels</li>
<li>API: Fixed input panel not running on_cancel when re-showing the input panel</li>
<li>API: Fixed selector scoring with the & operator</li>
<li>API: Fixed a bug causing incorrect phantom contents</li>
<li>API: Fixed crash in <code class="highlighter-rouge">Window.set_view_index()</code></li>
<li>API: Updated OpenSSL to 1.0.2k, SQLite to 3.16.02</li>
</ul>yashumittalThere is some good news for lovers of the popular code editor, Sublime Text, as it has released the new final version of Sublime Text 3.0 Build 3143, which is now available for download on Windows, Linux and MacOS. In comparison to the previous release, the program is supposed to be better in every way, which makes it easy for everyday people to work with code.
https://cdn.codecarrot.net/images/1582459dribbble_shot.png
How to Draw a Heart Shape in Adobe Illustrator2017-09-16T09:14:00+00:002017-09-16T09:14:00+00:00https://blog.codecarrot.net/how-to-draw-a-heart-shape-in-adobe-illustrator<p>Learn the simple to way to draw a heart share in adobe illustrator using simple shapes without using the pen tool.</p>
<iframe width="100%" height="315" src="https://www.youtube.com/embed/QDbzZu8l1pM?rel=0" frameborder="0" allow="autoplay; encrypted-media" allowfullscreen=""></iframe>
<p><strong>Pro Tip:</strong> If you, not a pro in creating illustrations, using Logogenie to use an <a href="https://www.logogenie.fr/">online logo maker</a>, creating cheap logo easily. It has more than +3000 logo templates and provides social network packages, high definition JPG, PNG, PDF and vector files.</p>yashumittalLearn the simple to way to draw a heart share in adobe illustrator using simple shapes without using the pen tool.
https://cdn.codecarrot.net/images/draw-heart-shape-video-thumbnail.jpg
Why Investing in Messaging and Video Will Make You a Better Marketer2017-09-15T20:10:00+00:002017-09-15T20:10:00+00:00https://blog.codecarrot.net/messaging-and-video-megatrends<p>With billions now using messaging, and billions of videos being watched everyday, marketing teams need to adapt these megatrends.</p>
<p>The world’s top four messaging apps — WhatsApp, Messenger, WeChat, and Viber — now have a combined total of nearly 4 billion monthly active users.</p>
<p>That’s more than the combined total for the top four social networks <em>(Facebook, Instagram, Twitter, and LinkedIn)</em>.</p>
<h2 id="megatrend-1-messaging">Megatrend #1: Messaging</h2>
<p>After analyzing the marketing tools being used by all 100 companies on Forbes’ Cloud 100 list, we discovered that 15% of them are using messaging on their websites.</p>
<p>Ultimately, the approach is that these companies use messaging on their website depends on how much traffic they’re getting, and how they want to balance the quantity and quality of the conversations they’re having with visitors.</p>
<p>For example, it makes sense that Dropbox, which has the most-visited website in the world, would only display messaging on their business sub-site.</p>
<p>That way, they can filter out some of the “noise” of website visitors who have no intention of paying for a business plan.</p>
<p>One last thing about messaging before we move onto video:</p>
<p>Overall, we found that 69% of Cloud 100 companies have a call-to-action on their website that prompts people to get in touch with sales. However, only two of those companies give you the opportunity, to chat with someone live after clicking that CTA.</p>
<p>At CodeCarrot, we see this as a huge missed opportunity for generating a new category of qualified leads.</p>
<p>By replacing your “Contact Us” form with messaging — or simply by adding messaging button on your site — you can generate more leads and, ultimately, shorten your sales cycle.</p>
<p>Meanwhile…</p>
<h2 id="megatrend-2-video">Megatrend #2: Video</h2>
<p>Ten billion videos are now being watched on Snapchat every single day and 100 million hours of video are being watched on Facebook per day.</p>
<p>These figures may look fancy but it’s predicted that by 2021, video traffic will account for 82% of all internet traffic.</p>
<p>Over 34% of Cloud 100 companies are producing video content on a regular basis and uploading them on YouTube, Facebook, and Vimeo.</p>
<p>Overall, adoption of video is more widespread among the Cloud 100 compared to messaging adoption, with just over one-third of companies producing video content on a regular basis.</p>
<p>While YouTube is clearly the most popular channel for uploading video content, it’s noteworthy that companies are regularly uploading video directly to Facebook and not just sharing links to video content uploaded to YouTube.</p>
<p>The difference is that instead of using Vimeo as a social network for sharing new videos regularly, most use it as a way to host their “evergreen” videos like product walkthrough videos on their websites.</p>
<h2 id="final-thought-the-relationship-between-messaging--video">Final Thought: The Relationship Between Messaging & Video</h2>
<p>While at first glance they might seem like completely unrelated technologies, messaging and video both deliver on-demand, personalized experience that buyers have come to expect these days.</p>
<p>And while messaging lets you engage with visitors in real-time on your site, video can help you drive those visitors there in the first place.</p>
<p>They’re not just popular marketing channels, they’re gateways for reaching billions of potential customers all around the world, that’s why, at CodeCarrot, we consider messaging and video to be megatrends.</p>yashumittalWith billions now using messaging, and billions of videos being watched everyday, marketing teams need to adapt these megatrends.
https://i.imgur.com/JtM5CB1.jpg
14 Handy jQuery Code Snippets for Developers2017-09-14T17:20:00+00:002017-09-14T17:20:00+00:00https://blog.codecarrot.net/14-handy-jquery-code-snippets-for-developers<p>The jQuery dev team has been releasing code updates frequently since the project began. JavaScript developers have never had an easier framework to code on frontend interfaces. For anybody just getting started in web development you can be certain to run into some jQuery code on the web.</p>
<p>I have put together a series of 14 helpful jQuery code snippets you may save and copy to use at your own discretion. These are merely blank templates you can edit to change variables and parameters matching your own script. I’m sure even experienced developers may find some of these snippets beneficial and shaving off time during code sessions.</p>
<h2 id="1-hover-onoff">1. Hover On/Off</h2>
<div class="language-js highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="nx">$</span><span class="p">(</span><span class="dl">"</span><span class="s2">a</span><span class="dl">"</span><span class="p">).</span><span class="nx">hover</span><span class="p">(</span>
<span class="kd">function</span> <span class="p">()</span> <span class="p">{</span>
<span class="c1">// code on hover over</span>
<span class="p">},</span>
<span class="kd">function</span> <span class="p">()</span> <span class="p">{</span>
<span class="c1">// code on away from hover</span>
<span class="p">}</span>
<span class="p">);</span>
</code></pre></div></div>
<p><a href="//api.jquery.com/hover/">Source</a></p>
<p>The jQuery hover method is a quick solution for handling these events. You can determine whether the user is just hovering over your element, or if the user is just leaving the hover state. This allows for two custom functions where you can run two distinct sets of code.</p>
<h2 id="2-prevent-anchor-links-from-loading">2. Prevent Anchor Links from Loading</h2>
<div class="language-js highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="nx">$</span><span class="p">(</span><span class="dl">"</span><span class="s2">a</span><span class="dl">"</span><span class="p">).</span><span class="nx">on</span><span class="p">(</span><span class="dl">"</span><span class="s2">click</span><span class="dl">"</span><span class="p">,</span> <span class="kd">function</span><span class="p">(</span><span class="nx">e</span><span class="p">){</span>
<span class="nx">e</span><span class="p">.</span><span class="nx">preventDefault</span><span class="p">();</span>
<span class="p">});</span>
</code></pre></div></div>
<p><a href="//api.jquery.com/on/">Source</a></p>
<p>When you create JavaScript applications there are plenty of times where you need a link or button to just do nothing. This is often for triggering some type of dynamic effect, such as a hidden menu or Ajax call. By using the event object during any click, we can manipulate the data sent back to the browser URL. In this scenario I am stopping the whole href from loading anything at all!</p>
<h2 id="3-scroll-to-top">3. Scroll to Top</h2>
<div class="language-js highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="nx">$</span><span class="p">(</span><span class="dl">"</span><span class="s2">a[href='#top']</span><span class="dl">"</span><span class="p">).</span><span class="nx">click</span><span class="p">(</span><span class="kd">function</span><span class="p">()</span> <span class="p">{</span>
<span class="nx">$</span><span class="p">(</span><span class="dl">"</span><span class="s2">html, body</span><span class="dl">"</span><span class="p">).</span><span class="nx">animate</span><span class="p">({</span> <span class="na">scrollTop</span><span class="p">:</span> <span class="mi">0</span> <span class="p">},</span> <span class="dl">"</span><span class="s2">slow</span><span class="dl">"</span><span class="p">);</span>
<span class="k">return</span> <span class="kc">false</span><span class="p">;</span>
<span class="p">});</span>
</code></pre></div></div>
<p><a href="//stackoverflow.com/a/1145297/477958">Source</a></p>
<p>You have probably seen this functionality becoming popular on all the new social networking websites. I have definitely seen this technique appear on infinite-scrolling layouts such as Tumblr and Pinterest.</p>
<p>The code is very minimal but powerful in some layouts. You are offering a simple link or button display which behaves like a “back to home” link. By using the animate effect in jQuery users won’t notice the jump all at once, but instead over a brief period of milliseconds.</p>
<h2 id="4-ajax-template">4. Ajax Template</h2>
<div class="language-js highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="nx">$</span><span class="p">.</span><span class="nx">ajax</span><span class="p">({</span>
<span class="na">type</span><span class="p">:</span> <span class="dl">'</span><span class="s1">POST</span><span class="dl">'</span><span class="p">,</span>
<span class="na">url</span><span class="p">:</span> <span class="dl">'</span><span class="s1">backend.php</span><span class="dl">'</span><span class="p">,</span>
<span class="na">data</span><span class="p">:</span> <span class="dl">"</span><span class="s2">q=</span><span class="dl">"</span><span class="o">+</span><span class="nx">myform</span><span class="p">.</span><span class="nx">serialize</span><span class="p">(),</span>
<span class="na">success</span><span class="p">:</span> <span class="kd">function</span><span class="p">(</span><span class="nx">data</span><span class="p">){</span>
<span class="c1">// on success use return data here</span>
<span class="p">},</span>
<span class="na">error</span><span class="p">:</span> <span class="kd">function</span><span class="p">(</span><span class="nx">xhr</span><span class="p">,</span> <span class="nx">type</span><span class="p">,</span> <span class="nx">exception</span><span class="p">)</span> <span class="p">{</span>
<span class="c1">// if ajax fails display error alert</span>
<span class="nx">alert</span><span class="p">(</span><span class="dl">"</span><span class="s2">ajax error response type </span><span class="dl">"</span><span class="o">+</span><span class="nx">type</span><span class="p">);</span>
<span class="p">}</span>
<span class="p">});</span>
</code></pre></div></div>
<p><a href="//api.jquery.com/jQuery.ajax/">Source</a></p>
<p>Passing form data via Ajax is one of the most common uses for jQuery. As a web developer myself I can’t think how many times I am using the ajax method in each project. The syntax can be awfully confusing to memorize, and checking the documentation gets old after a while. Consider copying this small template for usage in any future Ajax-powered webapps.</p>
<h2 id="5-animate-template">5. Animate Template</h2>
<div class="language-js highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="nx">$</span><span class="p">(</span><span class="dl">'</span><span class="s1">p</span><span class="dl">'</span><span class="p">).</span><span class="nx">animate</span><span class="p">({</span>
<span class="na">left</span><span class="p">:</span> <span class="dl">'</span><span class="s1">+=90px</span><span class="dl">'</span><span class="p">,</span>
<span class="na">top</span><span class="p">:</span> <span class="dl">'</span><span class="s1">+=150px</span><span class="dl">'</span><span class="p">,</span>
<span class="na">opacity</span><span class="p">:</span> <span class="mf">0.25</span>
<span class="p">},</span> <span class="mi">900</span><span class="p">,</span> <span class="dl">'</span><span class="s1">linear</span><span class="dl">'</span><span class="p">,</span> <span class="kd">function</span><span class="p">()</span> <span class="p">{</span>
<span class="c1">// function code on animation complete</span>
<span class="p">});</span>
</code></pre></div></div>
<p><a href="//api.jquery.com/animate/">Source</a></p>
<p>As we saw the animate method earlier, this is very powerful for creating dynamic movement on your page. CSS3 transitions are a whole lot easier in some circumstances. But with animate you can manipulate multiple objects or CSS properties all at once!</p>
<p>It’s a very powerful library to get into and start playing with. If you haven’t used any of the jQuery UI library I suggest spending an hour or two practicing with demo stuff. You can animate any object on the page into almost any position or updated style.</p>
<h2 id="6-toggle-css-classes">6. Toggle CSS Classes</h2>
<div class="language-js highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="nx">$</span><span class="p">(</span><span class="dl">'</span><span class="s1">nav a</span><span class="dl">'</span><span class="p">).</span><span class="nx">toggleClass</span><span class="p">(</span><span class="dl">'</span><span class="s1">selected</span><span class="dl">'</span><span class="p">);</span>
</code></pre></div></div>
<p><a href="//api.jquery.com/toggleClass/">Source</a></p>
<p>Adding and removing CSS classes on HTML elements is another fairly common action. This is one technique you may consider with selected menu items, highlighted rows, or active input elements. This newer method is simply quicker than using <code class="highlighter-rouge">.addClass()</code> and <code class="highlighter-rouge">.removeClass()</code> where you can put all the code into one function call.</p>
<h2 id="7-toggle-visibility">7. Toggle Visibility</h2>
<div class="language-js highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="nx">$</span><span class="p">(</span><span class="dl">"</span><span class="s2">a.register</span><span class="dl">"</span><span class="p">).</span><span class="nx">on</span><span class="p">(</span><span class="dl">"</span><span class="s2">click</span><span class="dl">"</span><span class="p">,</span> <span class="kd">function</span><span class="p">(</span><span class="nx">e</span><span class="p">){</span>
<span class="nx">$</span><span class="p">(</span><span class="dl">"</span><span class="s2">#signup</span><span class="dl">"</span><span class="p">).</span><span class="nx">fadeToggle</span><span class="p">(</span><span class="mi">750</span><span class="p">,</span> <span class="dl">"</span><span class="s2">linear</span><span class="dl">"</span><span class="p">);</span>
<span class="p">});</span>
</code></pre></div></div>
<p><a href="//api.jquery.com/fadeToggle/">Source</a></p>
<p>Fading objects out of the document is very common with modern user interfaces. You can always have small popup boxes or notifications which need to display and then hide after a few seconds. Using the fadeToggle function you can quickly hide and display any objects in your DOM. Keep this code handy if you will ever need such functionality in a website interface.</p>
<h2 id="8-loading-external-content">8. Loading External Content</h2>
<div class="language-js highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="nx">$</span><span class="p">(</span><span class="dl">"</span><span class="s2">#content</span><span class="dl">"</span><span class="p">).</span><span class="nx">load</span><span class="p">(</span><span class="dl">"</span><span class="s2">somefile.html</span><span class="dl">"</span><span class="p">,</span> <span class="kd">function</span><span class="p">(</span><span class="nx">response</span><span class="p">,</span> <span class="nx">status</span><span class="p">,</span> <span class="nx">xhr</span><span class="p">)</span> <span class="p">{</span>
<span class="c1">// error handling</span>
<span class="k">if</span><span class="p">(</span><span class="nx">status</span> <span class="o">==</span> <span class="dl">"</span><span class="s2">error</span><span class="dl">"</span><span class="p">)</span> <span class="p">{</span>
<span class="nx">$</span><span class="p">(</span><span class="dl">"</span><span class="s2">#content</span><span class="dl">"</span><span class="p">).</span><span class="nx">html</span><span class="p">(</span><span class="dl">"</span><span class="s2">An error occured: </span><span class="dl">"</span> <span class="o">+</span> <span class="nx">xhr</span><span class="p">.</span><span class="nx">status</span> <span class="o">+</span> <span class="dl">"</span><span class="s2"> </span><span class="dl">"</span> <span class="o">+</span> <span class="nx">xhr</span><span class="p">.</span><span class="nx">statusText</span><span class="p">);</span>
<span class="p">}</span>
<span class="p">});</span>
</code></pre></div></div>
<p><a href="//api.jquery.com/load/">Source</a></p>
<p>Believe it or not you can actually pull external HTML code from a file right into your webpage. This doesn’t technically require an Ajax call, but instead we’re parsing the external files for whatever content they have. Afterwards this new content may be loaded into the DOM anywhere in the page.</p>
<h2 id="9-keystroke-events">9. Keystroke Events</h2>
<div class="language-js highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="nx">$</span><span class="p">(</span><span class="dl">'</span><span class="s1">input</span><span class="dl">'</span><span class="p">).</span><span class="nx">keydown</span><span class="p">(</span><span class="kd">function</span><span class="p">(</span><span class="nx">e</span><span class="p">)</span> <span class="p">{</span>
<span class="c1">// variable e contains keystroke data</span>
<span class="c1">// only accessible with .keydown()</span>
<span class="k">if</span><span class="p">(</span><span class="nx">e</span><span class="p">.</span><span class="nx">which</span> <span class="o">==</span> <span class="mi">11</span><span class="p">)</span> <span class="p">{</span>
<span class="nx">e</span><span class="p">.</span><span class="nx">preventDefault</span><span class="p">();</span>
<span class="p">}</span>
<span class="p">});</span>
<span class="nx">$</span><span class="p">(</span><span class="dl">'</span><span class="s1">input</span><span class="dl">'</span><span class="p">).</span><span class="nx">keyup</span><span class="p">(</span><span class="kd">function</span><span class="p">(</span><span class="nx">event</span><span class="p">)</span> <span class="p">{</span>
<span class="c1">// run other event codes here </span>
<span class="p">});</span>
</code></pre></div></div>
<p><a href="//api.jquery.com/keydown/">Source</a></p>
<p>Dealing with user input is another grey area I have come across. The jQuery keydown and keyup event listeners are perfect for dealing with such experiences. Both of these methods are called at very different times during the keystroke event. So make sure you have the application planned out before deciding which one to use.</p>
<h2 id="10-equal-column-heights">10. Equal Column Heights</h2>
<div class="language-js highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="kd">var</span> <span class="nx">maxheight</span> <span class="o">=</span> <span class="mi">0</span><span class="p">;</span>
<span class="nx">$</span><span class="p">(</span><span class="dl">"</span><span class="s2">div.col</span><span class="dl">"</span><span class="p">).</span><span class="nx">each</span><span class="p">(</span><span class="kd">function</span><span class="p">(){</span>
<span class="k">if</span><span class="p">(</span><span class="nx">$</span><span class="p">(</span><span class="k">this</span><span class="p">).</span><span class="nx">height</span><span class="p">()</span> <span class="o">></span> <span class="nx">maxheight</span><span class="p">)</span> <span class="p">{</span> <span class="nx">maxheight</span> <span class="o">=</span> <span class="nx">$</span><span class="p">(</span><span class="k">this</span><span class="p">).</span><span class="nx">height</span><span class="p">();</span> <span class="p">}</span>
<span class="p">});</span>
<span class="nx">$</span><span class="p">(</span><span class="dl">"</span><span class="s2">div.col</span><span class="dl">"</span><span class="p">).</span><span class="nx">height</span><span class="p">(</span><span class="nx">maxheight</span><span class="p">);</span>
</code></pre></div></div>
<p><a href="//web.enavu.com/tutorials/top-10-jquery-snippets-including-jquery-1-4/">Source</a></p>
<p>This is a small jQuery snippet I ran into while surfing the web earlier in the year. While this is not the most recommended solution for your layout display, this code snippet may come in handy down the line. CSS column heights are not always matched and so this dynamic solution using JavaScript is worthy of some insight.</p>
<h2 id="11-append-new-html">11. Append New HTML</h2>
<div class="language-js highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="kd">var</span> <span class="nx">sometext</span> <span class="o">=</span> <span class="dl">"</span><span class="s2">here is more HTML</span><span class="dl">"</span><span class="p">;</span>
<span class="nx">$</span><span class="p">(</span><span class="dl">"</span><span class="s2">p#text1</span><span class="dl">"</span><span class="p">).</span><span class="nx">append</span><span class="p">(</span><span class="nx">sometext</span><span class="p">);</span> <span class="c1">// added after</span>
<span class="nx">$</span><span class="p">(</span><span class="dl">"</span><span class="s2">p#text1</span><span class="dl">"</span><span class="p">).</span><span class="nx">prepend</span><span class="p">(</span><span class="nx">sometext</span><span class="p">);</span> <span class="c1">// added before</span>
</code></pre></div></div>
<p><a href="//api.jquery.com/append/">Source</a></p>
<p>Using the <code class="highlighter-rouge">.append()</code> method we can quickly place any HTML code directly into the DOM. This is similar to <code class="highlighter-rouge">.load()</code> we saw earlier, except these functions can take HTML from any source. You could setup a brand new variable of HTML text or even clone HTML right from your webpage. These properties are often used in conjunction with Ajax response data.</p>
<h2 id="12-setting--getting-attributes">12. Setting & Getting Attributes</h2>
<div class="language-js highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="kd">var</span> <span class="nx">alink</span> <span class="o">=</span> <span class="nx">$</span><span class="p">(</span><span class="dl">"</span><span class="s2">a#user</span><span class="dl">"</span><span class="p">).</span><span class="nx">attr</span><span class="p">(</span><span class="dl">"</span><span class="s2">href</span><span class="dl">"</span><span class="p">);</span> <span class="c1">// obtain href attribute value</span>
<span class="nx">$</span><span class="p">(</span><span class="dl">"</span><span class="s2">a#user</span><span class="dl">"</span><span class="p">).</span><span class="nx">attr</span><span class="p">(</span><span class="dl">"</span><span class="s2">href</span><span class="dl">"</span><span class="p">,</span> <span class="dl">"</span><span class="s2">//www.google.com/</span><span class="dl">"</span><span class="p">);</span> <span class="c1">// set the href attribute to a new value</span>
<span class="nx">$</span><span class="p">(</span><span class="dl">"</span><span class="s2">a#user</span><span class="dl">"</span><span class="p">).</span><span class="nx">attr</span><span class="p">({</span>
<span class="na">alt</span><span class="p">:</span> <span class="dl">"</span><span class="s2">the classiest search engine</span><span class="dl">"</span><span class="p">,</span>
<span class="na">href</span><span class="p">:</span> <span class="dl">"</span><span class="s2">//www.google.com/</span><span class="dl">"</span>
<span class="p">});</span> <span class="c1">// set more than one attribute to new values</span>
</code></pre></div></div>
<p><a href="//api.jquery.com/attr/">Source</a></p>
<p>This property is relatively straightforward but I always see these problems in StackOverflow. You can pull the <code class="highlighter-rouge">.attr()</code> method on any HTML element and pass in the attribute string value. This will return the value of that attribute, whether it’s ID or class or name or maxlength. All HTML attributes may be accessed through this syntax and so it’s a very powerful method to keep in mind.</p>
<h2 id="13-retrieve-content-values">13. Retrieve Content Values</h2>
<div class="language-js highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="nx">$</span><span class="p">(</span><span class="dl">"</span><span class="s2">p</span><span class="dl">"</span><span class="p">).</span><span class="nx">click</span><span class="p">(</span><span class="kd">function</span> <span class="p">()</span> <span class="p">{</span>
<span class="kd">var</span> <span class="nx">htmlstring</span> <span class="o">=</span> <span class="nx">$</span><span class="p">(</span><span class="k">this</span><span class="p">).</span><span class="nx">html</span><span class="p">();</span> <span class="c1">// obtain html string from paragraph</span>
<span class="nx">$</span><span class="p">(</span><span class="k">this</span><span class="p">).</span><span class="nx">text</span><span class="p">(</span><span class="nx">htmlstring</span><span class="p">);</span> <span class="c1">// overwrite paragraph text with new string value</span>
<span class="p">});</span>
<span class="kd">var</span> <span class="nx">value1</span> <span class="o">=</span> <span class="nx">$</span><span class="p">(</span><span class="dl">'</span><span class="s1">input#username</span><span class="dl">'</span><span class="p">).</span><span class="nx">val</span><span class="p">();</span> <span class="c1">// textfield input value</span>
<span class="kd">var</span> <span class="nx">value2</span> <span class="o">=</span> <span class="nx">$</span><span class="p">(</span><span class="dl">'</span><span class="s1">input:checkbox:checked</span><span class="dl">'</span><span class="p">).</span><span class="nx">val</span><span class="p">();</span> <span class="c1">// get the value from a checked checkbox</span>
<span class="kd">var</span> <span class="nx">value3</span> <span class="o">=</span> <span class="nx">$</span><span class="p">(</span><span class="dl">'</span><span class="s1">input:radio[name=bar]:checked</span><span class="dl">'</span><span class="p">).</span><span class="nx">val</span><span class="p">();</span> <span class="c1">// get the value from a set of radio buttons</span>
</code></pre></div></div>
<p><a href="//api.jquery.com/val/">Source</a></p>
<p>Instead of appending new HTML content into the document you may also pull out the current HTML content from any area in your webpage. This can be an entire list item block, or the contents of a paragraph tag. Also the <code class="highlighter-rouge">.val()</code> property is used on input fields and form elements where you cannot get inside the object to read anything further.</p>
<h2 id="14-traversing-the-dom">14. Traversing the DOM</h2>
<div class="language-js highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="nx">$</span><span class="p">(</span><span class="dl">"</span><span class="s2">div#home</span><span class="dl">"</span><span class="p">).</span><span class="nx">prev</span><span class="p">(</span><span class="dl">"</span><span class="s2">div</span><span class="dl">"</span><span class="p">);</span> <span class="c1">// find the div previous in relation to the current div</span>
<span class="nx">$</span><span class="p">(</span><span class="dl">"</span><span class="s2">div#home</span><span class="dl">"</span><span class="p">).</span><span class="nx">next</span><span class="p">(</span><span class="dl">"</span><span class="s2">ul</span><span class="dl">"</span><span class="p">);</span> <span class="c1">// find the next ul element after the current div</span>
<span class="nx">$</span><span class="p">(</span><span class="dl">"</span><span class="s2">div#home</span><span class="dl">"</span><span class="p">).</span><span class="nx">parent</span><span class="p">();</span> <span class="c1">// returns the parent container element of the current div</span>
<span class="nx">$</span><span class="p">(</span><span class="dl">"</span><span class="s2">div#home</span><span class="dl">"</span><span class="p">).</span><span class="nx">children</span><span class="p">(</span><span class="dl">"</span><span class="s2">p</span><span class="dl">"</span><span class="p">);</span> <span class="c1">// returns only the paragraphs found inside the current div</span>
</code></pre></div></div>
<p><a href="//api.jquery.com/children/">Source</a></p>
<p>This idea of traversing through object nodes is deep enough to be an article within itself. But for any intermediate or advance jQuery developers who understand this topic, I’m sure these quick snippets will help in future problem solving.</p>
<p>The goal is often to pull data from another element related to the currently active element(clicked, hovered, etc). This could be the container(parent) element or another inner(child) element, too. There are lots of tools for pulling data from around the DOM so don’t be afraid of experimentation.</p>
<h2 id="final-thoughts">Final Thoughts</h2>
<p>This quick guide should be handy to any jQuery fans or even developers who have heard about jQuery but never studied the language. Feel free to copy these snippets or save this article to your own bookmarks as a reference.</p>yashumittalThe jQuery dev team has been releasing code updates frequently since the project began. JavaScript developers have never had an easier framework to code on frontend interfaces. For anybody just getting started in web development you can be certain to run into some jQuery code on the web.
https://cdn.codecarrot.net/images/jquerysnippets2-658x243.png
Toggle Sidebar in Sublime Text2017-09-14T17:00:00+00:002017-09-14T17:00:00+00:00https://blog.codecarrot.net/toggle-sidebar-in-sublime-text<p>The shortcut for toggle sidebar in Sublime Text wasn’t working for me. Searching about it in the internets, I discovered that you’ve to press <code class="highlighter-rouge">command+k</code> and then <code class="highlighter-rouge">command+b</code>, they call it a sequential shortcut.</p>
<p>For me that’s crazy behavior, but it’s quite simple to change it: go to <code class="highlighter-rouge">Preferences » Key Bindings - User</code> and paste the following in your file:</p>
<div class="highlighter-rouge"><div class="highlight"><pre class="highlight"><code>// Toggle the Sidebar
{ "keys": ["super+\\"], "command": "toggle_side_bar" },
// BONUS: Reveal current file on the sidebar tree
{ "keys": ["super+shift+r"], "command": "reveal_in_side_bar" },
</code></pre></div></div>
<p>That’s it! Now when you press <code class="highlighter-rouge">command+\</code> it’ll show or hide the sidebar. As a bonus, I also added the shortcut <code class="highlighter-rouge">command+shift+r</code> to reveal the current file in the tree.</p>
<p><strong>Note to Windows users:</strong> you must change <code class="highlighter-rouge">super</code> to <code class="highlighter-rouge">ctrl</code>.</p>yashumittalThe shortcut for toggle sidebar in Sublime Text wasn’t working for me. Searching about it in the internets, I discovered that you’ve to press command+k and then command+b, they call it a sequential shortcut.
https://cdn.codecarrot.net/images/5933707352792e706e67.png
How should you finance your business?2017-09-12T13:59:00+00:002017-09-12T13:59:00+00:00https://blog.codecarrot.net/how-should-you-finance-your-business<p>If there’s one obstacle that stops many would-be business owners in their tracks, it’s financing. Although there are business ideas that require little startup capital, the motto “you need to spend money to make money” often holds true. Whether it’s to launch or expand your business, you’ll likely need financing at some point. There are four common options to finance your business that you can choose.</p>
<h2 id="bootstrapping">Bootstrapping</h2>
<p>Originating from the expression of pulling yourself up “by your bootstraps,” bootstrapping involves financing your business entirely with your own money. You’ll start out using your savings, and once you’re earning a profit, you can reinvest that money into your business.</p>
<p>Since you’re only using your money, you avoid paying any interest and you won’t put your credit score at risk like you would with a credit card or loan. The drawback is that you’re limited by the amount of money you can save, which could end up slowing down the expansion of your business.</p>
<div class="callout">
Bootstrapping allows you to see if you have a profitable idea before pursuing other options for financing your business.
</div>
<p>Saving enough money to launch your business is also a good litmus test for whether you’re financially responsible enough to own one.</p>
<p>Keep in mind that even if you want to apply for a loan, lenders will ask how much of your own money you’ve committed to your business.</p>
<h2 id="business-credit-cards">Business credit cards</h2>
<p><img src="https://i.imgur.com/YzUee30.jpg" alt="Person handing over the card" /></p>
<p>Credit cards are never good for long-term financing because they tend to have higher interest rates than loans. But for short-term financing, a 0-percent annual percentage rate (APR) business credit card is among your best options. The 0-percent APR lasts for an introductory period, with most ranging between six and 15 months.</p>
<blockquote>
Business credit cards also earn you either reward points or cashback, making it a good idea to use one for all your business spending to maximize your return.
There are some purchases you can’t make with a credit card, though.
</blockquote>
<p>You’ll need a good credit score to qualify for those 0-percent APR offers, and when the introductory period ends, the card issuer will charge you interest on your current balance. Make sure you have a plan to pay your card off before the APR goes up.</p>
<p>Credit card applications are available on the card issuer’s website. They usually require just basic information about you and your business, taking only minutes to complete.</p>
<h2 id="microloans">Microloans</h2>
<p>Don’t be fooled by the name — you could borrow up to $50,000 through a microloan. These types of loans start at $500, and on average, business owners borrow about $13,000. Terms last up to six years, and interest rates usually range from 8 to 13 percent.</p>
<div class="callout">
If a business credit card doesn’t fit your needs but you can’t qualify for a loan, microloans serve as a middle ground.
</div>
<p>They’re easier to <a href="https://debtreviews.com/get-out-of-debt/">obtain than business loans</a> and the interest rates are reasonable.</p>
<p>Although there are many lenders that offer microloans, the most popular way to find a lender is through the U.S. Small Business Administration (SBA). The SBA connects business owners with lenders through its Lender Match program. It also offers business training and in some cases requires you to complete that training before it will process your loan application.</p>
<p>When applying for a microloan, expect the lender to ask for proof of income, financial statements, your business plan, and how you intend to use the loan. The lender may also require references.</p>
<h2 id="business-loans">Business loans</h2>
<p>This is the most traditional business financing option, as well as the most difficult to obtain. Amounts can vary significantly, from less than $100,000 to millions of dollars or more. With the right credit score, you could get a loan with an interest rate between 5 and 9 percent.</p>
<blockquote>
From a cost perspective, business loans are the best choice for financing because they offer the lowest interest rates. You can also borrow the most money this way. The issue is qualifying for one of these loans.
</blockquote>
<p>Business loans are available through the SBA, many banks and credit unions, and online lenders. Minimum requirements depend on the lender, but will typically include a good credit score, a profitable business that has been operational for at least two years, and annual revenue of at least $50,000.</p>
<h2 id="choosing-the-right-method-to-finance-your-business">Choosing the right method to finance your business</h2>
<p>The right financing method for your business is likely a combination of those listed above. Most business owners start out with bootstrapping and business credit cards, then move on to microloans or business loans when they need more capital for expansion.</p>yashumittalIf there’s one obstacle that stops many would-be business owners in their tracks, it’s financing. Although there are business ideas that require little startup capital, the motto “you need to spend money to make money” often holds true. Whether it’s to launch or expand your business, you’ll likely need financing at some point. There are four common options to finance your business that you can choose.
https://i.imgur.com/K3d23Fk.jpg
Downloadable worksheet - Website Review for your small business website2017-09-12T13:30:00+00:002017-09-12T13:30:00+00:00https://blog.codecarrot.net/downloadable-worksheet-website-review-for-your-small-business-website<p>If you hadn’t noticed, we devote a lot of space in our blogs to building websites. And it’s not just because <a href="https://www.codecarrot.net/">CodeCarrot is team of web and mobile application developer</a>. It’s because we know small businesses today need a strong online presence to compete — and that (usually) starts with an effective website. We know that because we’ve owned small businesses ourselves, and we’ve talked to multitudes of entrepreneurs who’ve shared the same basic storyline:</p>
<div class="callout">
My website is an indispensable tool for my business.
</div>
<p>Sure, you might start out with only a Facebook page. If you want to be taken seriously, though, <a href="https://www.codecarrot.net/">you’re going to need a dedicated website</a> to serve as your online center of gravity. It’s your unique place in the vast cyberverse to tell your story your way, inspire visitors to action, and capture qualified leads.</p>
<p>But before you make your website live for all the world to see, take a moment to inspect it.</p>
<h2 id="download-a-10-point-website-review">Download a 10-point website review</h2>
<p>Eventually your website needs a shortlist of basic features so it can work its best for your business — including customer testimonials, compelling calls-to-action, and a signup form so you can collect email addresses. We’ve put together a 10-Point Website Review to help you make sure you’ve covered the fundamentals.</p>
<p>It’s free. <a href="https://eepurl.com/c29C3n">Click here</a> to sign up and download it.</p>yashumittalIf you hadn’t noticed, we devote a lot of space in our blogs to building websites. And it’s not just because CodeCarrot is team of web and mobile application developer. It’s because we know small businesses today need a strong online presence to compete — and that (usually) starts with an effective website. We know that because we’ve owned small businesses ourselves, and we’ve talked to multitudes of entrepreneurs who’ve shared the same basic storyline:
https://i.imgur.com/PaNkeUp.jpg
Rails 5.1’s form_with vs. form_tag vs. form_for2017-09-12T10:48:00+00:002017-09-12T10:48:00+00:00https://blog.codecarrot.net/rails-5-1s-form-with-vs-old-form-helpers<p><code class="highlighter-rouge">form_tag</code> and <code class="highlighter-rouge">form_for</code> are soft deprecated and they will be replaced by <code class="highlighter-rouge">form_with</code> in the future. If you want to know more about <code class="highlighter-rouge">form_with</code> then you can peruse the original <a href="//github.com/rails/rails/issues/25197">DHH’s proposal</a>, check the <a href="//github.com/rails/rails/pull/26976/files">pull request</a> in which it was implemented, check the <a href="//api.rubyonrails.org/classes/ActionView/Helpers/FormHelper.html#method-i-form_with">API documentation</a> and play with it in a test project.</p>
<p>Or, continue reading this post in which I explain differences between <code class="highlighter-rouge">form_tag</code>, <code class="highlighter-rouge">form_for</code> and <code class="highlighter-rouge">form_with</code> with code samples.</p>
<div class="callout">
One syntax to rule them all
</div>
<p>Previously when you wanted to create a form, but you did not have an underlying model for it, then you used <code class="highlighter-rouge">form_tag</code>.</p>
<div class="highlighter-rouge"><div class="highlight"><pre class="highlight"><code><%= form_tag users_path do %>
<%= text_field_tag :email %>
<%= submit_tag %>
<% end %>
</code></pre></div></div>
<p>When you had a model, then you used <code class="highlighter-rouge">form_for</code>.</p>
<div class="highlighter-rouge"><div class="highlight"><pre class="highlight"><code><%= form_for @user do |form| %>
<%= form.text_field :email %>
<%= form.submit %>
<% end %>
</code></pre></div></div>
<p>As you can see, we use form builder field helpers with <code class="highlighter-rouge">form_for</code> but we don’t do that with <code class="highlighter-rouge">form_tag</code>. So the syntax for both forms is different.</p>
<p>This isn’t the case with <code class="highlighter-rouge">form_with</code>, because we use form builder all the time.
<code class="highlighter-rouge">form_with</code> without a model:</p>
<div class="highlighter-rouge"><div class="highlight"><pre class="highlight"><code><%= form_with url: users_path do |form| %>
<%= form.text_field :email %>
<%= form.submit %>
<% end %>
</code></pre></div></div>
<p><code class="highlighter-rouge">form_with</code> with a model:</p>
<div class="highlighter-rouge"><div class="highlight"><pre class="highlight"><code><%= form_with model: @user do |form| %>
<%= form.text_field :email %>
<%= form.submit %>
<% end %>
</code></pre></div></div>
<p>When you set the <code class="highlighter-rouge">model</code> argument then <code class="highlighter-rouge">scope</code> and <code class="highlighter-rouge">url</code> are automatically derived from it. This behaviour is similar to <code class="highlighter-rouge">form_for</code>.</p>
<div class="callout">
Automatic ids and classes are gone
</div>
<p><code class="highlighter-rouge">form_tag</code> and <code class="highlighter-rouge">form_for</code> generate automatic ids for form fields. <code class="highlighter-rouge">form_for</code> does it also for forms.</p>
<div class="highlighter-rouge"><div class="highlight"><pre class="highlight"><code><%= form_for User.new do |form| %>
<%= form.text_field :email %>
<% end %>
</code></pre></div></div>
<p>Generates:</p>
<div class="highlighter-rouge"><div class="highlight"><pre class="highlight"><code><form class="new_user" id="new_user" action="/users" ...>
...
<input type="text" name="user[email]" id="user_email" />
</form>
</code></pre></div></div>
<p>With <code class="highlighter-rouge">form_with</code> you have to specify all of your ids and classes manually:</p>
<div class="highlighter-rouge"><div class="highlight"><pre class="highlight"><code><%= form_with model: @user do |form| %>
<%= form.text_field :name %>
<%= form.text_field :email, id: :email, class: :email %>
<% end %>
</code></pre></div></div>
<p>Generates:</p>
<div class="highlighter-rouge"><div class="highlight"><pre class="highlight"><code><form action="/users" ...>
...
<input type="text" name="user[name]" />
<input id="email" class="email" type="text" name="user[email]" /> </form>
</code></pre></div></div>
<p>Do not forget to specify ids for form fields if you want to make labels work.</p>
<div class="highlighter-rouge"><div class="highlight"><pre class="highlight"><code><%= form_with model: @user do |form| %>
<%= form.label :name %>
<%= form.text_field :name, id: :user_name %>
<% end %>
</code></pre></div></div>
<div class="callout">
Form id and class attributes aren’t wrapped anymore
</div>
<p>Before:</p>
<div class="highlighter-rouge"><div class="highlight"><pre class="highlight"><code><%= form_for @user, html: { id: :custom_id, class: :custom_class } do |form| %>
<% end %>
</code></pre></div></div>
<p>After:</p>
<div class="highlighter-rouge"><div class="highlight"><pre class="highlight"><code><%= form_with model: @user, id: :custom_id, class: :custom_class do |form| %>
<% end %>
</code></pre></div></div>
<div class="callout">
Form fields don’t have to correspond to model attributes
</div>
<p>Before:</p>
<div class="highlighter-rouge"><div class="highlight"><pre class="highlight"><code><%= form_for @user do |form| %>
<%= form.text_field :email %>
<%= check_box_tag :send_welcome_email %>
<% end %>
</code></pre></div></div>
<p>After:</p>
<div class="highlighter-rouge"><div class="highlight"><pre class="highlight"><code><%= form_with model: @user, local: true do |form| %>
<%= form.text_field :email %>
<%= form.check_box :send_welcome_email %>
<%= form.submit %>
<% end %>
</code></pre></div></div>
<p>Please note, that <code class="highlighter-rouge">send_welcome_email</code> will be scoped to <code class="highlighter-rouge">user</code> in controller parameters in the latter example:</p>
<div class="highlighter-rouge"><div class="highlight"><pre class="highlight"><code>params[:user][:send_welcome_email]
</code></pre></div></div>
<p>Therefore I would probably still use <code class="highlighter-rouge">check_box_tag</code> instead of <code class="highlighter-rouge">form.check_box</code> if I needed to.</p>
<div class="callout">
All forms are remote by default
</div>
<p>This change is the most exciting to me. All forms generated by <code class="highlighter-rouge">form_with</code> will be submitted by an XHR (Ajax) request by default. There is no need to specify remote: true as you have to with <code class="highlighter-rouge">form_tag</code> and <code class="highlighter-rouge">form_for</code>.</p>
<p>I like this feature, because it sends a message. Thanks to Turbolinks, (almost) all GET requests are XHR requests by default. And thanks to <code class="highlighter-rouge">form_with</code> this can become a reality for forms, too. You just need to do a little bit of work (create a JavaScript response template) and you can eliminate all full page refreshes.</p>
<p>However, if you want to disable remote forms then you can do it with <code class="highlighter-rouge">local: true</code>.</p>
<div class="highlighter-rouge"><div class="highlight"><pre class="highlight"><code><%= form_with model: @user, local: true %>
<% end %>
</code></pre></div></div>
<div class="callout">
Let’s use form_with since now and never look back!
</div>
<p>I did not cover everything in this post, but it should be enough to get you started with <code class="highlighter-rouge">form_with</code> so you don’t have to use <code class="highlighter-rouge">form_tag</code> and <code class="highlighter-rouge">form_for</code> anymore (they will be removed anyway). Also, <a href="//api.rubyonrails.org/classes/ActionView/Helpers/FormHelper.html#method-i-form_with">read the documentation for <code class="highlighter-rouge">form_with</code></a>.</p>yashumittalform_tag and form_for are soft deprecated and they will be replaced by form_with in the future. If you want to know more about form_with then you can peruse the original DHH’s proposal, check the pull request in which it was implemented, check the API documentation and play with it in a test project.
https://cdn.codecarrot.net/images/1-xFZId_tlC-8I4okYLFQYdA.jpeg
How to sync Sublime Text packages and settings across multiple computers with cloud storage2017-09-12T10:29:00+00:002017-09-12T10:29:00+00:00https://blog.codecarrot.net/how-to-sync-sublime-text-packages-and-settings-across-multiple-computers-with-cloud-storage<p>Are you a coder with the multiple computers to work on, here is the way you can make your workflow more easier by sharing all of your sublime packages and settings synced across multiple computer with Dropbox.</p>
<p><strong>Pro Tip:</strong> You can follow the same method with any cloud storage system like: Google Drive or OneDrive. <em>(Only the names of the files/folders may vary.)</em></p>
<p>The best way for syncing Sublime Text along with your installed packages, regardless of whether you choose to sync with Dropbox or by another method, is to only sync the <code class="highlighter-rouge">Packages/User/</code> directory. This folder contains the <code class="highlighter-rouge">Package Control.sublime-settings</code> file, which among other things, contains your list of installed packages. Once this file is synced with your other machines via the process outlined below, your other computers will automatically install the correct version of any missing/updated package the next time you start up Sublime Text.</p>
<p>There are other ways to sync your installed packages and settings across different machines without utilizing Dropbox, for example by using Git, however I have found that using other methods leads to added steps of constantly syncing files, updating repositories, and the list goes on. Dropbox sync allows for the cleanest, most “hands-off” approach.</p>
<p><strong>NOTE:</strong> If not already installed, <a href="//www.sublimetext.com/3">Download</a> a fresh copy of Sublime Text 3 to get up and running. Instructions may vary depending on your operating system.</p>
<h2 id="getting-started">Getting Started</h2>
<p>I recommend designating one of your computers as your “initial computer.” Once you configure your Sublime Text settings on this initial machine to your liking, we will be syncing these files with Dropbox.</p>
<h2 id="install-package-control">Install Package Control</h2>
<p>If you have not yet installed Package Control, go ahead and open up Sublime Text. Once you have Sublime Text up-and-running, from its menu select View > Show Console. Alternatively, utilize the keyboard shortcut</p>
<div class="highlighter-rouge"><div class="highlight"><pre class="highlight"><code>ctrl+`
</code></pre></div></div>
<p>to show the console.</p>
<p>Once the console is open, simply paste the code found on the Package Control installation page and press return. This code creates the Installed Packages folder for you, then downloads the Package Control.sublime-package. After Package Control installation has completed, quit/exit Sublime Text.</p>
<h2 id="setup-initial-machine">Setup Initial Machine</h2>
<p>These instructions assume your Dropbox folder is installed in the default location <code class="highlighter-rouge">~/Dropbox</code>. If your Dropbox folder is located elsewhere, you should replace all mentions of <code class="highlighter-rouge">~/Dropbox</code> below with the correct path, such as <code class="highlighter-rouge">~/Path/to/Dropbox</code>. The initial setup instructions vary depending on whether your main (initial) computer is a Mac or a PC running Windows</p>
<h3 id="if-initial-machine-is-a-mac">If initial machine is a Mac</h3>
<p>For MAC users follow the instructions below:</p>
<ol>
<li>Close down Sublime Text</li>
<li>Open Terminal and input the following commands</li>
<li>Navigate to the Sublime Text 3 Package directory
<div class="highlighter-rouge"><div class="highlight"><pre class="highlight"><code>cd ~/Library/Application Support/Sublime Text 3/Packages/
</code></pre></div> </div>
</li>
<li>Create a Sync Folder within your Dropbox, and then within the Sync folder, create a Sublime Text folder.</li>
<li>You may reuse the Sync folder for other purposes/applications
<div class="highlighter-rouge"><div class="highlight"><pre class="highlight"><code>mkdir ~/Dropbox/SublimeText
</code></pre></div> </div>
</li>
<li>Move the User folder from the Sublime Text 3 Package directory to your new Dropbox folder.
<div class="highlighter-rouge"><div class="highlight"><pre class="highlight"><code>mv User ~/Dropbox/SublimeText/
</code></pre></div> </div>
</li>
<li>Create a symlink within the Sublime Text 3 Package directory pointing to the User folder within Dropbox/Sync/Sublime Text/ directory.
<div class="highlighter-rouge"><div class="highlight"><pre class="highlight"><code>ln -s ~/Dropbox/SublimeText/User
</code></pre></div> </div>
</li>
</ol>
<h3 id="if-initial-machine-is-a-windows">If initial machine is a Windows</h3>
<p>For MAC users follow the instructions below:</p>
<ol>
<li>Close down Sublime Text</li>
<li>Open PowerShell or Command Prompt and selecting “Run as administrator” and then enter the following commands</li>
<li>Navigate to the Sublime Text 3 Package directory
<div class="highlighter-rouge"><div class="highlight"><pre class="highlight"><code>cd C:\Users\YASHU\AppData\Roaming\Sublime Text 3\Packages
</code></pre></div> </div>
</li>
<li>Create a Sync Folder within your Dropbox, and then within the Sync folder, create a Sublime Text folder.</li>
<li>You may reuse the Sync folder for other purposes/applications
<div class="highlighter-rouge"><div class="highlight"><pre class="highlight"><code>mkdir C:\Users\YASHU\Dropbox\SublimeText
</code></pre></div> </div>
</li>
<li>Move the User folder from the Sublime Text 3 Package directory to your new Dropbox folder.
<div class="highlighter-rouge"><div class="highlight"><pre class="highlight"><code>mv Sublime Text 3 C:\Users\YASHU\Dropbox\SublimeText
</code></pre></div> </div>
</li>
<li>Create a symlink within the Sublime Text 3 Package directory pointing to the User folder within Dropbox/SublimeText/ directory.
<div class="highlighter-rouge"><div class="highlight"><pre class="highlight"><code>mklink /d User "C:\Users\YASHU\AppData\Roaming\Sublime Text 3\Packages\User"
</code></pre></div> </div>
</li>
</ol>
<hr />
<h2 id="configure-other-computers-for-sync">Configure Other Computers for Sync</h2>
<p>After completing the instructions outlined above based on your initial machine’s OS, next follow the instructions below for ALL OTHER machines, depending on their operating system.</p>
<h3 id="if-a-secondary-computer-is-running-mac">If a secondary computer is running Mac</h3>
<ol>
<li>Close down Sublime Text</li>
<li>Open Terminal and input the following commands</li>
<li>Navigate to the Sublime Text 3 Package directory.
<div class="highlighter-rouge"><div class="highlight"><pre class="highlight"><code>cd ~/Library/Application\ Support/Sublime\ Text\ 3/Packages/
</code></pre></div> </div>
</li>
<li>Delete the User folder within this directory.
<div class="highlighter-rouge"><div class="highlight"><pre class="highlight"><code>rm -r User
</code></pre></div> </div>
</li>
<li>Create a symlink within the Sublime Text 3 Package directory pointing to the User folder within <code class="highlighter-rouge">Dropbox/Sync/Sublime Text/</code> directory.
<div class="highlighter-rouge"><div class="highlight"><pre class="highlight"><code>ln -s ~/Dropbox/Sync/Sublime\ Text/User
</code></pre></div> </div>
</li>
</ol>
<h3 id="if-a-secondary-computer-is-running-windows">If a secondary computer is running Windows</h3>
<ol>
<li>Close down Sublime Text</li>
<li>Open PowerShell or Command Prompt by right-clicking and selecting “Run as administrator” and then enter the following commands</li>
<li>Navigate to the Sublime Text 3 Package directory.
<div class="highlighter-rouge"><div class="highlight"><pre class="highlight"><code>cd C:\Users\YASHU\AppData\Roaming\Sublime Text 3\Packages
</code></pre></div> </div>
</li>
<li>Delete the User folder within this directory.
<div class="highlighter-rouge"><div class="highlight"><pre class="highlight"><code>rmdir -recurse User
</code></pre></div> </div>
</li>
<li>Create a symlink within the Sublime Text 3 Package directory pointing to the User folder within <code class="highlighter-rouge">Dropbox/Sync/Sublime Text/</code> directory.
<div class="highlighter-rouge"><div class="highlight"><pre class="highlight"><code>mklink /d User "C:\Users\YASHU\Dropbox\SublimeText\User"
</code></pre></div> </div>
</li>
</ol>
<p>Once you complete the secondary computer changes above, your instances of Sublime Text on each computer should automatically update whenever you make a change to your installed packages. Additionally, any changes made to your User Settings in the <code class="highlighter-rouge">Preferences.sublime-settings</code> file will also be updated. This method should allow for the perfect developer space regardless of which of your computers you’re working from.</p>yashumittalAre you a coder with the multiple computers to work on, here is the way you can make your workflow more easier by sharing all of your sublime packages and settings synced across multiple computer with Dropbox.
https://cdn.codecarrot.net/images/sync-sublime-text-on-multiple-computers-with-cloud-storage.png
Tips for presenting your work2017-09-10T19:30:00+00:002017-09-10T19:30:00+00:00https://blog.codecarrot.net/tips-for-presenting-your-work<p>You’ve put in the long hours day and night for the last week and it’s time to finally present your concepts to the client. Your concepts are solid and you feel it’s exactly what the client and, more importantly, the audience needs. Don’t let a bad presentation take your beautiful work and turn it into a mediocre mess.</p>
<p>Even the best designers in the world need to know a couple of things about presenting their work and managing a client/designer relationship.</p>
<h2 id="1-present-with-confidence">1. Present with confidence</h2>
<p>The biggest rookie mistake designers make is that they don’t present their work with confidence. Everyone gets nervous, but meetings are not the place to be shy. When I first started designing in college, I used to have shaky hands and my voice would crack like I was going through puberty, but I finally learned one thing to help me get by.</p>
<p>Confidence comes from knowing you put the work in. You put in the long hours and went through all the research and client briefs to provide the best solution to the client’s problem. Why shouldn’t you feel on top of your game at this point? Just believe in your work.</p>
<h2 id="2-defend-your-concepts">2. Defend Your Concepts</h2>
<p>This kind of goes hand-in-hand with the previous tip, but don’t be afraid to push back on the client if they are making the wrong decision. Be ready to explain every single pixel committed to the screen and why it’s important. Without that your work will have no legs to stand on.</p>
<p>If you’re having trouble vocalizing why you’re doing what you’re doing, just remember design is about solving the client’s problems. Whether that’s a communication (graphic design) or a behavioral (interactive design) problem, start from there and you’ll find that your rationale will be much more convincing.</p>
<h2 id="3-listen-to-criticism">3. Listen to Criticism</h2>
<p>Always make sure to listen to the client’s comments and any user feedback. No matter how un-intelligible it may be at times, they might have insight on something that you never thought of (especially if it’s in a market you have no experience in).</p>
<p>Also, be careful and don’t take all criticism at face value. You have to really listen and find the heart of the issue because most of the time your clients will not be able to vocalize the exact problem. If the criticism is especially cryptic, just dig deeper and you’ll eventually come to the root of the problem.</p>
<p>Don’t take “I just don’t like it…” as a response. Ask more questions.</p>
<h2 id="4-dont-be-a-yes-man">4. Don’t be a “Yes Man”</h2>
<p>I’ve put in a lot of hours at various advertising agencies in the past couple of years and the worst thing that happens in client meetings is watching people become “yes men”. Bad account executives are notorious for doing whatever it takes to make the client happy, even if it’s at the expense of the project’s quality. It’s sickening to watch.</p>
<p>You have the benefit of not having a middleman when being a freelancer or running your own shop. So take advantage of it and make sure your ultimate goal is to produce the best product possible, not stroke the ego of the client. Put the egos away if you want something to be done right.</p>
<h2 id="5-find-the-stakeholdersdecision-makers">5. Find the stakeholders/decision makers</h2>
<p>There’s nothing worse than presenting your work to someone and realizing that they have no sway or power. You jump through all the hoops and realize you have yet another set of people who have to approve of the design and direction. So, find the people who make the decisions and present to them alone. You’ll save everyone’s time and money that way.</p>
<h2 id="summing-it-up">Summing it up</h2>
<p>Overall, remember that each client relationship you have is a balancing act between addressing needs, problem solving, and your knowledge of the impact of good design. Be confident in fighting for what you believe will produce the best work. In the long run your client will be pleased and, more importantly, it will keep you from throwing your computer and yourself out your office window.</p>yashumittalYou’ve put in the long hours day and night for the last week and it’s time to finally present your concepts to the client. Your concepts are solid and you feel it’s exactly what the client and, more importantly, the audience needs. Don’t let a bad presentation take your beautiful work and turn it into a mediocre mess.
https://i.imgur.com/okRG5cS.jpg
Finding a design process that works2017-09-10T17:40:00+00:002017-09-10T17:40:00+00:00https://blog.codecarrot.net/finding-a-design-process-that-works<p>So where do I start?</p>
<p>We’ve already had a couple of meetings about the sites and we’ve set out the technical and functional criteria. The design is down to me.</p>
<p>I’ve been thinking a lot recently about the process of design because to be honest I’m still searching for one that works.</p>
<p>I’ve designed a load of projects over the years with some half decent results along the way… but using only a very loose design process I normally grind and crash my way to the project’s conclusion. So I’m eager to find design process that works.</p>
<p>So after some thought I’ve come up with a five point design process plan.</p>
<h3 id="1-just-think"><strong>1. Just think</strong></h3>
<p>Put on some inspiring tunes and just think about your project in the loosest possible way (at this point anything goes, the crazier the ideas the better).</p>
<p>I sometimes find going for a run with some tunes for company gives me a ton of ideas. Thinking in bed before you go to sleep is quite thought-provoking too.</p>
<h3 id="2-look-for-inspiration"><strong>2. Look for inspiration</strong></h3>
<p>Make a note of your initial ideas and with them in mind hit the internet. Scour the web for anything related to your ideas and bookmark anything that catches your eye. Do the same with your bookshelf, newspapers and magazines. One thing I find helps is looking at non design related literature as you can often stumble across an unexpected visual gem when you’re least expecting it. It’s also useful to take a step back from current design trends when looking for inspiration as I sometimes find it’s easy for a project to start looking a bit like everything else out there. Remember if you find that perfect bit of inspiration in the back of some old 80’s gatefold album sleeve you can bet your bottom dollar that no-one else’s design is going to look like yours.</p>
<h3 id="3-sketch-out-rough-designs"><strong>3. Sketch out rough designs</strong></h3>
<p>Spend some time sketching out your ideas in your notepad/sketchbook. Try and avoid jumping straight onto your computer (I’m guilty of this big time!).</p>
<p>I find going straight to your computer can give you a sort of ‘design tunnel vision’…basically meaning it’s easy to get stuck in a rut with your first design that wasn’t really thought through.</p>
<h3 id="4-start-designing-proper"><strong>4. Start designing proper</strong></h3>
<p>So after sketching out a bunch of ideas you should have a much clearer idea of what direction you want to take your design. So designing in photoshop or xhtml/css etc should be a much easier process. Also once you feel confident with the route your taking in your design try not to get bogged down in minor details at this stage (I’m also guilty of this), you can do the the detail later when you happy with the bigger picture.</p>
<h3 id="5-the-devils-in-the-detail"><strong>5. The devil’s in the detail</strong></h3>
<p>Hopefully now your photoshop and xhtml/CSS is going swimmingly and you’re nearing the end… well this is the time to pay attention to those small details as it’s often the attention to detail that makes the difference between good and great. If there’s something nagging you about a certain part of your design and you sort of know you should revisit it but don’t know if you can be bothered – just do it… It’ll be worth it in the end.</p>
<p>So what do you reckon? Is this a load of rubbish, is it just obvious?… or is there some value in it?
Does anyone have any thoughts or tips they could add? 🙂</p>
<p>Desiging is a very critial process, so <a href="//www.codecarrot.net">let us handle it for you</a> and make a awesome web design for you.</p>yashumittalSo where do I start?
https://cdn.codecarrot.net/images/sergey-zolkin-21234.jpg
Do you need to spend money on advertising your web app?2017-09-10T17:30:00+00:002017-09-10T17:30:00+00:00https://blog.codecarrot.net/do-you-need-to-spend-money-on-advertising-your-web-app<p>Now that we’ve built two web apps, we’ve got a good perspective on what it takes to make them succeed. This is my conclusion: <strong>You’ve got to be prepared to spend cash to advertise your web app.</strong></p>
<p>Spending one day a week on the app and it’s painfully obvious that the blogosphere is only going to get us so far.</p>
<ul>
<li>Yes, the App was a great guerrilla marketing activity (and a lot of fun).</li>
<li>Yes, getting on TechCrunch was handy.</li>
<li>Yes, a lot of folks in the Web 2.0 community know about the app.</li>
</ul>
<p>However, none of that is yielding an increase in revenue. We’ve got a long way to go until we build a critical mass of people who use the app. This demonstrates the point of this post very well: Building a financially successful web app takes hard work, clever marketing and advertising dollars.</p>
<h2 id="signal-vs-noise-is-not-normal">Signal Vs. Noise is not normal</h2>
<p>I have a feeling that far too many people (including myself sometimes) think that the blogosphere is a free ticket to successful web apps. This just isn’t the truth. We all look at Signal Vs. Noise and think “All we need to do is launch a great blog like the guys at 37signals. It will create buzz around our app and then we’ll see the users flow in.”</p>
<p>Well, I just don’t think that’s the case. Signal Vs. Noise is an anomaly. It has a loyal readership (myself included) that is the perfect market for their apps. Jason and crew has done a fabulous job of creating passionate users. However, I don’t think their experience is easily repeatable.</p>
<p>Yes, the blogosphere is powerful</p>
<p>I’m not trying to say that you shouldn’t have a great blog. It is definitely an extremely important part to any web app. However, it’s vital that you set aside money in your cash flow for advertising after you launch.</p>
<p>I called a friend today that runs a successful web app (the revenue from one app supports the entire company) and he said they often spend $10,000+ per month on advertising.</p>
<h2 id="plan-for-the-long-haul">Plan for the long haul</h2>
<p>So when you’re planning your budget for your new web app, don’t forget that you’ll most likely need to spend money on advertising. Yes, there’s always a chance that your rocket to success because of some great press, but it’s far more likely that you’ll have to wage a long term marketing and advertising battle to rise to the top.</p>
<p>Having this long term perspective (instead of expecting to achieve success very quickly) will separate the truly successful web apps from the rest.</p>yashumittalNow that we’ve built two web apps, we’ve got a good perspective on what it takes to make them succeed. This is my conclusion: You’ve got to be prepared to spend cash to advertise your web app.
https://i.imgur.com/VE3fbJ8.jpg
Copyright - Get to Know the Facts2017-09-10T16:30:00+00:002017-09-10T16:30:00+00:00https://blog.codecarrot.net/copyright-get-to-know-the-facts<p>They say that imitation is the sincerest form of flattery, and its not uncommon for successful sites and designers to find their work being appropriated by others, but when the hard work you’ve put into a project is blatantly ripped-off elsewhere it can really hurt, not to mention potentially cause damage your business.</p>
<p>Unfortunately the (US) Copyright Act of 1976 created a common misconception about copyright law that still exists today, some thirty years later. This misconception often serves as a trap that many a copyright owner, including web developers and designers, unknowingly falls for. What is it? Its the belief that “a copyright owner does not have to file a copyright application to protect its works…rather, copyright protection forms when the works are created.”</p>
<p>While technically true (copyright protection begins at the ‘publication’ of the work), taking a “I don’t need to file copyright applications” attitude can often come back to haunt you. The reason for this, under the US Copyright Act, is that registration of the copyright within ninety (90) days of publication (or before infringement takes place) is necessary to enable the copyright owner to receive what are referred to as “statutory damages.”</p>
<p>Here is where the “I don’t need to file copyright applications” strategy bites you…if registration is not made within that time limit, the only action you as a copyright owner can take against an infringer is essentially limited to:</p>
<ol>
<li>the Court ordering the infringer to stop infringing and</li>
<li>damages in the amount of the infringer’s profits or the copyright owner’s loss (which are often the same thing).</li>
</ol>
<p>As you can imagine, proving what your loss actually is or what monetary amount the infringer profited can be difficult, if not impossible. Further, the recovery of attorney’s fees and costs is not possible either, meaning that your actual recovery would be (profit or loss) minus attorney fees!</p>
<p>The result is that many copyright owners, when faced with infringement of a copyright they failed to register, are left in a position where tolerating the infringement is better than paying an attorney’s bill with no hope of recouping that expense in order to get the infringer to stop.</p>
<h2 id="know-your-statutory-rights">Know Your Statutory Rights</h2>
<p>However, if you have complied with the requirements of the Copyright Act and actually filed a copyright application at the appropriate time, then the aforementioned “statutory damages” come into play.</p>
<p>What are these statutory damages? In the US they include: a sum of not less than $750 or more than $30,000 per work infringed; attorneys fees; costs; and, where the copyright owner can show that the infringement was willful, an award of up to $150,000 per work. As you can imagine, the threat of statutory damages (including attorneys fees) alone are often enough to force the alleged infringer to the bargaining table (a tactic that individuals sued by the RIAA are well aware of). As you can see, the availability of statutory damages often makes or breaks the decision of whether or not legal action is even a viable option.</p>
<p>Note: for those of you reading this outside the United States, if your country has entered into the appropriate copyright treaty with the United States (most have), then statutory damages for infringements in the United States are likely available to you as well (presuming you comply with your country’s registration requirements (consult with a local attorney for more information.</p>
<h2 id="are-you-convinced-yet">Are you convinced yet?</h2>
<p>Did I mention that the fee for filing a copyright application is only $45? Of course, having a copyright attorney prepare the application for you (should you choose to have that done) will cost you more than that, but it isn’t uncommon for startups to assume the risk, read up on the topic and file their own copyright applications. More information about the <a href="//www.copyright.gov/">U.S. registration process can be found on the U.S. Copyright Office’s Registration website</a></p>
<p>Another, related, registration question that you may have is “if I can’t file the application until the work is complete and ‘published,’ how can I protect my work?” This is a question that oftentimes applies to alpha and beta software testing. Luckily, the U.S. Copyright Office recently started a “preregistration” system that allows copyright owners to file what essentially is a temporary application with the Copyright Office. This “preregistration” allows the copyright holder to file a copyright infringement action even before the work is commercially distributed (and traditional registration is possible) should the work be infringed. <a href="//www.copyright.gov/prereg/help.html">//www.copyright.gov/prereg/help.html</a></p>
<h2 id="whose-right-is-it-anyway">Whose right is it anyway?</h2>
<p>Finally, web developers should remember that in the US the author of the work is the owner of the work unless the author has assigned his/her rights in writing, has a duty to do so based upon an employment agreement, or the work is one of the few other “works for hire” exceptions (”a work specially ordered or commissioned for use as a contribution to a collective work, as a part of a motion picture or other audiovisual work, as a translation, as a supplementary work, as a compilation, as an instructional text, as a test, as answer material for a test, or as an atlas”). So, when you are working with an independent contractor on your projects, it is essential that the written agreement you have with the independent contractor includes and assignment of his/her copyright interests to you. Of course, your intellectual property attorney could assist you in preparing the appropriate agreements for signature.</p>
<p>A few ounces of preventative medicine today may save you tons of copyright issues down the road.</p>yashumittalThey say that imitation is the sincerest form of flattery, and its not uncommon for successful sites and designers to find their work being appropriated by others, but when the hard work you’ve put into a project is blatantly ripped-off elsewhere it can really hurt, not to mention potentially cause damage your business.
https://cdn.codecarrot.net/images/copyright-1.jpg
Turning Visitors into Users2017-09-10T16:28:00+00:002017-09-10T16:28:00+00:00https://blog.codecarrot.net/turning-visitors-into-users<p>Thousands of people may be visiting your site every day, but if you don’t convince them that they should be using your product, subscribing to your service, or registering in some way, then your web app’s homepage is simply not doing its job.</p>
<p>Successful web apps use similar formats when it comes to user interaction on their homepage. For instance, most feature an explanatory strapline that tells you what the service does, many show you screenshots of their service, and they all entice you to sign up or register with a prominently placed button. But is it really that simple?</p>
<p>If you design a site with this simple checklist of ‘must-haves’ in hand, is the resulting site guaranteed to turn your visitors into users? What are the elements of a home page that make it really effective at transforming visitors into users? And how does the design itself contribute to this?</p>
<p>Most designers agree that not only do you have to have brilliant navigation, impeccably-crafted copy and a great sales message, but you also have to have that something extra in the design that will speak volumes to your potential users.</p>
<p>We invited some leading designers to look at a selection of high-profile apps to examine how they’re attempting to turn visitors into users through user experience design.</p>
<h2 id="building-trust-is-key">Building Trust is key</h2>
<p>First up, <a href="//www.blinksale.com/">Blinksale</a> and <a href="//www.freshbooks.com/">Freshbooks</a>, which both offer services that will help the small online business get bills out quicker or easier. Blinksale’s strapline is ‘The easiest way to send invoices online’, whilst Freshbooks is ‘The fastest way to invoice your clients’ – essentially they are competing for the same users.</p>
<p><img src="https://cdn.codecarrot.net/images/freshbooks-blinksale.gif" alt="Freshbooks and blinksale old Website screenshot" /></p>
<p><em>View of their older version websites.</em></p>
<h3 id="blinksale">Blinksale</h3>
<p><strong>Pros</strong></p>
<p>Blinksale’s home page clearly and attractively outlines the benefits of the application and makes me really want to get started.</p>
<p><strong>Cons</strong></p>
<p>Not 100 per cent obvious how I get started. The big “Sign-up for your free Blinksale account” was below the fold (for me at least) and did not look like a link.</p>
<h3 id="freshbooks">Freshbooks</h3>
<p><strong>Pros</strong></p>
<p>FreshBooks is the exact opposite of Blinksale. Their home page is not as good at getting me to want to sign up.</p>
<p><strong>Cons</strong></p>
<p>It seems that there’s too much to read and too many different types of content on the page. The promotional claim centers around ‘fast,’ but the content is a bit pedantic.</p>
<p>Turning visitors into users your homepage needs to make them feel the way they will feel when they use your service – happy, satisfied, excited. And this kind of trust begins with how the information is presented on your site:</p>
<h2 id="the-shop-window-approach">The Shop Window Approach</h2>
<p>In the web metrics space we looked at Mint and the recently launched CrazyEgg. What’s immediately noticeable is that both sites think its important to let their clients know how the application works by prominently featuring screen shots of their application in action on the home page.</p>
<p><img src="https://cdn.codecarrot.net/images/mint-crazy.gif" alt="Screenshot of the mint and crazy egg website" /></p>
<blockquote>
Using big design statements to direct your users to a call for action is key for converting visitors to users.
</blockquote>
<p>When The Homepage Doesn’t Matter</p>
<p>In these days of RSS and APIs, where content is often viewed separately from its source, how important is the design of your homepage? Will your users even make it there? Or will they slip in the backdoor through a followed link?</p>
<p>Homepages don’t matter – at least when your content does the job of turning visitors into users for you as it does on sites such as YouTube.com.</p>
<p>I don’t visit YouTube and click around. But I see blog posts with cool videos all the time. I don’t think of YouTube as a site. What draws me in is a blog post, IM or email. Then, when you end up watching a video on YouTube’s site, you realize there are more cool videos there, and might start clicking around. In this way the root of each visit is a permalink, a particular video, a certain experience – not the home page. The video is the epicenter of the permalink, and the permalink is the epicenter of the whole site. Everything revolves around the videos you love, not the farm that feeds them.</p>
<p>Based on this view, the home page is secondary to the permalinks. The home page should show me permalinks I’ve recently visited, recommendations based on those, and so forth. It should provide history and continuity of experience.</p>
<p>So remember – if a big part of your success is going to depend on links, RSS feeds or blogs, you need to make every single page on your site just as effective at generating those all important new sign-ups: getting the positioning, colour, language, shape and prominence of every element on your homepage right is just the beginning.</p>yashumittalThousands of people may be visiting your site every day, but if you don’t convince them that they should be using your product, subscribing to your service, or registering in some way, then your web app’s homepage is simply not doing its job.
https://cdn.codecarrot.net/images/clem-onojeghuo-183583.jpg
Why standards still matter?2017-09-10T15:55:00+00:002017-09-10T15:55:00+00:00https://blog.codecarrot.net/why-standards-still-matter<p>Throughout my Web design and development career I have found incredible amounts of valuable help and fantastic resources while searching for solutions to various problems. In the last few years I have found most of this helpful information on Web standards and accessibility-oriented blogs and forums. It’s amazing that so many people are willing to spend so much time to share their knowledge with others and help make the Web a better place.</p>
<p>However, and that gets me to the subject of this article, occasionally I hear mutterings from some people who seem to think enough has been said about best practices and that we should find something else to write about. Some say that Web standards aren’t important anymore, because most Web developers are already using them. Others say that it’s boring to read yet another article, blog post, or book about CSS, HTML, accessibility, or usability. They don’t see the point in writing articles or books on those subjects since there are so few left to learn anything from them.</p>
<p>Are you kidding me?</p>
<h2 id="the-clued-in-are-a-small-minority">The clued-in are a small minority</h2>
<p>If you really think that the majority of people in the Web business have fully embraced Web standards, accessibility, and usability, and strive to follow best practices in general in their work, I’d like to know what planet you’re living on. On Planet Earth, standards-aware Web designers and developers are still a tiny minority of the people working in the Web business. <strong>Tiny.</strong> We may be vocal, and we may be the ones writing articles and books, but we are <strong>seriously</strong> outnumbered.</p>
<p>I encourage anyone who thinks we do not need yet another article or book on Web standards, CSS, accessibility, graceful degradation, progressive enhancement, or anything else related to best practices, to take a quick look around you.</p>
<p>Go on, examine some of the work produced by Web agencies and IT consultancies in your town, city, or country. Look at the work of your colleagues and competitors. Would you say that the people working there have nothing left to learn? That they would not benefit from reading an article that explains how to replace their old school Web design techniques with modern, accessible, and search engine friendly methods? Did the sites you just examined really use valid, semantic markup and have no accessibility problems? Really? Wow. You must live in a very small place, with your place of employment being the only company in the Web business.</p>
<p>What those saying they don’t want to read more articles on best practices do not seem to realize is that only a fraction of all people who design and build websites for a living read blogs. Even fewer read blogs related to Web development, frequent sites such as this, or read books on modern Web development. Most (as in “more than fifty percent of”) people who build websites do it first and foremost to make a living, not because they are passionate about the Web or get a kick out of the idea of giving everybody equal access to information. As long as they get paid, that’s good enough for them. If the techniques they learned several years ago still seem to work and nobody complains, that too is good enough for them.</p>
<p>Many articles and a whole bunch of books have been written about Web standards, CSS, accessibility, and semantic markup. But I can assure you that not even those of us who spend most of our time working with and advocating best practices in front-end Web development have heard it all before. And the things we have heard about can almost always bear repeating. Web standards and accessibility are not “dead”, “boring”, or subjects that everybody knows everything about. Actually, I don’t think anybody knows all there is to know about them. But if you find the subjects boring or think you know all you need to know, fine. Nobody is forcing you to read everything that gets published.</p>
<p>It is my firm belief that Web standards are just as important to talk about now as five years ago or last week. The message needs to be repeated over and over again as long as the vast majority of Web workers continue to produce sub-standard websites.</p>
<p>The problem is how to deliver that message to more people than those who already know.</p>
<h2 id="reaching-those-who-need-to-be-reached">Reaching those who need to be reached</h2>
<p>Like I said, most of the people we need to reach do not read our blogs. So we have to find ways of spreading information outside our small group of standardista blogs. Here are a few suggestions for <em>where</em> we can find these people:</p>
<ul>
<li>
<p><strong>Discussion forums and mailing lists:</strong> Perhaps you frequent a forum where the main focus is on PHP, ASP.Net, graphic design, Flash, or some other subject not directly related to Web standards or accessibility. Do what you can to plant seeds of information when you see an opportunity to do so.</p>
</li>
<li>
<p><strong>Local meet-ups:</strong> Organize a simple Web design get-together at a pub. Don’t mention anything about a special theme for the meet-up. Your first goal is to get a bunch of people together and start talking about Web design and development. You will likely be able to find at least a few people who are interested in talking about best practices. Then they talk to their friends in the business, spreading the information.</p>
</li>
<li>
<p><strong>Printed magazines:</strong> In my experience many Web workers prefer reading offline magazines instead of online publications. Contact your local (national) Web design and Internet related magazines and offer to write articles. It doesn’t have to be long feature articles. Start by sending them short tidbits to publish in their Tips and Tricks section, if they have one. You may even get paid to do this.</p>
</li>
<li>
<p><strong>Education:</strong> This is a big one. So many schools still teach students outdated ways of designing and building websites. If you can somehow influence teachers and instructors to update and improve what they teach students, much will be won.</p>
</li>
</ul>
<h2 id="reaching-those-who-dont-want-to-be-reached">Reaching those who don’t want to be reached</h2>
<p>Reading an article or listening to a presentation does not necessarily mean that you will change the way you work, however. Many will be interested in learning how they can improve the quality of the work they do, but there are two groups of people that I find really hard to influence (please forgive me for generalizing):</p>
<ul>
<li>Purely visually oriented designers and Flash developers who do not want the Web to follow any logical rules at all. They want the Web to be a purely visual medium, and approach it as if it was a printed brochure, a computer game, or television.</li>
<li>Back-end programmers who don’t really want to touch client side programming, and let their IDE create the HTML, CSS and JavaScript for them.</li>
</ul>
<p>I don’t really have any good suggestions for reaching these groups. Maybe you know what it would take to make them interested?</p>
<h2 id="we-still-have-a-long-way-to-go">We still have a long way to go</h2>
<p>If you consider yourself a Web standards and best practice advocate, please continue helping, explaining, and making it easier for the vast masses of Web workers out there to adopt modern ways of designing and constructing websites.</p>
<p>Let’s not stop fighting too early. The battle, if you choose to see it as a battle, has not been won. I would say that it has only just begun.</p>yashumittalThroughout my Web design and development career I have found incredible amounts of valuable help and fantastic resources while searching for solutions to various problems. In the last few years I have found most of this helpful information on Web standards and accessibility-oriented blogs and forums. It’s amazing that so many people are willing to spend so much time to share their knowledge with others and help make the Web a better place.
https://cdn.codecarrot.net/images/hands-measuring-a-gear.jpg
5 simple and low-cost tricks for growing your business2017-09-10T12:15:00+00:002017-09-10T12:15:00+00:00https://blog.codecarrot.net/5-simple-and-low-cost-tricks-for-growing-your-business<p>5 simple and low-cost tricks for growing your business growth tactics. Use one or all of these to spark new growth at your business, or if nothing else, draw inspiration from them in order to come up with similar ideas that better align with your business and your goals.</p>
<p>Here are 5 low-cost ways to spark growth at your small business:</p>
<ol>
<li>
<p><strong>Offer loyalty discounts</strong> - Launching a loyalty program might cost some money in the beginning, but once you have it in place, your customers will likely end up spending more and visiting you more often than they might have before you had anything in place.</p>
</li>
<li>
<p><strong>Hire an intern</strong> - If you need to spend more time on customer service, launching that new website, or improving upon products, it might be beneficial to hire a high school or college student who can help pick up the slack in other areas, or one who has experience in a particular area you need help with (like web design, for example).</p>
</li>
<li>
<p><strong>Offer a free seminar, product demo, or tasting</strong> - Offering free education or product samples to others is another great way to build a reputation for yourself and your business. It’s also a great way to connect with people who might be interested in doing business with you.</p>
</li>
<li>
<p><strong>Work on the front lines for a day</strong> - A little “hands on” experience never hurt anyone. If you’re wondering why your customers aren’t buying a certain product or staying longer at your business, work the front lines for a day (get on the sales floor, bus some tables, work the cash register, etc.). If you spend all day in the back office running the numbers, fulfilling orders, dealing with HR issues, and making the work schedule, this might not seem possible.</p>
</li>
<li>
<p><strong>Make someone’s day</strong> - Sometimes the smallest act of kindness can make the biggest impact. Try to think of an inexpensive way to make someone’s day better. It might not lead to instant business, but as they say, “what goes around comes around!”
If you’re stuck in a rut, the best way to spark business growth is to try something new. I hope these suggestions get the wheels turning!</p>
</li>
</ol>
<p>If you’re stuck in a rut, the best way to spark business growth is to try something new. I hope these suggestions get the wheels turning!</p>yashumittal5 simple and low-cost tricks for growing your business growth tactics. Use one or all of these to spark new growth at your business, or if nothing else, draw inspiration from them in order to come up with similar ideas that better align with your business and your goals.
https://cdn.codecarrot.net/images/stefan-stefancik-257625.jpg
How To Turn Your Webinar Into A Magnet For New Customers2017-09-10T09:32:00+00:002017-09-10T09:32:00+00:00https://blog.codecarrot.net/how-to-turn-your-webinar-into-a-magnet-for-new-customers<p>Now I know what you might be thinking…</p>
<p><em>You must be thinking that, I get a ton of email from tech vendors every week telling me to join their webinars but I always just delete them. Does people out there actually attend webinars?</em></p>
<p>Yes, they do and often times, those people that attend webinars are there for a reason.</p>
<p><strong>They’re thinking about buying.</strong></p>
<p>I didn’t think of it like this at first, but it makes perfect sense now: a webinar is the closest thing to a 1:1 sales demo.</p>
<p>But here’s the best part: it comes with none of the pressure of an actual sales call. There’s no pressure to buy, no figuring out next steps, no talking about budget, and no one asking “Are you ready to move forward?”</p>
<p>So in a world where we can find out just about everything that we need to know about a product before ever talking to sales (or anyone at the company for that matter), webinars are the perfect outlet for people who are looking to kick the tires and see what your product can do for them.</p>
<p>Since we started with a small test six months ago, webinars have become one of our top sources of new customers — and if you do webinars right, they can generate revenue for your business, too.</p>
<p>This post will break down the exact process that we use to run webinars and a handful of the things we’ve learned along the way over the last six months.</p>
<h2 id="the-6-keys-to-running-a-webinar-that-will-make-you-money">The 6 Keys To Running A Webinar That Will Make You Money</h2>
<h3 id="1-get-your-audience-involved-asap">1) Get your audience involved ASAP.</h3>
<p>There’s one big mistake many people make when they are hosting webinars: they kickoff the webinar, talk for 40 minutes straight, and then bring in the audience for Q&A.</p>
<p>That’s the standard webinar format.</p>
<p>But we like to flip that and bring the audience in right away.</p>
<p>Here’s a really simple trick: start the webinar by asking people to put their name and city into the webinar chat box and then give everyone a shoutout as they join.</p>
<p><em>Hey Carla in Texas. What’s up Shane in SF. Dave in Boston. Brendan in NYC, I see you out there! What’s up.</em></p>
<p>That’s how all of our webinars start. But here’s the best part. Not only does this get people involved right away but it also helps you check the audio to make sure everyone can hear you.</p>
<p>Once you see all of the responses come in through chat, you’ll be confident that the audio is working — and you’ll have gotten a whole group of people hooked right away by giving them a shoutout (and after all, a person’s name is the sweetest thing they could hear).</p>
<p>More involvement = more people that will stick around until the end of the webinar — and that’s when your big payoff CTA is anyway, right?</p>
<h3 id="2-tell-a-story-that-gets-people-to-stick-around">2) Tell a story that gets people to stick around.</h3>
<p>Getting the audience involved early is just the beginning.</p>
<p>You need to tell a story.</p>
<p>Before you dive into examples and features — no matter how powerful those things might be — you still need to hook the audience.</p>
<p>If you did something like give them a shoutout or give away some swag, you probably got their attention.</p>
<p>But now you have to prove that you are worth listening to for the next 40 minutes, and the best way to do that is by telling them a story.</p>
<p>And there’s no better example of this than a Steve Jobs keynote.</p>
<p>Go back and watch them all on YouTube or check out the transcripts — he never dives right into the news. He doesn’t bring up specs and features. He always starts with a story that grabs the audience’s interest and attention first.</p>
<p>So start with a story, and then you can follow this simple framework to guide the rest of your webinar deck:</p>
<ol>
<li>Tell a story to get people’s attention.</li>
<li>Pose a problem or talk about what’s not working.</li>
<li>Offer up a solution to that problem.</li>
<li>Show exactly how your product can solve that problem (be specific and show examples).</li>
<li>Serve up your CTA.</li>
</ol>
<p>Oh and one more thing here: it’s so easy to be boring on a webinar. Especially since you don’t have the ability to actually make eye contact and read your audience, so you need to bring the energy even more than you would in person.</p>
<h3 id="3-give-your-webinar-the-promotion-it-deserves">3) Give your webinar the promotion it deserves.</h3>
<p>Outside of getting people involved early and telling a great story, one of the mistakes people make over and over is webinar promotion.</p>
<p>Just because you made the decision to run a webinar doesn’t mean that people will show up.</p>
<p>And this is even harder than normal because I bet you that you’ll have competing priorities with the webinar — you want people to join your email list, signup for your product, follow you on Twitter, share this, etc.</p>
<p>So you need to have a tight plan for webinar promotion and think beyond just blasting out an email.</p>
<p>A few of the channels that have worked well for us include:</p>
<ul>
<li>Reaching out to our most active blog subscribers and asking them to share the webinar first with a click-to-tweet link to get the ball rolling (it helps with social proof when your audience sees everyone else tweeting about your webinar before they signup)</li>
<li>Adding a PS to all of our onboarding emails so all new Drift signups have the option to join the webinar</li>
<li>Creating an in-app message targeting all new users who (most likely) haven’t gotten the full tour of Drift yet</li>
</ul>
<p>And then once we started to get some traction with webinars after the first few months (aka they started working).</p>
<p>That’s my favorite method of webinar promotion because it’s just always capturing new webinar registrations vs. us having to do the “how many emails are sending to people?” dance.</p>
<p>One last note here around promotion: we typically see a 30-40% attendance rate.</p>
<p>So if your goal is to get 100 people on a webinar, you’d need to get 300 people to signup.</p>
<p>And that lead us perfectly into webinar tip #4 — reminder emails.</p>
<h3 id="4-dont-underestimate-the-power-of-reminder-emails">4) Don’t underestimate the power of reminder emails.</h3>
<p>I know you’ve been there before. Scrambling before a call to try and find the dial-in number…</p>
<p><em>“I swear I got an email from them…”</em></p>
<p>This is the last thing you want people doing before your webinar. Even if you put the link in the calendar invite, don’t take your chances.</p>
<p>So here’s a simple playbook for reminder emails leading up to <strong>your</strong> webinar date:</p>
<ul>
<li>Send a reminder the day before</li>
<li>Send a reminder an hour before</li>
<li>Send a reminder 10 minutes before</li>
</ul>
<p>Every webinar attendee counts. And the best way to get more people into your webinar is to remind them 10-minutes before.</p>
<p>The 10-minute reminder email gets <strong>more than 2x</strong> the number of clicks than the hour before reminder:</p>
<h3 id="5-dont-be-afraid-to-ask-for-the-sale">5) Don’t be afraid to ask for the sale.</h3>
<p>It’s not about what your product does — it’s about what people can do with your product.</p>
<p>And if you can tell a great story about how your product can improve people’s lives, make them more money, etc. then don’t be afraid to sell during your webinar.</p>
<p>After all, the goal of the webinar is to get people interested in your product anyway, right? So at Drift, at the end of the webinar, the CTA we use is to go to our website right now and start a conversation <em>with</em> the sales team.</p>
<p>It doesn’t get much more straightforward than that: if you saw something you liked on this webinar, go to <a href="https://www.codecarrot.net/">our website</a> and talk to our team right now.</p>
<p>If you don’t have a website for your business. You can get one, <a href="https://codecarrot.net/">right now</a>.</p>
<p><a href="https://www.codecarrot.net/"><img src="https://i.imgur.com/ISrEDIW.png" alt="Make your business online with a website" /></a></p>
<p>Instead of filling out a form and waiting to hear back, they can talk to our team and ask questions about what they just saw live — even while the webinar is still going on.</p>
<h3 id="6-dont-forget-to-ask-for-feedback">6) Don’t forget to ask for feedback.</h3>
<p>Assuming that you’ve just delivered a killer webinar by following a few of the tips above, there’s a big opportunity that will be waiting for you:</p>
<p>The follow-up email.</p>
<p>This is the single most important email you can send.</p>
<p>(Most people mail it in and just send over the recording.)</p>
<p>But this is the perfect time to ask for feedback, so we send a quick three question survey with every webinar follow up email that asks:</p>
<ul>
<li>How would you rate the webinar on a scale of 1-5?</li>
<li>Do you have any feedback? Was there anything you wished we covered?</li>
<li>Would you like to a get a 1:1 demo of Drift?</li>
</ul>
<p>The best part of this feedback survey isn’t the score, and it’s not whether or not people want demos (although that definitely helps and we’ve found it’s a nice low-pressure way of asking).</p>
<p>Responses can be pure gold for marketing (and they influence a lot of the marketing copy that we use today).</p>
<p>There’s no better way to write copy than to use potential customer’s actual words, and the webinar follow-up survey has been one great way to, well — get those words.</p>yashumittalNow I know what you might be thinking…
https://i.imgur.com/zYcLaiT.jpg
Is your idea good enough to turn into a Product?2017-09-10T09:32:00+00:002017-09-10T09:32:00+00:00https://blog.codecarrot.net/is-your-idea-good-enough-to-turn-into-a-product<h2 id="question-how-can-you-make-an-incredibly-dangerous-misguided-and-high-risk-bet-with-a-single-sentence">Question: How can you make an incredibly dangerous, misguided and high-risk bet with a single sentence?</h2>
<p><strong>Answer: I have an idea for an app, and I’d like you to build it for me.</strong></p>
<p>I’ve heard this opener more than a few times at <a href="https://www.codecarrot.net">CodeCarrot</a>, and it always surprises me a bit.</p>
<p>You want to spend $100,000 or more on an idea?</p>
<p>Your idea is the very beginning of a possible app, but if you want to maximize your chance of success, having an idea is not the last step before turning to an agency to build it.</p>
<p>The reality is that most ideas can be evaluated pretty effectively without spending much, saving you a lot of time and money along the way, and also leading to a better product in the end.</p>
<p>Here’s the advice I always give to potential clients who come to me with an idea:</p>
<h2 id="first-validate-the-need">First, validate the need</h2>
<p>Thousands of apps have died a quick death because of the builder’s assumption that whatever problem they were solving for themselves was shared by others that were willing to pay to have it solved.</p>
<p>The tragic part is that validating the problem costs nothing more than time, and possibly a few cups of coffee.</p>
<p>Talk to as many people in your market as possible, and ask them about their challenges.</p>
<p>Not “would you use an app that did _____?”, but probing questions that will help you reframe your idea to fit the market:</p>
<ul>
<li>What are you struggling with?</li>
<li>What have you tried to do to solve the problem?</li>
<li>Why have other solutions failed?</li>
</ul>
<p>Listen closely, and take a lot of notes.</p>
<p>Many of the best app ideas come from someone trying to validate a different idea and discovering a more pressing need. By asking probing, open-ended questions with an open mind, you can focus on discovering the problem that needs to be solved.</p>
<h2 id="next-validate-the-market">Next, validate the market</h2>
<p>If you’re going to pay to have a product built, presumably it will make money for you.</p>
<p>There are different ways to make money from an app; it doesn’t have to mean charging for it. You might plan on building a large free user base and then making money on advertising. Or you might plan on selling the company down the line. Or charging just for premium features.</p>
<p>But whatever your plan is, make sure that there’s a market that can support it.</p>
<p>Why do so many apps targeted at indie musicians and students often fail?</p>
<p>Because money. Or more specifically, the lack of it in the market.</p>
<p>Before you build, think very carefully about the true size of the market that will support your business, and whether getting them to pay will be painful.</p>
<h2 id="fine-tune-your-idea-into-an-mvp">Fine-tune your idea into an MVP</h2>
<p>Contrary to what some say, an MVP is not a smaller version of your product. An MVP is a basic product or service that’s designed to test your solution without building the entire scope. Sometimes, an MVP doesn’t look anything like your big idea.</p>
<p>If you wanted to build an on-demand dry cleaning pickup and delivery app, you could either:</p>
<p>a) Build a mobile app with limited features (even though the bulk of of the cost of the app will likely be building its core, not the extra features).</p>
<p>or…</p>
<p>b) Set up a simple SMS relay to let people text their pickup location to you, and iterate from there.</p>
<p>The key is to build the most basic solution that still delivers value and allows you to test your idea. Often, this kind of thing can be done without an agency or developer at all.</p>
<h2 id="come-up-with-a-unique-selling-proposition">Come up with a unique selling proposition</h2>
<p>Your Unique Selling Proposition (USP) is the reason your customers will want to buy from you.</p>
<p>What makes your product different? What makes your product valuable? What makes your product worth paying for or using? Distill your idea into language that will convince your customers to buy.</p>
<p>Try the “working backwards” approach used at Amazon, where the team writes the press release before they build the product:</p>
<p>Understand the technical challenges and scope</p>
<p>Finally, if you haven’t yet talked to an expert (though agencies can be helpful in guiding you through the steps above), it’s time. Talk to the people who might be building your product, and get a solid understanding of the technical challenges involved.</p>
<ul>
<li>How long will it take to build a version that you can test in the market?</li>
<li>How will the technical challenges be solved?</li>
<li>Is there a way to build the product differently than you imagined, but still accomplish the same goal?</li>
</ul>
<p>Once you’ve done that, your idea has become much more than simply an idea, and you’re ready to build.</p>yashumittalQuestion: How can you make an incredibly dangerous, misguided and high-risk bet with a single sentence?
https://i.imgur.com/iWqR9Vm.jpg
5 Talent Metrics for Effective Recruiting2017-09-10T05:54:00+00:002017-09-10T05:54:00+00:00https://blog.codecarrot.net/5-talent-metrics-for-effective-recruiting<p>Human Resources has traditionally been a transactional operation, focused on tactical initiatives or short-term objectives. Lately, there’s been a growing demand for HR leaders to gain a “seat at the table” in order to play a more critical and strategic role at an organization.</p>
<blockquote>
Being strategic means focusing on business problems that occur outside of HR.
</blockquote>
<p>At the same time, many high-growth companies are thinking about talent more holistically to attract and retain top performers, rather than putting rear-ends in seats. Greater value is being placed on the talent function, and recruiting has become a central and integrated function of entire organizations. This is largely due to the proactive initiative taken by the executive team, but not all companies have the necessary buy-in from the C-suite.</p>
<p>To earn the ear of your executive team, you’ll need to begin by measuring Key Performance Indicators (KPIs) that matter, the ones that tie into business objectives. Instead of a calculation that evaluates processing efficiency, recruiting performance metrics should demonstrate efficacy. How do your activities support tomorrow’s business objectives and move the organization forward?</p>
<h2 id="5-recruiting-metrics-that-matter">5 Recruiting Metrics that Matter</h2>
<p><strong>1. Time to Hire</strong></p>
<p>The Time to Hire metric should be a leading indicator that determines recruiting forecasting rather than efficiency.</p>
<p><strong>2. Source to Close</strong></p>
<p>Source to Close measures how quickly you close candidates once they enter your interview pipeline.</p>
<p><strong>3. Conversion Rates</strong></p>
<p>Monitoring stage conversion rates allows your Talent team to identify where candidates are dropping out, and why.</p>
<p><strong>4. Source Quality</strong></p>
<p>Instead of simply measuring the number of candidates a source provides, you must also measure how far candidates from a particular source get in the interview process.</p>
<p><strong>5. Quality of Hire</strong></p>
<p>Companies should consider the monetary value a high-performing employee contributes to the organization.</p>
<hr />
<h2 id="1-time-to-hire">1. Time to Hire</h2>
<p>Typically, Time to Hire is a measurement of elapsed time starting with the submission of the job requisition and ending with an accepted offer. A hiring manager determines that he or she needs to add a new member to the team. Then, a recruiter is evaluated based on the speed at which he or she is able to complete this task.</p>
<p>This is an outdated, reactive strategy that relies on backwards-looking data to make a future decision. It does not maximize the likelihood that the recruiter will secure high-quality candidates, only that he or she will move quickly.</p>
<p>In order to secure top performers, progressive organizations are relying on recruiting as an ongoing process that is embedded into the company culture. Talent Acquisition teams are building talent communities, engaging passive candidates, and developing employer branding to build relationships and attract prospects. In isolation, this makes the Time to Hire metric less valuable to the organization.</p>
<p>Instead, the Time to Hire metric should be a leading indicator that determines recruiting forecasting rather than efficiency.</p>
<h2 id="2-source-to-close">2. Source to Close</h2>
<p>As opposed to Time to Hire, Source to Close measures how quickly you close candidates once they enter your interview pipeline. This removes the sourcing phase from the equation and evaluates the efficacy of the organization’s hiring process.</p>
<p>Your goal should be to make evidence-based decisions on a candidate as quickly as possible. As a result, Source to Close becomes indicative of how well the company’s interview process is able to collect meaningful and relevant information at each stage.</p>
<p>In the past, recruiters were unable to track this. Today, recruiters are creating structured interview processes that produce robust data around the health of your pipeline.</p>
<h3 id="your-source-to-close-metric-should-indicate">Your Source to Close Metric Should Indicate:</h3>
<ul>
<li>The total amount of time it takes for a candidate to complete your interview process</li>
<li>The amount of time a candidate spends in each recruiting stage</li>
<li>Interview quality. Did you get the information you need to move the candidate to the next stage?</li>
<li>Interviewer discrepancies. Is there an interviewer who fails at collecting the necessary information, therefore slowing down your process?</li>
</ul>
<p>Developing a process with structured interview stages allows your team to identify any bottlenecks and examine contributing factors.</p>
<h2 id="conversion-rates">Conversion Rates</h2>
<p>A structured interview process allows recruiters to measure conversion rates at each stage in the recruiting funnel. Monitoring stage conversion rates allows your Talent team to identify where candidates are dropping out, and why. It also helps manage the number of candidates that interviewers are passing or rejecting.</p>
<p>Acceptance rate has long been a KPI of recruiting teams. It’s simple for an organization to calculate the percentage of offer letters accepted by candidates. However, this information is meaningless without supporting data that helps improve the conversion rate.</p>
<p>Strategic talent operations will not simply do the calculation, but will also examine all of the elements of the interview process and candidate experience to increase the acceptance rate.</p>
<h2 id="source-quality">Source Quality</h2>
<p>Many organizations determine the quality of a source based on the number of candidates who have applied from it. At forward-thinking companies, the mindset has shifted from volume of candidates to quality of candidates. Instead of simply measuring the number of candidates a source provides, you must also measure how far candidates from a particular source get in the interview process.</p>
<p>For example, at the end of the month, your company has received 30 applicants from a job board and 12 applicants from your in-house referral program. It’s easy to assume that the job board is your more valuable source, and many organizations stop there. However, if only 6 of these candidates are scheduled for a phone interview, and the same number of referrals make it to the in-person stage, your referral source becomes your higher-quality channel</p>
<p>Much like marketing departments, talent functions use source quality data to measure media performance and make changes to improve their strategy. If you can show your CEO that the referral program results in higher-quality candidates, he or she will be likely to invest in an employee advocacy program.</p>
<h2 id="quality-of-hire">Quality of Hire</h2>
<p>Because businesses rely on human capital to execute their strategies, talent operations has an opportunity to play a large, quantifiable role in company success. Your CEO calculates Customer Lifetime Value (CLV) to help measure the productivity of customer acquisition efforts. Calculating Employee Lifetime Value (ELV) links recruiting to performance metrics and drives strategies to improve talent acquisition efforts.</p>
<p>Cost Per Hire is a common performance indicator of a recruiting operation. However, companies often seek to reduce the cost, rather than improve the Quality of Hire. Companies should consider the monetary value a high-performing employee contributes to the organization.</p>
<p>Knowing Employee Lifetime Value allows your CEO to visualize the value of acquiring a top performer, and hiring a top performer has direct ties to your company’s revenue stream. Beyond avoiding the cost of a mis-hire, hiring top talent has a measurable impact on your company’s revenues because of a significant performance differential. For example, Google has found that hiring a top-performing employee will result in 300 times more productivity and business impact hiring an average-performing employee. And because the average Google employee generates $1 million in annual revenue, a single hire can make the company up to $300 million in a year</p>
<p>GE, Microsoft, Yahoo and Apple have all also estimated significant performance differential (“double- digit”) at their organizations. And it’s no coincidence that these companies are well-known for both their top-tier talent and their hiring cultures.</p>
<p>Coupling this understanding with Source Quality data, talent operations is able to make strategic investments in sourcing efforts that contribute to long-term company objectives.</p>
<h2 id="conclusion">Conclusion</h2>
<p>Recruiting KPIs are evolving as Talent teams become more strategic and integrated into an organization. High-growth companies are operationalizing the Talent function, using data to optimize the recruiting process in order to improve their quality of hire.</p>
<p>In order to be a business partner at your organization, you must begin by measuring the right things. Make sure your applicant tracking system is equipped with the reports you need to measure these 5 KPIs. Having meaningful data at your disposal will allow you to make smart, evidence-driven decisions on where to spend company resources and how to make the best hires. It will also speak the language of the department heads acting as your hiring managers!</p>yashumittalHuman Resources has traditionally been a transactional operation, focused on tactical initiatives or short-term objectives. Lately, there’s been a growing demand for HR leaders to gain a “seat at the table” in order to play a more critical and strategic role at an organization.
https://i.imgur.com/LKLqCbx.jpg
Inbound Marketing - A Cost Effective Way for Small Businesses2017-09-06T06:33:00+00:002017-09-06T06:33:00+00:00https://blog.codecarrot.net/inbound-marketing-a-cost-effective-way-for-small-businesses<p><a href="/how-to-become-a-digital-marketing-expert-through-blogging">Marketing strategies</a>, techniques, trends and methods have changed rapidly and for the better over years. These changes have expanded the horizon of inventions in this space and has strengthened the customer-brand relationship.</p>
<p>While deriving the term ‘marketing’ from a Latin word ‘ mercatus’ nobody knew that this strategy would be so important for every brand as it is today. Dating back to the1900s, promotions happened mainly in form of pamphlets, display and announcements. These methods were used to create awareness about particular events happening in towns or for introduction of new commercial goods like fruits, vegetables, beauty products and so on. Marketing can be divided into several types but if broadly classified it is mainly of two types – Outbound and Inbound.</p>
<h2 id="what-is-outbound-marketing">What is Outbound Marketing?</h2>
<p>If observed closely it includes all forms of traditional tactics namely; print ads, television, radio, newspaper, trade shows or exhibitions, direct mails amongst others. Analytics project the efficiency of outbound marketing to be limited to certain set of audiences and is not technologically savvy. Here a lot of assumptions are relied on.</p>
<ul>
<li>Audience are based on a wide spectrum of profiling. Thus X amount of money spent here, doesn’t boost conversions as expected or to the mark.</li>
<li>As outbound is mainly traditional, it doesn’t include the new forms of technology platforms like social media, digital, mobile and so on into its radar. Hence, leaving behind a major chunk of audience who undoubtedly are the future.</li>
</ul>
<h2 id="what-is-inbound-marketing">What is Inbound Marketing?</h2>
<p>Inbound marketing also largely known as content marketing involves everything that ‘outbound’ effortlessly looks over –</p>
<ul>
<li><a href="/how-to-write-a-blog-post-people-want-to-read">Blogs</a></li>
<li>Social media channels</li>
<li><a href="/9-seo-tips-improve-website-performance-drive-traffic">Search engine optimization (SEO)</a></li>
<li><a href="/beginners-guide-to-starting-an-email-list">Email</a></li>
<li><a href="/how-to-turn-your-webinar-into-a-magnet-for-new-customers">Webinars</a></li>
<li>Infographics</li>
</ul>
<p>It rightly focuses on the new age media and promotion mediums where the profiled audience spend most of their time today. Unlike outbound, it doesn’t ask for attention aggressively. It is carefully segmented and targeted. It awaits to be found by its audience to offer valuable inputs and insights in exchange. In simple words, it is a source of free traffic.</p>
<h2 id="benefits">Benefits</h2>
<p>By incorporating inbound marketing, small business can:</p>
<h3 id="reach-relevant-audiences">Reach Relevant Audiences</h3>
<p>Displaying huge billboards and distributing ads in public dailies will not be as effective as online ads. This is because your audience viewing billboards would not be targeted intentionally whereas, your targets would be active on some social media sites. With micro targeting, you can reach out to specific audiences who can understand your brand and your valued offerings.</p>
<h3 id="save-huge-chunk-of-money">Save Huge chunk of Money</h3>
<p>One half page print ad can cost you a fortune and now just imagine getting your product out in the market in every daily possible! You can turn the tables around and earn a fortune by just including this strategy in your promotional plan. Though it takes more effort than simply buying a newspaper ad, its per lead costs run way lower than traditional marketing.</p>
<h3 id="increase-search-organically">Increase Search Organically</h3>
<p>In order to get listed on Google’s first page, coming up with relevant and fresh content is a must. When you produce search optimized content on regular basis and receive social media attention, your ranking will shoot up. Choosing apt keywords is crucial.</p>
<h3 id="prompt-business-decisions--actions">Prompt Business Decisions & Actions</h3>
<p>Using inbound you will get quick and on the spot insights of how your online or digital campaign is performing. Depending on these results as the owner of your business you can take prompt actions to change or enhance your campaign for better business.</p>
<h3 id="build-loyal-customers">Build Loyal Customers</h3>
<p>People will like, share and purchase your products or services if you interact with them constantly by putting new products, offers, coupons, discounts and providing exceptional customer services. Time and again it has been proven that customers who are linked to your social media handles are more likely to be loyal. Denote the above as benefits or hacks to increase business, inbound marketing is the type to opt for. You might be the owner of a small, medium or large business, these benefits apply successfully to all.</p>
<p>Here’s an example that helped Varsha, a passionate cake baker to scale up her baking business. She started her business with accepting small orders from her friends and family. Soon, her passion and uniquely baked flavors were recognized in her locality and community. She started her website for receiving and accepting order online from others outside her locality, family and friends. To boost her online presence she drafted a strategic inbound marketing plan for her business.</p>
<ul>
<li>Varsha strongly promoted her brand and products on different Facebook communities and groups.</li>
<li>She also attached a blog to her site where she discussed different techniques, styles of baking and ‘about cakes’.</li>
<li>She wisely chose certain words such as: ‘cake’, ‘baking’, ‘DIY’ and so on.</li>
<li>These keywords which were frequently searched on Google by her target audience: belonging to varied age, gender and backgrounds.</li>
<li>This took care of her site’s <a href="/9-seo-tips-improve-website-performance-drive-traffic">SEO</a>.</li>
</ul>
<p>Making use of different inbound marketing techniques and tools, this process eventually increased Varsha’s clientele and business by manifolds.</p>
<p><strong>Pro Tip:</strong> Getting a website for your business is a key to success, as it increase the reach of your business to the whole internet <em>(a.k.a Internet)</em></p>
<p><a href="https://www.codecarrot.net/"><img src="https://i.imgur.com/ISrEDIW.png" alt="Make your business online with a website" /></a></p>yashumittalMarketing strategies, techniques, trends and methods have changed rapidly and for the better over years. These changes have expanded the horizon of inventions in this space and has strengthened the customer-brand relationship.
https://i.imgur.com/wSi9MEk.jpg
The history of the internet2017-09-05T19:35:10+00:002017-09-05T19:35:10+00:00https://blog.codecarrot.net/the-history-of-the-internet<p>Learn the journal of internet from the where it originated and what change it bring all the way from the…</p>
<iframe width="100%" height="315" src="https://www.youtube.com/embed/9hIQjrMHTv4?rel=0" frameborder="0" allow="autoplay; encrypted-media" allowfullscreen=""></iframe>yashumittalLearn the journal of internet from the where it originated and what change it bring all the way from the…
https://cdn.codecarrot.net/images/the-history-of-the-internet.jpg
How to Choose the Right Web Hosting2017-09-05T19:11:20+00:002017-09-05T19:11:20+00:00https://blog.codecarrot.net/how-to-choose-the-right-web-hosting<p>How do we decide if a web host is good? Do bandwidth and disk storage features still matter these days? Which type of hosting service should you go with? In this article, we will get these questions answered with the following walk-through and a 15-point checklist.</p>
<p><strong>In brief –</strong></p>
<ol>
<li>Know your hosting needs.</li>
<li>Investigate on host reliability and uptime guarantees.</li>
<li>Study web host upgrading options.</li>
<li>Check all hosting features (such as number of addon domains allowed) based on your needs.</li>
<li>Check prices on both sign up and renewal.</li>
<li>Check hosting control panel.</li>
<li>Read hosting company’s ToS to find out more about account suspension and server usage policy.</li>
<li>Other supporting features (ie. site backup, environmental friendliness, etc)</li>
</ol>
<h3 id="knowing-your-hosting-needs">Knowing Your Hosting Needs</h3>
<p>You can never get the right web host without knowing what you need. So before you go any further – put everything aside (including this guide you are reading) and think thoroughly on your own needs.</p>
<ul>
<li>What kind of website are you building?</li>
<li>Do you want something common (a WordPress blog, for example)?</li>
<li>Do you need Windows applications?</li>
<li>Do you need a special version of software (ie. PHP)?</li>
<li>Does your website need special software?</li>
<li>How big (or small) can the web traffic volume go?</li>
</ul>
<p>These are some of the basic questions you need to answer for yourself.</p>
<p>Have a quick picture of what you want to do with your website now. Figure what happens next for the next 12 months.</p>
<p><strong>If you are totally new…</strong></p>
<p>For newbies, the no-brainer rule is to always start small with a good shared hosting account.</p>
<p>A shared hosting account is cheap, easy to maintain, and sufficient for most new sites. Plus, you can always upgrade to VPS or dedicated hosting in the later stage when your site grows bigger.</p>
<p><strong>What to look for in a web host?</strong></p>
<h2 id="1-server-reliability--uptime-scores">1. Server Reliability / Uptime Scores</h2>
<p>Nothing is more important than having a 24×7 operating web host. You need a web host is operating on a powerful server and stable network connections. 99.5% and above is the recommended uptime score; anything below 99% is unacceptable.</p>
<p>There are a number of different ways to obtain a web host uptime info. One way to do so is by reading my hosting reviews – where we publish uptime records based on our test sites from time to time (see samples below).</p>
<p>Alternatively, you can simply track your web host with server monitor tools – many of these tools are free on trial and are very to use.</p>
<h2 id="2-server-upgrading-options">2. Server Upgrading Options</h2>
<p>Shared web hosts are pretty powerful these days.</p>
<p>On rough guestimation, a shared hosting account should be sufficient to support a proper-optimized WordPress blog with 30,000 – 40,000 monthly unique visitors. You should be doing alright on a shared host if you manage to limit your concurrent database connections below 20 (this is why I said it’s always best to start with a shared hosting if you are new).</p>
<p><strong>However…</strong></p>
<p>If you expect your website to grow really big in next two or three years, then you should consider picking up a web host with room to grow. By grow, I mean upgrading your web host – from shared hosting to virtual private or dedicated server – for more processing power, memory capacity, disk storage, and better security features.</p>
<p><img src="https://i.imgur.com/po9KoQo.png" alt="Different types of hosting and its factors" /></p>
<h2 id="3-multiple-addon-domains">3. Multiple Addon Domains</h2>
<p>Domain names are cheap – so cheap that it is hard to resist not owning more than one. According to the survey – 80% of the voters own more than 5 domains and more than 20% of the voters own more than 50!</p>
<p>To accommodate these extra domains, we need extra hosting space. And this is why it is important to have a web hosting account that allows adding multiple domains.</p>
<p>Generally speaking, most budget shared hosting companies allow at least 25 addon domains in one account nowadays but you can never be sure. Some years ago I was careless and signed up on a web host that allows only one domain. And, I was holding more than 10 parked domains at that time. Do not repeat my mistake – be sure to check the domain capacity before you make a purchase.</p>
<h2 id="4--prices-hosting-signup-vs-renewal-cost">4. Prices: Hosting Signup vs Renewal Cost</h2>
<p>Hosting deals, shared hosting especially, are normally selling very cheap on signup prices but charge much higher on renewals.</p>
<p>It is an industry norm.</p>
<p>Unless you are willing to hoop between two or three web hosts every two years, there is no way to avoid the pricey renewal costs.</p>
<p>In general, any shared hosting priced below $10/mo is acceptable but you might have a lower tolerance. So, to avoid any unpleasant surprise, you should check the TOS and make sure you are okay with the renewal prices before signup.</p>
<h2 id="5-refund-policy">5. Refund Policy</h2>
<ul>
<li>Should you choose to cancel your host within the trial period, does the company provide full money return?</li>
<li>What is the hosting company’s refund policy after the trial session?</li>
<li>Is there any cancellation charges?</li>
</ul>
<p>These are some basic questions to ask before signing up.</p>
<p>It’s important to know your hosting provider handle customer refunds so that you don’t have to lose too much money when things go wrong.</p>
<p>There are some hosting companies that charge absurdly high cancellation fees when users cancel their account during trial period. Our advice? Avoid these hosting providers at all cost. On the other hand, some hosting companies provide anytime money back guarantees where you can ask for a pro-rated refund after your trial period (good eh?).</p>
<h2 id="6-cron-jobs-auto-script-installer-htaccess-and-ssi">6. Cron Jobs, Auto Script Installer, .htaccess, and SSI</h2>
<p>I am always surprise that some web hosts out there still do not offer these basic hosting features nowadays. You need Cron for day-in-day-out operations, Auto Script Installer (like Fantastico, Simple Scripts, Quick Installer, Softaculous, Installatron, and so on) for easy web apps installations and updates, .htaccess access for security/page redirects/etc purposes, Server Side Include (SSI) for easier site maintenance (especially when you are building a static site), and FTP access for easy file transfer.</p>
<h2 id="7-disk-space-and-data-transfer-capacity">7. Disk Space and Data Transfer Capacity</h2>
<p>Disk space and data transfers are hardly a meaningful comparison factor for shoppers – especially if you are new – these days.</p>
<p>One, if you check, almost all shared hosting providers are offering “unlimited” storage and data transfers. While the term “unlimited” is nothing but a marketing gimmick; web hosting users get more than enough capacity in storage and data transfer. (In most cases, it is RAM and processor power that limit the usage of an unlimited hosting account.)</p>
<p>Two, if you think about it, disk storage and bandwidth hardly matter to an average website owners these days. Images can be stored on Flickr; files and documents on Google Doc, videos on YouTube and Vimeo, large data files on cloud storage.</p>
<p>So in conclusion – you don’t need to care that much on your hosting storage or bandwidth for now.</p>
<h2 id="8-e-commerce-features">8. e-Commerce Features</h2>
<ul>
<li>Are you running an e-commerce website?</li>
<li>Are you using any specific shopping cart software?</li>
<li>Do you need to process business transactions on your website?</li>
<li>Do you need special technical support?</li>
</ul>
<p>If yes, then it is important for you to pick a web host with sufficient e-commerce features support. SSL certification, dedicated IP, and one-click shopping cart software installation are some of the essential features/supports you will need.</p>
<h2 id="9-an-easy-to-use-hosting-control-panel">9. An Easy-to-use Hosting Control Panel</h2>
<p>A user-friendly and functional hosting control panel is very, very important.</p>
<p>It doesn’t matter if it’s a cPanel or a Plesk or a third party control panels – we are okay as long as it is user-friendly and come with all the necessary functions. Without an adequate control panel, you will be left at the mercy of the hosting tech support staff – even if all you need is some basic server changes.</p>
<h2 id="10-account-suspension-what-are-the-limitations">10. Account Suspension: What are the limitations?</h2>
<p>Here’s a money tip that most hosting review sites will not tell you: Hosting companies will pull the plug and suspend your account if you are using too much CPU power (yes, unlimited hosting is limited) or violating the rules. So before you sign up on a web host, it is important that you read the rules.</p>
<p><strong>Knowing your account limits help you understand two things:</strong></p>
<ol>
<li>How Generous (Or Stingy) Is Your Shortlisted Web Host – Should you go with that web host, or other host with looser restrictions?</li>
<li>How Transparent Is Your Hosting Company – Can you trust the words coming out from your hosting company? Honest hosting company normally will have very clear guidelines on account limitation.</li>
</ol>
<h2 id="11-environmental-friendliness">11. Environmental Friendliness</h2>
<p>Having an eco-friendly website host is the primary concern for some webmasters.</p>
<p>According to science studies, a web server on average produces more than 630kg of CO2 (which is a lot!) and consumes 1,000 KWh of energy annually. A green host on the other hand, theoretically produces zero CO2. There is indeed a huge difference between a green web host and a non-eco-friendly web host.</p>
<p>If you care about the environment and wish to cut down on your carbon footprint, pick a web host that runs on renewable energy (or at least, a web host that offsets its energy consumption via green certificates).</p>
<h2 id="12-emailyourdomaincom">12. Email@YourDomain.com</h2>
<p>If you wish to host email accounts together with your website, then you should look at the email feature before signup. Most hosting companies will come with the ability to host your own email (something like email@yourdomain.com) but hey, it’s always better to check and be sure of it, yeah?</p>
<p>In case email feature is not provided, no big deal. There are a number ways you can own an email account at your own domain.</p>
<h2 id="13-subscription-period">13. Subscription Period</h2>
<p>Do not be surprise if you discover some web hosts force their customers to take up unreasonably long contracts.</p>
<p>Should you commit to long term hosting contracts? Our answer is no – Never signup web host with more than 2 years upfront unless they provide clear anytime money back guarantees.</p>
<p><strong>Pro Tip:</strong> Hosting companies usually give better offers when users go for longer subscription period. Discounts are great; but I strongly recommend users not to prepay for more than 2 years.</p>
<h2 id="14-site-backup">14. Site Backup</h2>
<p>There are times when a site crashes. Perhaps a hacker got into your WordPress blog and replaced your index.php file, or your entire database got nuked, or the server had a severe hard disk failure.</p>
<p>If your web host does site backups regularly then there is nothing to worry about when these incidents happen. Your hosting provider should be able to restore back your full (or at least, a big chunk of) site in no time.</p>
<p>On backups, here are a few key questions to ask your web host:</p>
<ul>
<li>Does your web host provide full backups regularly?</li>
<li>Can site backup be done easily via the control panel?</li>
<li>Can you create auto backup your site easily via cron job or other program?</li>
<li>Can you restore your backup files by yourself easily (so you don’t have to wait for the support staffs to do it for you during disaster time)?</li>
</ul>
<h2 id="15-247-live-chat-support">15. 24/7 Live Chat Support?</h2>
<p>Personally I prefer live chat over phone and I prefer web hosting company with comprehensive documentation (so I can just read and solve the problems myself).</p>
<p>But it’s just me. You might prefer email or telephone support instead.</p>
<p>What we want is someone who can throw us the life saving rope instantly when we press the S.O.S button.</p>yashumittalHow do we decide if a web host is good? Do bandwidth and disk storage features still matter these days? Which type of hosting service should you go with? In this article, we will get these questions answered with the following walk-through and a 15-point checklist.
https://i.imgur.com/NGy5GWL.jpg
How to Make the Most of Your Weekends to Grow Your Side Business2017-09-05T11:30:00+00:002017-09-05T11:30:00+00:00https://blog.codecarrot.net/how-to-make-the-most-of-your-weekends-to-grow-your-side-business<p>Building your business on the side is not easy. You come home after a long day of work, you spend the little time you have with your family and friends, and you try to jam in a productive session, working on your side business before going to bed.</p>
<p>Your weekends allow you to get much more done in much larger chunks. They’re usually where you’re most capable of growing your business or having the most impact on your business when you’re working a day job.</p>
<p>However, are you making the most of your weekends? How often do you find yourself distracted or making excuses when you’re not getting enough done? How should you structure your weekends? What does a weekend, optimized for productivity and growing a business, look like?</p>
<p>I’m going to answer these questions and share what has worked for me, and continues to work for me. Additionally, I’m going to share my action plan, exactly how I structure my weekends, and what I do every weekend that has helped me grow my side business and maintain a great work/work balance.</p>
<h2 id="switch-up-your-frame">Switch Up Your Frame</h2>
<p>The first thing you need to consider is how do you think of your weekends.</p>
<p>What you do during the week should set you up to get more done on the weekend. Don’t use your weekends to support the stuff you do during the week, instead, whenever you come home from your day job and begin working on your business, make sure it supports what you plan to do over your weekend.</p>
<p>For example, if you’re planning to tackle your website’s design over the weekend then choose templates, design logos, draw layout ideas and write copy throughout the week. That way, when the weekend rolls around, you can focus on the most important task - getting the website up.</p>
<h2 id="making-your-weekdays-support-your-weekend">Making Your Weekdays Support Your Weekend</h2>
<p>Whenever you think up a task or project, but can’t make time for it during the week, David Allen, author of Getting Things Done suggests you add it to a “next actions” list instead of a “to-do” list. Throwing items into a to-do list is non-actionable. If you set an ordered list, of the next things you need to do for your business, it will require and encourage you to make quick decisions.</p>
<p>Think up a great, actionable idea for your business? Put it in your “next actions” list. Come up with a new marketing idea that will take several hours to implement? Put it in your “next actions list.”</p>
<p><img src="https://i.imgur.com/P7xKwO8.jpg" alt="Next action list" /></p>
<p>At the end of the week, organize these ideas, tasks, and projects into timeslots throughout your weekends, then pull each task from your next actions list and move it into your calendar for the weekend. (More on this in the next section)</p>
<p>Now let’s get into what a typical weekend looks like for me, and how you should consider structuring yours to get more done.</p>
<h2 id="how-to-structure-your-weekend">How to Structure Your Weekend</h2>
<h3 id="friday">Friday</h3>
<p>While you won’t have as much time on Fridays to get as much done as you can on Saturday or Sunday, it’s a good time to reflect on what you’ve accomplished throughout the week and what you plan to do over your weekend</p>
<p><strong>Reflect</strong></p>
<p>It’s good to sit down for five minutes, before planning out your weekend, to reinforce what has (or hasn’t) been working for you.</p>
<p>Not taking the time to see where you went right and wrong can stunt your growth as an entrepreneur. <em>Your business only grows when you do</em>. Here are some questions you can ask yourself:</p>
<ul>
<li>What were my top wins this past week?</li>
<li>What didn’t I get done?</li>
<li>Where did I waste time this past week?</li>
<li>What was the best part of my week?</li>
</ul>
<p>You can answer these questions out loud or write them down in a journal or private document (like <strong>Google Docs</strong> or <strong>Evernote</strong>).</p>
<p><strong>Plan of Attack</strong></p>
<p>Now it’s time to schedule your weekend. Set blocks of time for each task and get your priorities in check.</p>
<p>Your weekend should be flexible. Things happen and you can’t always stick to your schedule. However, don’t use that as an excuse to procrastinate. Stay flexible for when “life” happens, but don’t stay flexible just because <em>Game of Thrones</em> or your favorite TV show might be on.</p>
<p>Before planning out your weekend, ask yourself a few questions to get a better perspective on what needs to get done:</p>
<ul>
<li>What must I get done no matter what this weekend?</li>
<li>Are there any potential distractions or commitments this weekend that I will need to account for?</li>
</ul>
<p>Now it’s time to plan your weekend for success.</p>
<p>First, if you don’t know what you should be doing, use the Pareto Principle. Look at the 20% of things you’ve been doing for your business that have yielded 80% of your results.</p>
<p>Next, use a tool like <strong>Trello</strong> or even <strong>Google Calendar</strong> to set your schedule for the next two days. Pull the tasks you put off from your “next actions” list and start to schedule them into your weekend. If the task can be done in five minutes or less, do it immediately (yes, while you’re still scheduling your tasks) instead of putting it off for the weekend.</p>
<p>In the next section, I’ll talk about what your Saturday and Sunday might look like to help you figure out how to make the most of your weekend.</p>
<p>Generally, you’ll want to tackle the most difficult or time-consuming tasks first. If you don’t think you’ll be able to complete all your tasks for the day, do the most important things first. The most important task is up to your discretion, but generally, if it has a looming deadline or will make the most immediate impact on your business, it’s the most important task.</p>
<h3 id="saturday">Saturday</h3>
<p>Let’s carry over that excitement and momentum from Friday’s reflection and planning, and begin to tackle the most important tasks on Saturday.</p>
<p><strong>“Airplane Mode” Saturdays</strong></p>
<p>So, because you hopefully have scheduled the most important or difficult task first, that’s where you’ll be spending most of your Saturday. It’s also likely to be your most time-consuming task, which is why it’s also important to get it out of the way as quickly as possible.</p>
<p>The key to getting more done on the weekends is focus. Sounds simple, right?</p>
<p>On paper, sure, but in reality, there are a lot of distractions and excuses to keep you distracted.</p>
<p>My Saturdays are usually the most productive day of my weekends. I like to put myself into “Airplane Mode”. Much like how your phone’s Airplane Mode which disables all of your phone’s connectivity to the internet, I do the same thing by cutting myself off from distractions.</p>
<p><img src="https://i.imgur.com/9j0T8GC.png" alt="Yashu Mittal mobile phone screenshot" /></p>
<p>Though it’s unlikely you’ll be able to get much done without the internet there are tools you can use to help keep you from wandering off and browsing Facebook, while staying connected to the internet.</p>
<p>These are the Chrome extensions I use to put myself in “Airplane Mode” every Saturday.</p>
<ul>
<li><strong><a href="https://chrome.google.com/webstore/detail/stayfocusd/laankejkbhbdhmipfmgcngdelahlfoji?hl=en">StayFocused</a></strong> - Block out the sites that steal your time so that you can work on what matters.</li>
<li><strong><a href="https://chrome.google.com/webstore/detail/rescuetime-for-chrome-chr/bdakmnplckeopfghnlpocafcepegjeap">RescueTime</a></strong> - Track all your time on the internet to later review where you waste the most time. <em>(<a href="https://biz30.timedoctor.com/rescuetime-review/">Check reviews</a>)</em></li>
<li><strong><a href="https://chrome.google.com/webstore/detail/news-feed-eradicator-for/fjcldmjmjhkklehbacihaiopjklihlgg?hl=en">News Feed Eradicator</a></strong> - Sometimes, I can’t block Facebook using a tool like StayFocused because I use Facebook to manage my ads and pages. However, with News Feed Eradicator, my news feed goes from distraction filled mess to motivational or inspirational quote.</li>
<li><strong><a href="https://chrome.google.com/webstore/detail/momentum/laookkfknpbbblfpciffpaejjkokdgca?hl=en">Momentum</a></strong> - This extension replaces your new tab screen with an inspirational photo and a reminder of your most important task for the day.</li>
<li><strong><a href="https://chrome.google.com/webstore/detail/simple-pomodoro%C2%AE/blidjjfbdbkcmegfnidmgndgdamhhelp">Simple Pomodoro</a></strong> - If you’re not familiar with The Pomodoro Technique, it helps you work in small intervals of 25 minutes of getting stuff done and a short 5 or 10 minute break. Instead of plowing through without taking a break, Simple Pomodoro is a timer that will alert you when it’s time to take a break and when it’s time to get back to work.</li>
</ul>
<h3 id="sunday">Sunday</h3>
<p>I don’t like to lose the momentum I created on Friday and Saturday, however, even I understand that there are errands and things that need to be done on the weekend. That’s what Sunday’s for.</p>
<p>If I have time on Sunday, I will finish any other tasks, but if I can’t, I will add them back to my “next actions” list or simply schedule them for next weekend.</p>
<p><strong>Schedule Content for the Week</strong></p>
<p>Spend some time automating whatever you can for the following week. For example, every Sunday evening, I use Buffer to schedule all my social media posts until the following Sunday.</p>
<p>You can do this as well. Spend your Sunday evenings briefly scheduling out social media posts, planning out blog content, or scheduling emails to be sent to your email list.</p>
<p><strong>Plan Your Week Ahead</strong></p>
<p>I use Trello (you can use any scheduling tool you feel comfortable with) to plan out the week ahead. This way, I know exactly what I should (and need) to be working on when I get home from work. I’m not wasting time on deciding what to do or trying to figure out what to do next. I just come home and take action.</p>
<p><strong>Set Goals</strong></p>
<p>If you don’t already, I strongly suggest writing down and tracking weekly goals for yourself and your business. Some example goals you can set are:</p>
<ul>
<li><em>I will easily launch my new ecommerce website by Saturday this week</em></li>
<li><em>I will easily go to the gym at least 3 times this week</em></li>
<li><em>I will easily get 10 sales to my store by Saturday this week</em></li>
<li><em>I will easily double my store’s weekly traffic, from 100 visitors to 200 visitors, by Saturday this week</em></li>
</ul>
<p>Writing your goals down helps keep you accountable and brings you clarity. How do you really know what you want to accomplish in life and in your business if you’re not tracking it?</p>
<p><strong>Prime Yourself for the Week Ahead</strong></p>
<p>Stop dreading Mondays every Sunday night. Set the tone for an amazing week. Look forward to getting up early, tackling your morning routine and getting home after your 9-to-5 to work on your side business. Make your Sunday nights amazing!</p>
<p>Watch a few motivational <a href="https://www.youtube.com/channel/UCIAktdRKgMZMkNbJY44spqA">videos on YouTube</a> or an inspiring Ted Talk, or <a href="https://blog.codecarrot.net/">learn something new</a> before going to bed. You don’t have to over-stimulate yourself, just put yourself in the right mindset before going to bed.</p>
<h2 id="rinse-and-repeat">Rinse and Repeat</h2>
<p>Now it’s just a matter of repeating this process and becoming really good at adapting it. You won’t be perfect and won’t always have the most productive weekends - I know I don’t.</p>
<p>However, making an effort to work at it every weekend and putting in that work, even when it’s only for a few hours, can make all the difference. All of those efforts begin to add up over time and before you know it, you can have a full-time ecommerce empire on your hands.</p>
<p>What do you think? How do you, as a sidepreneur, manage to build your ecommerce empire on the side while working a 9-to-5? How will you make this upcoming weekend much more productive?</p>yashumittalBuilding your business on the side is not easy. You come home after a long day of work, you spend the little time you have with your family and friends, and you try to jam in a productive session, working on your side business before going to bed.
https://i.imgur.com/CvgRJlz.jpg
How To Create An Admin Panel In Ruby on Rails2017-09-05T10:43:10+00:002017-09-05T10:43:10+00:00https://blog.codecarrot.net/how-to-create-an-admin-panel-in-ruby-on-rails<p>I did some research on admin panel tools, that is RailsAdmin, ActiveAdmin and Administrate. Every tool did its job perfectly, but there were some major differences.</p>
<h2 id="activeadmin"><a href="https://github.com/activeadmin/activeadmin">ActiveAdmin</a></h2>
<p><strong>Pros:</strong></p>
<ul>
<li>Has its own DSL</li>
<li>Application progress is pretty steady with ActiveAdmin, that means the cost of adding a new feature will most likely be the same at any point</li>
<li>Recommended by CodeCarrot as a basic admin panel tool</li>
</ul>
<p><strong>Cons:</strong></p>
<ul>
<li>Requires you to do some reading before you are able to create something complex</li>
<li>Has a slow startup comparing to two other tools</li>
<li>Doesn’t support nested relations by default, you have to write it on your own</li>
</ul>
<h2 id="railsadmin"><a href="https://github.com/sferik/rails_admin">RailsAdmin</a></h2>
<p><strong>Pros:</strong></p>
<ul>
<li>Has its own DSL</li>
<li>Easy to start (after setup, there’s almost no work required to create full administration panel)</li>
<li>Can use previously created Fields, Actions, Sections and so on, so if you need graphical representation of your data, there’s a big chance that someone did it already and you can use it in your app</li>
<li>Provide nested relations by default, so you don’t waste time on implementing that</li>
</ul>
<p><strong>Cons:</strong></p>
<ul>
<li>Much harder to learn and to do more complex stuff</li>
<li>Harder to create things that are not included in base gem, modify views</li>
</ul>
<h2 id="administrate"><a href="https://github.com/thoughtbot/administrate">Administrate</a></h2>
<ul>
<li>Doesn’t have any DSL</li>
<li>You can override anything without doing hacks, controllers and views are available for you to override</li>
<li>Easy setup</li>
<li>Easy everything</li>
<li>Doesn’t provide nested relations by default</li>
<li>Still pre 1.0, not ready for production</li>
</ul>
<p>Administrate looks really promising, but at the time when I’m writing this, it’s still pre 1.0 and may change substantially, so it’s not recommended to use in production applications.</p>
<p>I’d love to tell you: “use RailsAdmin!” or: “use ActiveAdmin”, but unfortunately, I can’t. The tool has to be adjusted to the needs of the client, so if your client has very specific demands for admin panel (which is strange, because it’s not a CMS, it’s a panel for administrate data… but whatever), for example: “This should be on the top left, then next to it should be that, then we need a vertical line and a picture of my cat, and also I’d like to integrate it with Slack in real time”, then you probably should choose <strong>ActiveAdmin</strong>. It’s much easier to operate, has pretty clear syntax and there’s almost no magic happening. Prepare yourself to write nested forms.</p>
<p>On the other hand, if your client only wants an admin panel that works, shows data, allows to create new data, and the styling is not important (even though, in my opinion, the standard RailsAdmin looks much better than ActiveAdmin), then you can be 99% sure that <strong>RailsAdmin</strong> is your choice. Initial setup is really easy, after that you just have to add some kind of authentication and that’s all. You’ve finished your admin panel, no further work required, no nested forms needed to be written, all new models that should appear in the admin panel can be either added to the whitelist or automatically. In effect, such tasks as “add users to admin panel” will most likely take less than 5 minutes.</p>
<p>I won’t talk much about <strong>Administrate</strong>, because it’s not ready yet, but I think that in a year or so this will be the basic admin panel tool, used by every application, just like Devise right now.</p>
<p>You’ve probably noticed that I wrote about <strong>nested relations</strong> a couple of times, that’s because admin panels mostly don’t have any special logic and are pretty standard, so you’ll mostly spend time on things that are not implemented by default, that is: nested relations. You’ll have to display them in the show action, you’ll have to create forms for them in the edit/new action, you’ll have to show some kind of a summary of them in index actions. That’s the most annoying part of maintaining an admin panel, because you know it doesn’t provide any other additional value than “you don’t have to go to posts section, create a post, then move to comments section and create a comment for that post”, you can do that in one place. In my opinion that’s the biggest benefit of RailsAdmin - you don’t have to do that basic stuff all the time.</p>
<p><a href="https://www.codecarrot.net/"><img src="https://i.imgur.com/MAphtcZ.png" alt="Make your business online with a website" /></a></p>yashumittalI did some research on admin panel tools, that is RailsAdmin, ActiveAdmin and Administrate. Every tool did its job perfectly, but there were some major differences.
https://i.imgur.com/V8MiCYT.png
How To Configure Paranoia Gem With Ruby on Rails2017-09-05T10:43:10+00:002017-09-05T10:43:10+00:00https://blog.codecarrot.net/how-to-configure-paranoia-gem-with-ruby-on-rails<p>Paranoia is a gem that allows you to hide records instead of destroying them. You can recover them later if you want. It’s a very simple reimplementation of <a href="https://github.com/ActsAsParanoid/acts_as_paranoid">ActsAsParanoid</a>.</p>
<p>I assume you have a Rails app with User, Conversation and Message models created, with basic views added with conversations showing authors and messages</p>
<p>We will use <a href="https://github.com/rubysherpas/paranoia">paranoia</a> gem.</p>
<p><strong>Pros</strong></p>
<ul>
<li>Very simple gem</li>
<li>Easy to debug (only one file)</li>
<li>It does what it claims to do</li>
<li>Actively maintained</li>
<li>Nice documentation</li>
</ul>
<p><strong>Cons</strong></p>
<ul>
<li>Sometimes unintuitive</li>
<li>In some cases it’s probably better to implement your own solution</li>
</ul>
<h2 id="step-1">Step 1</h2>
<p>Add paranoia gem to your Gemfile:</p>
<div class="language-ssh highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="k">gem</span> 'paranoia', git: 'git@github.com:rubysherpas/paranoia.git', branch: 'core'
</code></pre></div></div>
<p>You add it like that because the newest release doesn’t include some features that will be used in this tutorial.</p>
<h2 id="step-2">Step 2</h2>
<p>Now, let’s say that you want to delete an user, but his messages should still be displayed with his name as an author (in your view you’ll have something like message.user.name). If you removed that user, when trying to display his messages you would get an error:</p>
<div class="language-ssh highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="k">undefined</span> method `name` for nil:NilClass
</code></pre></div></div>
<p>In order to avoid that, instead of destroying records you should mark them as deleted. It’s called soft deleting and it’s what paranoia gem is all about.</p>
<p>To enable this behaviour for User model, add this line to it:</p>
<div class="language-rb highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="k">class</span> <span class="nc">User</span> <span class="o"><</span> <span class="no">ActiveRecord</span><span class="o">::</span><span class="no">Base</span>
<span class="n">acts_as_paranoid</span>
<span class="p">[</span><span class="o">...</span><span class="p">]</span>
</code></pre></div></div>
<p>You also need to generate and run this migration:</p>
<div class="language-rb highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="n">rails</span> <span class="n">generate</span> <span class="n">migration</span> <span class="no">AddDeletedAtToUsers</span> <span class="n">deleted_at</span><span class="ss">:datetime:index</span>
<span class="n">rake</span> <span class="n">db</span><span class="ss">:migrate</span>
</code></pre></div></div>
<p>From now on, calling destroy on any user will set deleted_at to a current date instead of actually destroying the record.</p>
<h2 id="step-3">Step 3</h2>
<p>But, if you try to softly delete an user and display his messages, you’ll still get the same error as before. That’s because paranoia gem changes the default_scope of a model, so every query will treat softly deleted records as if they weren’t there (WHERE “<code class="highlighter-rouge">users</code>”.”<code class="highlighter-rouge">deleted_at</code>” <code class="highlighter-rouge">IS NULL</code> will be added to queries). Of course if you love your default_scope and you don’t ever want it to change you can achieve that:</p>
<div class="language-rb highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="c1"># not available in the newest release, you have to add paranoia gem as in step 1</span>
<span class="n">acts_as_paranoid</span> <span class="ss">without_default_scope: </span><span class="kp">true</span>
</code></pre></div></div>
<p>You can also access your softly deleted user record in other ways:</p>
<ul>
<li>
<p>by overriding <em>user</em> method in <em>Message</em> model:</p>
<div class="language-rb highlighter-rouge"><div class="highlight"><pre class="highlight"><code> <span class="k">def</span> <span class="nf">user</span>
<span class="no">User</span><span class="p">.</span><span class="nf">unscoped</span> <span class="p">{</span> <span class="k">super</span> <span class="p">}</span>
<span class="k">end</span>
</code></pre></div> </div>
</li>
<li>
<p>by modifying belongs_to relation in Message model:</p>
<div class="language-rb highlighter-rouge"><div class="highlight"><pre class="highlight"><code> <span class="n">belongs_to</span> <span class="ss">:user</span><span class="p">,</span> <span class="o">-></span> <span class="p">{</span> <span class="n">with_deleted</span> <span class="p">}</span>
</code></pre></div> </div>
</li>
</ul>
<p>If you need to include or ignore softly deleted records in other places, there are several ways to do that in addition to the methods above:</p>
<ul>
<li><code class="highlighter-rouge">User.with_deleted, User.without_deleted</code> and <code class="highlighter-rouge">User.only_deleted</code> scopes</li>
<li>you can check if a record is softly deleted by using <code class="highlighter-rouge">user.paranoia_destroyed?</code> or <code class="highlighter-rouge">user.deleted?</code> methods</li>
</ul>
<p>Note that if you want your indexes to ignore softly deleted records, you have to modify them as follows:</p>
<div class="language-rb highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="n">add_index</span> <span class="ss">:users</span><span class="p">,</span> <span class="ss">:some_column</span><span class="p">,</span> <span class="ss">where: </span><span class="s2">"deleted_at IS NULL"</span>
</code></pre></div></div>
<h2 id="step-4">Step 4</h2>
<p>If you want to restore a user, use this code:</p>
<div class="language-rb highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="no">User</span><span class="p">.</span><span class="nf">restore</span><span class="p">(</span><span class="n">message</span><span class="p">.</span><span class="nf">user</span><span class="p">.</span><span class="nf">id</span><span class="p">)</span>
</code></pre></div></div>
<p>or</p>
<div class="language-rb highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="no">Message</span><span class="p">.</span><span class="nf">user</span><span class="p">.</span><span class="nf">restore</span>
</code></pre></div></div>
<h2 id="step-5">Step 5</h2>
<p>What if you want to softly delete an user and all of his messages? You can do that simply by implementing <code class="highlighter-rouge">acts_as_paranoid</code> for Message model (as in step 2, you also need to add a migration) and then using <code class="highlighter-rouge">dependent: :destroy</code></p>
<div class="language-rb highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="k">class</span> <span class="nc">User</span> <span class="o"><</span> <span class="no">ActiveRecord</span><span class="o">::</span><span class="no">Base</span>
<span class="n">acts_as_paranoid</span>
<span class="n">has_many</span> <span class="ss">:messages</span><span class="p">,</span> <span class="ss">dependent: :destroy</span>
<span class="p">[</span><span class="o">...</span><span class="p">]</span>
</code></pre></div></div>
<p>Note that if you didn’t implement <code class="highlighter-rouge">acts_as_paranoid</code> for Message model the messages would be destroyed normally and you wouldn’t be able to restore them. Also, restoring the user doesn’t restore all of his messages unless you use:</p>
<div class="language-rb highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="no">User</span><span class="p">.</span><span class="nf">restore</span><span class="p">(</span><span class="n">user_id</span><span class="p">,</span> <span class="ss">recursive: </span><span class="kp">true</span><span class="p">)</span>
</code></pre></div></div>
<p>or</p>
<div class="language-rb highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="n">user</span><span class="p">.</span><span class="nf">restore</span><span class="p">(</span><span class="ss">recursive: </span><span class="kp">true</span><span class="p">)</span>
</code></pre></div></div>yashumittalParanoia is a gem that allows you to hide records instead of destroying them. You can recover them later if you want. It’s a very simple reimplementation of ActsAsParanoid.
https://i.imgur.com/tZW9gIp.jpg
Free and low-cost online tools for freelancers2017-09-05T09:58:10+00:002017-09-05T09:58:10+00:00https://blog.codecarrot.net/free-and-low-cost-online-tools-for-freelancers<p>You’ve done your due diligence, looked at the numbers, written a business plan, and set up a legal entity. You’re ready to take the leap as an independent marketing consultant. Yet without corporate accounting, IT and other departments behind you, the task of running your own business falls completely on your shoulders. Good news? There are multitudes of free and low-cost online tools for marketing consultants available. Here are some of my favorites.</p>
<h2 id="finding-new-clients">Finding new clients</h2>
<p>If you’re just starting out as a marketing consultant, you might have a few clients the moment you launch your company. However, there are other ways to fill extra billable hours of your day.</p>
<p><img src="https://cdn.codecarrot.net/images/website-screenshot-of-the-webpage-upwork.png" alt="Website screenshot of the webpage upwork" /></p>
<p><a href="//www.upwork.com/">UpWork</a> and <a href="//remote.com/?ref=outsource">Outsource</a> offer freelancers the opportunity to bid on hundreds of jobs. Using keyword search, you can get granular about what services you would like to bid on — Facebook marketing, email marketing, social media marketing — the job options are abundant. Both companies handle the legalities of contracting and take care of payments. All you need to do is set up a profile, submit bids, and make money.</p>
<h2 id="polished-website-design">Polished website design</h2>
<p>Maintaining a <a href="//codecarrot.net">business website</a> allows you to showcase your services and current marketing work.</p>
<div class="callout">
Consider taking it a step further and adding a blog for an SEO boost.
</div>
<p>Do you want a simple or complex website? That’s up to you - all while making your business look its professional best.</p>
<p><a href="//codecarrot.net/"><img src="https://i.imgur.com/ISrEDIW.png" alt="Make your business online with a website" /></a></p>
<h2 id="manage-projects-like-a-pro">Manage projects like a pro</h2>
<p>As a marketing consultant, managing multiple clients is paramount to your overall success. Thanks to <a href="//trello.com/">Trello</a>, project management has never been easier. Available on your desktop or through handy mobile apps for smartphones and tablets, your to-do list is only a click away.</p>
<p><em>The drag-and-drop interface allows you to create projects and checklists in a meeting or on the go.</em></p>
<p>You can attach images, add priority labels, set due-dates to each task, and invite others to collaborate. Best of all, the cloud-based platform has a reboost free option for solopreneurs and upgrade solutions for teams.</p>
<h2 id="google-analytics-anytime-anywhere">Google Analytics anytime, anywhere</h2>
<p>Multiple clients might provide access to their Google Analytics data so you can stay on top of their digital marketing strategy. Yet you aren’t always in front of your computer. <a href="//escoz.com/quicklytics/index.html">Quicklytics</a> is a free app download available on Apple or Android devices that seamlessly combines every client’s analytics data into a departmentalized view for easy access.</p>
<p>With one swipe you can see multiple properties, filter data, create custom reports, review conversions in hourly charts and see activity in real time. Fueled by data, Quicklytics helps you stay on top of your client’s website trends.</p>
<h2 id="identify-your-clients-competitive-advantage">Identify your clients’ competitive advantage</h2>
<p>Marketing consultants know they must have an understanding of the competitive landscape. A competitive analysis informs your clients who the competition is, the competitive advantages and disadvantages they might face, what advertising mediums competitors use, and at what price point they market.</p>
<p><em>Spyfu provides access to your client’s most competitive keywords and advertising copy for paid and organic search.</em></p>
<p>With <a href="//www.spyfu.com/">Spyfu</a>, you have an edge on the best PPC and SEO campaigns competitors are using and can find out how much they’re spending on search advertising. By “spying” on a competitor, you can get insight into how a competitor’s marketing evolved and learn from their mistakes — all before proposing new marketing strategies to a client.</p>
<h2 id="a-design-tool-to-elevate-your-professionalism">A design tool to elevate your professionalism</h2>
<p><img src="https://cdn.codecarrot.net/images/screenshot-of-the-website-canva.png" alt="screenshot of the website canva" /></p>
<p>There will come a time when a client needs a presentation, eBook or marketing flyer. Even without graphic design experience, you can still create beautiful marketing materials using <a href="//www.canva.com/">Canva</a>.</p>
<p><em>This simple interface allows you to upload photos, drag-and-drop images and copy, and customize any document to your liking.</em></p>
<p>Or, use one of Canva’s templates for faster turnaround. Canva also includes a photo editor feature so you don’t need to worry about accessing expensive editing software. With Canva, you can provide services above and beyond your client’s expectations.</p>
<h2 id="track-your-miles-for-a-tax-deduction">Track your miles for a tax deduction</h2>
<p>As a self-employed marketing consultant, many business expenses are tax-deductible. Driving to and from client meetings is one expense the IRS allows you to deduct. Instead of trying to remember to document your odometer miles, download <a href="//www.mileiq.com/">MileIQ</a> to your smartphone.</p>
<p>This amazing app automatically detects where you have traveled, allows you to make notes of your client meeting, and stores information with one swipe. Then, at the end of each month, download your MileIQ report for your records. You will make your tax accountant very happy.</p>
<h2 id="get-feedback-on-your-marketing-plan-or-website">Get feedback on your marketing plan or website</h2>
<p><img src="https://cdn.codecarrot.net/images/screenshot-of-the-website-user-interviews.png" alt="screenshot of the website user interview" /></p>
<p>Before launching a new website or marketing campaign, get unbiased feedback. <a href="//www.userinterviews.com/">User Interviews</a> recruits and screens participants for you, which removes the hassle of putting together a focus group on your own. Its features include customized audiences, in-person or remote participation either by phone or computer, participant vetting, and automated scheduling. Clients will be confident that your marketing strategies are spot-on if they’re backed with fact-based research.</p>
<h2 id="online-tools-for-marketing-consultants">Online tools for marketing consultants</h2>
<p>Starting a business is both exciting and scary at the same time. But with the right online tools for marketing consultants, you can avoid the obstacles that might come with solopreneurship and flourish on your own.</p>
<p><a href="//codecarrot.net/"><img src="https://i.imgur.com/ISrEDIW.png" alt="Make your business online with a website" /></a></p>yashumittalYou’ve done your due diligence, looked at the numbers, written a business plan, and set up a legal entity. You’re ready to take the leap as an independent marketing consultant. Yet without corporate accounting, IT and other departments behind you, the task of running your own business falls completely on your shoulders. Good news? There are multitudes of free and low-cost online tools for marketing consultants available. Here are some of my favorites.
https://cdn.codecarrot.net/images/adam-sherez-228582.jpg
E-Mail power tips2017-09-05T09:28:10+00:002017-09-05T09:28:10+00:00https://blog.codecarrot.net/email-power-tips<p>I’ve noticed that when I get stressed at work, it’s often because my email inbox is out of control. I’ve got hundreds of unread emails, with no idea which ones are important. I finally decided I needed to learn how to be much more effective with email, so I came up with a few strategies.</p>
<p><strong>I created a few simple rules to keep me on top of the madness, and here they are:</strong></p>
<ol>
<li>Check your email twice a day, but never right when you get into the office.</li>
<li>Mark important emails with a star or label.</li>
<li>Mark other emails that require a response (but are not urgent) as ‘Later’.</li>
<li>Archive them all to clear your inbox.</li>
<li>Finally, master keyboard shortcuts to make answering and writing email much faster.</li>
</ol>yashumittalI’ve noticed that when I get stressed at work, it’s often because my email inbox is out of control. I’ve got hundreds of unread emails, with no idea which ones are important. I finally decided I needed to learn how to be much more effective with email, so I came up with a few strategies.
https://i.imgur.com/Fb4JkxE.jpg
How To Upload And Transform Images Using Cloudinary in Ruby on Rails2017-09-05T00:05:00+00:002017-09-05T00:05:00+00:00https://blog.codecarrot.net/how-to-upload-and-transform-images-using-cloudinary-in-ruby-on-rails<p>Cloudinary is the image back-end for web and mobile developers. In other words, it allows you to upload images to the cloud (let’s say it’s something similar to S3), but in addition it allows you to do many different image (and video!) transformations on the fly, just by changing URL params.</p>
<h2 id="these-are-few-things-that-cloudinary-can-handle-for-you">These are few things that Cloudinary can handle for you:</h2>
<ul>
<li>change image and video format/size/resolution</li>
<li>add filters and change image shape</li>
<li>add watermarks (text and image)</li>
<li>automatic image optimization <em>(Cloudinary serves different image type for different devices, with support for retina and other high DPI displays)</em></li>
<li>manage access for your assets</li>
</ul>
<h2 id="why-and-when-should-i-use-it">Why and when should I use it?</h2>
<p>Cloudinary is really easy to implement, so if you don’t want to spend time on your own solutions you should give it a try. But as it is not the cheapest option, you might prefer different approaches for various applications.</p>
<p><strong>Hacking & building some demos</strong></p>
<p>Cloudinary is really good for that kind of tasks, it has free plan with 2GB of space and you can do up to 7500 transformations per month. It’s definitely the easiest & fastest way to implement any kind of avatars handling etc.</p>
<p><strong>App with only few uploaders that doesn’t require anything more than image resizing or generating thumbnails</strong></p>
<p>For this kind of app you should consider writing your own solution, as it’s not really complicated, and you can keep your uploads on S3 without worrying about money.</p>
<p><strong>App performing different heavy operations on images/videos, starting from scratch</strong></p>
<p>In this case Cloudinary should be a good way to start, as you can use all it’s powers to handle image operations and just focus on your business logic. Cheapest Cloudinary plan starts from $50 and includes 15GB of space and up to 7500 transformations per month. Later you can always create some own solutions (it’s something that can be done after MVP) and move to S3.</p>
<p><strong>Existing app in need of optimization or better UX</strong></p>
<p>As Cloudinary connects together cloud file storage (under the hood it’s still S3) with built-in CDN and automatic image optimization, it can provide some really great performance boost for reasonable price.</p>
<p><strong>Adding live previews to your app</strong></p>
<p>Cloudinary should be also a good solution if you are building app that needs some live preview of images. It works just on URL params and it’s really easy to implement.</p>
<p>As you can see, Cloudinary is very flexible tool which you should consider in your project. Note that for image heavy apps (with >120gb of images/videos) it can be very expensive solution, so if you are building another Facebook clone where users are uploading thousands of photos daily you propably need something else.</p>
<h2 id="step-1">Step 1</h2>
<p><strong>Setup carrierwave</strong></p>
<p>To start using Cloudinary you need to setup carrierwave first, you can do it really easily by following tutorial on <a href="https://github.com/carrierwaveuploader/carrierwave#installation">carrierwave’s github</a>.</p>
<h2 id="step-2">Step 2</h2>
<p><strong>Login to cloudinary</strong></p>
<p>Before we start you need to login at <a href="https://cloudinary.com/">cloudinary.com</a>. Create your own account or use credentials provided by your client.</p>
<p>On the Dashboard page, you should see all account details, just click on <code class="highlighter-rouge">YML link</code> and save this file in app <code class="highlighter-rouge">config</code> directory.</p>
<p><img src="https://i.imgur.com/yhK0gS5.png" alt="Dashboard view of cloudinary.com" /></p>
<p><em>It’s highly recommended to avoid storing API keys in repo</em>, so you should later edit this config file and move keys to <code class="highlighter-rouge">secrets.yml</code> or <code class="highlighter-rouge">ENV</code>.</p>
<h2 id="step-3">Step 3</h2>
<p><strong>Setup cloudinary</strong></p>
<p>Add this line to your gemfile (remember to put it right after carrierwave gem):</p>
<pre><code class="language-gemfile">gem 'cloudinary'
</code></pre>
<p>and include this module to any uploader that should use Cloudinary:</p>
<div class="language-rb highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="kp">include</span> <span class="no">Cloudinary</span><span class="o">::</span><span class="no">CarrierWave</span>
</code></pre></div></div>
<p>After these two simple steps, every uploaded image will be stored in Cloudinary!</p>
<p>For any further details, please take a look at <a href="https://cloudinary.com/documentation/rails_carrierwave#carrierwave_integration">official Cloudinary documentation</a>.</p>
<h2 id="example-image-transformation">Example image transformation</h2>
<p>Just use <code class="highlighter-rouge">cl_image_tag</code> helper in your views like this:</p>
<div class="language-rb highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="n">cl_image_tag</span> <span class="n">your_model</span><span class="p">.</span><span class="nf">your_image_field</span><span class="p">,</span> <span class="ss">height: </span><span class="mi">200</span><span class="p">,</span> <span class="ss">width: </span><span class="mi">200</span><span class="p">,</span> <span class="ss">crop: :thumb</span><span class="p">,</span> <span class="ss">radius: :max</span>
</code></pre></div></div>
<p>You can also still use regular <code class="highlighter-rouge">image_tag</code>, but to get it work with Cloudinary you need to use absolute image URL. Simply append <code class="highlighter-rouge">_url</code> to your field name. The code will look like below:</p>
<div class="language-rb highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="n">image_tag</span> <span class="n">your_model</span><span class="p">.</span><span class="nf">your_image_field_url</span>
</code></pre></div></div>
<p>Keep in mind that image transformations are only available through <code class="highlighter-rouge">cl_image_tag</code> helper.</p>
<h2 id="changing-file-format">Changing file format</h2>
<p>Available file formats: jpg, png, gif, webp, wdp, bmp, pdf, tiff, ico, mp4, webm, ogv, mp3, ogg, wav <em>(you can extract audio from videos)</em>.
To change file format just change file extension in URL:</p>
<div class="language-rb highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="n">cl_image_tag</span> <span class="s2">"your_filename.selected_extension"</span>
</code></pre></div></div>
<h2 id="cropping-images">Cropping images</h2>
<p>Available cropping types: scale, limit, fill, fit, crop, thumb, pad, lfill, lpad, mfit, mpad, imagga_crop, imagga_scale</p>
<p>Sample usage:</p>
<div class="language-rb highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="n">cl_image_tag</span> <span class="n">your_model</span><span class="p">.</span><span class="nf">your_image_field</span><span class="p">,</span> <span class="ss">height: </span><span class="mi">200</span><span class="p">,</span> <span class="ss">width: </span><span class="mi">200</span><span class="p">,</span> <span class="ss">crop: :selected_cropping_type</span>
</code></pre></div></div>
<h2 id="adding-effects">Adding effects</h2>
<p>Available effects: grayscale, blackwhite, sepia, brightness, saturation, hue, oil_paint, vignette, pixelate, pixelate_faces, gradient_fade, blur, improve, tilt_shift, sharpen, unsharp_mask, pixelate_region, red, blue, green, contrast, vibrance, auto_color, auto_brightness, auto_contrast, fill_light, blur_region, blur_faces, make_transparent, trim, mask, shadow, negate, screen, multiply, colorize, redeye, rek_redeye, overlay, gamma, viesus_correct, fade, deshake, ordered_dither, distort, shear, volume, adv_redeye, noise, accelerate, displace</p>
<p>Sample usage:</p>
<div class="language-rb highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="n">cl_image_tag</span> <span class="n">your_model</span><span class="p">.</span><span class="nf">your_image_field</span><span class="p">,</span> <span class="ss">effect: </span><span class="s2">"effect_name"</span>
</code></pre></div></div>
<p>You can also chain many transformations together, just like that:</p>
<div class="language-rb highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="n">cl_image_tag</span> <span class="n">your_model</span><span class="p">.</span><span class="nf">your_image_field</span><span class="p">,</span> <span class="ss">transformation: </span><span class="p">[</span> <span class="p">{</span> <span class="ss">radius: </span><span class="mi">7</span><span class="p">,</span> <span class="ss">effect: </span><span class="s2">"sepia"</span> <span class="p">},</span> <span class="p">{</span> <span class="ss">angle: </span><span class="mi">108</span> <span class="p">},</span> <span class="p">{</span> <span class="ss">effect: </span><span class="s2">"pixelate_region:74"</span> <span class="p">}</span> <span class="p">]</span>
</code></pre></div></div>
<p>If you don’t want to search through documentation for any advices, I recommend using Cloudinary admin panel, just select any image and add whatever effect you like, on the right side you will find code snippet generated for you with all the options you just provided!</p>
<h2 id="thats-it">That’s it!</h2>
<p>Cloudinary is a great, easy to use tool which can considerably speed up your development. If you need to process images, it’s definitely worth to try. If you have any questions, feel free to ask in comment section below.</p>
<p><a href="https://www.codecarrot.net/"><img src="https://i.imgur.com/ISrEDIW.png" alt="Make your business online with a website" /></a></p>yashumittalCloudinary is the image back-end for web and mobile developers. In other words, it allows you to upload images to the cloud (let’s say it’s something similar to S3), but in addition it allows you to do many different image (and video!) transformations on the fly, just by changing URL params.
https://i.imgur.com/V8MiCYT.png
Writing Your Own jQuery Plugins2017-09-04T20:36:50+00:002017-09-04T20:36:50+00:00https://blog.codecarrot.net/writing-your-own-jquery-plugins<p><a href="//jquery.com/">jQuery</a> is great. It’s cross-browser, easy to learn, and makes adding interactivity to your website a breeze. It also comes with plenty of <a href="//plugins.jquery.com/">plugins</a> to do almost whatever you need it to do.</p>
<p>But what if you can’t find just the right plugin to suit your needs? Or you’re just looking to keep your project DRY (Don’t Repeat Yourself) by combining some oft-used functionality into one nice, neat package? The solution might be to roll your own plugin to meet exactly your needs.</p>
<p>Writing your own jQuery plugin isn’t as hard as it might seem at first. This tutorial will go through the process of writing a simple plugin, adding some options, and even perform a callback.</p>
<h2 id="setting-up">Setting Up</h2>
<p>We’ll start with the old chesnut of programming tutorials, a “Hello, World!” plugin. Before we can do anything, we need to establish our file and link it to our HTML document. First, we’ll create our plugin file and put it in the “js” directory of our website. It’s traditional to start our filename with “jquery,” followed by the actual plugin name, so we’ll call this “jquery.hello-world.js”.</p>
<p><img src="https://cdn.codecarrot.net/images/screenshot-of-the-folder-creating-new-jquery-plugin.png" alt="Screenshot of the folder creating new jquery plugin" /></p>
<p>Next, we’ll need to make sure our plugin file, as well as it’s jQuery core big brother, are linked in our HTML file, so place the following two lines at the bottom of your HTML document, just before the closing <code class="highlighter-rouge"></body></code> tag:</p>
<div class="language-html highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="c"><!-- <script src="//blog.codecarrot.net/js/jquery-3.2.1.min.js"></script> --></span>
<span class="nt"><script </span><span class="na">src=</span><span class="s">"js/jquery-3.2.1.min.js"</span><span class="nt">></script></span>
<span class="nt"><script </span><span class="na">src=</span><span class="s">"js/jquery.hello-world.js"</span><span class="nt">></script></span>
</code></pre></div></div>
<h2 id="the-jquery-plugin-structure">The jQuery Plugin Structure</h2>
<p>jQuery comes with all the necessary hooks to build your plugin file easily. But we still want to be mindful of good JavaScript practices, and make sure we keep everything inside a local scope. We’ll start with the very basic shell of a traditional jQuery plugin:</p>
<div class="language-js highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="p">(</span><span class="kd">function</span><span class="p">(</span><span class="nx">$</span><span class="p">)</span> <span class="p">{</span>
<span class="nx">$</span><span class="p">.</span><span class="nx">fn</span><span class="p">.</span><span class="nx">helloWorld</span> <span class="o">=</span> <span class="kd">function</span><span class="p">()</span> <span class="p">{</span>
<span class="c1">// Future home of "Hello, World!"</span>
<span class="p">}</span>
<span class="p">}(</span><span class="nx">jQuery</span><span class="p">));</span>
</code></pre></div></div>
<p>Let’s take a quick moment to understand what’s going on. By including everything in the <code class="highlighter-rouge">(function() {})</code> self-enclosed JavaScript pattern, we’re making sure that all the variables in our plugin will stay safely outside of the global namespace. We don’t want to cause any collisions with any other JavaScript used on the page, after all.</p>
<p>The other thing you might notice is that we’re defining our plugin as if jQuery was in it’s “no-conflict” mode. Again, we’re seeking to avoid colliding with other JavaScript on the page, and thus we want to make sure that our plugin isn’t reliant on the default <code class="highlighter-rouge">$</code>, which could be used by another library.</p>
<p>Finally, <code class="highlighter-rouge">$.fn</code> is jQuery’s way of allowing you to define your plugin, which we’ve named <code class="highlighter-rouge">helloWorld</code>. With all of our pieces in place, let’s actually do something!</p>
<h2 id="making-our-plugin-do-something">Making Our Plugin Do Something</h2>
<p>For our plugin, we’re going to do something pretty silly, but also simple enough for our demonstration purposes, and that is to change all the text for the acted upon elements with (what else?) the text “Hello, World!”.</p>
<div class="language-js highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="p">(</span><span class="kd">function</span><span class="p">(</span><span class="nx">$</span><span class="p">)</span> <span class="p">{</span>
<span class="nx">$</span><span class="p">.</span><span class="nx">fn</span><span class="p">.</span><span class="nx">helloWorld</span> <span class="o">=</span> <span class="kd">function</span><span class="p">()</span> <span class="p">{</span>
<span class="k">this</span><span class="p">.</span><span class="nx">each</span><span class="p">(</span> <span class="kd">function</span><span class="p">()</span> <span class="p">{</span>
<span class="nx">$</span><span class="p">(</span><span class="k">this</span><span class="p">).</span><span class="nx">text</span><span class="p">(</span><span class="dl">"</span><span class="s2">Hello, World!</span><span class="dl">"</span><span class="p">);</span>
<span class="p">});</span>
<span class="p">}</span>
<span class="p">}(</span><span class="nx">jQuery</span><span class="p">));</span>
</code></pre></div></div>
<p>When we’re invoking the plugin by attaching it to a jQuery selector, the object we’re acting upon is already a jQuery object, so we don’t need to wrap it in the <code class="highlighter-rouge">$(this)</code> structure you’re used to. However, once we start looping through each instance of the matching selector, we use the <code class="highlighter-rouge">$(this)</code> structure as we would any time we ran our selectors through <code class="highlighter-rouge">$.each()</code>.</p>
<p>Suppose we wanted to change the text of all of our <code class="highlighter-rouge"><h2></code> headers on the following page:</p>
<p><img src="https://cdn.codecarrot.net/images/static-view-of-html-file-in-writing-your-own-jquery-plugin.png" alt="Static view of html file in writing your own jquery plugin" /></p>
<p>We would invoke the plugin as you’re already familiar, like so:</p>
<div class="language-html highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="nt"><script></span>
<span class="nx">$</span><span class="p">(</span><span class="nb">document</span><span class="p">).</span><span class="nx">ready</span><span class="p">(</span> <span class="kd">function</span><span class="p">()</span> <span class="p">{</span>
<span class="nx">$</span><span class="p">(</span><span class="dl">'</span><span class="s1">h2</span><span class="dl">'</span><span class="p">).</span><span class="nx">helloWorld</span><span class="p">();</span>
<span class="p">});</span>
<span class="nt"></script></span>
</code></pre></div></div>
<p>To yield this:</p>
<p><img src="https://cdn.codecarrot.net/images/static-view-of-html-file-in-writing-your-own-jquery-plugin-after-adding-custom-js-script.png" alt="Static view of html file in writing your own jquery plugin after adding custom js script" /></p>
<p>We’re not quite done yet. While our plugin technically works, it’s living in its own little isolated world. That is, if you try and chain another jQuery action onto it, nothing’s going to happen because our plugin has led to a dead end. To fix this, be sure to return the results of the plugin as it loops through the DOM elements:</p>
<div class="language-js highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="p">(</span><span class="kd">function</span><span class="p">(</span><span class="nx">$</span><span class="p">)</span> <span class="p">{</span>
<span class="nx">$</span><span class="p">.</span><span class="nx">fn</span><span class="p">.</span><span class="nx">helloWorld</span> <span class="o">=</span> <span class="kd">function</span><span class="p">()</span> <span class="p">{</span>
<span class="k">return</span> <span class="k">this</span><span class="p">.</span><span class="nx">each</span><span class="p">(</span> <span class="kd">function</span><span class="p">()</span> <span class="p">{</span>
<span class="nx">$</span><span class="p">(</span><span class="k">this</span><span class="p">).</span><span class="nx">text</span><span class="p">(</span><span class="dl">"</span><span class="s2">Hello, World!</span><span class="dl">"</span><span class="p">);</span>
<span class="p">});</span>
<span class="p">}</span>
<span class="p">}(</span><span class="nx">jQuery</span><span class="p">));</span>
</code></pre></div></div>
<p>And congratulations! You’ve just written you’re first jQuery plugin!</p>
<h2 id="but-wait-theres-more">But Wait, There’s More!</h2>
<p>Now that you’re all happy that you’ve built your jQuery plugin, your boss comes back and says that they need to be able to translate the site into Spanish. Uh oh, what do we do now?</p>
<p>Well, we could start by just adding an argument. Let’s take our plugin above, and instead of hard-coding the text into the plugin, we can replace it with a variable and pass that along when we invoke the plugin.</p>
<div class="language-js highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="p">(</span><span class="kd">function</span><span class="p">(</span><span class="nx">$</span><span class="p">)</span> <span class="p">{</span>
<span class="nx">$</span><span class="p">.</span><span class="nx">fn</span><span class="p">.</span><span class="nx">helloWorld</span> <span class="o">=</span> <span class="kd">function</span><span class="p">(</span> <span class="nx">customText</span> <span class="p">)</span> <span class="p">{</span>
<span class="k">return</span> <span class="k">this</span><span class="p">.</span><span class="nx">each</span><span class="p">(</span> <span class="kd">function</span><span class="p">()</span> <span class="p">{</span>
<span class="nx">$</span><span class="p">(</span><span class="k">this</span><span class="p">).</span><span class="nx">text</span><span class="p">(</span> <span class="nx">customText</span> <span class="p">);</span>
<span class="p">});</span>
<span class="p">}</span>
<span class="p">}(</span><span class="nx">jQuery</span><span class="p">));</span>
</code></pre></div></div>
<p>There, now we can pass any text we’d like to our plugin. Our offices in Madrid have given us the Spanish translation we need, which we now use as the parameter of our plugin:</p>
<div class="language-html highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="nt"><script></span>
<span class="nx">$</span><span class="p">(</span><span class="nb">document</span><span class="p">).</span><span class="nx">ready</span><span class="p">(</span> <span class="kd">function</span><span class="p">()</span> <span class="p">{</span>
<span class="nx">$</span><span class="p">(</span><span class="dl">'</span><span class="s1">h2</span><span class="dl">'</span><span class="p">).</span><span class="nx">helloWorld</span><span class="p">(</span><span class="dl">'</span><span class="s1">¡Hola, mundo!</span><span class="dl">'</span><span class="p">);</span>
<span class="p">});</span>
<span class="nt"></script></span>
</code></pre></div></div>
<p>Our web page now looks like this:</p>
<p><img src="https://cdn.codecarrot.net/images/static-view-of-html-file-in-writing-your-own-jquery-plugin-translate-to-spanish.png" alt="Screenshot of the folder creating new jquery plugin translate to spanish" /></p>
<p>Complete Customization FTW</p>
<p>But already we’re a little nervous. What if no text was passed when we called the plugin? As it’s written, the plugin would simply blank out the text of our matched elements, and we probably don’t want that. Also, our boss has already come back to us once asking to make a variable. What if he wants more customization options? Simply adding options ad infinitum isn’t going to work in the long term. A more future-proof solution is the <code class="highlighter-rouge">options</code> object.</p>
<p>We already know that the specific text needs to be customizable. Now our boss is asking that the text color and font style be customizable as well. (Yes, I know these are simple options to chain onto our selector via built-in jQuery functions, but go with me here.) Let’s add an options object to our plugin, along with some sensible defaults using the <code class="highlighter-rouge">$.extend</code> method:</p>
<div class="language-js highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="p">(</span><span class="kd">function</span><span class="p">(</span><span class="nx">$</span><span class="p">)</span> <span class="p">{</span>
<span class="nx">$</span><span class="p">.</span><span class="nx">fn</span><span class="p">.</span><span class="nx">helloWorld</span> <span class="o">=</span> <span class="kd">function</span><span class="p">(</span> <span class="nx">options</span> <span class="p">)</span> <span class="p">{</span>
<span class="c1">// Establish our default settings</span>
<span class="kd">var</span> <span class="nx">settings</span> <span class="o">=</span> <span class="nx">$</span><span class="p">.</span><span class="nx">extend</span><span class="p">({</span>
<span class="na">text</span> <span class="p">:</span> <span class="dl">'</span><span class="s1">Hello, World!</span><span class="dl">'</span><span class="p">,</span>
<span class="na">color</span> <span class="p">:</span> <span class="kc">null</span><span class="p">,</span>
<span class="na">fontStyle</span> <span class="p">:</span> <span class="kc">null</span>
<span class="p">},</span> <span class="nx">options</span><span class="p">);</span>
<span class="k">return</span> <span class="k">this</span><span class="p">.</span><span class="nx">each</span><span class="p">(</span> <span class="kd">function</span><span class="p">()</span> <span class="p">{</span>
<span class="c1">// We'll get back to this in a moment</span>
<span class="p">});</span>
<span class="p">}</span>
<span class="p">}(</span><span class="nx">jQuery</span><span class="p">));</span>
</code></pre></div></div>
<p>Now we have a <code class="highlighter-rouge">settings</code> object that, when the plugin is invoked devoid of any parameters, will use what we’ve established as the default text. We also have two other properties of our <code class="highlighter-rouge">settings</code> object, “color” and “fontStyle”, that have no default beyond <code class="highlighter-rouge">null</code>. For this plugin, we don’t need to establish any color or font style beyond what is laid out in our CSS, but they’re there for the overriding if we want. We just have to make use of them:</p>
<div class="language-js highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="k">return</span> <span class="k">this</span><span class="p">.</span><span class="nx">each</span><span class="p">(</span> <span class="kd">function</span><span class="p">()</span> <span class="p">{</span>
<span class="nx">$</span><span class="p">(</span><span class="k">this</span><span class="p">).</span><span class="nx">text</span><span class="p">(</span> <span class="nx">settings</span><span class="p">.</span><span class="nx">text</span> <span class="p">);</span>
<span class="k">if</span> <span class="p">(</span> <span class="nx">settings</span><span class="p">.</span><span class="nx">color</span> <span class="p">)</span> <span class="p">{</span>
<span class="nx">$</span><span class="p">(</span><span class="k">this</span><span class="p">).</span><span class="nx">css</span><span class="p">(</span> <span class="dl">'</span><span class="s1">color</span><span class="dl">'</span><span class="p">,</span> <span class="nx">settings</span><span class="p">.</span><span class="nx">color</span> <span class="p">);</span>
<span class="p">}</span>
<span class="k">if</span> <span class="p">(</span> <span class="nx">settings</span><span class="p">.</span><span class="nx">fontStyle</span> <span class="p">)</span> <span class="p">{</span>
<span class="nx">$</span><span class="p">(</span><span class="k">this</span><span class="p">).</span><span class="nx">css</span><span class="p">(</span> <span class="dl">'</span><span class="s1">font-style</span><span class="dl">'</span><span class="p">,</span> <span class="nx">settings</span><span class="p">.</span><span class="nx">fontStyle</span> <span class="p">);</span>
<span class="p">}</span>
<span class="p">});</span>
</code></pre></div></div>
<p>Since the purpose of this plugin is to replace text, it makes sense to always replace the text with whatever is provided, which is why it also makes sense to provide a default value so that something appears if the plugin is invoked without any options. But the color and font style options are tested for and only acted upon if they are provided.</p>
<p>Our boss has come back and says now they’re going to translate the site into French, and beyond that they want the text to be blue and italic. Fortunately, our plugin can now handle all these requests:</p>
<div class="language-js highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="nx">$</span><span class="p">(</span><span class="dl">'</span><span class="s1">h2</span><span class="dl">'</span><span class="p">).</span><span class="nx">helloWorld</span><span class="p">({</span>
<span class="na">text</span> <span class="p">:</span> <span class="dl">'</span><span class="s1">Salut, le monde!</span><span class="dl">'</span><span class="p">,</span>
<span class="na">color</span> <span class="p">:</span> <span class="dl">'</span><span class="s1">#005dff</span><span class="dl">'</span><span class="p">,</span>
<span class="na">fontStyle</span> <span class="p">:</span> <span class="dl">'</span><span class="s1">italic</span><span class="dl">'</span>
<span class="p">});</span>
</code></pre></div></div>
<p><img src="https://cdn.codecarrot.net/images/static-view-of-html-file-in-writing-your-own-jquery-plugin-speaking-french.png" alt="Screenshot of the folder creating new jquery plugin speaking french" /></p>
<p><em>Et voilà!</em> We now have a plugin with a number of possible objects, and the ability to easily add more (or subtract what’s there) in the future without impacting legacy users of the plugin. Hooray for maintainability!</p>
<p>But our boss has come back with yet another request: once the plugin has completed whatever task it was called to do, it should sound an alert informing us of that fact. For this, we have two options: either quit because our boss has obviously never heard of a requirements document, or go the less drastic route and give our plugin the ability to handle <em>callbacks</em>.</p>
<p>Callbacks are options to JavaScript functions that are themselves JavaScript functions. They’re also not unique to jQuery. Again, it may seem like it would be a complicated thing to do, but actually it’s quite simple.</p>
<p>All we need is to establish one more variable in our options object:</p>
<div class="language-js highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="c1">// Establish our default settings</span>
<span class="kd">var</span> <span class="nx">settings</span> <span class="o">=</span> <span class="nx">$</span><span class="p">.</span><span class="nx">extend</span><span class="p">({</span>
<span class="na">text</span> <span class="p">:</span> <span class="dl">'</span><span class="s1">Hello, World!</span><span class="dl">'</span><span class="p">,</span>
<span class="na">color</span> <span class="p">:</span> <span class="kc">null</span><span class="p">,</span>
<span class="na">fontStyle</span> <span class="p">:</span> <span class="kc">null</span><span class="p">,</span>
<span class="na">complete</span> <span class="p">:</span> <span class="kc">null</span>
<span class="p">},</span> <span class="nx">options</span><span class="p">);</span>
</code></pre></div></div>
<p>Now we have a “complete” variable to perform an action when, well, our plugin completes its action. To invoke it, we’ll want to make sure that what we’re given is actually a function. Fortunately, jQuery helps us with this with the <code class="highlighter-rouge">$.isFunction</code> test:</p>
<div class="language-js highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="k">return</span> <span class="k">this</span><span class="p">.</span><span class="nx">each</span><span class="p">(</span> <span class="kd">function</span><span class="p">()</span> <span class="p">{</span>
<span class="c1">// Our plugin so far</span>
<span class="k">if</span> <span class="p">(</span> <span class="nx">$</span><span class="p">.</span><span class="nx">isFunction</span><span class="p">(</span> <span class="nx">settings</span><span class="p">.</span><span class="nx">complete</span> <span class="p">)</span> <span class="p">)</span> <span class="p">{</span>
<span class="nx">settings</span><span class="p">.</span><span class="nx">complete</span><span class="p">.</span><span class="nx">call</span><span class="p">(</span> <span class="k">this</span> <span class="p">);</span>
<span class="p">}</span>
<span class="p">});</span>
</code></pre></div></div>
<p>On the invocation side, our code becomes:</p>
<div class="language-js highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="nx">$</span><span class="p">(</span><span class="dl">'</span><span class="s1">h2</span><span class="dl">'</span><span class="p">).</span><span class="nx">helloWorld</span><span class="p">({</span>
<span class="na">text</span> <span class="p">:</span> <span class="dl">'</span><span class="s1">Salut, le monde!</span><span class="dl">'</span><span class="p">,</span>
<span class="na">color</span> <span class="p">:</span> <span class="dl">'</span><span class="s1">#005dff</span><span class="dl">'</span><span class="p">,</span>
<span class="na">fontStyle</span> <span class="p">:</span> <span class="dl">'</span><span class="s1">italic</span><span class="dl">'</span><span class="p">,</span>
<span class="na">complete</span> <span class="p">:</span> <span class="kd">function</span><span class="p">()</span> <span class="p">{</span> <span class="nx">alert</span><span class="p">(</span> <span class="dl">'</span><span class="s1">Done!</span><span class="dl">'</span> <span class="p">)</span> <span class="p">}</span>
<span class="p">});</span>
</code></pre></div></div>
<p>And as a result, we see our callback as our plugin is executed:</p>
<p><img src="https://cdn.codecarrot.net/images/static-view-of-html-file-in-writing-your-own-jquery-plugin-display-alert.png" alt="Screenshot of the folder creating new jquery plugin displaying alert" /></p>
<h2 id="conclusion">Conclusion</h2>
<p>Custom jQuery plugins are a great option when you know you’re going to be doing a lot of the same things over and over in your JavaScript. By writing your own jQuery plugin, you’re both keeping your code DRY and your global namespace nice and clean.</p>yashumittaljQuery is great. It’s cross-browser, easy to learn, and makes adding interactivity to your website a breeze. It also comes with plenty of plugins to do almost whatever you need it to do.
https://cdn.codecarrot.net/images/writing-your-own-jquery-plugin.png
How to Stay Motivated2017-09-04T20:09:10+00:002017-09-04T20:09:10+00:00https://blog.codecarrot.net/how-to-stay-motivated<p>Staying motivated can be tough, especially on longer projects. Recently a professional acquaintance told me about a 3-year-long client project. This is an extreme case, but long projects are not uncommon in the tech industry. In fact, I’m working on a personal side project right now that I expect will take about 1.5 years. How do you keep going once the initial rush of a new idea has faded? Through trial and error, I’ve found a few techniques that work for me, and I hope that by sharing them you can stay motivated too.</p>
<h2 id="be-the-boss">Be the Boss</h2>
<p>Nearly every company will use deadlines to motivate employees. Sometimes there’s rewards attached, such as a raise for good performance. However, if you’re trying to retrain for a new career or if you work for yourself, it can feel like there’s no pressure to get anything done. This is purely an illusion created by our own poor perception of large time scales. Nobody is going to tell you what to do.</p>
<p>Rarely are there short term consequences for moving at a humdrum pace on a client project or procrastinating on learning a new technology. Over longer periods, it means missed opportunities. These might be new projects you’re not ready to accept or dream jobs that come and go because you’re not ready to apply. Worse yet, your job could be made redundant and you might not have any new skills to fall back on.</p>
<p>This is where you have to be your own boss and your own employee. If you’re not able to stay motivated by the long-term consequences (like me), here’s something to try:</p>
<ol>
<li>Choose a vice that you enjoy, like watching movies or playing video games</li>
<li>Choose a task to accomplish and a reasonable amount of time to get it done</li>
<li>Only allow yourself to indulge if you finish your work in the allotted time</li>
</ol>
<p>The first few times I tried this, I failed, because I was used to a slower pace. The key to making this work is to not give in. Don’t reward yourself if you haven’t performed well. Eventually, you’ll start finding efficiencies and using your time more wisely (like not surfing the web or checking email) because you’ll be hungry for your vice. Then when you successfully hit a timebox, you’ll feel like you’ve really earned the reward. For me, this has sparked a potent cycle of work and reward.</p>
<h2 id="seek-critique">Seek Critique</h2>
<p>Seek critique: It rhymes so it must be right. Right?</p>
<p>The longer you work on a project, the more difficult it is to think objectively. This is where critique can be very helpful. Find some trusted colleagues or a friend that will give you honest feedback. If you’re working on a personal project and you feel comfortable posting your work to a public forum, even better.</p>
<p><img src="https://i.imgur.com/8ROXb9O.png" alt="Yashu Mittal Behance Profile" /></p>
<p><em>Sites like <a href="https://dribbble.com/mittalyashu">Dribbble</a> & <a href="https://www.behance.net/mittalyashu77">Behance</a> can help you gather constructive feedback and stay motivated.</em></p>
<p>Other people will typically find obvious flaws immediately. There might be major problems with your work that are right in front of your face, but you might not notice them because you’ve learned to ignore them. It’s a common human flaw to spend a lot of time on unimportant details, but a fresh pair of eyes can help you refocus. Don’t fall into the trap of working hard on the wrong problem.</p>
<p>I try to share my latest progress with close friends and family members as often as I can (without driving them crazy, of course). Most of them have little familiarity or emotional attachment to the project, so their first impressions are pretty accurate. The feedback often will clarify the next action you should take, which will also help keep you motivated.</p>
<h2 id="learn-something">Learn Something</h2>
<p>Whether a project is small or large, I think it’s important to continue learning every day. Any time I learn an exciting new technique, I want to try it right away. This is a great way to get excited about an aging project.</p>
<p>Learning can also help you find new efficiencies. Even if you’re timeboxing yourself, using some of that time to learn might uncover a small tip that saves hours. Repeating this process every day builds on itself, because the next time you encounter the same problem, you’ll already know the best way to handle it.</p>
<h2 id="track-progress">Track Progress</h2>
<p>I use sites like Pinterest and <a href="https://imgur.com">Imgur</a> to create a “motivation gallery” for myself. When I first start a project, I’ll generally use these like a mood board. I’ll find pictures that capture the essence of the project so that I remember the original emotions I had when I first started. Never forget why you started, or you’ll never be motivated to finish.</p>
<p>Later on in the project, I’ll start to fill a “progress gallery” with screenshots. I keep them in chronological order so that I can see what the project looked like at the beginning, how it progressed, and what it looks like now. In moments when a project feels like it’s moving slow, I check out the progress gallery. As soon as I see the first image and then start to scroll through the pictures, I realize how far I’ve come. This creates a powerful feedback loop, because the more the gallery grows, the more you’ll want to add to it and watch the project evolve.</p>
<h2 id="visualize-success">Visualize Success</h2>
<p>A project will morph and change throughout its development, making it difficult to see the light at the end of the tunnel. Perhaps you started a project with a nice looking mockup or some great sketches, but those ideas might be out of date with reality. Whenever I start to feel like I’ve drifted away from the original vision, I don’t attempt any course corrections. Instead, I reconcile by reimagining what the finished project will look like based on the present. In other words, I imagine my current work in a finished state, rather than referring to my first thoughts.</p>
<p>Spending a little bit of time daydreaming can help recapture the magic of a fresh idea. This isn’t always possible on client projects that have strict specifications, but it’s critically important on projects with flexible guidelines. Having vision doesn’t mean sticking to your original vision. Find the fun, over and over again.</p>
<h2 id="share-tips-for-staying-motivated">Share Tips for Staying Motivated</h2>
<p>This article only contains my own techniques for staying motivated, and they won’t work for everyone or every situation.</p>yashumittalStaying motivated can be tough, especially on longer projects. Recently a professional acquaintance told me about a 3-year-long client project. This is an extreme case, but long projects are not uncommon in the tech industry. In fact, I’m working on a personal side project right now that I expect will take about 1.5 years. How do you keep going once the initial rush of a new idea has faded? Through trial and error, I’ve found a few techniques that work for me, and I hope that by sharing them you can stay motivated too.
https://i.imgur.com/fCYM635.jpg
How to Build a Strong Writing Portfolio When You’re a Ghostwriter2017-09-04T20:05:00+00:002017-09-04T20:05:00+00:00https://blog.codecarrot.net/how-to-build-a-strong-writing-portfolio-when-youre-a-ghostwriter<p>In order to be a successful ghostwriter, it is important to <a href="https://www.codecarrot.net/">build a portfolio</a> for yourself.</p>
<p>If you do not build it, to be fair you may have to spent your career as a <em>salaried employee</em> and found yourself with zero author credit and a client base who preferred I stay in the shadows.</p>
<p>The thing is, <strong>how you can prove you wrote what you say you wrote?</strong>. I simple language we say <strong>“What is the proof of your writing work?”</strong></p>
<p>It’s a layered problem. For starters, ghostwriters don’t put their names on their work. You might have got lots of writing experience, but you still don’t get bylines.</p>
<p>Then, too, there is the very real fact that many clients fear being “outed” for hiring a ghostwriter.</p>
<h2 id="1-include-a-portfolio-permissions-clause-in-every-contract">1. Include a portfolio permissions clause in every contract</h2>
<p>While this type of clause is standard for most types of freelancing, ghostwriting clients have anonymity concerns. Many feel embarrassed they’re not writing the content on which they put their name. I respect that. But it does not have to be a roadblock to business development.</p>
<p><strong>Ghostwriters should include a permissions clause in every contract.</strong></p>
<p>Mine is typically very simple. It states that I reserve the right to include the contracted work in part or in full within my professional portfolio.</p>
<p>That is sufficient for most clients, though some stipulate additional parameters. For example, some clients allow me to use their pieces in my portfolio but request I remove their name. Others specify word count limits.</p>
<h2 id="2-excerpt-fee-based-content">2. Excerpt fee-based content</h2>
<p>The rise of ebooks and other fee-based content presents a new challenge.</p>
<p>Long-form ghostwriters, for example, are currently in high demand to write self-help books, memoirs, and romance novels — all of which are revenue-generating products. Obviously, it’s bad form (if not outright theft) to freely distribute an ebook, for example, that otherwise sells for $10. And yet, contract writers still need to showcase the work.</p>
<p>The solution is to provide excerpts.</p>
<p><strong>Product excerpts allow a ghostwriter to show relevant work samples without robbing a client of potential sales.</strong></p>
<p>When you’re writing a contract for a fee-based product, include a clause that grants you permission to use excerpts of that product in your portfolio. As stated previously, some clients may wish to stipulate additional parameters such as word count or other limits. In my experience, these requests are typically reasonable and easy to accommodate.</p>
<p>If you find you didn’t secure usage permissions in your original contract, follow-up with the client.</p>
<p>Include the excerpted text in your request and a brief statement about how you plan to use it.</p>
<h2 id="3-maintain-a-client-testimonial-catalog">3. Maintain a client testimonial catalog</h2>
<p>On rare occasion, I’ve had clients withhold permission for the use of individual pieces, but instead, offer a testimonial on my behalf. I always take them up on it.</p>
<p><strong>In fact, I recommend all ghostwriters not only maintain a catalog of client referrals, but that they also include these statements in their portfolio.</strong></p>
<p>Even a handful of compliments can help a ghostwriter stand out from the competition. They also go a long way in justifying fees.</p>
<p>The most compelling testimonials address the fact that ghostwriters offer more value than just the production of an article or ebook, etc. The best ghostwriters help clients clarify ideas and strategize arguments.</p>
<p>They reduce customers’ workloads and relieve their content development headaches.</p>
<p>Hiring a ghostwriter needn’t be anyone’s shameful little secret, and I’ve found that a few good conversations can go a long way in assuaging this fear for my clients.</p>
<p>Ghostwriters provide a valuable service to clients, but it is up to you to advocate for your own careers. Building a strong portfolio not only helps you land more work, it allows to increase your rates, expand your expertise, and establish your professional standing. We can’t let something as singular as a byline stand in the way of earning what your worth.</p>
<p><a href="https://www.codecarrot.net/"><img src="https://i.imgur.com/iHiA1XP.png" alt="Want to get a portfolio for yourself?" /></a></p>yashumittalIn order to be a successful ghostwriter, it is important to build a portfolio for yourself.
https://i.imgur.com/61Oz8cg.jpg
Adding Motion into Web Design with Animate.css2017-09-04T19:20:00+00:002017-09-04T19:20:00+00:00https://blog.codecarrot.net/adding-motion-into-web-design-with-animate-css<p>Lots of frontend web developers have been getting interested in dynamic interfaces using motion effects. This is all too common with many advancements within popular JavaScript libraries. But there has also been a lot of interest in CSS3 animated effects.</p>
<p>One such library is called <a href="//daneden.me/animate/">Animate.css</a> which was created by Dan Eden. You can find a lot of great information on the website and usage is very well documented. In this article I want to present a few miscellaneous UI effects which may be applied into typical website layouts. Keep in mind that although Animate.css can make CSS3 animations, it cannot handle binding to specific effects such as clicks or keystrokes. Because of this limitation I will be coupling a bit of jQuery code along with the CSS classes and demonstrating how this comes together in an organized fashion.</p>
<h2 id="generating-the-animate-library">Generating the Animate Library</h2>
<p>First you should download a copy of Animate.css from the <a href="//github.com/daneden/animate.css">Github repo page</a>. If there is a specific number of animations you wish to use it may be easier to create your own custom build. This can be done from the <a href="//daneden.me/animate/build/">build page</a> on Dan’s website. The full library is only about 60kb so it’s not overly enormous to keep it all together.</p>
<p>Aside from the Animate CSS library I will also be including a copy of my own stylesheet and a custom Google Web font. Plus the latest <a href="//blog.codecarrot.net/js/jquery-3.2.1.min.js">jQuery library</a> and the <a href="//html5shiv.googlecode.com/svn/trunk/html5.js">HTML5shiv script</a> both hosted by Google are some additional assets. We can take a peek at my heading code below:</p>
<div class="highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="cp"><!doctype html></span>
<span class="nt"><html</span> <span class="na">lang=</span><span class="s">"en-US"</span><span class="nt">></span>
<span class="nt"><head></span>
<span class="nt"><meta</span> <span class="na">http-equiv=</span><span class="s">"Content-Type"</span> <span class="na">content=</span><span class="s">"text/html;charset=utf-8"</span><span class="nt">></span>
<span class="nt"><title></span>Animate.css Basic Webpage Demos<span class="nt"></title></span>
<span class="nt"><meta</span> <span class="na">name=</span><span class="s">"author"</span> <span class="na">content=</span><span class="s">"Jake Rocheleau"</span><span class="nt">></span>
<span class="nt"><link</span> <span class="na">rel=</span><span class="s">"shortcut icon"</span> <span class="na">href=</span><span class="s">"https://cdn.codecarrot.net/images/favicon.png"</span><span class="nt">></span>
<span class="nt"><link</span> <span class="na">rel=</span><span class="s">"icon"</span> <span class="na">href=</span><span class="s">"https://cdn.codecarrot.net/images/favicon.png"</span><span class="nt">></span>
<span class="nt"><link</span> <span class="na">rel=</span><span class="s">"stylesheet"</span> <span class="na">type=</span><span class="s">"text/css"</span> <span class="na">media=</span><span class="s">"all"</span> <span class="na">href=</span><span class="s">"css/styles.css"</span><span class="nt">></span>
<span class="nt"><link</span> <span class="na">rel=</span><span class="s">"stylesheet"</span> <span class="na">type=</span><span class="s">"text/css"</span> <span class="na">media=</span><span class="s">"all"</span> <span class="na">href=</span><span class="s">"css/animate.css"</span><span class="nt">></span>
<span class="nt"><link</span> <span class="na">rel=</span><span class="s">"stylesheet"</span> <span class="na">type=</span><span class="s">"text/css"</span> <span class="na">href=</span><span class="s">"//fonts.googleapis.com/css?family=Oxygen:400,700"</span><span class="nt">></span>
<span class="nt"><script </span><span class="na">type=</span><span class="s">"text/javascript"</span> <span class="na">src=</span><span class="s">"//blog.codecarrot.net/js/jquery-3.2.1.min.js"</span><span class="nt">></script></span>
<span class="c"><!--[if lt IE 9]>
<script type="text/javascript" src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
<![endif]--></span>
<span class="nt"></head></span>
</code></pre></div></div>
<p>With all of this in place we should look at each of the different elements of the page from top to bottom. We can start out with the title text which animates as you hover along the header area.</p>
<h2 id="basic-animation-styles">Basic Animation Styles</h2>
<p>The demo webpage is made up of some different sections which contain various animated content blocks. If we applied all the animation classes onto each element they would animate immediately once the page loads. It completely defeats the purpose of being able to control the animation.</p>
<div class="highlighter-rouge"><div class="highlight"><pre class="highlight"><code><header id="heading">
<div class="wrapper">
<h1>Custom Animate.css</h1>
</div>
</header>
</code></pre></div></div>
<p>I want to start here because this example does not require any JavaScript code. The CSS pseudo target <code class="highlighter-rouge">:hover</code> selector will detect whenever the user hovers into the header block. Then we add all the animate styles onto the h1 text using the specific animation named “tada”.</p>
<div class="highlighter-rouge"><div class="highlight"><pre class="highlight"><code>#heading {
display: block;
width: 100%;
height: 175px;
background-color: #2f2f2f;
background-image: -webkit-gradient(linear, left top, left bottom, from(#5b5b5b), to(#2f2f2f));
background-image: -webkit-linear-gradient(top, #5b5b5b, #2f2f2f);
background-image: -moz-linear-gradient(top, #5b5b5b, #2f2f2f);
background-image: -ms-linear-gradient(top, #5b5b5b, #2f2f2f);
background-image: -o-linear-gradient(top, #5b5b5b, #2f2f2f);
background-image: linear-gradient(top, #5b5b5b, #2f2f2f);
-webkit-box-shadow: 0px 4px 3px 1px rgba(0,0,0,0.75);
-moz-box-shadow: 0px 4px 3px 1px rgba(0,0,0,0.75);
box-shadow: 0px 4px 3px 1px rgba(0,0,0,0.75);
}
#heading h1 {
font-family: 'Oxygen', 'Trebuchet MS', Arial, sans-serif;
font-size: 4.2em;
line-height: 175px;
font-weight: bold;
text-align: right;
color: #8d8d8d;
cursor: default;
text-shadow: 2px 2px 1px #000;
}
#heading:hover h1 {
-webkit-animation-duration: 1s;
-webkit-animation-timing-function: ease;
-webkit-animation-fill-mode: both;
-webkit-animation-name: tada;
-moz-animation-duration: 1s;
-moz-animation-timing-function: ease;
-moz-animation-fill-mode: both;
-moz-animation-name: tada;
animation-duration: 1s;
animation-timing-function: ease;
animation-fill-mode: both;
animation-name: tada;
}
</code></pre></div></div>
<p>You will notice each of the animation codes are broken down into individual properties. Most obviously we can see the <code class="highlighter-rouge">animation-name</code> which defines what type of animation we need. The duration says how long we animate and the <code class="highlighter-rouge">animation-timing-function</code> is an easing value. Now the <code class="highlighter-rouge">animation-fill-mode</code> is a bit confusing but relates to adding delays into your effect. We haven’t used any delays so this value is set to both. You can read a bit more about fill mode properties on <a href="//css-infos.net/property/-webkit-animation-fill-mode">this helpful CSS3 article</a>.</p>
<h2 id="animated-error-messages">Animated Error Messages</h2>
<p>Directly underneath the heading area you will notice a message box. Keep in mind that the styles and IDs do not matter so much, and you could apply this effect onto any similar info/warning/error message in your own layout. The animation doesn’t get added until after the user clicks our link to hide the box.</p>
<div class="highlighter-rouge"><div class="highlight"><pre class="highlight"><code><section id="content">
<div class="wrapper">
<div id="error" class="animate">
<p>This is a simple error message. <a href="#" data-anim="bounceOutRight">Click to Hide!</a></p>
</div>
</code></pre></div></div>
<p>I am using a different method for animation this time around by adding the class <code class="highlighter-rouge">.animate</code> as a default. This sets up all our timing and easing but does not specify which type of animation we are using. By separating these different properties it is now possible to create a new class for any of the animations you want to try out. Then whenever the user clicks we can add this animated class onto the element via jQuery and watch it fly offscreen.</p>
<div class="highlighter-rouge"><div class="highlight"><pre class="highlight"><code> $('#error a').on('click', function(e){
e.preventDefault();
var timer;
var animateStyle = $(this).attr('data-anim');
$('#error').addClass(animateStyle);
// reset timer and after 800ms remove the error div
clearTimeout(timer);
timer = setTimeout(function() { $('#error').remove(); }, 800);
});
</code></pre></div></div>
<p>This is the JS code which handles our click event. The first block prevents the default HREF value from loading into the browser. Notice this anchor link is also using the HTML5 custom attributes property for <code class="highlighter-rouge">data-anim</code> which I just made up for this tutorial. You can change this value to any of the <a href="//daneden.me/animate/build/">pre-defined animations</a> and it will be pulled via JavaScript.</p>
<p>You may have also noticed the small timer function at the bottom. This will pause for 800 milliseconds before running a bit of code to remove this error div from the page. Most web developers would want to do something like this so the message blocks are not constantly taking up space after being appended into the DOM.</p>
<h2 id="dynamic-picture-frames">Dynamic Picture Frames</h2>
<p>The next block on the demo page contains two <a href="//dribbble.com/codecarrot">Dribbble shots</a> which are using a custom CSS frame class. Note this is yet another example when we do not need to apply JavaScript, although it is certainly a fallback solution.</p>
<div class="highlighter-rouge"><div class="highlight"><pre class="highlight"><code><ul id="imggrid" class="clearfix">
<li><a href="//dribbble.com/shots/945432-SS-Bank" target="_blank"><img src="images/dribbble-shot-01.png" class="imgframe" width="320" height="320" class="animate" /></a></li>
<li><a href="//dribbble.com/shots/945657-The-3-Little-Witches" target="_blank"><img src="images/dribbble-shot-02.png" class="imgframe" width="320" height="320" class="animate" /></a></li>
</ul>
</code></pre></div></div>
<p>All of the images are using the same animate class. But since we have the container element’s ID name it is possible to rewrite the properties for these images. I have included my demo CSS codes so you can see what I am doing.</p>
<div class="highlighter-rouge"><div class="highlight"><pre class="highlight"><code>/* webpage animations */
.animate {
-webkit-animation-duration: 1.5s;
-webkit-animation-timing-function: ease-out;
-webkit-animation-fill-mode: both;
-moz-animation-duration: 1.5s;
-moz-animation-timing-function: ease-out;
-moz-animation-fill-mode: both;
-ms-animation-duration: 1.5s;
-ms-animation-timing-function: ease-out;
-ms-animation-fill-mode: both;
animation-duration: 1.5s;
animation-timing-function: ease-out;
animation-fill-mode: both;
}
#imggrid img:hover {
-webkit-animation-duration: 0.6s;
-webkit-animation-timing-function: ease;
-webkit-animation-fill-mode: both;
-webkit-animation-name: swing;
-moz-animation-duration: 0.6s;
-moz-animation-timing-function: ease;
-moz-animation-fill-mode: both;
-moz-animation-name: swing;
animation-duration: 0.6s;
animation-timing-function: ease;
animation-fill-mode: both;
animation-name: swing;
}
</code></pre></div></div>
<p>By using a more specific selector we can target all the images which are located directly inside the unordered list. Then I have added a custom animation name while also reducing the total duration. This effect should run properly every time you mouse on/off the image.</p>
<h2 id="handling-input-field-entry">Handling Input Field Entry</h2>
<p>I specifically enjoy this last example because it is an effect which isn’t often seen in many websites. Yet it is a brilliant use of the animation library while applying JavaScript for checking against user data.</p>
<div class="highlighter-rouge"><div class="highlight"><pre class="highlight"><code> <h2>Handling Form Data</h2>
<form id="passwords" name="passwords" method="post" action="#">
<input type="text" name="name" id="name" placeholder="Name..." class="texty">
<button class="pill">Click for Bad Data</button>
</form>
</code></pre></div></div>
<p>The input field is using a class <code class="highlighter-rouge">.texty</code> for adding the basic CSS components. However in jQuery I am targeting the ID name – it doesn’t matter too much on your own pages as long as the effects still work. When the user clicks on our submit button we want to pretend this information is wrong or invalid, and let the user know so they can update the text.</p>
<div class="highlighter-rouge"><div class="highlight"><pre class="highlight"><code> $('form').submit(function(e){
e.preventDefault();
var timer;
$('#name').addClass('shakenform wrongdata');
clearTimeout(timer);
timer = setTimeout(function() { $('#name').removeClass('shakenform') }, 800);
});
</code></pre></div></div>
<p>Notice this time we are adding two different classes onto the form. The first class <code class="highlighter-rouge">.shakenform</code> will make the animation happen while <code class="highlighter-rouge">.wrongdata</code> will add the red border and background, also updating the text styles. We are using CSS3 transition effects so the animation and new properties blend together nicely.</p>
<div class="highlighter-rouge"><div class="highlight"><pre class="highlight"><code>/* form inputs */
form .texty {
width: 320px;
outline: none;
padding: 7px 8px;
font-size: 1.5em;
border: 1px solid #bbb;
margin-right: 16px;
font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
color: #434343;
-webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.2);
-moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.2);
box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.2);
-webkit-transition: all linear 0.2s;
-moz-transition: all linear 0.2s;
-o-transition: all linear 0.2s;
transition: all linear 0.2s;
}
form .texty:focus {
border-color: rgba(128, 148, 232, 0.8);
outline: 0;
-webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.1), 0 0 7px rgba(82, 168, 236, 0.7);
-moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.1), 0 0 7px rgba(82, 168, 236, 0.7);
box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.1), 0 0 7px rgba(82, 168, 236, 0.7);
}
input.wrongdata::-webkit-input-placeholder { color: #535353; }
input.wrongdata:-moz-placeholder { color: #535353; }
input.wrongdata::-moz-placeholder { color: #535353; }
input.wrongdata:-ms-input-placeholder { color: #535353; }
input.wrongdata {
color: #864f4f;
background: #eab8b8;
border-color: rgba(220, 90, 95, 0.8);
}
.shakenform {
-webkit-animation-duration: 0.75s;
-webkit-animation-timing-function: ease;
-webkit-animation-fill-mode: both;
-webkit-animation-name: shake;
-moz-animation-duration: 0.75s;
-moz-animation-timing-function: ease;
-moz-animation-fill-mode: both;
-moz-animation-name: shake;
animation-duration: 0.75s;
animation-timing-function: ease;
animation-fill-mode: both;
animation-name: shake;
}
</code></pre></div></div>
<p>You can also find a lot of other great styles inside my custom CSS document. Developers have been pleasantly surprised over the improvements added into CSS3. And as more browsers jump on board the bandwagon we can expect simple animations to become commonplace over the years to come.</p>
<h2 id="final-thoughts">Final Thoughts</h2>
<p>I do hope these smaller website UI examples can amount to some progress for inspired developers. Animate.css is often not enough to use on its own. However if the only animations you need can be triggered via focus or hover events, then CSS3 really is a full package solution! But keep in mind that jQuery will offer so much more control and you will find very different animations in this CSS library compared with jQuery UI.</p>
<p>See what you can build and get a feel for using the Animate library in your own projects. It is very easy to get going and once you understand the syntax it almost becomes like second nature.</p>yashumittalLots of frontend web developers have been getting interested in dynamic interfaces using motion effects. This is all too common with many advancements within popular JavaScript libraries. But there has also been a lot of interest in CSS3 animated effects.
https://cdn.codecarrot.net/images/frank-mckenna-132749.jpg
Sell more properties with these real estate website design tips2017-09-04T19:05:00+00:002017-09-04T19:05:00+00:00https://blog.codecarrot.net/sell-more-properties-with-these-real-estate-website-design-tips<p>If you don’t have a website for your business. You can get is <a href="https://www.codecarrot.net/">developed from Codecarrot</a>.</p>
<p>Your website is more than just a piece of web real estate. Properly built and maintained, a site can help you bring in more clients, more sales and greater earnings. It gives potential customers a way to explore what you have to offer, and you a way to sell your services to those who are looking for them. Your real estate website design is a dynamic representation of you, your team or your brokerage, and should be crafted with care and strategy.</p>
<p>When agents join a major brokerage firm — or even medium-sized or more localized brokerages — the onboarding package might include a provided agent website. Those joining small brokerages or going into business for themselves will usually be responsible for building their own websites.</p>
<p>Even if your brokerage does provide you with a website, there’s still a significant downside — your site now looks like 90,000 or so other sites (or perhaps even 200 local ones). How is anyone going to find you or tell you apart from the rest?</p>
<blockquote>
With the right real estate website design, you can better attract the right clients and potentially sell more properties.
</blockquote>
<h2 id="what-to-include-in-your-real-estate-website-design">What to include in your real estate website design?</h2>
<p>A large part of shopping for a home these days is online research. People want as much information as possible before ever setting foot on a property. If you can make your real estate website a resource for potential buyers, you will simplify the process. At a minimum, your site should have the following elements to meet the needs of today’s home buyer.</p>
<h3 id="1-searchable-listings">1. Searchable listings</h3>
<p>Some statistics show that 80 percent of all property shoppers search online when looking for a new home. If you have the listings right on your site, it will be easy for them to turn to you when they find the one they love.</p>
<h3 id="2-photos-photos-and-more-photos">2. Photos, photos and more photos</h3>
<p>Along with being able to search for available properties, customers should be greeted by high-quality imagery the moment they land on your website. We’re talking full-page images that exhibit the beautiful details of the properties you sell.</p>
<blockquote>
Show pictures of the available homes, pictures of properties you’ve sold, pictures of the neighborhoods in the area — show pictures of everything. And, more importantly, make it easy to view them.
</blockquote>
<h3 id="3-prominent-contact-information">3. Prominent contact information</h3>
<p>However you lay out your real estate website design, make sure your contact information is always visible on screen. In many cases, this means including a phone number in a sticky header, as well as the footer.</p>
<div class="callout">
It’s also a good idea to have a clear and concise contact page that is accessible through the main navigation of the website.
</div>
<p>Don’t have a website for your business, no worries, we will <a href="https://www.codecarrot.net/">create it for you</a>.</p>yashumittalIf you don’t have a website for your business. You can get is developed from Codecarrot.
https://i.imgur.com/hyhnTlz.jpg
50 Ways To Increase Your Twitter Followers2017-09-04T18:05:10+00:002017-09-04T18:05:10+00:00https://blog.codecarrot.net/50-ways-to-increase-your-twitter-followers<p>Twitter is a powerful tool for businesses when used correctly. It can help you generate leads, solidify your branding, and build connections with your prospects. The trouble is, if you have no followers, you can’t experience all these benefits.</p>
<p>Having an active following on Twitter isn’t just about prestige, and followers aren’t just numbers. Twitter followers hold real value for businesses; in fact, 36% of marketers say they have gained a customer by using Twitter.</p>
<p>This article will examine at 50 ways you can increase your Twitter followers, and take advantage of the many benefits of Twitter. The strategies below all fit into one of the following 4 categories:</p>
<ul>
<li>Tweeting content that’s so enticing and/or informative that it’s likely to be retweeted</li>
<li>Following others so they’ll follow you back</li>
<li>Tweeting content in a way that it actually gets seen</li>
<li>Promoting your Twitter account effectively</li>
</ul>
<p>Twitter has a great paid ads option which is very effective for acquiring followers, but in this article we’ll only consider free options (since the paid one is pretty obvious). Don’t forget to add your best Twitter tips in the comments at the end of this post!</p>
<ol>
<li>
<p>Follow more people. Research shows a correlation between the number of people followed and the number of followers.</p>
</li>
<li>
<p>Use a tool like <a href="https://www.hootsuite.com/">Hootsuite</a> or <a href="https://sproutsocial.com/">SproutSocial</a> to schedule your tweets. Posting regularly will increase your engagement and visibility, thereby increasing your follower count.</p>
</li>
<li>
<p>Use <a href="https://twiends.com/">Twiends</a> to find new Twitter users you can connect with. Once you’re listed on the platform, other users with similar interests will also be able to find and follow you.</p>
</li>
<li>
<p>Optimize your Twitter bio. Users who want to find out more about you will inevitably visit your Twitter bio. Make sure it’s professional, complete and that it does a great job of representing you and your business.</p>
</li>
<li>
<p>Use links in your tweets. Tweets with links get more retweets than those without.</p>
</li>
<li>
<p>Use relevant keywords in your bio so you rank in Twitter search. Don’t forget to include your city or region name to attract local users.</p>
</li>
<li>
<p>Use relevant hashtags in your posts. Tweets with hashtags get at least 2x more engagement, and will help you attract new followers who are searching for those keywords.</p>
</li>
<li>
<p>Ask for retweets. Tweets that include “Please retweet” in their text get 4x more retweets.</p>
</li>
<li>
<p>Find people you know by uploading your email contacts to Twitter. They are likely to follow you back, especially since they know you in real life.</p>
</li>
<li>
<p>Include images with your tweets. Research suggests that tweets with images receive 18% more engagement than those without.</p>
</li>
<li>
<p>Promote your Twitter account on all your marketing materials. This includes your business cards, brochures, signs and of course, your website.</p>
</li>
<li>
<p>Use a headshot in your profile picture, not your logo. Nobody wants to follow a faceless brand. Show there’s a real person behind your brand by using a personal photo.</p>
</li>
<li>
<p>Use the <a href="https://wordpress.org/plugins/tweetthis/">Tweet This</a> WordPress plugin to embed content boxes on your website or blog. These are great for getting your site visitors to tweet your content, expanding your reach and attracting new followers.</p>
</li>
<li>
<p>Promote your Twitter account on your other social media accounts. For best results, entice people by mentioning interesting discussions you’re engaged with on Twitter.</p>
</li>
<li>
<p>Tweet on the weekends. Dan Zarrella’s research indicates brands get 17% more engagement on the weekends than during the week.</p>
</li>
<li>
<p>Reference users in your tweets. When replying to or mentioning other users, be sure <a href="https://twitter.com/mittalyashu77">@mention</a> them. People are much more likely to engage with your tweets when they’re mentioned by name.</p>
</li>
<li>
<p>Use a <a href="https://about.twitter.com/resources/buttons">follow button</a> on your website or blog. Why not make it as easy as possible for your website visitors to find you?</p>
</li>
<li>
<p>Tweet motivational or inspirational quotes. These are great for getting retweets.</p>
</li>
<li>
<p>Respond publically when your response would be useful to others. Instead of direct messaging responses to public questions, share your knowledge publically, @mentioning the person who asked.</p>
</li>
<li>
<p>Include a link to your <a href="https://twitter.com/mittalyashu77">@username</a> in the author bio of your guest posts.</p>
</li>
<li>
<p>Listen in on relevant conversations: Using a tool like <a href="https://www.socialmention.com/">Social Mention</a>, find out what other Twitter users are saying about your brand, products or industry. Respond or answer questions where appropriate.</p>
</li>
<li>
<p>@mention influential users when relevant. This may help catch their attention, leading them to follow you or even retweet your content. Here are some other strategies for getting influencers to follow you on Twitter.</p>
</li>
<li>
<p><a href="https://support.twitter.com/articles/20169559-embedding-a-tweet-on-your-website-or-blog">Embed tweets in your website content</a>. Display particularly interesting or popular tweets in a blog post to entice your website visitors to follow you on Twitter.</p>
</li>
<li>
<p>Participate in Twitter chats. Chats are a great way to engage with your customers and prospects on a deeper level. Follow those you meet in the chat, and they’re likely to follow you back.</p>
</li>
<li>
<p>Pin an eye-catching tweet to the top of your stream. When people check out your profile, show them the best-of-the-best to entice them to follow you.</p>
</li>
<li>
<p>Find new followers using Ignitwit. Choose the topics you’re interested in and receive a list of users you should follow. They will even tell you who has chosen not to follow you back…giving you the ability to unfollow uninterested parties.</p>
</li>
<li>
<p>Ask your email subscribers to follow you on Twitter. Let them know about interesting discussions, chats or topics they can expect to find if they follow you.</p>
</li>
<li>
<p>Help others rather than just pushing your own stuff. Twitter is about helping, making connections and providing great content, not about selling your stuff. Become known as someone who puts the needs of others first, and your follower count will grow organically.</p>
</li>
<li>
<p>Use Twitter search to find users who share your interests. Follow them, engage with their content and wait for them to follow you back!</p>
</li>
<li>
<p>Participate in Follow Friday (#FF). Regularly add new followers and suggest users others should follow. Getting connected and being a connector are both key to increasing your follower count.</p>
</li>
<li>
<p>Retweet influencers and give valuable feedback.</p>
</li>
<li>
<p>Tweet the same content multiple times. Moz estimates the lifespan of a tweet at around 18 minutes. How many of your followers are actually on Twitter in those 18 minutes? Tweet out your links multiple times over the course of a day or two to give your tweets as much visibility as possible.</p>
</li>
<li>
<p>@mention users in your tweets, asking them for input. It’s hard to resist responding to a question when you’re asked by name!</p>
</li>
<li>
<p>Link to your Twitter profile on your other social media profiles.</p>
</li>
<li>
<p>Always reply to questions. Not only is this just good etiquette, but it sends the signal that you actually notice and care about your followers, and that you’re worth following.</p>
</li>
<li>
<p>Post engaging, informative content. This should go without saying, but I’ll say it anyway. Posting what you had for lunch, or your opinions about world politics, or random thoughts about life are fine, but without a solid base of valuable, relevant content, your follower count will never increase.</p>
</li>
<li>
<p>Utilize social proof by embedding a <a href="https://support.twitter.com/articles/20164833-adding-a-follow-button-to-your-website">follow button</a> with a counter on your website or blog.</p>
</li>
<li>
<p>Tweet often, but not in bursts. A Korean research study showed that a common reason why people unfollow is due to too many tweets in a short period of time.</p>
</li>
<li>
<p>Try tweeting between 1pm and 3pm when Twitter traffic is at its peak.</p>
</li>
<li>
<p>Be a generous retweeter. People like to know you’re not only listening, but that you’re willing to spread the Twitter love. The more you retweet, the more likely you are to be retweeted, and the more followers you’re likely to attract.</p>
</li>
<li>
<p>Add questions in your retweets (if possible) to increase engagement and visibility.</p>
</li>
<li>
<p>Share news that’s relevant to your audience. News is one of the most retweeted types of content.</p>
</li>
<li>
<p>Regularly offer your followers exclusive coupons. 94% of Twitter users follow brands for the discounts and promos.</p>
</li>
<li>
<p>Don’t buy fake followers! While it may be tempting to boost your numbers by paying for fake followers, these followers will never add any value to your business. Not only that, but engaging in this process <a href="https://support.twitter.com/groups/56-policies-violations/topics/237-guidelines/articles/20171936-free-followers-apps">may lead to your account being suspended</a>.</p>
</li>
<li>
<p>Use <a href="https://followerwonk.com/">Followerwonk</a> to find new people to connect with, and to find out which activities typically drive the most new followers to your account.</p>
</li>
<li>
<p>Find and follower your LinkedIn connections on Twitter. <a href="https://blog.linkedin.com/2010/05/25/find-and-follow-your-linkedin-connections-on-twitter/">Here’s how to do it</a>.</p>
</li>
<li>
<p>Make sure you have a <a href="https://about.twitter.com/resources/buttons">tweet button</a> next to each and every post on your blog.</p>
</li>
<li>
<p>Don’t focus on yourself. Tweets that contain a self-reference get retweeted less often than those that don’t.</p>
</li>
<li>
<p>Use <a href="https://dev.twitter.com/cards/overview">Twitter cards</a> to increase visibility and engagement. Add some simple code to your site, and anytime someone tweets your content, the rich media you’ve included (images, videos, etc.) will show alongside their tweet.</p>
</li>
<li>
<p>Use words like ‘you’, ‘twitter’, ‘please’ and ‘retweet’, that are more likely to get retweeted. Some words to avoid in your tweets? ‘Game’, ‘going’, ‘haha’ and ‘lol’.</p>
</li>
</ol>yashumittalTwitter is a powerful tool for businesses when used correctly. It can help you generate leads, solidify your branding, and build connections with your prospects. The trouble is, if you have no followers, you can’t experience all these benefits.
https://i.imgur.com/jShlX3y.png
Mr.Bucket for developers and designers to showcase their templates2017-09-04T13:29:00+00:002017-09-04T13:29:00+00:00https://blog.codecarrot.net/mr-bucket-for-developers-and-designers-to-showcase-their-templates<p>Mr.Bucket is an open-source platform for developers and designer offering a tailored, uncluttered experience for showcasing their templates.</p>
<blockquote>
Which is maintained by CodeCarrot
</blockquote>
<p><img src="https://cdn.codecarrot.net/images/screenshot-of-the-mrbucket-website.png" alt="Screenshot of the Mr.Bucket Website" /></p>
<h2 id="want-to-submit-your-template">Want to submit your Template?</h2>
<p>Follow the steps to submit your template at Mr.Bucket</p>
<ol>
<li>Appropriate screenshot size.</li>
<li>Fill the required YAML Data.</li>
<li>Is actively maintained.</li>
<li>Has a GitHub repository.</li>
<li>Has a working demo. <em>(Please create a real demo, don’t just use your personal blog.)</em></li>
</ol>
<h2 id="screenshots">Screenshots</h2>
<p>Screenshots can be of the following sizes: <strong>533x800</strong> or <strong>800x533</strong> (Choose any size).</p>
<h2 id="check-the-required-yaml-data">Check the required YAML Data</h2>
<ol>
<li>layout: post</li>
<li>title:</li>
<li>date:</li>
<li>categories:</li>
<li>description:</li>
<li>image:</li>
<li>demo:</li>
<li>download:</li>
<li>author:</li>
<li>license:</li>
<li>license_link:</li>
</ol>
<p><strong>Layout:</strong> Should be post only. <em>(Don’t change it)</em></p>
<p><strong>Title:</strong> Enter the name/title of the template you are submitting.</p>
<p><strong>Date:</strong> Enter the date on which you are submitting your template.</p>
<p><strong>Categories:</strong> What type of template you are uploading? <em>(For example: jekyll)</em></p>
<p><strong>Description:</strong> Give a long description about your template.</p>
<p><strong>Image:</strong> Upload the image of the template in the following directory <code class="highlighter-rouge">images/template</code>.</p>
<p><strong>Demo:</strong> URL of the template you are submitting. <em>(Please create a real demo, don’t just use your personal blog.)</em></p>
<p><strong>Download:</strong> URL of the downloadable zip file of the template.</p>
<p><strong>Author:</strong> Name of the author <em>(Owner of the template)</em>.</p>
<p><strong>License:</strong> Name of the license</p>
<p><strong>License link:</strong> URL of the license</p>
<h2 id="once-you-are-ready">Once you are ready</h2>
<ol>
<li>Fork the repository</li>
<li>Add your template</li>
<li>Make a pull request.</li>
</ol>yashumittalMr.Bucket is an open-source platform for developers and designer offering a tailored, uncluttered experience for showcasing their templates.
https://cdn.codecarrot.net/images/mr-bucket-artboard2.jpg
How to bridge the gap between Design and Development2017-09-04T12:55:00+00:002017-09-04T12:55:00+00:00https://blog.codecarrot.net/how-to-bridge-the-gap-between-design-and-development<p>It’s well known that the clash between Design and Development is not simply just a clash between people who do different stuff- it’s a clash between two ways of solving problems within given constraints.</p>
<p>To really understand what is happening between designers and developers, we need to take a look first at what is each one’s aim and how they think, when it’s different and when it’s similar.</p>
<p>Design’s aim is to accommodate a large number of factors within a single solution (visual appeal, accessibility, usability, marketing, branding, historical and geographical context, etc.) so that the largest possible number of customers will understand and use the solution.</p>
<p>Development’s aim is to direct the complexity and subtlety of a given algorithm towards the same large number of customers so that they will use it as efficiently and effectively as possible.</p>
<p>In contrast to the big and complicated pile of unorganized complexities, a designer has to confront in any project, a developer has to build a process of organized rules that will be incorporated one day in the life of many people afterward (hence, to develop an algorithm). Designers bring those complexities together to build an experimental framework (a prototype) in which developers bring those processes of rules to create a functional prototype.</p>
<div class="callout">
Without Development, Design is useless. Without Design, Development is unusable.
</div>
<p>This is probably the best difference to note if you are just starting out. In order for a solution to be useful, it has to provide efficiency, efficacy and deliver on its promises. In order for the same solution to be usable, it has to appeal to its customers and be understandable enough so that they won’t have to learn the process of rules behind the solution (take, for example, how many people don’t know how a refrigerator works, but everyone has and uses one. This is because the arrangement of controllers is designed in such a way that it easily triggers the process behind the technology, making it ready for use by anyone.)</p>
<p>The main difference between Design’s and Development’s ways of thinking is that Design is inclusive (it has to include multiple factors within the solution) and Development is exclusive (it has to exclude all the possibilities to achieve the ultimate and optimal solution). However, similarities begin here also. In order for those multiple factors and possibilities to be included and excluded respectively, they have to be perceived, which is the reason why a designer or a developer will probably never achieve a state of knowing all there is to know.</p>
<blockquote>
Design and Development are, by default, explorative domains, in which there has to be a perpetual state of discovery and learning.
</blockquote>
<p>The complex way in which Design and Development have evolved in the past years is due to the rise of all the big communities on the web comprised of people who chose to dedicate their lives to perpetual learning (see communities like Behance and Github.)</p>
<p>But the similarities don’t stop here: Design and Development are also creative domains, they both necessity a large quantity of brainpower and imagination and they are both driven by people who want to make the world a better place and solve problems.</p>
<p>So why the clashes? Why do so many teams and companies find it hard to integrate these two domains who need to work together if they wish to achieve greatness?</p>
<p>It has to do with the fact that what is truly different between these two is the way they approach problems. The design is user-oriented, their focus in on the people and how every aspect of the product will affect them. Development is solution-oriented, their focus is on the problem’s constraints and how to eliminate what is not going to be a part of the solution. The funny part is, both Design and Development will argue that theirs is the way to solve a problem. Development will say that focusing on the people is not literally solving the problem and Design will say that the problem is not really the problem. Both are right and both need to be right.</p>
<p>If Design would start to build solutions the way a developer does, we would have refrigerators that talk about how they work and how intricate and amazing they are as a technology (“.. and also look at my shiny door with three gradients on it”). In contrast, if Development would start to build solutions the way a designer does, we would have database models with flowers and emojis and great typography.</p>
<p>This is no way to start if you want to bridge the gap between them- you can’t ask them to come to terms with the opposite way of doing business since it doesn’t make sense for them to do so. Their approach to the problem is correct for the context in which they apply it. The complex, flamboyant and inclusive process of a designer is perfect for user-centered solutions and the systematical, mathematical and exclusive process of a developer is perfect for solution-centered algorithms.</p>
<p>So how to actually bridge the gap? Well, you might start by giving them this article, which points out the fact that the entire project is by default based on the idea that their approach to the same problem will be different. It’s also essential to understand each and everyone’s limitations so that conflict will not start from ignorance. Encourage your designers and developers (and if you are one of them, do this) to talk with one another about what they can’t do instead of bragging about what they can do.</p>
<p>My high school was a programming high school. The successful kids in my high school ended up to become (obviously) developers. Whenever I had a problem in my IT class, my teacher would tell me to discover for myself, which in my designer mind didn’t make sense because I wanted to communicate about the constraints in order to include them in a final, beautifully coded program. It took me 3 years to understand that this was not the way to do business in that environment and 4 to fully appreciate how the high school shaped my brain.</p>
<p>When my developer buddy left for Holland, the first thing I did was to give him a comprehensive book about design. This is how you actually bridge the gap: by promoting and rewarding understanding of the other one’s point of view so that they will be able to speak freely about the other one’s way of doing business.</p>
<p>In large projects, usually designers are the ones who want to implement intricate features that developers don’t have yet the means of building- developers get angry because designers dream too big and too much and designers get angry because developers don’t want to “get it” when it comes to how those intricate features will help the user.</p>
<p>The truth is, here lies the challenge: making use of everyone’s limitations can be achieved only when both parties understand those limitations. That’s why it’s so important for you to promote this understanding with everyone you work. The only way to achieve greatness is to learn about the stuff you don’t use so that you can integrate the stuff you use within them.</p>yashumittalIt’s well known that the clash between Design and Development is not simply just a clash between people who do different stuff- it’s a clash between two ways of solving problems within given constraints.
https://cdn.codecarrot.net/images/designer-rotating-head-and-developer-up-down.gif
Want to Write for Us? Here’s What to Publish (and we pay!)2017-09-04T06:30:00+00:002017-09-04T06:30:00+00:00https://blog.codecarrot.net/want-to-write-for-us<p>Is your writing goal to get published by one of your favorite websites?</p>
<p><strong>CodeCarrot is looking for writers (contributors) with exceptional skills.</strong></p>
<p>Content demand for the CodeCarrot’s blog is growing rapidly, and we are expanding our network of external writers. We’re looking for experienced writers who can deliver high-quality blog posts.</p>
<p>CodeCarrot seeks practical, actionable advice on business, growth, project management, design, coding, tips and tricks that will help people in their own journey.</p>
<p>👉 Requirements:</p>
<p>✅ Experience in professional writing</p>
<p>✅ Impeccable spelling and grammar</p>
<p>✅ Understanding of online audiences</p>
<p>✅ Excellent research skills</p>
<p>✅ Fluency in English</p>
<p>The demand for articles may vary, and contributors looking to send readers to their website or portfolio can opt for a link in their bio of payment.</p>
<h2 id="ready-to-get-started-consult-this-checklist">Ready to get started? Consult this checklist:</h2>
<ul>
<li>To get a sense for the type of work we publish, <a href="/">read our site</a>! That’s the best way to familiarize yourself with our voice and style.</li>
<li>Then, <a href="https://codecarrot.freshdesk.com/support/solutions/folders/35000173707">check out our contributor guidelines</a>. We love writers who pay close attention to detail and submit their posts in our preferred manner.</li>
<li>Share your Dropbox Paper with <strong><a href="mailto:yashu@codecarrot.net">yashu@codecarrot.net</a></strong>. Make sure we can edit it.</li>
<li>Allow one-two weeks for a response to your pitch or submission before following up (We get a lot of ‘em!).</li>
</ul>
<p>What topics would you like to see covered on CodeCarrot Blogs? You can comment below.</p>
<p>Let me know if you have any further questions, drop an email at <strong><a href="mailto:blog@codecarrot.net">blog@codecarrot.net</a></strong> or start a chat with us.</p>yashumittalIs your writing goal to get published by one of your favorite websites?
https://i.imgur.com/WKvXrHi.jpg
How to Become a Digital Marketing Expert Through Blogging2017-09-03T17:49:00+00:002017-09-03T17:49:00+00:00https://blog.codecarrot.net/how-to-become-a-digital-marketing-expert-through-blogging<p>Once you <a href="/how-to-start-a-blog-a-step-by-step-guide-for-writer">start a blogging website</a>. There is no other way you left behind to start getting traffic on your website.</p>
<p>Even after doing too much of marketing effort, people find it difficult to believe that you can actually become a digital marketing expert through blogging. Here I’ll explain how blogging can help you become a digital marketing expert.</p>
<p>Digital marketing has several aspects to it. The market has grown so big that each of these modules needs a separate expert inside a company.</p>
<p>Some of the major modules in digital marketing are as follows:</p>
<ol>
<li>Content Marketing</li>
<li>Search Engine Optimization</li>
<li>Search Engine Marketing</li>
<li>Social Media Marketing</li>
<li>Social Media Advertising</li>
<li>Email Marketing</li>
<li>Marketing Automation</li>
<li>Analytics</li>
<li>Integrated Digital Marketing</li>
<li>Guest Posting</li>
</ol>
<p>To become a true digital marketer, you should be able to conduct high-quality digital marketing campaigns to help build brands from scratch. And, to do so, you need to know how to leverage all the skills mentioned above. And, if you want to become a specialist in one of those skills, you need to go deeper in it and master it.</p>
<p>In digital marketing, we call this a T-shaped marketer. The horizontal line of the ‘T’ is knowing all the basic components to be a good digital marketer and the vertical line of the ‘T’ is becoming a specialist in one of the component.</p>
<p>To master one of the mentioned skills, it will take a lifetime and it’ll be almost impossible to do so with the traditional method of learning. You can only become a master when you successfully apply the knowledge, not when you complete the learning. And, considering the fast-changing nature of the skills, you’ll need to constantly learn and apply.</p>
<p>Now, let’s look into each one of the skills and how blogging can help you to master it.</p>
<h2 id="content-marketing">Content Marketing:</h2>
<p>Content marketing is the hottest skill that’s in huge demand. Content marketing is not just writing a blog post or article and publishing it online.</p>
<p>According to Seth Godin, content marketing is the only marketing that remains. It has gained more traction as more and more businesses are starting to realize the importance of it. And it is mainly because the ads are becoming inefficient by each day.</p>
<p><strong>How can Blogging Help You Master Content Marketing?</strong></p>
<p>The three important phases of content marketing are — planning, creation, and promotion.</p>
<p>You sitting down to put together the blogging calendar for a month is more or less equal to content marketing planning phase. With each blog post idea, you have a goal — what you want to achieve through that particular blog post and a plan — how you’re going to achieve the goal aka what to write in the post. If you’re not doing this activity, there is a good chance your posts will not be helping you to achieve your bigger goals.</p>
<p>When you start writing the blog post, you do a bit of research on the topic or idea, then create an outline first and then you set off to write the blog post, edit it and publish it. It is equal to the content creation phase. researching, outlining, writing, editing and publishing are the core steps of the content creation process. With each blog post you write, you’ll be able to refine each of the steps and in time, you’ll be mastering it.</p>
<p>Blogging doesn’t stop with publishing what you’ve written. Getting visitors to read, share and promote is the next important step. Most of the bloggers neglect this step or fail at this and that results in the premature death of their blog.</p>
<p>Experts recommend that if you spend 40% of your time in writing the blog post, then you need to spend 60% of your time in promoting it. When it comes to promotion, you have plenty of options - social media marketing & advertising, search engine optimization & marketing, email marketing etc. We’ll discuss them when we approach those skills. Here you learn the promotion phase of the content marketing.</p>
<p>It’s how blogging helps you to master content marketing.</p>
<h2 id="search-engine-optimization">Search Engine Optimization</h2>
<p>Search Engine Optimization, popularly known as SEO is the most sought after and the most difficult skill to master. Google is tweaking its ranking algorithm 200 times a year which keeps the practitioners on their toes as the tactics that worked before could become useless at the instant Google pushes an update.</p>
<p>When you write your blog post, you would’ve done keyword research to pick the right keyword to focus and competitor research to know what kind of content your competitors have published. Those two steps are the starting of a good SEO process.</p>
<p>While writing the blog post, you’ll be using the ‘target keyword’ in the right areas to improve the ranking possibilities of that article. Also, you’ll be using it in the URL and anchor texts. It is the ‘on page optimization’ part of SEO.</p>
<p>Once publishing the post, you’ll be reaching out to influencers to promote your blog. You’ll use social channels to promote it. You’ll also consider tactics like using PR coverage or commenting or posting the blog post link in the communities or using social bookmarking etc. Those steps are part of the ‘link building’ component of the SEO.</p>
<p>So, while focusing on writing and promoting your blog post, you’re mastering the crucial components of SEO.</p>
<h2 id="search-engine-marketing">Search Engine Marketing</h2>
<p>If you really want to excel at blogging, you cannot just rely on the organic traffic. As it might take a while to receive the organic traffic to your new blog posts, you can leverage Google AdWords and Bing Ads to gain instant traction. Since you’ll be focusing on research or awareness keywords for ads, it won’t be costing you much. Also, you don’t have to focus only on AdWords or Bing Ads, you can try and test second tier and third tier players like 7Search, AOL search etc.</p>
<p>And, if you chose to use this tactic, you’ll be learning to create ad campaigns, writing adverts, measuring and optimizing the ads which mean, you’ll be mastering search engine marketing aka PPC advertising.</p>
<h2 id="social-media-marketing">Social Media Marketing</h2>
<p>Social is an essential component to succeed in blogging and in earlier times blogging is considered as a social media activity because your blog posts can evoke comments, likes, and shares from the readers. To leverage social media to drive interactions, you need to learn the right time to post on social medias and to craft social media posts that get likes and shares. When you do it, you’ll be learning and mastering social media marketing.</p>
<h2 id="social-media-advertising">Social Media Advertising</h2>
<p>It’s a known factor that Facebook doesn’t want to you get much of free likes and shares and the organic reach for the posts are diminishing by the day. Running successful social media ads have become a crucial component to succeed as a blogger. Many bloggers have failed to recognize this change and adapt to it and it has cost them, robbing many of their readers and the shares from them. This opens up the path to learn and master social media advertising.</p>
<h2 id="email-marketing">Email Marketing</h2>
<p>List building and blogging go hand in hand and any successful blogger (or the ones who want to become a successful blogger) will focus on it. Also, as part of monetizing the blog, bloggers use email to support their revenue generation plans. Keeping the readers updated with the latest blog posts through weekly newsletters, engaging readers with email only contents and promoting products and services through emails are few of the email tactics commonly used by the bloggers. And those tactics are the most important components of email marketing. When you build, manage and engage your email list, you are also en route to mastering email marketing.</p>
<h2 id="marketing-automation">Marketing Automation</h2>
<p>Most savvy bloggers automate their marketing. When a new blog post is published, it is automatically posted on their social media profiles, submitted to ping servers and added to the sitemap. Also, they segment and show relevant content and ads to their readers based on the source of the visit. With email automation, they can tag, segment and promote relevant content and offers. All these are part of the marketing automation skill set and blogging can help you learn it effectively.</p>
<h2 id="analytics">Analytics</h2>
<p>You need to know about your blog readers - where do they come from, what do they consume, where do they leave, how much time they spend and what actions they take and analytics tools like Google helps you with it. Mastering such analytics tools is important for a blogger to improve his game by publishing more blog posts in the topics that get more readership, likes, and shares. Every good blogger will be a pro analytics user.</p>
<h2 id="integrated-digital-marketing">Integrated Digital Marketing</h2>
<p>By now, you would’ve realized that becoming a successful blogger is not luck-dependent. it depends on how well you’re using the marketing channels and tactics together to achieve the best results. Using two or more marketing channels and tactics to achieve results is termed as integrated digital marketing. And, if you’re truly focusing on driving the best results to your blog, you’ll be automatically mastering the integrated digital marketing skill. I guess now, how you can become a digital marketing expert through blogging is clear.</p>
<p>If you’re serious about blogging and do everything it takes to make it a successful one, you’ll eventually end up becoming a digital marketing expert.</p>
<h2 id="guest-posting">Guest Posting</h2>
<p>Guest is an effective and economical way of increasing website traffic. Today, guest posts have evolved as credible means of building good business reputation. So if you want your content to rapidly rank on the first page of Google, learn what guest blogging is all about.</p>
<p>Here’s the <a href="https://www.izideo.com/blog/list-sites-accepts-guest-posting/?utm_source=codecarrot_blog&utm_medium=website">list of the website</a>, that accept guest posts.</p>yashumittalOnce you start a blogging website. There is no other way you left behind to start getting traffic on your website.
https://i.imgur.com/1vdgLTG.jpg
How to Write a Blog Post People Want to Read2017-09-02T18:30:46+00:002017-09-02T18:30:46+00:00https://blog.codecarrot.net/how-to-write-a-blog-post-people-want-to-read<p>If you have some blog and want to share it with world. Get your own blogging website with <a href="https://www.codecarrot.net">Codecarrot</a>.</p>
<p>Creating a <a href="/how-to-start-a-blog-a-step-by-step-guide-for-writer">perfect blog post</a> is so much more than slapping a few hundred words on a document, uploading it to your website and them <a href="/5-meaningful-ways-to-make-money-blogging">making money from it</a>.</p>
<p>There’s a craft to writing blog posts that are engaging and fun but also <a href="/9-seo-tips-improve-website-performance-drive-traffic">optimized for search engines</a> in a way that’ll bring you more traffic.</p>
<p><strong>If you want to create a blog post that drives traffic and gets people sharing with others, there’s a kind of formula you have to follow.</strong></p>
<p>But what makes a blog post better than others?</p>
<p>Which ingredients are necessary to not only keep people interested and sharing but also get your post to rank highest on search engines?</p>
<p>Here’s what you need to craft a perfect blog post:</p>
<ul>
<li>A catchy title and sub-headers</li>
<li>Interesting, relevant images</li>
<li>Search engine optimization</li>
<li>Helpful, factual information</li>
<li>Lots of personality</li>
</ul>
<p>Writing a great blog post isn’t as easy as just that. First you have to hone these skills and put them to use in the <em>right way</em>. If you want to increase traffic and engagement, this is what you’ll want to do.</p>
<h2 id="1-choose-a-unique-idea-and-a-killer-title">1. Choose a unique idea and a killer title</h2>
<p>I bet you have tons of great ideas for blog posts. Lots of people have great ideas and that means people probably have very similar ideas to yours.</p>
<p>The issue with this is that people don’t want to read the same blog post over and over again when they’re looking for specific information. They want exactly that – <em>specifics</em>.</p>
<p>Which means you have to think up a topic and <strong>create a unique spin on a broader idea</strong>.</p>
<p><strong>For example:</strong> if you want to write about how to moisturize your hair, you can’t just choose the topic, “how to moisturize your hair.” It’s way too broad of an idea and people will gloss right over it. Plus, there are tons of blog posts covering the exact same thing.</p>
<p><strong>You want to show people that your blog has something new and fresh to offer.</strong></p>
<p>To do this, you have to narrow the general idea into something more specific like, “how to moisturize your hair with 5 natural items from your kitchen.” With this idea, you’ve just created a unique title and a fresh angle on a much bigger idea.</p>
<p>And this way, you’ll also get the right readers to gravitate toward your blog by giving them the direct information they’re looking for while showing them your blog niche.</p>
<h2 id="2-use-headings-and-white-space">2. Use headings and white space</h2>
<p>People want to be able to find what they’re looking for easily. When you present them with a huge block of text and nothing to separate any of your ideas, they’ll leave.</p>
<p>Many of us get intimidated by large amounts of text. Not because we can’t read it, but because we don’t want to take the time to read through it when <strong>we can easily find the information in a few seconds on a different site</strong>.</p>
<p>If you want someone to stay on your website long enough to actually benefit, they’ll need to be able to find the information they want <em>quickly</em>.</p>
<p>Breaking up your big blocks of text and labeling them with obvious — yet helpful — titles is a great way to capture attention. You can also add to this by throwing in bolded phrases and making the font bigger with the main ideas you want people to take away from your blog post.</p>
<h2 id="3-write-with-personality">3. Write with personality</h2>
<p>People don’t want to read something that sounds like a computer generated it. It’s boring and makes them think there isn’t a real person behind the content they’re reading.</p>
<p>So if you really want people to relate to what you’re saying and actually enjoy reading your blog, you need to throw in some of your personality. You need to have a voice.</p>
<p>That may sound easy enough but if you’re not used to writing how you speak, it could be a struggle. Here’s how you can make sure you’re breathing life into your blog post:</p>
<ul>
<li>Read it out loud and fix choppy sentences</li>
<li>Add in phrases you actually say a lot</li>
<li>Throw in some jokes</li>
<li>Tell a story related to the topic (this also adds credibility!)</li>
</ul>
<p>All of these can help you find issues and ensure you’re putting the real you into the words instead of robotically typing them.</p>
<p>Another way to make your blog post more personable is to change the font style. You talk with certain inflections on different words. In order to show that and have people actually read the content the way it sounds in your head, use italics or <strong>make important sentences bold</strong>.</p>
<h2 id="4-add-relevant-images">4. Add relevant images</h2>
<p>People are visual creatures. We love connecting ideas with images. Which means you should be adding photos into your content if you want to have the perfect blog post.</p>
<p><strong>Blog posts with photos get 94% more views than those without them.</strong></p>
<p>Now, this doesn’t give you permission to litter your content with random photos. They need to make sense and add to the content you’re writing. They should be offering something extra that words alone can’t.</p>
<p>But you can’t just choose any photo you can get your hands on.</p>
<p>The actual photos you use also play a huge role in reader engagement and can result in a positive or negative outcome depending on the quality of the image.</p>
<p><strong>Incorporating <a href="/15-free-places-to-find-stock-photos-for-your-blog">high-quality photos into your blog</a> post adds to your credibility.</strong></p>
<p>How many times have you been on a website only to click the “back” button when you see they have super low quality photos? If you’re like the rest of us, probably a lot.</p>
<p>Not having great photos shows people that the rest of your website may not be high quality, either. Thankfully, there are a ton of places you can find high quality photos in your niche for free.</p>
<p>You just have to know where to look.</p>
<h2 id="5-optimize-your-blog-post-for-search-engines">5. Optimize your blog post for search engines</h2>
<p>Still not getting the traffic you want?</p>
<p><a href="/9-seo-tips-improve-website-performance-drive-traffic">Search engine optimization (or SEO)</a> is crucial for getting your blog post to rank higher when people type in your keyword on Google.</p>
<p>The most important part of great SEO is the keyword. You need to find a word or phrase that readers are actively searching for on Google. Once you have that, you need to put it to use in all the right places.</p>
<p>Where to use your keyword:</p>
<ul>
<li>Once in the title</li>
<li>Once in the first paragraph of the content</li>
<li>At least in one subheading</li>
<li>Within the body content (but not too much)</li>
<li>In the last paragraph of your content</li>
<li>In the “alternate attributes” section of your in-text photos</li>
</ul>
<p><strong>Other ways to optimize your blog post for search engines:</strong></p>
<ul>
<li>Use internal links to other content on your blog</li>
<li>Use subheadings so people can find what they need easier</li>
<li>Structure it with a lot of white space and smaller paragraphs</li>
<li>Guest post on high-traffic websites — get those backlinks!</li>
</ul>
<p>There may be a lot of reasons you’d want to grow your blog. Whether it’s to increase your income or simply to have your voice be heard by a wider audience, the process is very much the same.</p>
<p>Knowing how to create the perfect blog post is essential for allowing others to find your blog in the black hole that is the internet and share your amazing content with others. Those two ingredients are what you need to build a successful blog and the above steps will help get you there.</p>yashumittalIf you have some blog and want to share it with world. Get your own blogging website with Codecarrot.
https://i.imgur.com/dCDWw8C.jpg
How to Start a Blog - A Step-by-Step Guide for Writers2017-09-02T18:30:18+00:002017-09-02T18:30:18+00:00https://blog.codecarrot.net/how-to-start-a-blog-a-step-by-step-guide-for-writer<p>So you want to start a blog?</p>
<p>If you’re a writer, it makes perfect sense: You can use a blog to serve as your author platform, market your book or find new freelance writing clients.</p>
<p>But where do you begin? Though you’ve got the writing part down, the rest of the process can be overwhelming. Hosting, themes and all that other techy stuff can stand in your way for years.</p>
<p>Well, today is the day that ends. <strong>We’re here to help you navigate every step of starting a blog, from choosing your domain name to publishing your first post</strong>.</p>
<p>Here’s <strong>how to start a blog</strong> as a writer:</p>
<h2 id="1-pick-a-domain-name">1. Pick a domain name</h2>
<p>First things first: Where are people going to find you online? As a writer, you are your brand, so we recommend using some variation of your name. To check availability, simply visit the domain registrar website and search for the domain name you are looking for.</p>
<p>If none of the obvious options are available, try tacking a “writer” onto the end of your name, as in <code class="highlighter-rouge">codecarrotwriter.com</code>. You could also use a “.net” or “.biz” domain, but keep in mind that most people automatically type in “.com” before thinking of other endings.</p>
<p>You can, of course, opt for a creative blog name, but remember that your interests and target audience may change as the years go by. May be in future you plan to writer blog on other topic.</p>
<p>If you don’t want to use a new brand name for your blogs, then go for your own name, because your name won’t change, no matter what you’re blogging about.</p>
<h2 id="2-purchase-a-hosting-package">2. Purchase a hosting package</h2>
<p>Now that you’ve picked out your domain name, it’s time to choose a web host. Your hosting company does all the technical magic to make sure your site actually appears when people type your newly anointed domain name into their browser.</p>
<h2 id="3-coding-and-designing">3. Coding and designing</h2>
<p>Don’t worry, you don’t have to do the techy stuff of coding and designing, <a href="https://www.codecarrot.net/">we’re here to do</a> it.</p>
<p>To get started all you need is to visit <a href="https://www.codecarrot.net/">codecarrot.net</a> and start a chat, one of our representative will happy to help you.</p>
<h2 id="4-start-your-email-list">4. Start your email list</h2>
<p>I know, I know — you haven’t even started posting blog and you’re glad to do it.</p>
<p>Starting an <a href="/beginners-guide-to-starting-an-email-list">email list</a> is a great way to bring traffic to your website, buys of my products and opportunities you never could expect.</p>
<p>Even if you don’t have anything to send, just start collecting email addresses. The best way to entice people to sign up is by offering a free ebook or resource.</p>
<h2 id="5-write">5. Write</h2>
<p>If you really want to start a blog, you’re going to need to… start blogging.</p>
<p>We recommend creating an editorial calendar — even if it’s just you blogging. It doesn’t have to be fancy; it can even be scribbled out in a notebook.</p>
<p><strong>What’s important is that you plan your posts in advance, so you can keep track of your ideas and stick to a schedule.</strong> It’s also a chance to assess and tweak your content strategy. What do you want to write about? How will you draw the readers in?</p>
<p>Don’t forget you’re writing for the web, so your style should be different than if you were writing for print. Keep your tone conversational, use “you” phrases to speak to the reader and break up text with bullet points and sub-headers. Keep SEO in mind, but don’t make it the focus of your writing.</p>
<h2 id="6-promote-promote-promote">6. Promote, promote, promote</h2>
<p>You’re almost there! Now that you’ve started writing, it’s time to get readers. And I hate to be the bearer of bad news, but for many writers, this is one of the most surprisingly time-consuming aspects of blogging. Though it’d be nice if we could just write (that’s what we love to do, right?), it’s nicer to have people actually reading your work.</p>
<p>One of the best ways to attract new readers is guest blogging on more popular blogs. Social media is another great way to get more traffic to your new blog. In addition to sharing your posts and networking with fellow bloggers, make sure you’re constantly trying to grow your author following on social media.</p>
<p>You can also <a href="/how-to-increase-website-traffic-with-existing-content">increase traffic on your blog website with existing content</a>.</p>yashumittalSo you want to start a blog?
https://i.imgur.com/otGpmm7.jpg
What is HTML5?2017-09-02T12:25:00+00:002017-09-02T12:25:00+00:00https://blog.codecarrot.net/what-is-html5<p>In this article, you will learn an overview of HTML5, including a look at some of the new tags now available to designers and developers. If you want to learn how to take advantage of all the new features of HTML5, continue reading this article!</p>
<p><strong>Let get started!</strong></p>
<p>HTML5 is the latest edition of HTML or hypertext markup language.</p>
<p>Some pieces of it are not fully supported in every browser, but that doesn’t mean that you shouldn’t start taking advantage of all that it has to offer.</p>
<p>It is comprised of several parts there are new browser API’s and features like Drag and Drop, Geolocation, the canvas element, web storage, and more.</p>
<p>If you are new to HTML5, you’re probably more interested in the new elements or tags that are available.</p>
<p><img src="https://cdn.codecarrot.net/images/screenshot-of-the-basic-html5-code.png" alt="Screenshot of the basic html5 code" /></p>
<h2 id="1-html5-doctype">1. HTML5 doctype.</h2>
<div class="language-html highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="cp"><!DOCTYPE html></span>
</code></pre></div></div>
<p>This is much shorter than previous versions of HTML, it’s also case insensitive. However, it’s still a good idea to type the word <code class="highlighter-rouge">DOCTYPE</code> in all caps to help with backward compatibility with the older browser.</p>
<h2 id="2-header--footer-elements">2. Header & Footer elements</h2>
<div class="language-html highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="nt"><header></span>This is a header<span class="nt"></header></span>
<span class="nt"><p></span>This is a paragraph<span class="nt"></p></span>
<span class="nt"><footer></span>This is a footer<span class="nt"></footer></span>
</code></pre></div></div>
<p>Header and footer elements help in labeling the top and bottom of either the entire document, specific sections or both.</p>
<h2 id="3-nav-element">3. Nav Element</h2>
<div class="language-html highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="nt"><nav></span>
<span class="nt"><ul></span>
<span class="nt"><li></li></span>
<span class="nt"><li></li></span>
<span class="nt"></ul></span>
<span class="nt"></nav></span>
</code></pre></div></div>
<p>Nav element helps us to structure the navigation of our web pages in this case we’re using an unordered list to structure our navigation.</p>
<h2 id="4-section-element">4. Section Element</h2>
<p>Section element just helps us in breaking the specific sections of our website.</p>
<h2 id="5-address-element">5. Address Element</h2>
<div class="language-html highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="nt"><address></span>
<span class="nt"><a</span> <span class="na">href=</span><span class="s">"#"</span><span class="nt">></span>Click here<span class="nt"></a></span>
<span class="nt"></address></span>
</code></pre></div></div>
<p>Address element is used to wrap various types of addresses.</p>
<p>Do you also <a href="//www.codecarrot.net">want a website</a> for yourself? Get a successful project with <a href="//www.codecarrot.net">Codecarrot</a>.</p>yashumittalIn this article, you will learn an overview of HTML5, including a look at some of the new tags now available to designers and developers. If you want to learn how to take advantage of all the new features of HTML5, continue reading this article!
https://cdn.codecarrot.net/images/what-is-html5.png
PSD to HTML is Dead2017-09-02T11:55:00+00:002017-09-02T11:55:00+00:00https://blog.codecarrot.net/psd-to-html-is-dead<p>PSD to HTML tutorials are all over the web. In fact, many people have asked me is it worth converting PSD to HTML. There are lots of companies that will accept a PSD and convert it to a webpage for roughly $100 USD.</p>
<p><img src="https://cdn.codecarrot.net/images/google-search-on-psd2html.png" alt="Google Search on PSD to HTML" /></p>
<p><em>Google returns more than 48 million results for a “psd to html” search. It’s popular, but not the best way to make websites.</em></p>
<p>If it’s so popular, then how can I say that it’s dead? Well… I wish every web design quandary could fit into a poetic 140 character tweet, but this is a fuzzy issue that demands a more articulate explanation. Let’s dig in.</p>
<h2 id="what-is-psd-to-html">What is PSD to HTML?</h2>
<p>In general, “PSD to HTML” is a workflow. First, a web page is designed in a Photoshop Document (PSD) and then converted to code (using HTML, CSS, and JavaScript). You could swap Photoshop with any other image editor (like Pixelmator, GIMP, and so on), but the principle is the same. Here’s a slightly more detailed step-by-step breakdown:</p>
<ol>
<li>Design a high fidelity pixel-perfect mockup in Photoshop of exactly what you want your site to look like.</li>
<li>Use the slice tool to divide your website’s imagery and then export it for the web.</li>
<li>Write HTML and CSS that utilizes the imagery you exported from Photoshop.</li>
</ol>
<p>At first glance, this might seem like a good idea. It can be difficult to start coding if you don’t know what the final result is going to look like, so experimenting in Photoshop first and then “exporting” it to HTML sounds like a granular and sensible process.</p>
<p><img src="https://cdn.codecarrot.net/images/exporting-the-file-for-web-in-photoshop.png" alt="Exporting the file for web in Photoshop" /></p>
<p><em>In Photoshop, the slices feature in the save for web dialog used to be an essential tool for designers saving assets from a PSD. It made it easy to “slice” a design into images and then layout in a web page using HTML and CSS.</em></p>
<p>Taking this idea further, many web companies have used PSD to HTML as a template for team workflows. In other words, a designer creates the Photoshop mockup and then hands it over to a developer that writes all of the code. In modern times, the job role of a web designer tends to encompass aesthetics as well as HTML and CSS coding.</p>
<h2 id="was-psd-to-html-ever-a-good-idea">Was PSD to HTML ever a good idea?</h2>
<p>Yes, PSD to HTML workflows used to be one of the best ways to make websites. There’s two big reasons why PSD to HTML used to make sense.</p>
<p>The first reason is for image assets. Before browsers supported all the wonderful features of modern CSS (drop shadows, rounded corners, gradients, and more) it was very difficult to create cross-browser effects without the use of images. Designers would create shadows and rounded corners as images, then clever coding tricks were used to place the imagery on the page. These assets would need to be realized no matter what, so creating them at the same time as the high fidelity mockup actually saved time.</p>
<p>Secondly (and perhaps more importantly) the web used to only be available on desktop browsers and wasn’t really present on phones and tablets in the way it is today. Designing for one fixed resolution of 1024×768 used to be totally viable.</p>
<p>For these two reasons, it’s understandable why a designer would look to Photoshop as their primary web design tool. Image assets were needed for a single screen resolution.</p>
<h2 id="whats-wrong-with-psd-to-html-now">What’s wrong with PSD to HTML now?</h2>
<p>When pitted against other areas of art and technology, the web is a relatively young medium and things change fast. I’ve made dozens of websites using some variation of the PSD to HTML mindset and I’m sure many people reading this have done the same, but it’s time to move on. Here are the primary reasons why I believe thinking in terms of PSD to HTML is dead.</p>
<h2 id="responsive-web-design">Responsive Web Design</h2>
<p>First, there are now a myriad of methods for browsing the web. Phones, tablets, desktops, notebooks, televisions, and more. There is no single screen resolution that a designer can target. Taking that idea a few steps further, there’s really no number of screen resolutions that you can safely “target” anymore.</p>
<p><img src="https://cdn.codecarrot.net/images/different-screensizes-website-screenshot.png" alt="Different screen sizes website screen shot" /></p>
<p>I’m not going to delve into the finer details of <a href="/10-reasons-website-needs-mobile-optimized">responsive web design</a> or scalable design, but the point is that Photoshop is pixel based. Web pages are fluid and change.</p>
<h2 id="css-design">CSS Design</h2>
<p>Second, new features in CSS have now become commonly available. There are still a few lingering issues here and there, but support has vastly improved in the last several years. Common effects like shadows, gradients, and rounded corners can be accomplished in CSS and usually don’t even need an image-based fallback anymore.</p>
<h2 id="maturity">Maturity</h2>
<p>Third, the web industry has grown up a lot. Collectively we’ve had more time to refine our present understanding of what works and what doesn’t. Most companies will expect a designer to take ownership of aesthetics as well as HTML and CSS code.</p>
<p>This also means there are much better tools to support modern workflows. CSS frameworks like Bootstrap and Foundation make it more viable to design in the browser. Apps like Balsamiq and Omnigraffle help to wireframe sites rapidly. Pencil and paper mockups have stood the test of time because they allow for extremely rapid iteration.</p>
<h2 id="does-this-mean-photoshop-is-dead">Does this mean Photoshop is dead?</h2>
<p>No! Not even close. Photoshop is still very important to web design. The problem comes in when a powerful tool like Photoshop is used as a catch all solution without thinking of the higher level task (designing websites). Photoshop is awesome for editing and exporting photographs for web usage. There’s also plenty of situations where it still might make sense to generate full detail mockups (in Photoshop, Illustrator, or otherwise) as part of a more complete process. Here are a couple of examples:</p>
<ul>
<li>High fidelity mockups can be a critical communication tool when working with web design clients. It might seem faster to skip a high detail mockup, but it could hurt later on, because many clients aren’t going to understand how a wireframe will translate to a web browser. A high fidelity mockup can serve as a discussion tool before writing lots of code (only to discover it’s not what the client wanted).</li>
<li>High fidelity mockups can be very important when working in medium to large sized teams. We often will create high res mockups at CodeCarrot when planning new courses or designing new features of our site, because it’s a powerful way to sync everyone’s mental model of what a feature will look like or how a project might look once it’s finished.</li>
</ul>
<p>These two examples have a key difference from the PSD to HTML way of thinking. High detail mockups are still sometimes generated, but not so that they can be “tossed over the fence” to a team of developers or sliced up into code. Rather, Photoshop mockups can be used as a visual aid to discuss ideas. In a PSD to HTML workflow, the Photoshop document represents the final site and it’s expected to look exactly the same in the browser. This is a subtle but important difference.</p>
<h2 id="different-strokes">Different Strokes</h2>
<p>Everyone’s workflow is different and nobody knows how to make the perfect website. You should always do whatever is most effective for you and your colleagues. Pushing pixels around in Photoshop is a ton of fun, but I can admit to many occasions when I’ve pushed the pixels too far. The key is to know yourself and what makes you perform at your best.</p>
<p>Looking for a <strong>customized website</strong> for your business or project. Let’s make it possible with <a href="//www.codecarrot.net/">CodeCarrot</a>.</p>yashumittalPSD to HTML tutorials are all over the web. In fact, many people have asked me is it worth converting PSD to HTML. There are lots of companies that will accept a PSD and convert it to a webpage for roughly $100 USD.
https://cdn.codecarrot.net/images/psd-to-html-is-dead.png
12 powerful productivity apps for business2017-09-02T10:16:00+00:002017-09-02T10:16:00+00:00https://blog.codecarrot.net/12-powerful-productivity-apps-for-business<p>Small business owners wear many different hats throughout the day. The constant juggling between tasks can be overwhelming. As a result, it’s possible for important details to get lost in the shuffle. Rein in your tasks and make room to earn more with these 12 powerful productivity apps for business.</p>
<h2 id="12-productivity-apps-for-business">12 productivity apps for business</h2>
<ol>
<li><a href="https://www.activeinboxhq.com/">ActiveInbox</a></li>
<li><a href="https://www.google.com/drive/">Google Drive</a></li>
<li><a href="https://asana.com/">Asana</a></li>
<li><a href="https://slack.com/">Slack</a></li>
<li><a href="https://evernote.com/">Evernote</a></li>
<li>iScanner
<ul>
<li><a href="https://play.google.com/store/apps/details?id=com.bpmobile.iscanner.free&hl=en">Android</a></li>
<li><a href="https://itunes.apple.com/us/app/iscanner-pdf-document-scanner-app/id1035331258?mt=8">Apple</a></li>
</ul>
</li>
<li><a href="https://buffer.com/app">Buffer</a></li>
<li><a href="https://www.skype.com/en/">Skype</a></li>
<li><a href="https://www.waveapps.com/">Wave</a></li>
<li><a href="https://www.proven.com/">Proven</a></li>
<li><a href="https://toggl.com/">Toggl</a></li>
<li><a href="https://www.lastpass.com/">LastPass</a></li>
</ol>
<h2 id="in-conclusion">In conclusion</h2>
<p>As a small business owner, it can be a struggle to keep up with daily activities. These powerful productivity apps for business should help you monitor tasks, communicate with employees and clients, and get rid of clutter. Having more time and headspace gives you the opportunity to come up with creative ideas and generate more income.</p>yashumittalSmall business owners wear many different hats throughout the day. The constant juggling between tasks can be overwhelming. As a result, it’s possible for important details to get lost in the shuffle. Rein in your tasks and make room to earn more with these 12 powerful productivity apps for business.
https://i.imgur.com/eH2N6W5.jpg
5 Excellent Ways to Improve Your Coding Confidence2017-09-02T09:51:00+00:002017-09-02T09:51:00+00:00https://blog.codecarrot.net/5-excellent-ways-to-improve-your-coding-confidence<p>Starting out in the professional development arena is pretty daunting. I’m self taught and I don’t have a degree. Broaching my first full time position was pretty scary. What would the interviewer think? Am I ready? The truth is I was, but I wish I knew what I knew now because I’d be more confident. Here are five tips to improve your coding confidence, whether it’s your first or fiftieth job position.</p>
<h2 id="1-practice-practice-practice">1. Practice, Practice, Practice</h2>
<p>Firstly you need to build your own confidence in your own abilities. You can only go so far following along with tutorials online. You need to build something of your own. In many professional settings you don’t want to reinvent the wheel, but it can be helpful for a learning exercise. Build your own blog in PHP, build a JavaScript plugin, get a feel for how these things work, so you’ll have the confidence using pre-packaged applications and plugins in your job. Fail fast and often.</p>
<p>Don’t feel obligated to finishing your practice projects either if you’ve felt you’ve learnt what you wanted to, things can get boring if your goal of learning a particular thing has already been accomplished.</p>
<h2 id="2-create-a-project--release-it">2. Create a Project & Release It</h2>
<p>Now you’ve practiced, it’s time to actually use your knowledge and create a project and share it with the world.</p>
<p>Is it a web site? Is it a mobile app? Is it a Ruby Gem? Seeing people use your code in the real world gives you more confidence. For my first project I built a <a href="//mr-bucket.github.io/">Web Application</a>, not because I had any real use for it but because I saw it didn’t exist yet. I released it and didn’t expect anything of it. When I got a tweet thanking me for it and it was being used in a production site it gave me a great confidence boost.</p>
<h2 id="3-contribute-on-github">3. Contribute on Github</h2>
<p>Contributing to other Open Source projects on <a href="//github.com/codecarrotnet">Github</a> can be a great way to get additional experience and confidence. You can learn from other’s code and feedback on your commits.</p>
<p>Your contributions don’t even have to be in code. You can modify a wiki or update documentation. This shows you understand the code and can articulate how to use it!</p>
<h2 id="4-give-a-talk-at-a-meet-up">4. Give a Talk at a Meet Up</h2>
<p>I’ve trained in corporate settings, and released some courses. And you know what? Every time I’ve felt a little scared and inadequate to the task. But almost every time I’ve done it and put myself out there, I’ve found that my feelings of inadequacy were unjustified. After giving the talk, even on something like “What I learned from trying out <Insert Framework/Language Here>”, I’ve found that a lot of people are less experienced. Why are they there in the first place listening to you? You’ve done something they haven’t. You’ve just become an instant expert and valuable resource to them.</p>
<h2 id="5-talk-to-everyone">5. Talk to Everyone</h2>
<p>Finally, when you talk to people about their experiences coding you’ll soon find out that they have the same feelings of doubt and inadequacy. Just knowing you’re not alone can give you the confidence to move forward in your development career.</p>yashumittalStarting out in the professional development arena is pretty daunting. I’m self taught and I don’t have a degree. Broaching my first full time position was pretty scary. What would the interviewer think? Am I ready? The truth is I was, but I wish I knew what I knew now because I’d be more confident. Here are five tips to improve your coding confidence, whether it’s your first or fiftieth job position.
https://i.imgur.com/AZI6iYn.jpg
10 Ways You Can Be Happier at Your Job2017-09-02T09:28:00+00:002017-09-02T09:28:00+00:00https://blog.codecarrot.net/10-ways-you-can-be-happier-at-your-job<p>“Happy” isn’t just the contagious Pharrell Williams song that later made him cry to Oprah Winfrey. It’s also a state that can be achieved at — gasp! — work.</p>
<p>We all know we’re an overworked country, especially compared to our European brothers and sisters. In fact, each year, full-time workers in this country log a whopping 1,700 hours at their jobs versus fewer than 1,500 by their German and French counterparts, according to new economic data.</p>
<p>So why spend those hours hunched over in misery, squeezing a stress ball with Hulk Hogan-like force or passive-aggressively spreading rumors about the spineless guy in sales who’s surely out to get you?</p>
<p>Experts in a wide array of academic fields are not just studying happiness as a blanket topic but trying to unlock the secrets of achieving joy and Zen specifically while building a career. And professionals are becoming more committed to work-life balance as if that pursuit is their job.</p>
<p>Here are 10 actions you can take to achieve a happier office mindset:</p>
<h2 id="1-maintain-a-good-social-network-in-the-office--just-be-sure-its-diverse-and-ample">1. Maintain a Good Social Network in the Office — Just Be Sure It’s Diverse and Ample</h2>
<p>The concept of the “work wife” or “work husband” is a longstanding one. Yet it’s not quite enough. Ben Waber, a research scientist and CEO at management consulting firm Sociometric Solutions, has proven that a robust set of work friends is key. This tight-knit circle allows you to vent, which, in addition to being a relief, can do long-term good. Waber studied, of all things, the size and makeup of lunch tables at companies. Bigger is slightly better. It’s also imperative not just to befriend others in your office who are “mini-yous.” Change it up — whether these peers are different because of race, title, ethnicity or gender.</p>
<h2 id="2-start-a-gratitude-journal">2. Start a Gratitude Journal</h2>
<p>Speaking of Oprah, the talk show host years ago touted these daily recordings of satisfaction as a worthy pursuit. They still are, especially if you include work triumphs as part of the list of items for which to be grateful.</p>
<h2 id="3-take-a-page-from-jerry-maguire--help-me-help-you">3. Take a Page from Jerry Maguire — Help Me Help You</h2>
<p>Helping people is nice and the way we’re supposed to conduct ourselves in order to be, you know, moral, functioning humans. But exercising some altruism also has some tangible impact on happiness levels, scientists from the University of Wisconsin-Madison say.</p>
<p>“Altruism is not a form of martyrdom, but operates for many as part of a healthy psychological reward system,” Prof. Donald Moynihan said in a recent story about the studies. So, during a lull in your workday, volunteer to assist on someone else’s project. Give needed feedback to another. Hell, even pinch hit on a task that is in no way yours to pitch in on. It might complete you.</p>
<h2 id="4-keep-temps-cool--even-if-some-like-it-hot">4. Keep Temps Cool — Even if Some Like It Hot</h2>
<p>Researchers in Helsinki pinpointed the ideal temperature for productivity, and it’s 71.6 degrees. That means neither overload on air conditioning nor heat so that the vibe — and air flow — is cool.</p>
<h2 id="5-hang-your-hat-and-stick-around-for-at-least-a-spell--or-at-least-plan-to-do-so">5. Hang Your Hat and Stick Around for at Least a Spell — Or at Least Plan to Do So</h2>
<p>The iOpener Institute, which studies people and performance, likes to compare the most and least gleeful workers to draw conclusions about the differences. One of the major factors is how long someone intends to stay at a position. Their research shows that the happiest employees planned to be in their roles for four times longer than their grumpy, demotivated counterparts. That doesn’t mean it’s necessary to actually stay for four times as long but to at least select positions that make you want to be there for some length of time.</p>
<h2 id="6-be-a-business-owner--or-embody-some-of-the-qualities-of-one">6. Be a Business Owner — Or Embody Some of the Qualities of One</h2>
<p>At least in the U.K., business owners, while possessing the most responsibility and the highest stakes, are also the most content members of the country’s workforce. Even if you’re not ready to set off on an entrepreneurial path, own some control over what you do professionally and have the same purpose that the head of the shop would.</p>
<h2 id="7-all-hail-positive-emotions">7. All Hail Positive Emotions</h2>
<p>This isn’t a hippie-dippie suggestion to smile through it and stay upbeat. Barbara Fredrickson has found tangible proof, in her research, that if workers put their attention on positive emotions, they can be expanded and reinforced. She calls it the “broaden and build theory.” In the office, hone in on that beautiful Powerpoint presentation and the pride that praise heaped on it brought. More pride will come.</p>
<h2 id="8-take-a-dance-break">8. Take a Dance Break</h2>
<p>Lock your door. Sneak into a hall closet or a stairwell. Whatever. Loosen up your body and mind, and take a quick break. Then back to work you go refreshed. It’s that easy.</p>
<h2 id="9-keep-it-local">9. Keep It Local</h2>
<p>Commuting is hell in a large and increasing number of cities. It’s gotten so bad that 5 million Americans say they’ve called in sick (I’d guess even more) simply because they couldn’t face the getting-there part of work. Cut back on the commuting, whether that means arranging a partial work-from-home arrangement or taking the trip in parts. No one wants to be bummed before even starting the workday.</p>
<h2 id="10-ring-ring-and-then-ring-again">10. Ring, Ring and Then Ring Again</h2>
<p>Three times is the charm when it comes to how many times to let your phone sound off before answering. Sharon Salzberg, best-selling author about workplace happiness, says waiting those two initial rings out does one imperative thing: lets you breathe.</p>yashumittal“Happy” isn’t just the contagious Pharrell Williams song that later made him cry to Oprah Winfrey. It’s also a state that can be achieved at — gasp! — work.
https://cdn.codecarrot.net/images/flickr-6-people-smiling.jpg
10 Tips for Going Freelance for the First Time2017-09-02T09:09:00+00:002017-09-02T09:09:00+00:00https://blog.codecarrot.net/10-tips-for-going-freelance-for-the-first-time<p>Over the course of my career I’ve been self-employed twice. The first time I was incredibly green but the second time I was more prepared. Here are some tips if you’re doing it the first time, or even if you want to take another stab at it.</p>
<h2 id="dont-undercharge">Don’t Undercharge</h2>
<p>One of the most important lessons to learn is not to undercharge. Often when you price too low, you attract the “wrong” type of client. Cheap prices mean that people without the means contact you and try to strike unrealistic deals with you. I had several people approach me in my early, underpriced days, offering a 50% cut of a business. They have the idea, you execute it. It’d be a waste of time. Don’t engage in these conversations. You need to make sure you charge enough to cover some of the other tips below!</p>
<h2 id="dont-burn-bridges">Don’t Burn Bridges</h2>
<p>When moving on from job to job it’s important not to burn bridges. Previous employers can be a source of income. They know you already and know the quality of work you can produce. There’s nothing like getting the team back together to crack out an awesome project.</p>
<h2 id="network">Network</h2>
<p>Go to meet ups and find local businesses and other developers and designers you can tag-team with. Don’t just go to meet ups in your speciality. Become a social butterfly! Engaging people on Twitter can also be an additional source of leads. Don’t say “Give me a job” but answering their questions shows you know what you’re talking about. You’ll be on their radar.</p>
<h2 id="talk-at-events">Talk at Events</h2>
<p>Be noticed at meet ups. Become an authority in your local community. People will want to work with you. Also, often the best ice breaker is giving a talk at an event. People will come and talk to you afterwards and ask questions. At future events people will recognize you and you become friends. This is also a great way of networking.</p>
<h2 id="share-your-burdens">Share Your Burdens</h2>
<p>Don’t over promise and under deliver. Only take on as many projects as you can reasonably manage. If you can’t do it, refer it to friends you’ve made at meet ups. Often you can work out a referral fee. If they’re busy they will refer work back to you!</p>
<h2 id="cash-cushion">Cash Cushion</h2>
<p>Before biting the bullet and going freelance you should have a cash cushion. A runway. Going freelance can be stressful and you need to reduce that as much as possible. Having a couple of months runway really helps.</p>
<h2 id="save-for-the-winter">Save for the Winter</h2>
<p>You may not always be in demand. Over the Christmas period it can get pretty slow as companies wrap up for the year. Often the early months in the year are slow and things don’t pick up until after February or March.</p>
<h2 id="remember-the-taxes">Remember the Taxes</h2>
<p>Another portion of your income should be put aside for taxes. Remember to do it or else you may be in for a surprise when you come around to filing! Also, you may want to get an accountant for advice.</p>
<h2 id="expenses">Expenses</h2>
<p>You may be able to claim, in full or in part some of your business expenses. This is where an accountant would be able to advise.</p>
<h2 id="line-up-enough-work">Line Up Enough Work</h2>
<p>Finally and probably most importantly, make sure you have enough work when you go self employed. Line up a couple of projects before you quit your day job so you’re not wasting precious time and runway in your first couple of months flying solo. Get a head start.</p>
<p><strong>Pro Tip:</strong> Get more clients with your own <a href="//www.codecarrot.net/">personal website</a>.</p>yashumittalOver the course of my career I’ve been self-employed twice. The first time I was incredibly green but the second time I was more prepared. Here are some tips if you’re doing it the first time, or even if you want to take another stab at it.
https://cdn.codecarrot.net/images/person-sitting-along-in-stadium-working-on-laptop.jpg
20+ Free Places to Find Stock Photos for Your Blog2017-09-02T06:30:00+00:002017-09-02T06:30:00+00:00https://blog.codecarrot.net/free-places-to-find-stock-photos-for-your-blog<p>Whether you’re blogging for yourself or a client, I’m sure you know the importance of images.</p>
<blockquote>
Want a start a new blogging website. Get started today with CodeCarrot.
</blockquote>
<p>On a high level, gorgeous photos help bring your blog’s brand to life. Photos also break up text, making your content skimmable and shareable.</p>
<p>But where to find these photos? Image licensing is a tricky beast and stock photos are expensive.</p>
<p>It’s no secret that for today’s bloggers, there’s many websites offering free, high-quality stock photography.</p>
<p>While lots of these websites are wonderful, the sheer volume of images available on them can be overwhelming to mine through. These sites tend to be generalists, offering a smaller number of photos across a broader range of categories. If you’re looking for something unique, specific or offbeat, you might end up searching multiple sites to find that one perfect image you need.</p>
<p>Luckily, there are a handful of free stock photo websites <strong>targeted toward a specific niche or category</strong>. If your blog caters to foodies, history buffs or creative freelancers/marketers, it might be worth checking out one of the websites below.</p>
<p><em>Note: Each website has its own licensing rules; check before downloading and using any photos. Also, different rules may apply if you want to change an image or use it commercially. You’ll also need to verify whether any of the photos you select require attribution.</em></p>
<h2 id="1-gratisography">1. <a href="https://gratisography.com/">Gratisography</a></h2>
<p>Gratisography is a great place to find free, high-resolution images that are <strong>quirky, offbeat, and just plain fun</strong>.</p>
<p>All images are taken by visual artist Ryan McGuire, with new pictures added weekly. Images can be used for personal or commercial use, and no attribution is required.</p>
<p>You can filter by big bucket categories (e.g., Animals, People, Nature), or do a custom keyword search. Pictures range from whimsical (ex. piglets donning party hats) to wacky (ex. a man mowing the lawn wearing just his undies and a beer helmet).</p>
<p>If you or your client approaches content with a sense of humor or satire, then Gratisography should definitely be added to your stock photo toolkit.</p>
<h2 id="2-new-old-stock">2. <a href="https://nos.twnsnd.co/">New Old Stock</a></h2>
<p>If you’re looking for <strong>free vintage stock photos</strong>, New Old Stock is a good place to start.</p>
<p>Free of known copyright restrictions, these photos have been thoughtfully curated from participating institutions on The Commons on Flickr. (Note: It’s a good idea to double-check the institution’s rights statement, which can be found by clicking on the link for the image’s original Flickr posting provided for each image.)</p>
<p>Browsing New Old stock, you’ll find a variety of beautiful, vintage stock photos from the world’s public archives—great for historical topics, blogs, and societies/organizations.</p>
<p>Whether you’re looking for antique images depicting city life, farming, or transportation (e.g., automobiles, trains), this website is a great one to bookmark for sourcing snapshots from bygone eras.</p>
<h2 id="3-foodiesfeed">3. <a href="https://foodiesfeed.com/">FoodiesFeed</a></h2>
<p>As the name suggests, FoodiesFeed offers free, high-resolution food photography — perfect for food bloggers and food-related businesses.</p>
<p>Its collection of food photography is available for personal or commercial use, and images are grouped into broad categories like Coffee & Drinks, Cooking & Baking or Grocery & Ingredients. The numerous display ads are a bit annoying as you scroll, but the array of appetizing imagery makes it worth the inconvenience.</p>
<p>In addition to its collection of free images, FoodiesFeed offers a few Premium packages, which grant you lifetime access to hundreds of more photos, regular updates/notifications, and thematic photo bundles.</p>
<h2 id="4-startup-stock-photos">4. <a href="http://startupstockphotos.com/">Startup Stock Photos</a></h2>
<p>No stuffy suits, phony smiles or post-meeting high fives here — Startup Stock Photos offers free <strong>business stock photography for the modern creative professional</strong>.</p>
<p>Founded in 2014 by Sculpt, an Iowa-city social media marketing agency, Startup Stock Photos caters to creative freelancers, agencies and the startup community.</p>
<p>Its collection of photos features plenty of casually clad workers (think flannel and beanies), either working solo on MacBooks or participating in a brainstorming session at a coffee shop or downtown warehouse loft.</p>
<p>Many big names have used images from Startup Stock Photos; their client list includes Mashable, Forbes and The New York Times (among many others).</p>
<h2 id="5-kaboompics">5. <a href="https://kaboompics.com/">KaboomPics</a></h2>
<p>Here you’ll find beautiful images related to fashion, food, and interior design—often <strong>pairing modern elements with rustic accents</strong> (ex. an iPhone and laptop on a flannel blanket in the grass).</p>
<p>Images are free and can be used for personal or commercial use.</p>
<h2 id="6-free-stock-photo-sites">6. <a href="https://www.stockphotosecrets.com/best-free-stock-photo-sites">Free Stock Photo Sites</a></h2>
<p>As free photo licenses can be more complex than they appear at first glance, you must choose a site that gives you not only the perfect photos for your blog but also the safest ones from a legal point of view.</p>
<p>This handy list of 27+ best (and safest) free stock photo sites is a great way to find them, as all the sites listed have been carefully reviewed in terms of library offer, image quality and legal safety.</p>
<h2 id="7-death-to-the-stock-photo">7. <a href="https://deathtothestockphoto.com/">Death to the Stock Photo</a></h2>
<p>Death to the Stock Photo (DTS) is a free email newsletter sharing monthly original, professional photo packs. Images are free to use and edit. Photos have a specific style — think hipster coffee shop meets Portland hiking — but are simple enough to use in a variety of ways.</p>
<p>DTS is my favorite place to find photos to pair with blog posts. Every photograph is gorgeous and high quality. I download each pack straight to my computer and use my own tagging system. Since most of my blog imagery contains graphics, I don’t need a specific photo (i.e. an apple on a wooden table). DTS gives me ideas for images I might never have thought of, and it’s all in one, curated place.</p>
<h2 id="8-flickr">8. <a href="https://www.flickr.com/">Flickr</a></h2>
<p>Flickr is one of the largest photo-management apps in the world. You can store your own shots or share them with the world. Thousands of photographers on Flickr allow free use of their work.</p>
<p>Search for anything you want, from “cat napping on a tree” to “writer in a cafe.” After searching, click on the “Any license” tab and choose “Creative Commons.” If you want to change the image or use it commercially, select the appropriate license from there.</p>
<p>To be safe, I always link back to the photographer’s website or Flickr portfolio. If you’re averse to linking out, just select “no known copyright restrictions”.</p>
<p>Flickr groups can help you find photos, too. <a href="https://www.flickr.com/groups/freeuse/">Free Use Photos</a>, for example, has more than 4,000 members and almost 8,000 photos available for free.</p>
<h2 id="9-unsplash">9. <a href="https://unsplash.com/">Unsplash</a></h2>
<p>Unsplash is run by freelance design marketplace Crew. It’s like Death to Stock in that it releases collections every 10 days to use as you wish. The difference is all photos are available online, so you don’t have to sign up to receive or download folders of images.</p>
<p>Photos are licensed under Creative Commons Zero. This means you can “copy, modify, distribute and use the photos for free, including commercial purposes, without asking permission from or providing attribution to the photographer or Unsplash.”</p>
<p>Browse Made with Unsplash for inspiration.</p>
<h2 id="10-negative-space">10. <a href="https://negativespace.co/">Negative Space</a></h2>
<p>Here’s another site that allows you to search for exactly what you want. It adds 20 photos per week and you can search and sort by category, copy space position and color. Negative Space is particularly helpful for designers and anyone making social media graphics.</p>
<p>You can also buy premium photos in themed packs. You “pay what you want,” and the company gives 50 percent of sales to charity.</p>
<p>Photos released on Negative Space have no copyright restrictions.</p>
<h2 id="11-stocksnap">11. <a href="https://stocksnap.io/">StockSnap</a></h2>
<p>If you’re looking for free photos, StockSnap is the easiest site to navigate. It offers hundreds of images and adds more every week. All photos are free from copyright restrictions and attribution isn’t required.</p>
<p>StockSnap also offers many different ways to explore available photos. Its “trending” and “views” section show what’s popular, or you can sort by date to see what’s new.</p>
<p>Photo quality is mixed (I found a lot of weird filters), but the selection is extensive.</p>
<h2 id="12-splitshire">12. <a href="https://www.splitshire.com/">SplitShire</a></h2>
<p>Web designer Daniel Nanescu created SplitShire “With the simple aim of giving life to photographs that would have gone into oblivion without any utility.”</p>
<p>SplitShire offers free stock photos for commercial use. Browse its photo collections if you’re looking for something specific, like the ocean or dogs. Save time and buy the entire 500-image library at once for $9.60.</p>
<h2 id="13-life-of-pix">13. <a href="https://www.lifeofpix.com/">Life of Pix</a></h2>
<p>Montreal creative agency LEEROY created Life of Pix with its impressive network of photographers. It organized photos into galleries like “animals”, “people” and “textures.” New high-resolution photos are added weekly, without copyright restrictions.</p>
<h2 id="14-ancestry-images">14. <a href="https://www.ancestryimages.com/">Ancestry Images</a></h2>
<p>For more than just photos, Ancestry Images offers historical prints and maps. If you’re a history or genealogy buff, or a local blogger, this site offers resources beyond your typical stock photo.</p>
<p>Search is rudimentary, but a quick test brought up a dozen images from my home state in the 1800s.</p>
<p>You’re welcome to use any of this site’s images for non-commercial purposes, as long as you credit Ancestry Images.</p>
<h2 id="15-bigfoto">15. <a href="https://www.bigfoto.com/">BigFoto</a></h2>
<p>Organized by location, BigFoto is perfect for travel bloggers. If your recent trip resulted in grainy photos, use BigFoto to download images of almost any attraction. BigFoto uses photos by amateurs, but they’re high quality and well-organized.</p>
<p>Photos are free to use, even for commercial purposes. The site asks for a link back to BigFoto.</p>
<h2 id="16-pexels">16. <a href="https://www.pexels.com/">Pexels</a></h2>
<p>Pexels provides high quality and completely free stock photos licensed under the Creative Commons Zero (CC0) license. All photos are nicely tagged, searchable and also easy to discover through their discover pages.</p>
<h2 id="17-burst">17. <a href="https://burst.shopify.com/">Burst</a></h2>
<p>Burst is a resource from Shopify that provides free stock photos for entrepreneurs. Some photos are licensed under Creative Commons CC0 while others fall under Shopify’s own photo license.</p>
<h2 id="18-pixabay">18. <a href="https://pixabay.com/">Pixabay</a></h2>
<p>Pixabay offers a large collection of free stock photos, vectors and art illustrations. All photos are released under Creative Commons CC0.</p>
<h2 id="19-foodiesfeed">19. <a href="https://foodiesfeed.com/">FoodiesFeed</a></h2>
<p>FoodiesFeed offers thousands of beautiful realistic free food pictures in high resolution. It’s the perfect stock photo site for food bloggers.</p>
<h2 id="20-canva">20. <a href="https://www.canva.com/photos/">Canva</a></h2>
<p>Canva photos is an extensive collection of high-quality photos and images to help both designers and non-designers with their designs.</p>
<h2 id="21-pikwizard">21. <a href="http://www.pikwizard.com/">Pikwizard</a></h2>
<p>Pikwizard is a great new stock photography website that has over 100,000 high-quality images. 20,000 of these are completely exclusive and there is no attribution required with Pikwizard.</p>
<p>Start using these images in your <a href="https://www.codecarrot.net/">new blogging website</a>.</p>yashumittalWhether you’re blogging for yourself or a client, I’m sure you know the importance of images.
https://i.imgur.com/LBPXLCp.jpg
7 reasons your small business needs a website2017-09-01T19:00:00+00:002017-09-01T19:00:00+00:00https://blog.codecarrot.net/7-reasons-your-small-business-needs-a-website<p>Many small businesses, especially new small businesses, run a lean operation. They focus on necessities and urgent matters, only spending money when they need to. So, it’s easy to see why some business owners might think a website is a luxury item they can afford to live without.</p>
<p>They might even believe a Facebook page is enough for an online presence, or that a sign with their phone number will generate calls, or that a traditional mailer will help them sell products. But the truth is, the only way to start promoting a business is by building a professional website.</p>
<div class="callout">
An effective website is the cornerstone of your company — it houses important information, and your customers expect you to have one.
</div>
<p>Your website acts as a portal so customers can learn more about your company, as well as research product information and determine if they want to do business with you. If you’re a small business owner, you need to realize that a website isn’t an expensive luxury or a frivolous endeavor — it’s an affordable, fundamental tool that every company needs.</p>
<h2 id="a-website-is-the-anchor-for-your-marketing">A website is the anchor for your marketing.</h2>
<p>Before you print a business card or spend a penny on advertising, you need to start marketing by building a website.</p>
<p>A website will act as an anchor for all of your advertising efforts. All business details, product information and promotions should live on your website first. Then, you can create marketing materials that fall in line with your domain name, which will drive customers to your website for additional information.</p>
<h2 id="a-website-sells-your-productsservices-online">A website sells your products/services online.</h2>
<p>Your website acts as a digital brochure, sharing up-to-date information about your offerings. A benefit of web publishing is that you can change information in real-time — no waiting or paying for new print materials.</p>
<div class="callout">
Guide potential buyers to the products and services they need by creating an effective website.
</div>
<p>Think of your website as a 24-hour sales staff. It provides answers to frequently asked questions and can even process sales. Websites with e-commerce and purchasing options allow users to make direct purchases online, thus simplifying sales for both your staff and your customers.</p>
<h2 id="a-website-helps-you-connect-with-new-customers">A website helps you connect with new customers.</h2>
<p>While you might already have an established customer base, a website is a surefire way to connect with new customers who might be unfamiliar with your business.</p>
<p>More often than not, people turn to the internet when they have a problem. Searching for solutions is easy — but is your business a potential problem solver? With a professional website, you position your business as a solution for your customers’ needs. Plus, you can optimize your site with search terms related to your industry. This will expose your business to new customers on the prowl.</p>
<h2 id="a-website-has-big-benefits-for-local-businesses">A website has big benefits for local businesses.</h2>
<p>One misconception about websites is that they’re only for national companies or worldwide corporations with audiences around the globe. Actually, websites are just as, if not more, beneficial for small businesses. In fact, it’s a great way to connect with locals.</p>
<p>Plus, search engines often rank results according to location. In other words, if you’re looking for “shoe stores near me,” Google won’t offer you a name-brand result in New York (unless of course you live in New York).</p>
<p>So it’s pretty clear — an online presence has big benefits even for small businesses who deal locally. No matter where you are located, you can <a href="https://www.codecarrot.net/">get started with an efficient website</a> that draws in customers.</p>
<h2 id="a-website-builds-credibility">A website builds credibility.</h2>
<p>Nothing is more important than the ability to be found. If you don’t have an established online identity, then customers can’t find you. Not showing up in the search engines (or on the Internet at all for that matter) is one of the fastest ways to lose credibility as a business. It makes you and your company look dated, out of touch and untrustworthy.</p>
<p>Even if you’re fantastic at word-of-mouth marketing, you could be missing out on a ton of referrals. Happy customers are quick to share what they think about your business, but what about their friends who haven’t experienced your services yet? They’ll take to the Internet. And when they come up empty handed, you’ll have missed your chance for brand new customers.</p>
<h2 id="a-website-helps-you-control-your-online-destiny">A website helps you control your online destiny.</h2>
<p>If you think having a Facebook page or an online directory listing (like Yellow Pages) is enough to promote your business, you’re wrong.</p>
<div class="callout">
Building your online presence through social platforms (while important) is not enough.
</div>
<p>When you publish through, or rely on, a third-party platform, you’re at their mercy. If the platform decides to close your account, change their policies or revise their programming, you might lose the ability to connect with your audience. Yet, when you run your own website, you’re in control of both the content you produce and the platform you or the <a href="https://www.codecarrot.net/">team you hire</a> to maintain it for you.</p>
<p>Websites are simple and affordable to set up.</p>
<p>Many small business owners rely on using third-party platforms or avoid setting up their own website because they think it’s complicated or expensive.</p>
<p>But building and maintaining a website is <strong>easier and cheaper</strong> than ever before.</p>
<p>Take my advice, small business owners — there are no more excuses. If you’re putting off building a website, you’re hurting your business. It’s time to <a href="https://www.codecarrot.net/">get started</a>!</p>yashumittalMany small businesses, especially new small businesses, run a lean operation. They focus on necessities and urgent matters, only spending money when they need to. So, it’s easy to see why some business owners might think a website is a luxury item they can afford to live without.
https://i.imgur.com/7WQtBrC.jpg
Using Instagram to drive traffic to your website2017-09-01T18:00:00+00:002017-09-01T18:00:00+00:00https://blog.codecarrot.net/using-instagram-to-drive-traffic-to-your-website<p>You must have uploaded many images and videos on Instagram for promotion your products and services.</p>
<p>Unfortunately, you can paste a link of your website, by which users can link on that link and re-directed to your website.</p>
<p>But you can be a bad-ass driver of traffic to your business.</p>
<p>Nowadays, if you’re a small business you NEED to have a well-working <a href="/7-reasons-your-small-business-needs-a-website">website</a> and be all up in social media. Instagram, in particular, has become the social platform of choice for millennials. In addition to using Instagram to upload pics of their uber-interesting lives (half sarcasm), people are also using Instagram as a new form of search engine.</p>
<div class="callout">
Because so many people are on Instagram, having an account just for your business is a solid way to acquire customers and attract attention.
</div>
<p>Gaining followers is as easy as pushing a button. Driving traffic to your website, however, well, that takes a bit of effort. Here are four tips to help you put the pedal to the medal.</p>
<h2 id="be-a-tease">Be a tease</h2>
<p>In the movies, who is the main heroine always attracted to? The guy who gushes the sweet whisperings of his heart and soul? Or the gruff dude who has nothing to say but has mysterious eyes? Maybe it’s a little messed up, but the main character always has this “thing” for the guy who walks around cloaked in a shroud of mystery.</p>
<p>A little mystery can attract Instagrammers to your business, too. Tease your audience.</p>
<p>If you’re planning to announce a new event or product on your website, for instance, consider posting a picture on your Instagram site a week before the official announcement and hint at the fact that you have something new a brewin’. This can pique your audience’s interest and drive them to your site just to see what the big unveil is!</p>
<h2 id="link-in-bio">Link in bio</h2>
<p>One of Instagram’s downfalls is that there isn’t an option to include links within your caption. However, when you edit your profile, there is a space for you to provide a URL. You can keep a link to your website in that prime spot or switch it up.</p>
<div class="callout">
Make the most of the link in your Instagram bio.
</div>
<p>Let’s say you’re promoting a new product/event/service on your site and you want to post about it on Instagram. In your caption, remember to say “link in bio” to direct people to the URL in your profile.</p>
<p><strong>Pro tip:</strong> To avoid long, ugly links, shorten your URL with <a href="https://bitly.com/shorten/">Bit.ly</a> or <a href="https://goo.gl">goo.gl</a>. If you sign up for an account, you’ll be able to track how many clicks that link has received.</p>
<h2 id="highlight-blog-posts">Highlight blog posts</h2>
<p>If your website includes a blog, make sure to draw attention to it on your Instagram. Not everyone who follows you on Instagram will religiously follow your blog. Keep your followers in the know by offering up an image and brief blurb about a new blog post with a link in your bio to the full post on your site.</p>
<h2 id="host-contests-and-giveaways">Host contests and giveaways</h2>
<p>Everyone likes a good contest, right? Announce a new contest or giveaway on your Instagram, but don’t reveal all the details. Tell your followers to click the link in bio in order to get the full set of guidelines. This is a fairly surefire way to drive traffic to your website. For even more engagement, tell your followers in advance that the winners will be announced on a certain date on your site and to keep checking back for updates!</p>yashumittalYou must have uploaded many images and videos on Instagram for promotion your products and services.
https://i.imgur.com/2j2GzcZ.png
How to use digital content marketing to grow awareness, trust and sales2017-09-01T17:25:00+00:002017-09-01T17:25:00+00:00https://blog.codecarrot.net/how-to-use-digital-content-marketing-to-grow-awareness-trust-and-sales<p>When it comes to creating a smart digital marketing strategy, the mantra you’ve heard over and over again is most likely, “Content is King.” This phrase is so widely repeated because the digital content marketing approach really does make sense when you’re talking about how to get the attention you need online.</p>
<blockquote>
In a hyper-individualized world where your audience has total control over what they consume when they open their laptops or pick up their phones, you need to create something that encourages people to take action. Most marketing experts will agree that creating content is the best way to achieve this goal.
</blockquote>
<p>On the flip side, it can be difficult to figure out how to translate success with digital content marketing efforts into real-world wins. One of the major challenges with the digital space is that you’re competing against endless streams of free content, all jostling for your audience’s attention. Putting up a paywall will only cause people to look elsewhere. Ads will do the same if they’re obnoxious enough, and will often get stymied by now-ubiquitous ad-blocking technology.</p>
<div class="callout">
The truth is that metrics aren’t everything, and ultimately they’re not what matters.
</div>
<p>Page views, backlinks, bounce rate, comments, social media amplification … at the end of the day all of these metrics mean the same thing — that you’re successfully connecting to the people in your audience. People will spend money if you convince them that you have what they want.</p>
<h2 id="digital-content-marketing-101-find-the-content-thats-right-for-you">Digital content marketing 101: Find the content that’s right for you</h2>
<p>The first thing to realize about content is that it doesn’t have to take only one form. While researching digital content marketing strategies, you might start to get discouraged by advice like “longer content is better,” or, “make sure you write two posts a week at first.”</p>
<p>Some people <strong>hate writing</strong>. It’s excruciating to squeeze out a few paragraphs of an important email, nevermind cranking out 2,000 words a week. The good news is that while writing is certainly a very powerful medium, it’s not the only form that content takes — and for some businesses, it may not even be the most effective one.</p>
<p><strong>Podcasting</strong>, videos, <strong>live streaming</strong>, images, how-to guides — all of these various forms of content are up for grabs when you’re considering a digital content marketing strategy.</p>
<p><strong>How do you decide what’s best for you?</strong></p>
<p>First, pick a content type that gives you more than a few ideas. Off the top of your head, how many of your friends would make a great guest on a podcast interview? What are some day-to-day things that you do that would be interesting for someone else to watch?</p>
<div class="callout">
Video and audio content can take a bit more planning, but might end up being more convenient for you to create.
</div>
<p>If you’re going to venture into audio podcasting, you’ll probably want to have at least an outline of what you’re going to cover. The audience will be listening for specific information, so it’s important to stay on topic. Video content can come in a variety of forms — from off-the-cuff short video blogging to fully produced and professionally filmed material. When planning for digital content marketing using video, consider:</p>
<ol>
<li>What you want to do.</li>
<li>How your audience wants to consume content.</li>
<li>How much you’re willing to invest upfront to make sure you’re making something that looks and sounds professional.</li>
</ol>
<p>The most important thing is to choose something that you’re good at, that you can commit to doing consistently, and hopefully that you’ll enjoy creating.</p>
<p><img src="https://i.imgur.com/9fg4piU.jpg" alt="Person capturing a picture using canon camera" /></p>
<h2 id="give-your-content-time-to-grow">Give your content time to grow</h2>
<p>The power of digital content marketing is that it snowballs. With every new piece of content you create, you increase the overall value of your entire content network. Each piece boosts traffic to everything else as your audience gets sucked in and starts crawling through your older work. I understand that this sounds too good to be true, but it’s not. The only reason it’s so hard to achieve is because it takes time and commitment.</p>
<div class="callout">
The power of digital content marketing is that it snowballs.
</div>
<p>Most experts say that you should be prepared to commit to six months to an entire year to see if your efforts will pay off. This is why it’s so important to pick something that you actually want to make. It’s easy to find the motivation to ramp up once things are going well and you’re starting to see results, but getting to that point in your digital content marketing effort is where most companies have doubts and break that commitment.</p>
<blockquote>
Volume is valuable, consistency a key component, but even more vital is quality.
</blockquote>
<p>At this early stage, your focus should be on only two things:</p>
<ul>
<li>a maniacal obsession with improving the quality of your content.</li>
<li>an equally fanatical commitment to turning your audience into something you can work with.</li>
</ul>
<p>Quality content builds trust, but only if it’s useful and not sales-y. The difficulty lies in the fact that, at some point, you do actually need to sell something.</p>
<h2 id="building-your-mailing-list">Building your mailing list</h2>
<p>As I said earlier, it’s not page views or traffic stats that ultimately matter when you’re trying to turn content into sales. You need to be able to reach people directly, and for that, you need to focus on <a href="/beginners-guide-to-starting-an-email-list">building an email list</a>.</p>
<p>There are a lot of ways to get people to give you their email address. One of the most simple, but often forgotten things is to make sure that you’re asking clearly. You’d be shocked how much of a difference it can make if you’re careful about tweaking your signup forms and their placement. Make sure that your call-to-action is impossible to miss, and that your signup form is dead simple. Another big boost is to pitch an extra tantalizing piece of free content — an eBook, a whitepaper, or a study — and offer it for free, in exchange for an email address.</p>
<h2 id="digital-content-marketing-mailing-list">Digital Content Marketing Mailing List</h2>
<p><strong>Leverage your mailing list</strong></p>
<p>This part is up to you, and it’s almost impossible to give general advice. It depends on the subject matter of the content you’re creating, what your business is selling, and what you’re good at.</p>
<div class="callout">
The big thing is to figure out your goals.
</div>
<p>If you’re using digital content marketing to drive foot traffic, for example, then you can use your mailing list to augment it by offering a special discount code, or announcing a special event. If it’s about getting people to try your product, then offer them a free trial.</p>
<p>Content marketing is a popular strategy because it helps you build awareness and trust. By creating content that people want to engage with — that’s informative, helpful or beautiful — you have a chance to capture your audience’s attention and make the sale.</p>yashumittalWhen it comes to creating a smart digital marketing strategy, the mantra you’ve heard over and over again is most likely, “Content is King.” This phrase is so widely repeated because the digital content marketing approach really does make sense when you’re talking about how to get the attention you need online.
https://i.imgur.com/NhWeNAN.jpg
How to increase website traffic with existing content2017-08-31T18:28:00+00:002017-08-31T18:28:00+00:00https://blog.codecarrot.net/how-to-increase-website-traffic-with-existing-content<p>You worked hard to produce the content that you already have. Now let’s take a look at how to increase website traffic by reusing, repackaging and recycling that existing content to get more website visitors, more links and more leads.</p>
<h2 id="is-your-content-finding-the-right-eyes">Is your content finding the right eyes?</h2>
<p>A common complaint when trying to make a <a href="/how-to-use-digital-content-marketing-to-grow-awareness-trust-and-sales">content marketing strategy</a> work, when you’re bootstrapping it in a small organization, is that there just isn’t enough time. You have to, you know, actually run your business. You can’t spend all your time creating content.</p>
<blockquote>
It’s true, making a successful content strategy work means making a commitment to consistent content generation. You need to keep people coming back for more, and they aren’t going to do that unless you have new things to offer.
</blockquote>
<p>At the same time, you might not be maximizing the value of the content you’ve already generated. A simple question to ask when you’re looking at how to increase website traffic: is your content getting in front of the right eyes? Are you doing the work you need to do to get your content in the hands of the right people?</p>
<h2 id="how-to-increase-website-traffic-3-content-hacks">How to increase website traffic: 3 content hacks</h2>
<ol>
<li><strong>Change up the format.</strong></li>
<li><strong>Bulk it up or break it down.</strong></li>
<li><strong>Do a content upgrade.</strong></li>
</ol>
<p>When you’re trying to figure out how to increase website traffic, these three content hacks are a great place to start. Let’s look at each strategy in more detail.</p>
<h2 id="content-hack-no-1-change-up-the-format">Content hack No. 1: Change up the format</h2>
<p>One of the simplest ways to squeeze more value out of the content you’ve already created is to change up the format in which it’s presented. Have you ever clicked on a promising link, only to find a video without a transcript or summary? Ever pass up an article because you don’t have time to scroll through it when you’re on the move?</p>
<div class="callout">
Users prefer different content formats depending on the environment in which they’re browsing, and which device they’re using.
</div>
<p>Podcasts are great for a crowded commute where you don’t have room to sit down, or when you’re driving or jogging and have to keep your eyes in front of you. A video might be great if you’re trying to figure out exactly how to do something, whereas you might skip to an article if you’re sitting down to do research.</p>
<blockquote>
Whatever content you create, it’s important to remember that it doesn’t have to be wedded to a single format.
</blockquote>
<p>It requires relatively little work to take a blog post you’ve already written and send it off to be recorded as a podcast. You can even do it yourself, provided you’re willing to do the homework to make sure it sounds good. The same goes for getting a transcription of your video or audio.</p>
<h2 id="content-hack-no-2-bulk-it-up-or-break-it-down">Content hack No. 2: Bulk it up or break it down</h2>
<p>This trick is a variation on a theme. Sometimes the content that you have isn’t performing as well as it could be, because it just hasn’t found the right combination of length, format and topic.</p>
<p>Let me put it another way: if you follow a sports team, you’re not always going to want to read a 5,000-word profile about a particular player’s life story, college playing struggles, and eventual success in the pros. It’s a nice thing to look at every once in awhile, but often you just don’t have the time — you only want to know what they’re doing differently that makes them so good this year.</p>
<p>The same goes for content. Longform content is valuable: it shows you know what you’re talking about; you can use it to build your <a href="/beginners-guide-to-starting-an-email-list">mailing list</a> or drive calls-to-action; and it can position you as a thought leader on the topic.</p>
<div class="callout">
Instead, consider breaking down your long content into a digestible series of short blog posts.
</div>
<p>I could turn this article into a series of 500-word “Content Hack” posts with just a little more fleshing out of each topic.</p>
<p>This idea also works the other way around. If you have a bunch of shorter posts, consider gathering them together into something longer, like an eBook or a whitepaper, for the reasons I went into earlier. Organize the topics into a rough outline, figure out what goes together, and you’re off to the races.</p>
<h2 id="content-hack-no-3-do-a-content-upgrade">Content hack No. 3: Do a content upgrade</h2>
<p>Do you have a piece that performed well but has fallen off recently, or otherwise gotten old? It might be time for a content upgrade.</p>
<div class="callout">
A content upgrade is all about looking at the data and figuring out what your most effective pieces are.
</div>
<p>Any metrics you can pull up are your friends. You want to target two types of pieces: ones that drew a lot of initial attention, and ones that draw continuing interest.</p>
<p>Freshness is an important part of search rankings, so the idea is to take a piece that’s already been successful, add some new features, and then run it again. Give it an edit, add an infographic, support your writing with a bunch of visuals — the list goes on and on. Get creative, republish it, and boost it on social media.</p>
<h2 id="reuse-repackage-and-recycle">Reuse, repackage and recycle</h2>
<p>When you’re looking for ways how to increase website traffic, keep the bottom line with repurposing existing content in mind: reuse, repackage and recycle.</p>
<ul>
<li>Find innovative ways to reuse old content by switching up the format: change a whitepaper to a podcast series, or your blog posts into infographics.</li>
<li>Repackage by breaking up long content into smaller bite-sized pieces, or combining short things into something bigger.</li>
<li>Recycle by taking your greatest hits and giving them a fresh look.</li>
</ul>
<p>These tricks help you make the most of what you already have, so you can spend your energy where it matters most — growing your business.</p>yashumittalYou worked hard to produce the content that you already have. Now let’s take a look at how to increase website traffic by reusing, repackaging and recycling that existing content to get more website visitors, more links and more leads.
https://i.imgur.com/RPVdvEX.jpg
How To Upload Images To Filestack With Ruby on Rails2017-08-31T16:48:00+00:002017-08-31T16:48:00+00:00https://blog.codecarrot.net/how-to-upload-images-to-filestack-with-ruby-on-rails<p>Filestack <em>(formerly Filepicker)</em> is a service that allows users to store files in a cloud. It has a free plan with some monthly limits: 250 uploads, 500 transformations and 3GB bandwidth. Those numbers get higher if you select one of paid plans. You can also use external storage (S3, Dropbox…), though you have to select any paid plan to enable this feature. Here’s how to use Filestack in a Rails app.</p>
<p>I assume you have:</p>
<ul>
<li>Account created on <a href="https://www.filestack.com/">filestack.com</a>, API key obtained (it’s generated automatically after registration)</li>
<li>Rails app with User model created <em>(<a href="https://github.com/RailsApps/rails-devise">rails-devise</a> is a good starting point)</em></li>
</ul>
<h2 id="what-you-will-use">What you will use:</h2>
<ul>
<li><a href="https://github.com/Ink/filepicker-rails">Filepicker-rails</a> - gem to make uploads easier to implement (to quickly see how it works you can use this repository or just follow the steps below)</li>
</ul>
<h2 id="pros">Pros:</h2>
<ul>
<li>Simple to implement</li>
<li>Files can be uploaded directly from many different sources such as Google Drive, Facebook, Instagram, etc.</li>
<li>Images can be cropped before upload</li>
</ul>
<h2 id="cons">Cons:</h2>
<p>The only gem I found isn’t updated very often, last commit was in October 2015</p>
<h2 id="step-1">Step 1</h2>
<p>Add filepicker-rails gem to your gemfile:</p>
<pre><code class="language-gemfile">gem 'filepicker-rails'
</code></pre>
<h2 id="step-2">Step 2</h2>
<p>Include Filestack js file in your layout:</p>
<div class="language-rb highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="o"><</span><span class="sx">%= filepicker_js_include_tag %>
</span></code></pre></div></div>
<h2 id="step-3">Step 3</h2>
<p>Add your Filestack API key to config/application.rb:</p>
<div class="language-rb highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="n">config</span><span class="p">.</span><span class="nf">filepicker_rails</span><span class="p">.</span><span class="nf">api_key</span> <span class="o">=</span> <span class="no">ENV</span><span class="p">[</span><span class="s1">'FILESTACK_API_KEY'</span><span class="p">]</span>
</code></pre></div></div>
<h2 id="step-4">Step 4</h2>
<p>Add helpers to your ApplicationController:</p>
<div class="language-rb highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="n">helper</span> <span class="no">FilepickerRails</span><span class="o">::</span><span class="no">Engine</span><span class="p">.</span><span class="nf">helpers</span>
</code></pre></div></div>
<h2 id="step-5">Step 5</h2>
<p>Create a migration to add a string column which will store uploaded files urls, e.g. users’ avatars:</p>
<div class="language-rb highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="k">class</span> <span class="nc">AddAvatarUrlToUsers</span> <span class="o"><</span> <span class="no">ActiveRecord</span><span class="o">::</span><span class="no">Migration</span>
<span class="k">def</span> <span class="nf">change</span>
<span class="n">add_column</span> <span class="ss">:users</span><span class="p">,</span> <span class="ss">:avatar_url</span><span class="p">,</span> <span class="ss">:string</span>
<span class="k">end</span>
<span class="k">end</span>
</code></pre></div></div>
<h2 id="step-6">Step 6</h2>
<p>Implement the form used to upload a file:</p>
<div class="language-rb highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="o"><</span><span class="sx">%= form_for @user do |f| %>
<div>
<%=</span> <span class="n">f</span><span class="p">.</span><span class="nf">label</span> <span class="ss">:avatar_url</span><span class="p">,</span> <span class="s1">'Upload Your Avatar:'</span> <span class="o">%></span>
<span class="o"><</span><span class="sx">%= f.filepicker_field :avatar_url, dragdrop: true %>
</div>
<%=</span> <span class="n">f</span><span class="p">.</span><span class="nf">submit</span> <span class="sx">%>
<% end %></span>
</code></pre></div></div>
<p>You can read about different filepicker_field options <a href="https://www.rubydoc.info/github/Ink/filepicker-rails/master/FilepickerRails/FormHelper">here</a>.</p>
<p>Modal that will allow you to upload your file looks like that:</p>
<p><img src="https://i.imgur.com/H5VsTGP.jpg" alt="Filestack Desktop V3 view" /></p>
<p>If you use devise, remember to properly configure permitted parameters in your ApplicationController (this works for devise 3, there’s a <a href="https://github.com/plataformatec/devise#strong-parameters">different syntax</a> in devise 4):</p>
<div class="language-rb highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="n">before_action</span> <span class="ss">:configure_permitted_parameters</span><span class="p">,</span> <span class="ss">if: :devise_controller?</span>
<span class="kp">protected</span>
<span class="k">def</span> <span class="nf">configure_permitted_parameters</span>
<span class="n">devise_parameter_sanitizer</span><span class="p">.</span><span class="nf">for</span><span class="p">(</span><span class="ss">:sign_up</span><span class="p">)</span> <span class="o"><<</span> <span class="ss">:avatar_url</span>
<span class="k">end</span>
</code></pre></div></div>
<h2 id="step-7">Step 7</h2>
<p>In order to display an avatar after submitting the form, you can use this helper:</p>
<div class="language-rb highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="o"><</span><span class="sx">%= filepicker_image_tag @user.avatar_url %>
</span></code></pre></div></div>
<p>To know more about the FileStack integration, head over to their <a href="https://www.rubydoc.info/github/Ink/filepicker-rails/master/FilepickerRails/ApplicationHelper#filepicker_image_tag-instance_method">documentation</a> page.</p>yashumittalFilestack (formerly Filepicker) is a service that allows users to store files in a cloud. It has a free plan with some monthly limits: 250 uploads, 500 transformations and 3GB bandwidth. Those numbers get higher if you select one of paid plans. You can also use external storage (S3, Dropbox…), though you have to select any paid plan to enable this feature. Here’s how to use Filestack in a Rails app.
https://i.imgur.com/RylJejq.png
How to Write a Perfect Readme2017-08-30T19:23:00+00:002017-08-30T19:23:00+00:00https://blog.codecarrot.net/how-to-write-a-perfect-readme<p>The clarity of readme files is critical for software developers. That information varies from installation instructions to potential bugs and depends on the nature of the software. Fortunately, there is a set of good practices to follow if you want your ReadMe to be neat.</p>
<div class="callout">
The goal is clear communications
</div>
<p>While there are no hard and fast rules, every ReadMe file needs to be easily understood and contain accurate information that helps users get the most out of your software. Following the eight guidelines listed below, you can help developers leverage the software’s benefits and head off potential problems down the road.</p>
<h2 id="1-summarize-what-your-software-does-in-the-introductory-paragraph">1. Summarize what your software does in the introductory paragraph</h2>
<p>All good writing, including technical writing, begins with a clear summary of what you’re writing about. Begin with an introductory paragraph that tells readers the purpose of your software and its major benefits. Give them a summary of the information you will include in your ReadMe using clearly defined sections.</p>
<h2 id="2-organize-your-information-to-make-it-easily-accessible">2. Organize your information to make it easily accessible</h2>
<p>While every ReadMe is different, most should include sections like general information, getting started, included technologies, setup, tests and any bugs or problems. If you mention libraries, provide links to these. Your ReadMe file should include such elements as tech description (language/framework used with version), database, patterns and setup.</p>
<h2 id="3-provide-key-facts-in-your-general-information-section">3. Provide key facts in your general information section</h2>
<p>The general information section should expand on the summary you provided in your introductory paragraph to give readers a better understanding of your project. Include a brief description and answer the question, “what problem does this project solve?”</p>
<p>Include an outline of the technologies in the project, such as framework (Rails/iOS/Android/Gameboy Colour), as well as programming language, database, ORM, links to any related projects (for example, whether this a Rails API with corresponding iOS and Android clients), links to online tools related to the application (such as the Basecamp project, the dropbox where all the wireframes are stored and the JIRA project).</p>
<h2 id="4-show-users-how-to-get-started">4. Show users how to get started</h2>
<p>In your getting started section, include a detailed spin-up process with instructions for installing any software the application is dependent on (such as wkhtmlopdf, PostgreSQL, XQuartz). Give instructions on running the app. Finally, include information about subdomains in the app (e.g., api.myapp.dev/), other tools configuration (e.g. Stripe, Amazon), and test data info. This way you will let the developer start working with on your project faster.</p>
<h2 id="5-explain-testing-procedures">5. Explain testing procedures</h2>
<p>Give users explicit instructions on how to run all necessary tests. Explain the libraries, such as Capybara or Cucumber, used for testing your software and supply all necessary commands.</p>
<h2 id="6-describe-common-problems-and-bugs">6. Describe common problems and bugs</h2>
<p>This point requires open source mostly. Be aware of any problems with your software and describe them to your users. The bugs/issues included in the ReadMe should always be specific and include solutions. Be sure to add information about solutions to the bugs you know.</p>
<h2 id="7-explain-and-provide-access-to-stagingbeta-environments">7. Explain and provide access to staging/beta environments</h2>
<p>Users will need access to all included staging environments to fully understand how to navigate them. Provide instructions for connecting to servers and tell clients how to obtain necessary permissions.</p>
<h2 id="8-remember-about-readme-updates">8. Remember about ReadMe updates</h2>
<p>It’s important to stay one step ahead of the problems by regularly updating and maintaining your ReadMe file. When you add new tools, be sure to proactively test each before you incorporate them into your file. You should update the ReadMe file anytime you implement changes within the setup, configuration or technologies used.</p>
<h2 id="conclusion">Conclusion</h2>
<p>A ReadMe file is often a developer’s first introduction to your project. If it’s clear and gives them relevant information they need, you’ll make other developers’ lives much easier, let them save time while introducing to the project and… keep calm by avoiding unnecessary frustrations. To be effective, your ReadMe should both engage your clients and be fun to use in open source projects.</p>yashumittalThe clarity of readme files is critical for software developers. That information varies from installation instructions to potential bugs and depends on the nature of the software. Fortunately, there is a set of good practices to follow if you want your ReadMe to be neat.
https://i.imgur.com/qd4rNQ7.jpg
Why Your Webpage Has Poor Conversion Rates2017-08-30T19:18:00+00:002017-08-30T19:18:00+00:00https://blog.codecarrot.net/why-your-webpage-has-poor-conversion-rates<p>Conversion rates are one of the most popular and accurate KPIs in web apps. That’s why you want to keep them high. There are many reasons why conversion rates are low, and we usually associate them with design issues. That said, the reasons for poor conversion rates can go way beyond interfaces, colors and the content used. Solving the non-design issues mentioned in this article will <a href="/why-your-frontend-maintenance-costs-so-much">help you boost conversion rates and will also take less time, money and effort than redesign and implementation</a>.</p>
<h2 id="first-impression-is-the-last-impression">First impression is the last impression</h2>
<p>One common reason for a low conversion rate is that people don’t like what they see when they land on your site or, even worse, they can’t find the information they need. If you’re getting traffic but no conversions, or have a high bounce rate on a page you think should keep visitors on your site, then it makes sense to troubleshoot site design issues first.</p>
<h2 id="you-dont-know-about-your-audience">You Don’t Know About Your Audience</h2>
<p>When you’re thinking about how to improve your conversion rate, another issue to consider is whether you’re clear on who is your audience are. If you’re not marketing to the right set of people, then you’ll end up with a low conversion rate, and sales will decline.</p>
<h2 id="you-dont-react-to-users-behaviour">You Don’t React to Users Behaviour</h2>
<p>There is only a short spam of time in which you have to react to a user’s behaviour. For example, if a users lands on a pricing page, send a targeted message about the pricing. Every user is expecting a reaction, and if the website doesn’t react, they think it’s broken and leave.</p>
<h2 id="you-dont-support-your-users-browsers">You Don’t Support Your Users’ Browsers</h2>
<p>Have you checked how your website works on browsers your visitors use? All the relevant data can be found in analytics tools, such as Google Analytics, and you should monitor these data on a regular basis to get most out of an analytics tool. You might be missing on many opportunities, if your website doesn’t display properly on a browser that the majority of your audience like.</p>
<h2 id="you-dont-handle-errors-gracefully">You Don’t Handle Errors Gracefully</h2>
<p>One of the most common reasons for the users to leave your app is when a they have a buggy experience and there’s no information on what went wrong. Users would rather see that something went wrong and seeing no results and feeling abandoned.</p>
<h2 id="your-web-page-is-slow">Your Web Page is Slow</h2>
<p>According to <a href="https://www.aberdeen.com/research/5136/ra-performance-web-application/content.aspx">Aberden Group Report</a>, a 1-second delay in page load time equals 11 percent fewer page views, a 16-percent decrease in customer satisfaction, and a 7-percent loss in conversions.</p>
<p>The reason your web page loads slowly becuase you are <a href="#you-fetch-too-much-data-on-your-pages">fetching too muching data on your page</a>.</p>
<p>The website speed can substantially decrease the number of current and potential clients. If the website fails to load within expected time, they won’t hesitate and move to other site. These stats are ruthless but show that you can’t afford to keep your website slow.</p>
<h2 id="you-fetch-too-much-data-on-your-pages">You Fetch Too Much Data on Your Pages</h2>
<p>This piece advice is perfect for <a href="/how-developing-spa-influenced-me-and-my-code">Single Page Applications</a>, but might be applied to others too. Fetching the most important data for the users first and fetch the less important things later in the background.</p>
<p>For example, loading the comments later on once the main content is rendered. It won’t spoil the experience and will increase the website’s loading speed.</p>
<h2 id="your-web-app-is-useless-on-mobile">Your Web App is Useless on Mobile</h2>
<p>Have you ever used your web app on mobile? Have you used it on a device other than your own, which probably is the latest iPhone or a flagship Android device?</p>
<p>It’s the best practice to make your application work with latest devices, but you should also your web app’s performance on older devices with different operating systems to make sure it is also usable on those. Very often, the UX can be totally broken due to bad implementations.</p>
<h2 id="your-page-is-distracting">Your Page Is Distracting</h2>
<p>For best results, make sure each page is focused on the core offer you want to make. That means removing navigation and other unnecessary elements on cart pages or landing pages. Check analytics for your pages to see if anything’s stopping people from converting.</p>
<h2 id="call-to-action-is-unclear">Call to Action Is Unclear</h2>
<p>Is your call to action (CTA) clearly written and clearly visible? If not, you could be missing out on conversions. It’s crucial to have a single, clear call to action so visitors have no doubt about what to do next.</p>
<h2 id="not-testing-enough">Not Testing Enough</h2>
<p>Testing is at the heart of conversion optimization, so it’s a no-brainer to test your entire website user flow to see where you can make improvements and boost conversions.</p>
<h2 id="summary">Summary</h2>
<p>A perfect design or code is not the only way you can increase conversion rates. There are a lot of things to consider, among them page load speed issues. You should make the overall performance and compatibility a priority when working on your products.</p>
<p>Do you want your app to take 1-second delay in page load time? Which equals 7-percent drop in conversion. If not? Then <a href="https://www.codecarrot.net/hire-us">contact us</a></p>yashumittalConversion rates are one of the most popular and accurate KPIs in web apps. That’s why you want to keep them high. There are many reasons why conversion rates are low, and we usually associate them with design issues. That said, the reasons for poor conversion rates can go way beyond interfaces, colors and the content used. Solving the non-design issues mentioned in this article will help you boost conversion rates and will also take less time, money and effort than redesign and implementation.
https://i.imgur.com/Yifq74M.jpg
Why Your Frontend Maintenance Costs So Much2017-08-30T18:53:00+00:002017-08-30T18:53:00+00:00https://blog.codecarrot.net/why-your-frontend-maintenance-costs-so-much<p>How much should you pay for a car?</p>
<p>If you have a budget for a Hyundai car, don’t expect to get a Ferrari or BMW.</p>
<p><em>Same goes for a Software development</em></p>
<p>Wheather you are a experienced software development or just an intern, you are probably aware that creating an app costs both time and money. Business owner or entrepreneur doesn’t realize that maintenance and further development after an app is deployed can sometimes be quite expensive too.</p>
<p>It is not uncommon to see a gradual decrease in performance of your development team over time, especially after they meet the first or second deadline due to bugs, hotfixes and other issues.</p>
<p>If you have no technical background, than probably you will always be surprised that changing the position of an element or adding a new modal can take so much time. Especially, when it took only a moment a few months ago! Have you ever wondered what makes it so hard?</p>
<p>We’ve jot down the most popular reasons for the dropping productivity and increasing costs of <a href="/why-your-webpage-has-poor-conversion-rates">frontend maintenance</a>.</p>
<h2 id="no-automatic-build-process-and-deployment">No Automatic Build Process and Deployment</h2>
<p>The build and deployments refers to the process that converts files and other assets under the developers’ responsibility into a software product, it is the last steps before your app goes live. If they are not prepared in a proper, error-proof way, it might be expensive to avoid bugs and stay confident in the future.</p>
<h2 id="no-tests">No Tests</h2>
<p>Automatic tests are the essential ingredient of refactoring and maintenance. It is an activity to check whether the actual results match the expected results. It involves execution of a software component or system component to evaluate one or more properties of interest.</p>
<p>Automatic testing also helps to identify errors, gaps or missing requirements in contrary to the actual requirements, this allows developers stay on top of it and focus on improving and adding features instead of being constantly afraid that they break something.</p>
<p>Fewer bugs, fewer crashes and better code quality are the benefits of automatic testing.</p>
<h2 id="poor-quality-code">Poor Quality Code</h2>
<p>If you take a look at code, you won’t be able to estimate quickly how good the project is. Understandability in code is for us humans. Computers don’t care how we write the code but we should.</p>
<p>Is any consistency over the repository. Are all the files structured identically? Are the indents consistent? What about semicolons? I know it might sound silly for a non-technical person, but the <a href="/what-is-code-quality">quality of your code</a> is a very good indicator of the project’s status.</p>
<p>Architects don’t go off and just draw whatever they want on a blueprint without paying attention to the standards and practices of their industry. In the software industry, we need to establish good standards and practices that we can follow just like builders and architects follow.</p>
<h2 id="no-structured-javascript">No Structured JavaScript</h2>
<p>There are a lot of smart folks in the JavaScript world that have been doing and talking about this for longer than I knew what a <code class="highlighter-rouge">div</code> was, there are lot of people who claim that world was a better place when there were no JavaScript frameworks. I don’t think so.</p>
<p>I have also seen apps written in Vanilla JS, without any structure. This is a very fast approach for reaching your MVP, but it will ultimately fail, and you will need to pay the technical debt as the code get more messier and harder to maintain.</p>
<p>I would always recommend using at least some kind of framework or library, like <a href="https://www.codecarrot.net/services/">Vue.js</a> or <a href="https://www.codecarrot.net/services/">React.js</a>.</p>
<h2 id="no-responsive-web-design-or-mobile-first-approach">No Responsive Web Design or Mobile-first Approach</h2>
<p>The <a href="/5-ways-to-bridge-the-designer-developer-gap-on-responsive-web-projects">mobile-first approach</a> is exactly as it sounds: designing for the smallest screen and working your way up. It is one of the best strategies to create either a responsive or adaptive design.</p>
<p>Even if it is rare today, there are still a lot of apps that don’t employ Responsive Web Design at all. When it comes to mobile, introducing mobile designs from the start can take less time.</p>
<p>A mobile first approach is perfect for structuring the CSS in your web app. If all the work is focused around mobile-first, it’s much easier to introduce tweaks and make sense of code that you have not seen for months.</p>
<h2 id="no-readme">No Readme</h2>
<p><a href="/how-to-write-a-readme">Readme.md is one of the key files on your project</a> – you will need every time a new developer joins the team.</p>
<p>Code that you wrote 6 months ago is often indistinguishable from code that someone else has written. You will look upon a file with a fond sense of remembrance. Then a sneaking feeling of foreboding, knowing that someone less experienced, less wise, had written it.</p>
<p>Documentation allows you to transfer the why behind code. Much in the same way code comments explain the why, and not the how, documentation serves the same purpose.</p>
<p>A good documentation consist of <em>(requirements, specifications, etc)</em> and what it’s using <em>(tools, dependencies etc)</em>. These are important in case it breaks - when I come back to a project I need to know how to get it working again if anything changed, how to use it, build it and eventually deploy it. If you don’t keep it updated from the very beginning, it can make your dev team spend hours on tackling problems somebody already solved earlier.</p>
<h2 id="summary">Summary</h2>
<p>There can be lot more reasons why the maintenance of your app might be expensive, and you can actually prevent most of them from happening. The next thing is to make sure your team delivers top-quality code, regardless of how much time is left until the deadline, it’s better to take more time for shipping top-quality code instead of spending more time on fixing bugs.</p>
<p>Spending too much time on your app maintenance? Let’s <a href="https://www.codecarrot.net/hire-us">cut down the cost of your fronted maintenance</a>.</p>yashumittalHow much should you pay for a car?
https://i.imgur.com/OLGj9J3.jpg
5 Great Hidden Features in the Chrome DevTools2017-08-30T18:30:10+00:002017-08-30T18:30:10+00:00https://blog.codecarrot.net/5-great-hidden-features-in-the-chrome-devtools<p>The Chrome DevTools is a set of panels built into the Google Chrome browser that help web developers inspect code. You can access the DevTools using shortcut keys <em>(Ctrl+Shift+i</em> on Windows and <em>CMD+Option+i</em> on Mac) or by right clicking anywhere on a webpage and selecting <strong>Inspect Element</strong> from the context menu. Using these tools, you can debug CSS, profile JavaScript performance, view network activity, and so much more.</p>
<p>There are many videos you can find on Internet, which gives a detailed overview if you want to start from the beginning. However, there’s so much functionality packed into the DevTools that it’s hard to know about everything that’s there. Here are five less obvious features of the DevTools that most developers don’t know about!</p>
<h2 id="1-force-element-state">1. Force Element State</h2>
<p>Let’s start with an easy one that everyone can use. In the Elements panel of the Chrome DevTools, you can right click on any HTML element on the page. This will bring up a context menu with many options, one of which is a submenu labeled <strong>Force Element State</strong>. Inside of this submenu you’ll see that you can apply several common pseudo classes, including <em>:active</em>, <em>:hover</em>, <em>:focus</em>, and <em>:visited</em>.</p>
<p><img src="https://cdn.codecarrot.net/images/chrome-devtools-force-element-state-in-windows-10.png" alt="Screenshot of the DevTools featuring a contextual submenu titled Force Element State" /></p>
<p>This is incredibly useful if you’re trying to debug CSS or JavaScript that relies on these pseudo classes. In the case of a stylesheet, you might want to experiment with some special :hover styling applied to a button. By forcing the element state, you can simply apply some CSS directly in the Chrome DevTools instead of editing in your text editor, refreshing the browser, hovering over the button, going back to the text editor, and so on.</p>
<h2 id="2-dom-breakpoints">2. DOM Breakpoints</h2>
<p>Many developers are familiar with the breakpoints that can be added to JavaScript in the Sources panel of the Chrome DevTools. Applying breakpoints to specific lines will break (pause) your JavaScript during execution so that you can get a better look into what’s going on. However, many people don’t realize that you can also break any time the HTML is modified.</p>
<p>In the Elements panel context menu is another item labeled <strong><em>Break on…</em></strong> with several submenu items. This submenu includes the items <em>Subtree Modifications</em>, <em>Attributes Modifications</em>, and <em>Node Removal</em>.</p>
<p><img src="https://cdn.codecarrot.net/images/chrome-devtools-breakon-in-windows-10.png" alt="Screenshot of the DevTools featuring a contextual submenu titled Break On" /></p>
<p>Often JavaScript code will modify the HTML code of a page in some way, but if your page isn’t behaving the way you expect, then you might be able to debug the problem by carefully watching how elements are modified.</p>
<ul>
<li><strong>Subtree Modifications</strong> item will break if there are any child elements that are added, removed, or modified.</li>
<li><strong>Attributes Modifications</strong> item will break if the element’s attributes change in any way.</li>
<li><strong>Node Removal</strong> will break if the element is deleted entirely.</li>
</ul>
<p>If you’d like to see this in action, here’s <a href="//developers.google.com/chrome-developer-tools/docs/javascript-debugging#breakpoints-mutation-events">a demo in the Chrome DevTools documentation</a>.</p>
<h2 id="3-the-console-api">3. The Console API</h2>
<p>The Console is a very powerful panel in the DevTools because it allows you to execute arbitrary JavaScript directly on a page as well as view any errors or log messages that the page is outputting. Many developers know they can use the <code class="highlighter-rouge">console.log()</code> method to print messages to the console. This is useful for many purposes, such as viewing the values of variables or determining whether or not a specific conditional statement was indeed executed.</p>
<p>However, <code class="highlighter-rouge">console.log()</code> is just one method accessible through the Chrome DevTools Console API. Another useful method is <code class="highlighter-rouge">console.count()</code> which can be used to count the number of times a block of code has been executed. For example, while debugging JavaScript, you might suspect that a function is being executed more times than it should. Using the <code class="highlighter-rouge">console.count()</code> method, you can find out for sure.</p>
<p>There are many other useful methods, so be sure to check out the <a href="//developers.google.com/chrome-developer-tools/docs/console-api#consolecountlabel">Console API Reference</a>.</p>
<h2 id="4-the-audits-panel">4. The Audits Panel</h2>
<p>OK, so this one isn’t exactly hidden. However, developers spend a lot of time in the Elements panel or the Console, so it’s easy to overlook the Audits panel. This powerful tool automatically inspects several aspects of your web page’s performance and identifies areas for improvement. It’s difficult and often impossible to perfectly optimize every web page on every performance factor, but this still provides a good sanity check for areas you might have missed.</p>
<p><img src="https://cdn.codecarrot.net/images/chrome-devtools-audits-in-windows-10.png" alt="Screenshot of the DevTools featuring the Audits panel" /></p>
<p>When you bring up the Audits panel, you can select which audits you’d like to run. You can optionally select to reload the page and run the audits at load time. After running an audit, you’ll be provided with a list of several common front-end performance best practices that can be applied to your page. Again, this isn’t a requirements list; they’re just helpful automated suggestions.</p>
<h2 id="5-additional-network-panel-columns">5. Additional Network Panel Columns</h2>
<p>The Network panel in the Chrome DevTools paints a vivid picture of network activity. You can see which assets were loaded, when they were loaded, in what order they were loaded, and so on. This is represented in a colorful chart with several columns containing additional information about each asset. Some columns are enabled by default, but the majority of the available columns are hidden! You can access these columns by right clicking on any column header and, from the context menu, selecting the column you would like to enable.</p>
<p><img src="https://cdn.codecarrot.net/images/chrome-devtools-network-in-windows-10.png" alt="Screenshot of the Chrome DevTools featuring the column header contextual menu in the Network panel" /></p>
<p>Here’s a full list of the additional columns that are normally hidden:</p>
<ul>
<li>Cache-Control</li>
<li>Connection</li>
<li>Content-Encoding</li>
<li>Content-Length</li>
<li>Cookies</li>
<li>Domain</li>
<li>ETag</li>
<li>Keep-Alive</li>
<li>Last-Modified</li>
<li>Scheme</li>
<li>Server</li>
<li>Set-Cookies</li>
<li>Vary</li>
</ul>
<p>Full disclosure: I don’t quite understand what every one of these does yet (I can’t find any complete documentation for these), but if you do know, feel free to elaborate in the comments. However, many of them are obviously useful right away. For example, by enabling the Content-Encoding menu item, you can see which assets are being served gzipped. This is helpful when you’re trying to minimize asset transfer time.</p>
<p>It’s amazing that the Chrome DevTools manage to stay elegant and simple to use when there are so many powerful features available. If you have any more tips or tricks, please share!</p>yashumittalThe Chrome DevTools is a set of panels built into the Google Chrome browser that help web developers inspect code. You can access the DevTools using shortcut keys (Ctrl+Shift+i on Windows and CMD+Option+i on Mac) or by right clicking anywhere on a webpage and selecting Inspect Element from the context menu. Using these tools, you can debug CSS, profile JavaScript performance, view network activity, and so much more.
https://cdn.codecarrot.net/images/5-great-hidden-features-in-the-chrome-devtools.png
Speeding Up Page Load Times2017-08-30T10:30:00+00:002017-08-30T10:30:00+00:00https://blog.codecarrot.net/speeding-up-page-load-times<p>The average size of a web page has been growing at an accelerating rate over the last few years. Research carried out by <a href="//httparchive.org/interesting.php#bytesperpage">HTTP Archive</a> in January reports that the average page size has now hit 1.25mb. For users with a decent broadband connection this is not too troublesome, but for users that still rely on slow dial-up connections (like in many developing countries) or crippled mobile data networks this poses a real issue.</p>
<p><img src="https://cdn.codecarrot.net/images/http-archive-survey-2013.png" alt="Average Web Page Size 2013 - source: HTTP Archive" /></p>
<p>In 2011, KISSmetrics created an <a href="//blog.kissmetrics.com/loading-time/">infographic</a> showing how page load times can have a direct impact on user engagement. The data is most likely a little out of date now but the general principle is still valid.</p>
<p>In this blog post you are going to learn about a number of techniques that you can use to help reduce the size of your web pages and speed up your page load times.</p>
<h2 id="optimize-images">Optimize Images</h2>
<p>One of the easiest ways to decrease the size of your web pages and increase load times is to properly resize and optimize your images. Using images that are larger than they will be displayed in your web page means that there is a lot of unnecessary data being transferred.</p>
<p>Once you have resized your images there are a number really handy tools like <a href="//www.smushit.com/ysmush.it/">Smush.it</a> and <a href="//tinypng.org/">TinyPNG</a> to reduce the size of the files further. These tools work by removing unnecessary data from the images and optimizing the use of colors.</p>
<h2 id="minify-css--javascript-code">Minify CSS & JavaScript Code</h2>
<p>Minifying your CSS and JavaScript code can help to reduce the size of these assets by removing unneeded whitespace and optimizing your code. Minifying your code does make it incredibly difficult for humans to read, so I would only minify when you are ready to launch a site.</p>
<p><a href="//www.minifycss.com/css-compressor/">CSS Compressor</a> and <a href="//www.minifyjavascript.com/">JavaScript Compressor</a> are two handy web apps that can minify your code for you.</p>
<h2 id="avoid-using-import">Avoid using @import</h2>
<p>The <code class="highlighter-rouge">@import</code> CSS rule allows you to load other CSS files into your stylesheet. Whilst this can sometimes be useful, files loaded through <code class="highlighter-rouge">@import</code> cannot be downloaded at the same time as the main stylesheet which increases the overall load time of the page.</p>
<p>Instead of using <code class="highlighter-rouge">@import</code> consider copying the CSS from the external file into your main stylesheet or use multiple <code class="highlighter-rouge"><link></code> tags.</p>
<h2 id="reduce-the-number-of-http-requests">Reduce The Number of HTTP Requests</h2>
<p>Another great way of speeding up your web pages is to simply reduce the number of files that need to be loaded. There a few ways that you can do this.</p>
<p><strong>Combine Files</strong></p>
<p>Combining multiple stylesheets into one file is a really useful way of eliminating extra HTTP requests. This strategy can also be adopted for your JavaScript files. A single larger CSS or JavaScript file will often load quicker because more time can be spent downloading the data rather than establishing multiple connections to a server.</p>
<p><strong>Use CSS Sprites</strong></p>
<p>Using CSS sprites can be a great way of reducing the number of HTTP requests your page needs to load. A CSS sprite is a collection of images within a single image file. They are particularly useful for instances where you have a lot of small icons. You set the background image of an HTML element to the sprite using CSS and then use some clever CSS code to position the background image so that only the image within the sprite that you wish to use is visible.</p>
<p>For more information on using CSS sprites check out <a href="//css-tricks.com/css-sprites/">this article</a> on CSS-Tricks.</p>
<h2 id="leverage-browser-caching">Leverage Browser Caching</h2>
<p>Your website probably contains files that don’t change very often. Things like images, CSS files and JavaScript assets. You can help to speed up your page load times by instructing the browse to cache a copy of these files on the hard drive so that next time the user visits your web page these resources will not need to be downloaded again.</p>
<p>To leverage browser caching you need to update your web server configuration to serve up resources with <code class="highlighter-rouge">Expires</code> headers. This is what tells the browser how long it should keep the cached files for.</p>
<p><img src="https://cdn.codecarrot.net/images/expires-headers.png" alt="Inspecting Response Headers in Chrome Dev Tools" /></p>
<p>The easiest way to update your server configuration for Apache servers is to use a <code class="highlighter-rouge">.htaccess</code> file. The code below shows an example configuration that would set all image, CSS and JavaScript resources to be cached for 1 month.</p>
<div class="highlighter-rouge"><div class="highlight"><pre class="highlight"><code><IfModule mod_expires.c>
# Enable Expirations
ExpiresActive On
# Default Expiration Time
ExpiresDefault "access plus 1 month"
# Expiration for Images
ExpiresByType image/gif "access plus 1 month"
ExpiresByType image/png "access plus 1 month"
ExpiresByType image/jpg "access plus 1 month"
ExpiresByType image/jpeg "access plus 1 month"
# Expiration for CSS
ExpiresByType text/css "access plus 1 month”
# Expiration for JavaScript
ExpiresByType application/javascript "access plus 1 month"
</IfModule>
</code></pre></div></div>
<p>For more information on browser caching check out this page on the Google Developers website.</p>
<h2 id="tools-for-testing-page-load-times">Tools for Testing Page Load Times</h2>
<p>There are some fantastic tools available that can help you test the performance of your websites. In this section you are going to learn about three of my favorites.</p>
<p><strong>PageSpeed</strong></p>
<p><img src="https://cdn.codecarrot.net/images/speed-test-of-codecarrot-blog-website-from-google.png" alt="Analysing a Web Page with PageSpeed (Web App) by Google" /></p>
<p>PageSpeed is a tool from Google that can analyze your web pages and give you pointers on what to do to improve performance. The tool will provide you with an overall ‘PageSpeed Score’ that allows you to quickly see how well optimized a page is.</p>
<p>You can either install PageSpeed as an <a href="//developers.google.com/speed/pagespeed/insights_extensions">extension for Chrome or Firefox</a>, or use the <a href="//developers.google.com/speed/pagespeed/insights">web app</a>.</p>
<p><strong>Speed Tracer</strong></p>
<p><a href="//developers.google.com/web-toolkit/speedtracer/">Speed Tracer</a> is another tool from Google that allows you to take a more in-depth look into the performance of your web pages. Instead of making recommendations this tool just provides you with the data that you need to identify performance bottlenecks in your web pages.</p>
<p><strong>YSlow</strong></p>
<p><a href="//developer.yahoo.com/yslow/">YSlow</a> is a browser extension from Yahoo! that is very similar to PageSpeed. Running YSlow against your web pages will give you a score and a grade that can be used to track the impact of your performance optimizations. Like PageSpeed, YSlow also gives you recommendations of techniques to use to increase performance.</p>
<p><strong>Developer Tools</strong></p>
<p><img src="https://cdn.codecarrot.net/images/chrome-devtools-network-in-windows-10.png" alt="Using Chrome Dev Tools to Examine Asset Load Times" /></p>
<p>As well as using the tools mentioned above, many browsers like Chrome and Firefox come with built-in developer tools that you can use to help find areas where performance could be increased. The ‘Network’ tab in the Chrome developer tools for example can be really useful for identifying large files that take a long time to load.</p>
<h2 id="summary">Summary</h2>
<p>In this post we have covered a number of techniques that you can adopt to increase the performance of your web pages. However this has by no means been an exhaustive list. Using the tools that are outlined above you will be able to identify loads more tips for enhancing the performance of your web pages. Take a look at some of the links below for more information on enhancing the performance of your websites.</p>
<h2 id="useful-links">Useful Links</h2>
<ul>
<li><a href="//developer.yahoo.com/yslow/">YSlow</a></li>
<li><a href="//developers.google.com/speed/pagespeed/">PageSpeed</a></li>
<li><a href="//developers.google.com/web-toolkit/speedtracer/">Speed Tracer</a></li>
<li><a href="//css-tricks.com/css-sprites/">CSS Sprites</a></li>
</ul>yashumittalThe average size of a web page has been growing at an accelerating rate over the last few years. Research carried out by HTTP Archive in January reports that the average page size has now hit 1.25mb. For users with a decent broadband connection this is not too troublesome, but for users that still rely on slow dial-up connections (like in many developing countries) or crippled mobile data networks this poses a real issue.
https://cdn.codecarrot.net/images/romain-peli-266992.jpg
The Best Chrome Extensions for Web Professionals2017-08-30T10:30:00+00:002017-08-30T10:30:00+00:00https://blog.codecarrot.net/the-best-chrome-extensions-for-web-professionals<p>It’s no secret that web designers and developers love the Google Chrome web browser and Chrome Extensions. The strength of the <a href="/5-great-hidden-features-in-the-chrome-devtools">Chrome Developer Tools</a> make it an excellent choice for web design and development work. The Chrome DevTools provide lots of built-in functionality, but if you still feel like there’s something missing, Chrome Extensions can fill in the gap.</p>
<h2 id="chrome-extensions-pros-and-cons">Chrome Extensions: Pros and Cons</h2>
<p>The only big downside to 3rd party Chrome Extensions is that the quality and usability can be fairly inconsistent. I’ve used lots of Chrome extensions over the years and I also carefully looked through the Chrome Web Store today to see if there were any I’d missed. I found that many Chrome Extensions didn’t work or they duplicated functionality already present in the Chrome DevTools (and as a result, have become abandoned). I also encountered lots of inconsistent UI. Even so, there are still a few extensions that I think are extremely useful when building websites.</p>
<h2 id="web-developer">Web Developer</h2>
<p>Before the first release of Google Chrome, most web designers and developers used Firefox. Similar to Chrome, Firefox also has lots of 3rd party support. One of the most popular Firefox extensions was simply titled “Web Developer”. In the years since, this extension has made its way into Chrome and it’s still packed with an incredible amount of useful functionality.</p>
<p><img src="https://i.imgur.com/BsqfwQQ.png" alt="Screenshot of the Web Developer extension for Google Chrome" /></p>
<p>It’s hard to just pick one feature from Web Developer, but I find myself using the <a href="https://chrome.google.com/webstore/detail/web-developer/bfbameneiokkgbdmiekhjnmfkcnldhhm">Outline tab when debugging CSS pretty frequently</a>. It can be very helpful to highlight elements based on how they’re positioned on the page.</p>
<h2 id="builtwith">BuiltWith</h2>
<p><a href="https://chrome.google.com/webstore/detail/builtwith-technology-prof/dapjbgnjinbpoindlpdmhochffioedbn/">BuiltWith</a> is an extension with a very straightforward purpose. If you’re curious about the web technologies that were used to create a site, you can click on the BuiltWith button to see a dropdown list of servers, frameworks, and more.</p>
<p><img src="https://i.imgur.com/DQX44W0.png" alt="Screenshot of the BuiltWith extension for Google Chrome" /></p>
<p>BuiltWith doesn’t always work perfectly, so if you really do need to know how a site is built, be sure to do some follow up investigation of your own in a more robust tool (like the Chrome DevTools). However, it can still be a quick way to satisfy curiosity and point your search in the right direction.</p>
<h2 id="jsonview">JSONView</h2>
<p>By default, Chrome doesn’t do a great job of formatting JavaScript Object Notation (JSON) files when they’re viewed in a tab. This might not seem important, but if your web application passes around JSON quite a lot, you’ll often need to look at JSON data for debugging purposes.</p>
<p><img src="https://i.imgur.com/TFbvH5M.png" alt="Screenshot of the JSONView extension for Google Chrome" /></p>
<p>With the <a href="https://chrome.google.com/webstore/detail/jsonview/chklaanhfefbnpoihckbnefhakgolnmc">JSONView extension</a> installed, JSON will be formatted nicely, making it far more readable.</p>
<h2 id="responsive-inspector">Responsive Inspector</h2>
<p>The <a href="https://chrome.google.com/webstore/detail/responsive-inspector/memcdolmmnmnleeiodllgpibdjlkbpim">Responsive Inspector extension</a> was created by a developer at Adobe as a side project. This extension takes the media queries from any applied stylesheets and presents them in an interactive chart.</p>
<p><img src="https://i.imgur.com/MHekt7v.png" alt="Screenshot of the Responsive Inspector extension for Google Chrome" /></p>
<h2 id="loom">Loom</h2>
<p>Reporting bugs requires the ability to identify relevant information which needs to be added to every bug report. Modern bug tracking tools offer the ability to attach this needed information automatically. Nevertheless there always will be some room for misunderstanding or missing information which results in a need for communication and that’s where <a href="https://chrome.google.com/webstore/detail/loom-video-recorder-scree/liecbddmkiiihnedobmlmillhodjkdmb">Loom</a> comes in, a video recording tool to record your camera, microphone, and desktop simultaneously, then your video is instantly available to share via Loom.</p>
<p><img src="https://i.imgur.com/19EuOzC.png" alt="Recording a video using loom on CodeCarrot Website" /></p>
<p>Here at <a href="https://www.codecarrot.net/">CodeCarrot</a>, we use Loom for client update and bug tracking.</p>
<h2 id="did-i-miss-anything">Did I miss anything?</h2>
<p>High quality Chrome Extensions can be difficult to find. If I missed one that you can’t live without, let me know.</p>yashumittalIt’s no secret that web designers and developers love the Google Chrome web browser and Chrome Extensions. The strength of the Chrome Developer Tools make it an excellent choice for web design and development work. The Chrome DevTools provide lots of built-in functionality, but if you still feel like there’s something missing, Chrome Extensions can fill in the gap.
https://i.imgur.com/Vf4ckjV.png
Tips for Debugging HTML & CSS2017-08-30T09:32:00+00:002017-08-30T09:32:00+00:00https://blog.codecarrot.net/tips-for-debugging-html-and-css<p>Debugging HTML and CSS problems can really ruin your creative momentum, but they’re inevitable when building almost any web project. It’s annoying when you’re designing a page and suddenly you notice that something isn’t quite aligned right or colored correctly.</p>
<p>If you know how to face rendering problems directly and solve them quickly, building websites becomes much more enjoyable. Every issue you encounter will be unique in its own way, but most can be resolved by adhering to a few basic “sanity checks” that can help you work with your code, rather than fight it.</p>
<p>The steps outlined below are in no particular order. Debugging is part technical and part intuitive art form that’s only learned with practice. As you build more projects, the debugging methods that you should try in different situations will become more obvious.</p>
<h2 id="check-for-syntax-errors">Check for syntax errors</h2>
<p>Even though these are in no particular order, my debugging instincts usually jump to syntax first. I ask myself, “Did I miss a semicolon? Did I forget to close an HTML element?” No matter how experienced you become, you’ll still make typos and mistakes. Often times you can simply switch back to your text editor, look at the last thing you wrote, and fix the problem.</p>
<p><img src="https://cdn.codecarrot.net/images/csslint.png" alt="CSS Lint" /></p>
<p>However, if you’re working in a large project, it might be helpful to use a validation tool. The <a href="//validator.w3.org/">W3C markup validation service</a> and the <a href="//jigsaw.w3.org/css-validator/">W3C CSS validator</a> are perfect for this, because any warnings or errors will reveal places to check your code. Sometimes these results can be difficult to read, though, because these validators aren’t specifically designed for detailed debugging. An alternative is to use a linting tool like <a href="//csslint.net/">CSS Lint</a>, which can perform an analysis of your code and help you find errors.</p>
<h2 id="prevent-cross-browser-issues">Prevent cross-browser issues</h2>
<p>Most display problems in HTML and CSS come from cross-browser issues. The site looks fine in one browser, but there’s problems in another. This is almost always a problem on any web project, but you can minimize the number of cross-browser issues by preventing many of them from happening in the first place.</p>
<p>First, always make sure that you’re using a good CSS reset, such as <a href="//codecarrotnet.github.io/normalize.css/">normalize</a>. This will “level out” inconsistencies between browsers and make them behave in a more uniform fashion. Even if you’re just doing a quick one-page site and you’re not using a CSS framework, you should still use a reset.</p>
<p>Second, check to make sure that the HTML elements and CSS properties that you’re using are indeed supported. HTML and CSS are always evolving, and browser vendors do the best they can to keep up with the latest standards. If you’re not sure about the support for a particular element or property, look it up on <a href="//caniuse.com/">caniuse.com</a> for a detailed breakdown.</p>
<h2 id="outline-elements-with-web-developer">Outline elements with Web Developer</h2>
<p>When debugging, it can be helpful to outline elements on the page to figure out how they’re being rendered in relation to one another. You could write CSS to do this yourself, but a better way is to use the <a href="//chrispederick.com/work/web-developer/">Web Developer</a> browser extension available for Chrome, Firefox, and Opera.</p>
<p><img src="https://cdn.codecarrot.net/images/webdeveloper-outline-block-level-elements.png" alt="Screenshot of the Web Developer extension in Google Chrome, outlining elements on //blog.codecarrot.net" /></p>
<p>The Web Developer extension allows you to outline elements based on different criteria, such as display type or element type. At first glance this might seem trivial, but in a convoluted web of cascading declarations, it can be easy to lose track of <em>which element ultimately ended up with which properties and values</em>. This is helpful for catching rogue floats or mixed display types. And speaking of display types…</p>
<h2 id="check-display-types">Check display types</h2>
<p>Every element on a web page has a display type, such as inline, block, inline-block, table, flex, none, and many more. Check out the <a href="//developer.mozilla.org/en-US/docs/Web/CSS/display">MDN docs display page</a> for a full list (even if you think you know them all, you might be surprised).</p>
<p>CSS works best when you build within the standards outlined by the W3C. However, with so many combinations, it’s impossible to know <em>exactly</em> how any particular browser might handle different elements with mixed display modes. Mixing display types is perfectly normal and isn’t inherently bad, it’s just something to be aware of when debugging. If you see an opportunity to match the display type of sibling elements, try it out to see if it fixes the problem.</p>
<h2 id="turn-off-styles-with-the-chrome-devtools">Turn off styles with the Chrome DevTools</h2>
<p>If you’re wondering how your CSS is affecting a particular page element, the Chrome DevTools make it easy to toggle each property. In the Google Chrome web browser, simply right click and choose Inspect Element from the context menu. This will bring up the Chrome DevTools.</p>
<p><img src="https://cdn.codecarrot.net/images/chrome-styles.png" alt="Screenshot of the Styles panel in the Chrome DevTools" /></p>
<p>On the right side of the Elements panel, you should see a tab called <em>Styles</em> with some CSS inside of it. This shows you which CSS declarations are being applied to the selected element, and if you hover over each CSS property, you can uncheck them individually. When a property is crossed out, it typically means that it is being overridden elsewhere. You may need to uncheck a property in several places to actually remove it from an element.</p>
<p>This might seem a bit tedious at first, but it’s actually one of the fastest methods for spotting style errors that are inconsistent with the CSS you’ve written (or at least the CSS you <em>think</em> you’ve written). This is useful for deciding whether or not a particular CSS property is a problem and whether or not the CSS you wrote is actually being applied (which could be an issue with selector specificity). And then, if your CSS is being applied, you can also figure out if it’s producing an effect at all.</p>
<h2 id="use-the-computed-tab-in-the-chrome-devtools">Use the “computed” tab in the Chrome DevTools</h2>
<p>In the Elements panel of the Chrome DevTools, right next to the Styles tab you’ll find another tab called <em>Computed</em>. I find myself spending a lot of time in this tab because it tells you exactly how the browser is computing your styles. When working on large projects this is essential for resolving cascading issues, problems with selector specificity, and more.</p>
<p>At the top of the Computed tab there’s a very important diagram that every web professional should make use of. This is a representation of the box model and it shows you how much space an element occupies in pixels.</p>
<p><img src="https://cdn.codecarrot.net/images/chrome-computed.png" alt="Screenshot of the Computed panel in the Chrome DevTools" /></p>
<p>More specifically, it breaks down an element’s space into content, padding, margin, and border. When elements aren’t spaced quite right, this can be incredibly helpful because you can literally “do the math” and figure out which element is a problem. For example, if you have three floated elements that should all be on the same line, and the last element is instead jumping down to the next line, you can inspect the width of the parent container and then compare its value to the widths of the three elements.</p>yashumittalDebugging HTML and CSS problems can really ruin your creative momentum, but they’re inevitable when building almost any web project. It’s annoying when you’re designing a page and suddenly you notice that something isn’t quite aligned right or colored correctly.
https://cdn.codecarrot.net/images/lights.jpg
Using Emmet to Speed Up Front-End Web Development2017-08-30T07:40:00+00:002017-08-30T07:40:00+00:00https://blog.codecarrot.net/using-emmet-to-speed-up-front-end-web-development<p>Emmet is a plugin for your text editor that provides a number of tools to help you quickly write HTML and CSS code. The plugin, which was previously known as <em>Zen Coding</em>, allows you to generate HTML elements using a CSS-like syntax.</p>
<p>In this post you’re going to be learning how to use the Emmet syntax to generate HTML and CSS code.</p>
<h2 id="plugins-for-your-favorite-text-editor">Plugins For Your Favorite Text Editor</h2>
<p>Before we get started you’ll need to install the Emmet plugin for your text editor. There’s a whole bunch of plugins available that cover most of the popular text editors.</p>
<p>Click the link for your text editor below and follow the instructions to install the plugin.</p>
<ul>
<li><a href="//github.com/sergeche/emmet-sublime#readme">Sublime Text</a></li>
<li><a href="//github.com/emmetio/emmet-atom#readme">Atom</a></li>
<li><a href="//github.com/emmetio/emmet-eclipse#readme">Eclipse</a></li>
<li><a href="//emmet.io/download/textmate2/">TextMate</a></li>
<li><a href="//emmet.io/download/coda/">Coda</a></li>
<li><a href="//github.com/emmetio/Emmet.sugar#readme">Espresso</a></li>
<li><a href="//github.com/emmetio/emmet.chocmixin#readme">Chocolat</a></li>
<li><a href="//github.com/emmetio/npp#readme">Notepad++</a></li>
<li><a href="//github.com/emmetio/brackets-emmet#readme">Brackets</a></li>
<li><a href="//github.com/emmetio/netbeans#readme">NetBeans</a></li>
<li><a href="//github.com/emmetio/dreamweaver#readme">Adobe Dreamweaver</a></li>
<li><a href="//community.activestate.com/xpi/zen-coding">Komodo Edit</a></li>
<li><a href="//github.com/emmetio/pspad">PSPad</a></li>
<li><a href="//github.com/emmetio/textarea">Textarea</a></li>
<li><a href="//github.com/emmetio/codemirror#readme">CodeMirror</a></li>
</ul>
<h2 id="generating-elements">Generating Elements</h2>
<p>Now that you’ve got the Emmet plugin installed lets take a look at the syntax that you will be using to generate elements.</p>
<div class="language-html highlighter-rouge"><div class="highlight"><pre class="highlight"><code>ul>li>img+p
</code></pre></div></div>
<p>Emmet uses abbreviations to define the elements that you want to generate. The syntax for these abbreviations is very much like CSS so it might look familiar to you.</p>
<p>Once you’re done writing an abbreviation, hitting the <code class="highlighter-rouge">TAB</code> key will trigger Emmet to parse the line and generate the requested code. The example above would generate the following code.</p>
<div class="language-html highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="nt"><ul></span>
<span class="nt"><li></span>
<span class="nt"><img</span> <span class="na">src=</span><span class="s">""</span> <span class="na">alt=</span><span class="s">""</span><span class="nt">></span>
<span class="nt"><p></p></span>
<span class="nt"></li></span>
<span class="nt"></ul></span>
</code></pre></div></div>
<p>Lets dive a bit deeper into the Emmet syntax to see how you can create more complex abbreviations.</p>
<p>Child ></p>
<p>The child operator <code class="highlighter-rouge">></code> is used to nest elements within each other.</p>
<div class="language-html highlighter-rouge"><div class="highlight"><pre class="highlight"><code>section>div>p
</code></pre></div></div>
<p>The example above will generate the following markup.</p>
<div class="language-html highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="nt"><section></span>
<span class="nt"><div></span>
<span class="nt"><p></p></span>
<span class="nt"></div></span>
<span class="nt"></section></span>
</code></pre></div></div>
<h2 id="sibling-">Sibling +</h2>
<p>The sibling operator + is used to create elements at the same level as the previous element in the abbreviation.</p>
<div class="language-html highlighter-rouge"><div class="highlight"><pre class="highlight"><code>section+div+p
</code></pre></div></div>
<p>This example generates the following HTML.</p>
<div class="language-html highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="nt"><section></section></span>
<span class="nt"><div></div></span>
<span class="nt"><p></p></span>
</code></pre></div></div>
<h2 id="climb-up-">Climb-up ^</h2>
<p>The climb-up <code class="highlighter-rouge">^</code> operator is used to move up one level in the tree structure. This can come in handy when you’re using the child operator >.</p>
<div class="language-html highlighter-rouge"><div class="highlight"><pre class="highlight"><code>section>div>p>a^p
</code></pre></div></div>
<p>In this abbreviation two paragraph elements will be created within the div but only the first paragraph will contain a link.</p>
<div class="language-html highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="nt"><section></span>
<span class="nt"><div></span>
<span class="nt"><p><a</span> <span class="na">href=</span><span class="s">""</span><span class="nt">></a></p></span>
<span class="nt"><p></p></span>
<span class="nt"></div></span>
<span class="nt"></section></span>
</code></pre></div></div>
<h2 id="multiplication">Multiplication</h2>
<p>The multiplication operator <code class="highlighter-rouge">*</code> is used to define how many occurrences of the element should be generated. The operator applies to the last element before the operator (unless you are using grouping).</p>
<div class="language-html highlighter-rouge"><div class="highlight"><pre class="highlight"><code>ul>li*5
</code></pre></div></div>
<p>This example will generate an unordered list with five list items.</p>
<div class="language-html highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="nt"><ul></span>
<span class="nt"><li></li></span>
<span class="nt"><li></li></span>
<span class="nt"><li></li></span>
<span class="nt"><li></li></span>
<span class="nt"><li></li></span>
<span class="nt"></ul></span>
</code></pre></div></div>
<h2 id="grouping">Grouping</h2>
<p>You can group together sections of an abbreviation using parenthesis <code class="highlighter-rouge">()</code>. Grouping is useful when creating complex abbreviations.</p>
<div class="language-html highlighter-rouge"><div class="highlight"><pre class="highlight"><code>ul>(li>a)*3
</code></pre></div></div>
<p>This simple example will generate an unordered list and three list items, each of which contain a link.</p>
<div class="language-html highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="nt"><ul></span>
<span class="nt"><li><a</span> <span class="na">href=</span><span class="s">""</span><span class="nt">></a></li></span>
<span class="nt"><li><a</span> <span class="na">href=</span><span class="s">""</span><span class="nt">></a></li></span>
<span class="nt"><li><a</span> <span class="na">href=</span><span class="s">""</span><span class="nt">></a></li></span>
<span class="nt"></ul></span>
</code></pre></div></div>
<p>Lets take a look at a more complex example.</p>
<div class="language-html highlighter-rouge"><div class="highlight"><pre class="highlight"><code>div>header+(article>p*3)+footer>p
</code></pre></div></div>
<p>In this abbreviation we have defined a div element that contains an header, article and footer. The article element also contains three paragraph elements.</p>
<p>This abbreviation would generate the following HTML.</p>
<div class="language-html highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="nt"><div></span>
<span class="nt"><header></header></span>
<span class="nt"><article></span>
<span class="nt"><p></p></span>
<span class="nt"><p></p></span>
<span class="nt"><p></p></span>
<span class="nt"></article></span>
<span class="nt"><footer></span>
<span class="nt"><p></p></span>
<span class="nt"></footer></span>
<span class="nt"></div></span>
</code></pre></div></div>
<h2 id="setting-attributes">Setting Attributes</h2>
<p>You can also use the Emmet syntax to add attributes to your generated elements. In this section you are going to learn how to define IDs, classes and other attributes in your abbreviations.</p>
<h2 id="ids">IDs</h2>
<p>IDs are defined using the familiar pound-sign <code class="highlighter-rouge">#</code> syntax from CSS.</p>
<div class="language-html highlighter-rouge"><div class="highlight"><pre class="highlight"><code>div#main
</code></pre></div></div>
<p>This simple example will generate a <code class="highlighter-rouge"><div></code> element with the ID <code class="highlighter-rouge">main</code>.</p>
<div class="language-html highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="nt"><div</span> <span class="na">id=</span><span class="s">"main"</span><span class="nt">></div></span>
</code></pre></div></div>
<h2 id="classes">Classes</h2>
<p>Classes are defined using the dot-syntax <code class="highlighter-rouge">.</code>. You can string together multiple classes just as you do in CSS.</p>
<p>div.content.page
This example will generate a <code class="highlighter-rouge"><div></code> element with the classes <code class="highlighter-rouge">content</code> and <code class="highlighter-rouge">page</code>.</p>
<div class="language-html highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="nt"><div</span> <span class="na">class=</span><span class="s">"content page"</span><span class="nt">></div></span>
</code></pre></div></div>
<h2 id="custom-attributes">Custom Attributes</h2>
<p>You can add any attribute you want by enclosing the attribute definition with box brackets <code class="highlighter-rouge">[]</code>.</p>
<div class="language-html highlighter-rouge"><div class="highlight"><pre class="highlight"><code>a[target="_blank"]
</code></pre></div></div>
<p>This example generates a link with the <code class="highlighter-rouge">target</code> attribute set to <code class="highlighter-rouge">_blank</code>.</p>
<div class="language-html highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="nt"><a</span> <span class="na">href=</span><span class="s">""</span> <span class="na">target=</span><span class="s">"_blank"</span><span class="nt">></a></span>
</code></pre></div></div>
<h2 id="item-numbering">Item Numbering</h2>
<p><img src="https://cdn.codecarrot.net/images/ul-li-item-5.gif" alt="ul li 5 items" /></p>
<p>Emmet also includes a feature that allows you to automatically add numbers to your HTML. This is useful for applications like setting unique classes on list items. Just add a dollar sign <code class="highlighter-rouge">$</code> to your abbreviation where you want the number to appear and Emmet will take care of the rest.</p>
<div class="language-html highlighter-rouge"><div class="highlight"><pre class="highlight"><code>ul>li.item$*5
</code></pre></div></div>
<p>Here Emmet will add the current index to the classes for each of the list items.</p>
<div class="language-html highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="nt"><ul></span>
<span class="nt"><li</span> <span class="na">class=</span><span class="s">"item1"</span><span class="nt">></li></span>
<span class="nt"><li</span> <span class="na">class=</span><span class="s">"item2"</span><span class="nt">></li></span>
<span class="nt"><li</span> <span class="na">class=</span><span class="s">"item3"</span><span class="nt">></li></span>
<span class="nt"><li</span> <span class="na">class=</span><span class="s">"item4"</span><span class="nt">></li></span>
<span class="nt"><li</span> <span class="na">class=</span><span class="s">"item5"</span><span class="nt">></li></span>
<span class="nt"></ul></span>
</code></pre></div></div>
<h2 id="reverse-numbering">Reverse Numbering</h2>
<p>Using <code class="highlighter-rouge">$</code> alone will cause elements to be numbered in ascending order. There may however be occasions when you wish to reverse this ordering. This can be done by adding the <code class="highlighter-rouge">@-</code> syntax after the dollar sign <code class="highlighter-rouge">$</code>.</p>
<div class="language-html highlighter-rouge"><div class="highlight"><pre class="highlight"><code>ul>li.item$@-*5
</code></pre></div></div>
<p>In this example the list item classes will be numbered in descending order.</p>
<div class="language-html highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="nt"><ul></span>
<span class="nt"><li</span> <span class="na">class=</span><span class="s">"item5"</span><span class="nt">></li></span>
<span class="nt"><li</span> <span class="na">class=</span><span class="s">"item4"</span><span class="nt">></li></span>
<span class="nt"><li</span> <span class="na">class=</span><span class="s">"item3"</span><span class="nt">></li></span>
<span class="nt"><li</span> <span class="na">class=</span><span class="s">"item2"</span><span class="nt">></li></span>
<span class="nt"><li</span> <span class="na">class=</span><span class="s">"item1"</span><span class="nt">></li></span>
<span class="nt"></ul></span>
</code></pre></div></div>
<h2 id="setting-text">Setting Text</h2>
<p>You can set the text that should be contained within an element by placing it in curly braces <code class="highlighter-rouge">{}</code>.</p>
<div class="highlighter-rouge"><div class="highlight"><pre class="highlight"><code>p{Hello CodeCarrot!}
</code></pre></div></div>
<p>This abbreviation will generate a simple <code class="highlighter-rouge"><p></code> element with the text <code class="highlighter-rouge">Hello CodeCarrot!</code>.</p>
<div class="language-html highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="nt"><p></span>Hello CodeCarrot!<span class="nt"></p></span>
</code></pre></div></div>
<p>You can even use the numbering syntax we looked at earlier within the curly braces.</p>
<div class="highlighter-rouge"><div class="highlight"><pre class="highlight"><code>ul>(li>a{Item $})*5
</code></pre></div></div>
<p>This abbreviation will create five list items containing text that is numbered.</p>
<div class="language-html highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="nt"><ul></span>
<span class="nt"><li><a</span> <span class="na">href=</span><span class="s">""</span><span class="nt">></span>Item 1<span class="nt"></a></li></span>
<span class="nt"><li><a</span> <span class="na">href=</span><span class="s">""</span><span class="nt">></span>Item 2<span class="nt"></a></li></span>
<span class="nt"><li><a</span> <span class="na">href=</span><span class="s">""</span><span class="nt">></span>Item 3<span class="nt"></a></li></span>
<span class="nt"><li><a</span> <span class="na">href=</span><span class="s">""</span><span class="nt">></span>Item 4<span class="nt"></a></li></span>
<span class="nt"><li><a</span> <span class="na">href=</span><span class="s">""</span><span class="nt">></span>Item 5<span class="nt"></a></li></span>
<span class="nt"></ul></span>
</code></pre></div></div>
<h2 id="using-snippets">Using Snippets</h2>
<p>Another great feature in Emmet is the ability to quickly generate snippets of code using preset abbreviations.</p>
<div class="highlighter-rouge"><div class="highlight"><pre class="highlight"><code>html:5
</code></pre></div></div>
<p>The example above generates a simple HTML5 compliant page template.</p>
<div class="language-html highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="cp"><!doctype html></span>
<span class="nt"><html</span> <span class="na">lang=</span><span class="s">"en"</span><span class="nt">></span>
<span class="nt"><head></span>
<span class="nt"><meta</span> <span class="na">charset=</span><span class="s">"UTF-8"</span><span class="nt">></span>
<span class="nt"><title></span>Document<span class="nt"></title></span>
<span class="nt"></head></span>
<span class="nt"><body></span>
<span class="nt"></body></span>
<span class="nt"></html></span>
</code></pre></div></div>
<p>Take a look at the <a href="//docs.emmet.io/customization/snippets/">documentation</a> for more about the snippets that are available.</p>
<h2 id="using-emmet-with-css">Using Emmet with CSS</h2>
<p>Emmet also includes a number of abbreviations to help you generate CSS code. These abbreviations are often shorthand versions of the CSS property names. You can find a full list of the CSS abbreviations that are available by examining the Emmet <code class="highlighter-rouge">snippets.json</code> file.</p>
<div class="highlighter-rouge"><div class="highlight"><pre class="highlight"><code>tsh
</code></pre></div></div>
<p>This abbreviation will generate the CSS syntax needed for the text-shadow property.</p>
<div class="highlighter-rouge"><div class="highlight"><pre class="highlight"><code>text-shadow: hoff voff blur #000
</code></pre></div></div>
<p>Adding a hyphen - before the abbreviation will trigger Emmet to generate vendor prefixes for the property.</p>
<div class="highlighter-rouge"><div class="highlight"><pre class="highlight"><code>-tsh
</code></pre></div></div>
<p>If your text editor supports tabstops Emmet will place multiple cursors so that you can fill out values for all of the vendor-prefixed properties simultaneously.</p>
<div class="highlighter-rouge"><div class="highlight"><pre class="highlight"><code>-webkit-text-shadow: hoff voff blur #000;
-moz-text-shadow: hoff voff blur #000;
-ms-text-shadow: hoff voff blur #000;
-o-text-shadow: hoff voff blur #000;
text-shadow: hoff voff blur #000;
</code></pre></div></div>
<h2 id="final-thoughts">Final Thoughts</h2>
<p>I’ve been using Emmet for a few months now and I’ve found it really useful. Especially when I need to quickly generate a list or table.</p>
<p>We’ve covered a lot of the syntax in this blog post but Emmet has a whole bunch of other features that we haven’t looked at. If you’re interested in finding out more I recommend that you spend a bit of time looking through the <a href="//docs.emmet.io/">Emmet documentation</a>.</p>
<p>What are your thoughts about Emmet? Share your views in the comments below.</p>
<h2 id="useful-links">Useful Links</h2>
<ul>
<li><a href="//docs.emmet.io/">Emmet Documentation</a></li>
<li><a href="//emmet.io/download/">Emmet Plugins</a></li>
</ul>yashumittalEmmet is a plugin for your text editor that provides a number of tools to help you quickly write HTML and CSS code. The plugin, which was previously known as Zen Coding, allows you to generate HTML elements using a CSS-like syntax.
https://cdn.codecarrot.net/images/emmet.jpg
Why jQuery is the Most Popular JavaScript Library2017-08-30T07:20:00+00:002017-08-30T07:20:00+00:00https://blog.codecarrot.net/why-jquery-is-the-most-popular-javaScript-library<p><a href="//ejohn.org/">John Resig</a> released <a href="//jquery.com/">jQuery</a> on <strong>August 26th, 2006</strong> and changed the <a href="">front-end development</a> landscape forever. jQuery quickly arose to be the go to JavaScript framework.</p>
<p>A number of other libraries came out around the same time such as <a href="//mootools.net/">MooTools</a> and <a href="//prototypejs.org/">Prototype</a> but there’s a number of reasons why jQuery has surpassed them in popularity.</p>
<h2 id="reuse-of-css-selectors">Reuse of CSS Selectors</h2>
<p>jQuery came out around the time web designers and front-end web developers were getting used to creating table-less, semantically marked-up web pages. It was a lot of effort to switch from one way of coding to another. CSS was being learned by the web community en masse.</p>
<p>jQuery used the same CSS selectors that people were using for styling their pages to add behavior. There was no context switching when referring to the same elements.</p>
<p>jQuery also implemented many of the CSS3 selectors prior to browser implementations. This meant you could apply behaviors to elements you couldn’t necessarily select with CSS yet! You didn’t feel you were wasting your time learning new selectors as they’d be eventually supported by modern browsers. In most cases these selectors are widely supported today.</p>
<p>jQuery was forward thinking and kept CSS selectors in the forefront. Other libraries, initially, sought to extend JavaScript and ignore the fresh blood of the new CSS developers and missed out on the opportunity to welcome them into their fold. It was an afterthought to them, the horse had already bolted.</p>
<h2 id="unobtrusive-by-design">Unobtrusive by Design</h2>
<p>Not only did jQuery emulate CSS with it’s selectors, it also employed the same separation from content.</p>
<p>While other JavaScript libraries were struggling with Unobtrusive JavaScript techniques, jQuery made it damn-near impossible to write hacky-in-the-markup-JavaScript.</p>
<p>By its very design, jQuery made it so that if you didn’t know what you were doing with JavaScript you’d write unobtrusive code without even realizing it. Fantastic.</p>
<h2 id="its-simple">It’s Simple</h2>
<p>jQuery didn’t set out to extend JavaScript’s APIs in a JavaScripty way. It was built with the developer in mind. The <em>user</em> of the library. From a developer’s perspective, the user experience for jQuery is a delight.</p>
<p>If you want to hide all paragraph elements with the class of <code class="highlighter-rouge">.spoiler</code> call the <code class="highlighter-rouge">hide()</code> method.</p>
<div class="language-js highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="nx">$</span><span class="p">(</span><span class="dl">"</span><span class="s2">p.spoiler</span><span class="dl">"</span><span class="p">).</span><span class="nx">hide</span><span class="p">()</span>
</code></pre></div></div>
<p>But what if you want to remove elements from the DOM? That’s right, you call the <code class="highlighter-rouge">remove()</code> method.</p>
<div class="language-js highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="nx">$</span><span class="p">(</span><span class="dl">"</span><span class="s2">div.warning</span><span class="dl">"</span><span class="p">).</span><span class="nx">remove</span><span class="p">()</span>
</code></pre></div></div>
<p>It’s the principle of least surprise, both because you’re using pre-existing CSS knowledge and because of jQuery’s simple method names. You’ll find yourself guessing methods rather than looking them up in the documentation. When you do go to the documentation there’s plenty of example code to see each part of the jQuery API in action.</p>
<h2 id="conclusion">Conclusion</h2>
<p>By its design, jQuery has allowed novices and pros to improve the experiences of countless numbers of users. It took the impossible job of thinking about both the end-user and the developer and made something that checked all the right boxes.</p>
<p>jQuery is a testament to John Resig and team’s ingenuity. I can’t imagine how much fun I’d have missed out on without jQuery in my toolbox.</p>
<p>Do you use jQuery? Why do you think it’s so popular? I’d love to hear your opinions.</p>yashumittalJohn Resig released jQuery on August 26th, 2006 and changed the front-end development landscape forever. jQuery quickly arose to be the go to JavaScript framework.
https://cdn.codecarrot.net/images/jquery-popular-javascript-library.png
Working with Files and Folders2017-08-30T07:10:00+00:002017-08-30T07:10:00+00:00https://blog.codecarrot.net/working-with-files-and-folders<p>Files and folders are a key concept in almost any career. Whether you want to create websites, make mobile apps, write music, or edit photos, it’s important to understand as much as you can about files and folders.</p>
<p><img src="https://cdn.codecarrot.net/images/files-and-folders-in-atom-text-editor.png" alt="List of files and folder in atom text editor" /></p>
<p><strong>Websites and mobile apps are composed of many different files. In order to create software, it’s important to understand how files and folders work.</strong></p>
<p>New developers might not understand the concept of files and folders. Websites and mobile devices have cleverly hidden their file systems, so it’s possible you might not have much experience working with files and folders.</p>
<p>In this article, we’re going to start from the beginning and work our way up to more advanced concepts. If you already know the topics we’re discussing, feel free to skip ahead.</p>
<h2 id="what-is-a-file-system">What is a File System?</h2>
<p>A computer file is a piece of information that exists on some sort of storage medium, like a hard drive or an optical disc. A file can be almost anything, such as a song, a video, a picture, or a document. Modern computers typically have millions of files, so to organize them, files can be grouped into folders based on many types of categorization. For example, you might have a folder that contains all of your documents, with folders inside of it to organize the type of documents. This is how information is stored on every modern computer, so where did this idea come from?</p>
<p><img src="https://cdn.codecarrot.net/images/files-and-folders.jpg" alt="Files and folder" /></p>
<p>Before computers, people stored almost all information on printed papers which were typically called files. The most popular way to organize paper was to use folders. Because files and folders were used in offices around the globe, people that made some of the first personal computers borrowed the idea of files and folders to make computers easier to understand. This was a smart idea at the time, but now that computers have almost completely replaced paper, this might not make sense now.</p>
<p><img src="https://cdn.codecarrot.net/images/mac-trash-icon.png" alt="Mac trash icon" /></p>
<p><strong>The file and folder metaphor extends to many parts of Windows and Mac operating systems. For example, the Trash on Mac OS X and the Recycle Bin on Windows allows users to organize documents they want to get rid of before deleting them permanently.</strong></p>
<p>Still, files are important for any job that even slightly involves a computer. Let’s learn how to use files and folders.</p>
<h2 id="navigating-files-and-folders">Navigating Files and Folders</h2>
<p>If you’re new to using files and folders, you’ll need to use either a Windows or a Mac operating system, because most devices like iPhones and iPads don’t give you direct access to the file system. If there’s a Windows logo in the bottom left of your screen, you’re using Windows. If there is an Apple logo in the top left of your screen, you’re using a Mac. Be sure to follow the directions for your operating system below.</p>
<p><strong>Windows</strong></p>
<p>If you’re using Windows, you can navigate the files and folders on your computer by using an app called File Explorer (previously known as Windows Explorer). If you’re using Windows 8, the easiest way to open File Explorer is to type it into the search bar. If you’re on an older version of Windows, go to the Start menu and select All Programs and then go to Accessories. Inside of the Accessories folder you’ll find Windows Explorer. Please note that this is a different app than the Internet Explorer web browser.</p>
<p><img src="https://cdn.codecarrot.net/images/file-explorer-in-windows-8.png" alt="File Explorer in windows 8" /></p>
<p>Once you’ve opened Explorer, you’ll notice that the left side of the window contains a list of files and folders on your computer. If you click on the triangle next to a folder, it will reveal its contents in the list, but if you click on the folder itself, you’ll see its contents in the right side of the window. To open a file, simply double click it.</p>
<p>You can move files and folders around by clicking and dragging them to the desired location. Be very careful when moving files around, because it’s easy to misplace them! You can also reveal additional options by right-clicking on any file.</p>
<p><a href="//windows.microsoft.com/en-us/windows-8/files-folders-windows-explorer">If you’d like to read more detailed instructions about File Explorer, here’s the official support article from Microsoft.</a></p>
<p><strong>Mac</strong></p>
<p>If you’re using a Mac, you can navigate your files and folders with an app called the Finder. To open a new Finder window, click the Finder icon in the Dock, which is usually located at the bottom of your screen (if not, then it should be on the left or right sides). The Finder should always on the left most icon in the dock.</p>
<p><img src="https://cdn.codecarrot.net/images/mac-finder-icon.png" alt="Mac finder icon" /></p>
<p>Once a new Finder window is open, you’ll see a list of file locations on the left side under the “Favorites” header and on the right side you’ll see a list of files. The Finder usually defaults to a list of all the files on your computer, but you can look at other files by clicking on the opens in the left panel. For example, if you select Applications you’ll see all of your installed apps. If you select Desktop, you can see everything that’s stored on your Desktop (in fact, your Desktop is just another folder on your computer).</p>
<p><img src="https://cdn.codecarrot.net/images/mac-finder.jpg" alt="Mac finder" /></p>
<p><strong>In Mac OS X, the Finder is the file system navigator. By contrast, there is no built-in equivalent to this on iOS devices like iPhones and iPads.</strong></p>
<p>To view the contents of a folder, you can click the triangle next to the folder. You can also double click on a folder to open it and view its contents that way.</p>
<p><a href="//support.apple.com/kb/ht2470">If you’d like to learn more about the Finder, here’s the official support article from Apple.</a></p>
<h2 id="creating-and-editing-files">Creating and Editing Files</h2>
<p><strong>Windows</strong></p>
<p>Almost every app interacts with files in some way, but on Windows, one common way to interact with files is to use the text editor called Notepad. This app has been included with every version since Windows 95. To open Notepad on Windows 8, simply type Notepad into the search bar. In older versions of Windows, you can click the Start menu, choose All Programs, then go to Accessories. Similar to Explorer, you should find Notepad in the Accessories menu.</p>
<p><img src="https://cdn.codecarrot.net/images/w8-notepad.png" alt="Windows 8 Notepad" /></p>
<p><strong>On Windows, the app Notepad allows users to edit plain text documents.</strong></p>
<p>Once Notepad is open, start typing some text into the blank area. Then, save the file by hitting the keys <code class="highlighter-rouge">Control + S</code> together at the same time. This will bring up a screen that asks you where you’d like to save the file. You can find a place on your computer, create a folder to save it in, or simply save it to the Desktop. It doesn’t matter where you save the file, as long as you can remember where you saved it.</p>
<p>Now, close Notepad by hitting the X in the upper right corner of the Window. Next, try opening Notepad again and hit the keys <code class="highlighter-rouge">Control + O</code> together. This will bring up a screen that allows you to open a file. If you navigate to where you stored the file originally, you’ll be able to open it again.</p>
<p>Alternatively, instead of opening Notepad again, you can open the File Explorer and navigate to the folder where you saved your file. Double clicking the file should open it in Notepad or a similar program that can read text files.</p>
<p><strong>Mac</strong></p>
<p>On a Mac, there are many apps that interact with the file system, but a common method for interacting with files is to use a text editor such as TextEdit. To open TextEdit, hit the keys <code class="highlighter-rouge">Command + Spacebar</code> at the same time to open Spotlight search. Then type “TextEdit” and hit enter.</p>
<p><img src="https://cdn.codecarrot.net/images/textedit-ss.png" alt="Text editor Sublime Text" /></p>
<p><strong>On Mac OS X, the app TextEdit allows users to edit plain text documents, provided the “Make Plain Text” option is set in the Format menu.</strong></p>
<p>Once TextEdit is open, click the “New Document” button in the bottom left corner of the window. Start typing some text in the blank area, then save the document by hitting the keys <code class="highlighter-rouge">Command + S</code> at the same time. This will open a new screen that allows you to save the document.</p>
<p><img src="https://cdn.codecarrot.net/images/save-on-mac.png" alt="Save on Mac" /></p>
<p><strong>In save dialog boxes on Mac OS X, you can click the triangle icon to expand the window and view more file system options.</strong></p>
<p>Next the text field that’s labeled “Save As” you’ll notice a triangle pointing downward. Clicking this triangle will expand the window and allow you to navigate to a more specific place to save your file.</p>
<p>Once you’ve saved your file, you can reopen it by searching for the filename in Spotlight, or by opening a Finder window and navigating to the file. You can also open it in TextEdit by hitting the keys <code class="highlighter-rouge">Command + O</code> at the same time to bring up the open file screen.</p>
<h2 id="file-extensions-and-plain-text">File Extensions and Plain Text</h2>
<p>Word processing apps like Microsoft Word, Apple Pages, or Google Docs, all will add hidden formatting to files so that they can display fonts, colors, bolded text, and more. If you’re writing code, this is bad, because while the formatting might be hidden to you it is not hidden to the computer. If this hidden formatting is present, your code won’t run properly and probably won’t work at all.</p>
<p>Instead, you should always make sure you write code in apps that save what’s called <em>plain text</em> files. To save files as plain text, you need to make sure that your files have the proper file extension. A file extension comes at the end of a file’s name and is separated with a dot. The extension describes the file’s format and gives a hint about its contents. For example, MP3 is a popular file extension for music files and GIF is a popular extension for short animations. Plain text file formats include TXT, HTML, CSS, and many others.</p>
<p>HTML is the primary computer language used to create web pages, so it’s important to know how to create them. Here’s how to save HTML files on Windows and on a Mac:</p>
<p><strong>Windows</strong></p>
<p>If you open Notepad again (instructions above) and save a document, you’ll notice in the save dialog box that you can change the file extension. By default, Notepad will save files using the TXT extension, but if you’d like to save an HTML file, change the filename to the HTML extension. For example, your filename might look like this:</p>
<p><code class="highlighter-rouge">mydocument.html</code></p>
<p>Save the document and you’re done!</p>
<p><strong>Mac</strong></p>
<p>If you open TextEdit again (instructions above) and open a document, you’ll need to convert it to plain text before saving. To convert a document to plain text in TextEdit, select Format menu and click the item that says Make Plain Text.</p>
<p><img src="https://cdn.codecarrot.net/images/make-plain-text.png" alt="Make plain Text File" /></p>
<p><strong>In the app TextEdit on Mac OS X, you must select the “Make Plain Text” option from the Format menu in order to save plain text documents.</strong></p>
<p>Now when you save the document, you can change the file extension. Instead of using the TXT file extension, try changing it to HTML and saving the document. For example, your filename might look something like this:</p>
<p><code class="highlighter-rouge">mydocument.html</code></p>
<p>HTML is one of the topics you can learn on <a href="//www.youtube.com/channel/UCIAktdRKgMZMkNbJY44spqA">CodeCannon</a> and is foundational to building websites.</p>yashumittalFiles and folders are a key concept in almost any career. Whether you want to create websites, make mobile apps, write music, or edit photos, it’s important to understand as much as you can about files and folders.
https://cdn.codecarrot.net/images/sanwal-deen-93466.jpg
How To Integrate PayPal With Ruby on Rails2017-08-30T06:40:00+00:002017-08-30T06:40:00+00:00https://blog.codecarrot.net/how-to-integrate-paypal-with-ruby-on-rails<p>PayPal is a online payments system that supports online money transfers. With the help of this guide you will be able to integrate intercom no time.</p>
<p>We have two different approaches available when implementing PayPal gateway:</p>
<h2 id="active-merchant">Active Merchant</h2>
<p>Active Merchant is a gem extracted from Shopify.</p>
<p><strong>Pros:</strong></p>
<ul>
<li>Support for multiple payment gateways</li>
<li>Maintained by Shopify</li>
</ul>
<p><strong>Cons:</strong></p>
<ul>
<li>Non-customizable</li>
<li>Doesn’t support REST API</li>
</ul>
<p>I’d recommend Active Merchant only when your project is a shop and requires only simple payments.</p>
<p>Instructions for Active Merchant can be found <a href="https://jldbasa.github.io/blog/2014/01/25/rails-4-paypal-express-checkout-integration/">here</a>.</p>
<h2 id="official-paypal-sdk">Official PayPal SDK</h2>
<p>PayPal Ruby SDK uses REST API and is recommended and maintained by PayPal.</p>
<p><strong>Pros:</strong></p>
<ul>
<li>Flexible</li>
<li>Big capabilities</li>
<li>Provided by PayPal</li>
</ul>
<p><strong>Cons:</strong></p>
<ul>
<li>None</li>
</ul>
<p>Use official PayPal Ruby SDK every time you need customized solution and single payment method (PayPal).</p>
<h3 id="step-1">Step 1</h3>
<p>Install and configure gem following <a href="https://github.com/paypal/PayPal-Ruby-SDK#installation">gem README instructions</a>.</p>
<h3 id="step-2">Step 2</h3>
<p>Familiarize yourself with <a href="https://devtools-paypal.com/guide/pay_paypal/ruby">simple usage guide</a>.</p>
<h3 id="step-3">Step 3</h3>
<p>How to use this SDK in Rails:</p>
<p>At first, create controller which handles main operations required to process payments:</p>
<p>[code]</p>
<p>It has four main actions for every step:</p>
<ul>
<li><strong>index</strong> handles initial operations (this could be form with amount or simple PayPal button)</li>
<li><strong>notify</strong> handles payment object creation (it should have proper <code class="highlighter-rouge">return_url</code>) and request to paypal for response with link to accept payment process</li>
<li><strong>done</strong>, this action is immediately invoked after redirect from paypal acceptance page. In this method we can finalize the whole transaction and additionally save record to our database</li>
<li><strong>cancel</strong> takes care of clients who reconsider their payment and cancel acceptance on paypal page</li>
</ul>
<h3 id="step-4">Step 4</h3>
<p>Good idea is to create a Service which handles some of SDK operations:</p>
<p>[code]</p>yashumittalPayPal is a online payments system that supports online money transfers. With the help of this guide you will be able to integrate intercom no time.
https://i.imgur.com/a8qugwb.png
How To Integrate Intercom With Ruby on Rails2017-08-30T06:10:00+00:002017-08-30T06:10:00+00:00https://blog.codecarrot.net/how-to-integrate-intercom-with-ruby-on-rails<p>Intercom is a popular marketing and consumer communication tool. With the help of this guide you will be able to integrate intercom no time.</p>
<p>I assume you have:</p>
<ul>
<li>User model configured, or</li>
<li><code class="highlighter-rouge">config.include_for_logged_out_users = true</code> set in Intercom configuration (for more info see Step 3)</li>
</ul>
<p>We will use <a href="https://github.com/intercom/intercom-rails">Intercom-rails</a> gem.</p>
<h2 id="pros--cons">Pros & Cons</h2>
<h3 id="pros">Pros</h3>
<ul>
<li>Easy to integrate</li>
<li>Multipurpose - in-app live chat, marketing automation, customer feedback, customer support, client tracking</li>
<li>Many integrations available - Facebook, Github, Mailchimp, Salesforce, Mixpanel, Stripe, Hipchat, Zendesk, Slack, Zapier, Webhooks</li>
<li>Great documentation</li>
</ul>
<h3 id="cons">Cons</h3>
<ul>
<li>Pricing - can become expensive in certain scenarios - few different plans to choose from (Live Chat, Marketing Automation, Customer Feedback, Customer Support), pricing based on number of tracked customers</li>
</ul>
<h2 id="step-1">Step 1</h2>
<p>Obtain app id from <a href="https://www.intercom.io/">intercom.io</a>.</p>
<h2 id="step-2">Step 2</h2>
<p>Add intercom-rails gem to your Gemfile:</p>
<pre><code class="language-gemfile">gem 'intercom-rails'
</code></pre>
<p>Then run</p>
<div class="language-ssh highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="k">bundle</span> install
</code></pre></div></div>
<p>Use your app id to generate a config file</p>
<div class="language-rb highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="n">rails</span> <span class="n">generate</span> <span class="n">intercom</span><span class="ss">:config</span> <span class="no">APP</span><span class="o">-</span><span class="no">ID</span>
</code></pre></div></div>
<h2 id="step-3">Step 3</h2>
<p>Initializer is saved as <code class="highlighter-rouge">config/initializers/intercom.rb</code>, here is where all the customization is done.</p>
<div class="language-rb highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="n">config</span><span class="p">.</span><span class="nf">app_id</span> <span class="o">=</span> <span class="no">ENV</span><span class="p">[</span><span class="s2">"INTERCOM_APP_ID"</span><span class="p">]</span> <span class="o">||</span> <span class="s2">"sOm3th1ng"</span>
</code></pre></div></div>
<p>Remember to remove hard coded APP-ID from initializer, it should be stored either in git ignored config file or as environmental variable.</p>
<p>By default, intercom script is added on every page where current user can be identified, this behavior can be changed by either limiting chat insertion for a specific controller:</p>
<div class="language-rb highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="n">skip_after_action</span> <span class="ss">:intercom_rails_auto_include</span>
</code></pre></div></div>
<p>Or chat can also be added for unidentified users:</p>
<div class="language-rb highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="n">config</span><span class="p">.</span><span class="nf">include_for_logged_out_users</span> <span class="o">=</span> <span class="kp">true</span>
</code></pre></div></div>
<h2 id="step-4">Step 4</h2>
<p>Further customization. Intercom offers some really interesting options.</p>
<p>Method that defines current user can be associated with Intercom via:</p>
<div class="language-rb highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="n">config</span><span class="p">.</span><span class="nf">user</span><span class="p">.</span><span class="nf">current</span> <span class="o">=</span> <span class="no">Proc</span><span class="p">.</span><span class="nf">new</span> <span class="p">{</span> <span class="n">some_method</span> <span class="p">}</span>
</code></pre></div></div>
<p>Custom data can be associated with user:</p>
<div class="language-rb highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="n">config</span><span class="p">.</span><span class="nf">user</span><span class="p">.</span><span class="nf">custom_data</span> <span class="o">=</span> <span class="p">{</span>
<span class="ss">plan: </span><span class="no">Proc</span><span class="p">.</span><span class="nf">new</span> <span class="p">{</span> <span class="o">|</span><span class="n">user</span><span class="o">|</span> <span class="n">user</span><span class="p">.</span><span class="nf">plan</span><span class="p">.</span><span class="nf">name</span> <span class="p">},</span>
<span class="ss">happy_user: </span><span class="no">Proc</span><span class="p">.</span><span class="nf">new</span> <span class="p">{</span> <span class="o">|</span><span class="n">user</span><span class="o">|</span> <span class="n">user</span><span class="p">.</span><span class="nf">happy?</span> <span class="p">}</span>
<span class="p">}</span>
</code></pre></div></div>
<p>Users can be grouped in order to treat them as if they were from a single company:</p>
<div class="language-rb highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="n">config</span><span class="p">.</span><span class="nf">company</span><span class="p">.</span><span class="nf">current</span> <span class="o">=</span> <span class="no">Proc</span><span class="p">.</span><span class="nf">new</span> <span class="p">{</span> <span class="n">company_method</span> <span class="p">}</span>
</code></pre></div></div>
<p>Intercom by default adds button to active chat, to override this behaviour add:</p>
<div class="language-rb highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="n">config</span><span class="p">.</span><span class="nf">inbox</span><span class="p">.</span><span class="nf">style</span> <span class="o">=</span> <span class="ss">:custom</span>
</code></pre></div></div>
<p>Now each element with id of Intercom will act as an activator, further customization of CSS selector can be achieved with:</p>
<div class="language-rb highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="n">config</span><span class="p">.</span><span class="nf">inbox</span><span class="p">.</span><span class="nf">custom_activator</span> <span class="o">=</span> <span class="s1">'.intercom-link'</span>
</code></pre></div></div>
<p>Check out their <a href="https://docs.intercom.io/">documentation</a> to know more about Intercom integration.</p>yashumittalIntercom is a popular marketing and consumer communication tool. With the help of this guide you will be able to integrate intercom no time.
https://i.imgur.com/cM3CfRC.png
Learning Markdown2017-08-27T22:44:00+00:002017-08-27T22:44:00+00:00https://blog.codecarrot.net/learning-markdown<p>The Markdown language was created in 2004 by John Gruber with substantial contributions from Aaron Swartz, with the goal of allowing people “to write using an easy-to-read, easy-to-write plain text format, and optionally convert it to structurally valid XHTML (or HTML)”.</p>
<p>Taking cues from existing conventions for marking up plain text in email such as setext, the language was designed to be readable as-is, without looking like it’s been marked up with tags or formatting instructions, unlike text which has been formatted with a Markup language, such as HTML, which has obvious tags and formatting instructions. Markdown is a formatting syntax for text that can be read by humans and can be easily converted to HTML.</p>
<p>Gruber wrote a Perl script, Markdown.pl, which converts marked-up text input to valid, well-formed XHTML or HTML and replaces left-pointing angle brackets (‘<’) and ampersands with their corresponding character entity references. It can be used as a standalone script, as a plugin for Blosxom or Movable Type, or as a text filter for BBEdit.</p>
<p>Markdown has since been re-implemented by others as a Perl module available on CPAN (Text::Markdown), and in a variety of other programming languages. It is distributed under a BSD-style license and is included with, or available as a plugin for, several content-management systems.</p>
<p>Markdown is a simple text-based markup language and conversion tool that allows writers to create great content for the web without having to worry too much about HTML. The syntax of the language is designed to be easy to learn and intuitive. It’s ideal for people that write content for the web but that might be distracted by the HTML syntax.</p>
<hr />
<p><strong>Note:</strong> Markdown wasn’t really designed as a language for creating complete web pages. It’s more suitable for just content areas like the body of a blog post, an article or web page copy.</p>
<p>Markdown files use the <code class="highlighter-rouge">.md</code> or <code class="highlighter-rouge">.text</code> extensions.</p>
<h2 id="use-cases">Use Cases</h2>
<p>Markdown is used in <strong>GitHub</strong>, <strong>GitBook</strong>, <strong>Reddit</strong>, <strong>Diaspora</strong>, <strong>Stack Overflow</strong>, <strong>OpenStreetMap</strong>, and many others.</p>
<h2 id="files">Files</h2>
<p>A markdown document is a text file with the .md extension. You can open a markdown file using a simple text editor.</p>
<hr />
<p>A common problem that faces HTML is that having all those tags in your markup makes it hard to actually read the content without viewing the page in a web browser. Markdown aims to solve this problem by providing a simple, unobtrusive syntax for marking up content elements such as headings, links, lists, images and more!</p>
<p>The Markdown syntax consists of a number of standard characters that represent HTML elements. When you are ready to publish your content, you pass your Markdown code through a converter that generates the HTML code for you.</p>
<h2 id="converting-markdown-to-html">Converting Markdown to HTML</h2>
<p>There are a number of different ways that you can convert your Markdown to HTML.</p>
<p>Use a plugin for your <strong>Content Management System</strong>.</p>
<p>There are plugins available for many popular Content Management Systems that will allow you to write your content using Markdown. Your Markdown will then be converted to HTML when you save your changes. If you are a WordPress user check out <a href="//wordpress.org/extend/plugins/wp-markdown/">WP-Markdown</a>.</p>
<p>Use a plugin for your <strong>Text Editor</strong>.</p>
<p>There also plugins available for popular text editors that provide tools for previewing and converting your markdown code. Federico Viticci put together a great <a href="//www.macstories.net/roundups/sublime-text-2-and-markdown-tips-tricks-and-links/">list of plugins</a> for Sublime Text 2.</p>
<p>Finally, you can also your the <strong>Command Line Tools</strong>.</p>
<p>The command line tools that can be downloaded from the project website also allow you to convert your markdown to HTML. If you’re a Mac user with homebrew you can simply do <code class="highlighter-rouge">brew install markdown</code> at the terminal to get these tools installed. Once installed, to use the command line interface you issue the following command.</p>
<p><code class="highlighter-rouge">markdown /path/to/input_file.md > output.html</code></p>
<p>Before I take you through the Markdown syntax lets take a look a simple example.</p>
<div class="highlighter-rouge"><div class="highlight"><pre class="highlight"><code># CodeCarrot
CodeCarrot is an Agile team with excellent track record & great communication skills. We love Web and mobile application development!
</code></pre></div></div>
<p>Running this through the Markdown converter would produce the following HTML.</p>
<div class="highlighter-rouge"><div class="highlight"><pre class="highlight"><code><h1 id="codecarrot">CodeCarrot</h1>
<p>CodeCarrot is an Agile team with excellent track record & great communication skills. We love Web and mobile application development!</p>
</code></pre></div></div>
<p>As you can see, the Markdown version is much easier to read. This is one of the biggest benefits of using Markdown and is also one of the reasons that a lot of experienced developers opt to use it over writing pure HTML.</p>
<p>Now that you understand the problem that Markdown is out to solve lets take a detailed look at the syntax.</p>
<h2 id="headings">Headings</h2>
<p>There are two different styles for marking up headings, <em>setext</em> and <em>atx</em>. In this article I’m going to focus on the <em>atx</em> style as it supports more heading levels (six levels against the two levels support by the setext style).</p>
<p>To create headings in Markdown you simply prefix the heading text with a pound sign (#) followed by a space. The number of pound signs that you use indicates the importance of the heading.</p>
<div class="highlighter-rouge"><div class="highlight"><pre class="highlight"><code># Level 1 Heading
## Level 2 Heading
### Level 3 Heading
#### Level 4 Heading
##### Level 5 Heading
###### Level 6 Heading
</code></pre></div></div>
<p>This Markdown would produce the HTML below.</p>
<div class="highlighter-rouge"><div class="highlight"><pre class="highlight"><code><h1>Level 1 Heading</h1>
<h2>Level 2 Heading</h2>
<h3>Level 3 Heading</h3>
<h4>Level 4 Heading</h4>
<h5>Level 5 Heading</h5>
<h6>Level 6 Heading</h6>
</code></pre></div></div>
<p>In accordance with the HTML specification you can only use up to six pound signs (indicating a level 6 heading). If you use more than six pound signs the converter will not create a heading at all and the pound signs will be visible to the reader.</p>
<h2 id="paragraphs">Paragraphs</h2>
<p>Creating paragraphs of text is easy. Simply separate paragraphs using one or more blank lines, you don’t need to use any special characters.</p>
<div class="highlighter-rouge"><div class="highlight"><pre class="highlight"><code>This is a paragraph of text.
This is another paragraph.
</code></pre></div></div>
<p>This Markdown would create two paragraphs.</p>
<div class="highlighter-rouge"><div class="highlight"><pre class="highlight"><code><p>This is a paragraph of text.</p>
<p>This is another paragraph.</p>
</code></pre></div></div>
<h2 id="line-breaks">Line Breaks</h2>
<p>If you want to add a line break simply add two spaces to the end of the line.</p>
<div class="highlighter-rouge"><div class="highlight"><pre class="highlight"><code>This is the first line.
This is the second line.
</code></pre></div></div>
<p>The first line in this example has two spaces at the end so the HTML will include a line break. A single paragraph element encloses both of the lines of text.</p>
<div class="highlighter-rouge"><div class="highlight"><pre class="highlight"><code><p>This is the first line. <br />
This is the second line.</p>
</code></pre></div></div>
<h2 id="blockquotes">Blockquotes</h2>
<p>To create a blockquote you need need to prefix each line of the blockqoute with an angled bracket (>) followed by a space. You can create multiple paragraphs within a blockquote using empty lines, as you did before.</p>
<div class="highlighter-rouge"><div class="highlight"><pre class="highlight"><code>> A person who never made a mistake never tried anything new.
> The true sign of intelligence is not knowledge but imagination.
</code></pre></div></div>
<p>This Markdown would become the following HTML.</p>
<div class="highlighter-rouge"><div class="highlight"><pre class="highlight"><code><blockquote>
<p>A person who never made a mistake never tried anything new.</p>
<p>The true sign of intelligence is not knowledge but imagination.</p>
</blockquote>
</code></pre></div></div>
<p>(Quotes provided by the mind of the great Albert Einstein.)</p>
<h2 id="phrase-emphasis">Phrase Emphasis</h2>
<p>Adding emphasis to phrases is pretty straightforward. To create a <code class="highlighter-rouge"><strong></code> element, wrap the phrase within double asterisks <code class="highlighter-rouge">(**)</code> or double underscores <code class="highlighter-rouge">(__)</code>. Creating an <code class="highlighter-rouge"><em></code> element requires single asterisks or underscores.</p>
<div class="highlighter-rouge"><div class="highlight"><pre class="highlight"><code>**Double asterisks produces a strong element**
__As does double underscores__
*A single asterisk produces an em element*
_As does a single underscore_
</code></pre></div></div>
<p>Here’s the HTML conversion (I added some line breaks).</p>
<div class="highlighter-rouge"><div class="highlight"><pre class="highlight"><code><p><strong>Double asterisks produces a strong element</strong> <br>
<strong>As does double underscores</strong></p>
<p><em>A single asterisk produces an em element</em> <br>
<em>As does a single underscore</em></p>
</code></pre></div></div>
<h2 id="lists">Lists</h2>
<p>Markdown supports both ordered and unordered lists as well as nesting.</p>
<h2 id="unordered-lists">Unordered Lists</h2>
<p>Unlike in HTML you don’t need to worry about creating an enclosing element for Markdown lists, you only need to focus on the actual list items. To create an unordered list you need to prefix each list item with either an asterisk <code class="highlighter-rouge">(*)</code>, minus <code class="highlighter-rouge">(-)</code> or plus <code class="highlighter-rouge">(+)</code> and the follow that up with a space. It is up to you which symbol you use, just be consistent once you have made your choice.</p>
<div class="highlighter-rouge"><div class="highlight"><pre class="highlight"><code>* Item One
* Item Two
* Item Three
- Item One
- Item Two
- Item Three
+ Item One
+ Item Two
+ Item Three
</code></pre></div></div>
<p>The Markdown above shows three examples of unordered lists using varying syntax. All of these examples will produce the same HTML shown below.</p>
<div class="highlighter-rouge"><div class="highlight"><pre class="highlight"><code><ul>
<li>Item One</li>
<li>Item Two</li>
<li>Item Three</li>
</ul>
</code></pre></div></div>
<h2 id="ordered-lists">Ordered Lists</h2>
<p>To create an ordered list you prefix each list item with a number, followed by a period, and finally a space. It’s worth noting that the actual number you use doesn’t matter. This is because the number that is displayed to the reader is handled by the browser and not in HTML (although you can manipulate the display behavior using CSS).</p>
<div class="highlighter-rouge"><div class="highlight"><pre class="highlight"><code>1. Item One
2. Item Two
3. Item Three
1. Item One
1. Item Two
1. Item Three
</code></pre></div></div>
<p>Both the of the Markdown examples above will be converted into the following HTML.</p>
<div class="highlighter-rouge"><div class="highlight"><pre class="highlight"><code><ol>
<li>Item One</li>
<li>Item Two</li>
<li>Item Three</li>
</ol>
</code></pre></div></div>
<h2 id="nested-lists">Nested Lists</h2>
<p>To create nested lists you need to indent the nested list items using 4 spaces (or one tab). You can mix-and-match list types when nesting. So you could have an ordered list nested within an unordered one and vice-versa.</p>
<div class="highlighter-rouge"><div class="highlight"><pre class="highlight"><code>* Item 1
* Item 1.1
* Item 1.2
* Item 2
* Item 3
</code></pre></div></div>
<p>The example above demonstrates nesting an unordered list within another unordered list. This would produce the following HTML.</p>
<div class="highlighter-rouge"><div class="highlight"><pre class="highlight"><code><ul>
<li>Item 1
<ul>
<li>Item 1.1</li>
<li>Item 1.2</li>
</ul>
</li>
<li>Item 2</li>
<li>Item 3</li>
</ul>
</code></pre></div></div>
<h2 id="links">Links</h2>
<p>The syntax for creating links has been simplified as much as possible. To create a link you first place the link text within square brackets. Immediately following the closing square bracket you then add a pair of regular brackets that contain the link.</p>
<div class="highlighter-rouge"><div class="highlight"><pre class="highlight"><code>[CodeCarrot Team](//codecarrot.net)
</code></pre></div></div>
<p>The Markdown above will create a simple link to the CodeCarrot home page.</p>
<div class="highlighter-rouge"><div class="highlight"><pre class="highlight"><code><a href="//codecarrot.net">CodeCarrot Team</a>
</code></pre></div></div>
<p>You can also add a <code class="highlighter-rouge">title</code> attribute to your link by adding the title text after the URL but within the brackets (as shown below). Make sure that you add a space between the URL and the title text.</p>
<div class="highlighter-rouge"><div class="highlight"><pre class="highlight"><code>[CodeCarrot Team](//codecarrot.net "Agile team with excellent track record & great communication skills. We love Web and mobile application development!")
</code></pre></div></div>
<p>This example would produce the following HTML link, complete with <code class="highlighter-rouge">title</code> attribute.</p>
<div class="highlighter-rouge"><div class="highlight"><pre class="highlight"><code><a href="//codecarrot.net" title="Agile team with excellent track record & great communication skills. We love Web and mobile application development!">CodeCarrot Team</a>
</code></pre></div></div>
<h2 id="images">Images</h2>
<p>Images use a similar syntax to links. This time the text you place within the square brackets will form the <code class="highlighter-rouge">alt</code> text for the image and the URL in the regular brackets will be used as the path to the image file. The whole syntax is prefixed with a bang (!) which indicates that an image should be created not a link.</p>
<div class="highlighter-rouge"><div class="highlight"><pre class="highlight"><code>![The image alt text goes here](//example.com/icon.png)
</code></pre></div></div>
<p>The example above will be converted to the following HTML.</p>
<div class="highlighter-rouge"><div class="highlight"><pre class="highlight"><code><img src="//example.com/icon.png" alt="The image alt text goes here">
</code></pre></div></div>
<h2 id="code">Code</h2>
<p>It’s quite common for us programmers to write blog posts that contain code that needs to be displayed in plain text. HTML provides the <code class="highlighter-rouge"><pre></code> and <code class="highlighter-rouge"><code></code> elements to help us accomplish this.</p>
<p>Markdown supports both inline code snippets and code blocks.</p>
<h2 id="inline-code-snippets">Inline Code Snippets</h2>
<p>In HTML we would use the <code class="highlighter-rouge"><code></code> element to markup occurrences of variable or file names when they appear inline. When using Markdown we just need to wrap the inline code snippet in backticks <code class="highlighter-rouge">(`)</code>.</p>
<div class="highlighter-rouge"><div class="highlight"><pre class="highlight"><code>The `index.html` file contains the homepage for your website.
</code></pre></div></div>
<p>The example above uses backticks to indicate that <code class="highlighter-rouge">index.html</code> should be wrapped in a <code class="highlighter-rouge"><code></code> element.</p>
<div class="highlighter-rouge"><div class="highlight"><pre class="highlight"><code><p>The <code>index.html</code> file contains the homepage for your website.</p>
</code></pre></div></div>
<h2 id="code-blocks">Code Blocks</h2>
<p>For occasions when you have a larger body of code to markup you need a slightly different approach. In HTML we would use <code class="highlighter-rouge"><pre></code> and <code class="highlighter-rouge"><code></code> elements to markup a body of code and preserve the layout of the text.</p>
<p>With Markdown you just need to indent the whole code block by 4 spaces (or one tab). Just like you do with nested lists.</p>
<div class="highlighter-rouge"><div class="highlight"><pre class="highlight"><code> function solveForX(y) {
return solve(y);
}
</code></pre></div></div>
<p>The code in the example above has been indented by 4 spaces, indicating that it should be wrapped in <code class="highlighter-rouge"><pre></code> and <code class="highlighter-rouge"><code></code> elements.</p>
<div class="highlighter-rouge"><div class="highlight"><pre class="highlight"><code> <pre><code>function solveForX(y) {
return solve(y);
}
</code></pre>
</code></pre></div></div>
<p>Notice that the indents within the original block of code are unaffected in the HTML output.</p>
<h2 id="horizontal-rules">Horizontal Rules</h2>
<p>To add horizontal rules in your markdown simply use three or more asterisks, minus signs, or underscores in a row. These must be on a single line with no other content for the converter to create a horizontal rule.</p>
<div class="highlighter-rouge"><div class="highlight"><pre class="highlight"><code>***
---
___
</code></pre></div></div>
<p>All three of the examples above will produce a <code class="highlighter-rouge"><hr></code> element.</p>
<h2 id="inline-html">Inline HTML</h2>
<p>Markdown is really useful for taking care of simple markup but it falls down when it comes to more complex structures like tables. Luckily you can mix HTML and Markdown together. The Markdown converter will preserve any HTML that it encounters within your Markdown files.</p>
<div class="highlighter-rouge"><div class="highlight"><pre class="highlight"><code>This is a standard paragraph of **text**.
<table>
<thead>
<tr>
<th>First Name</th>
<th>Last Name</th>
</tr>
</thead>
<tbody>
<tr>
<td>Yashu</td>
<td>Mittal</td>
</tr>
</tbody>
</table>
Here is some more text that the _Markdown_ converter will put into a new paragraph.
</code></pre></div></div>
<p>In the example above the Markdown converter will leave the <table> untouched but will create HTML elements for the remaining content.</p>
<div class="highlighter-rouge"><div class="highlight"><pre class="highlight"><code><p>This is a standard paragraph of <strong>text</strong>.</p>
<table>
<thead>
<tr>
<th>First Name</th>
<th>Last Name</th>
</tr>
</thead>
<tbody>
<tr>
<td>Yashu</td>
<td>Mittal</td>
</tr>
</tbody>
</table>
<p>Here is some more text that the <em>Markdown</em> converter will put into a new paragraph.</p>
</code></pre></div></div>
<p>It is worth mentioning that the converter does not process Markdown syntax within block-level HTML elements (<code class="highlighter-rouge"><div></code>, <code class="highlighter-rouge"><p></code>, etc.) that have been manually coded. For example the converter would not create a <code class="highlighter-rouge"><strong></code> element around the word ‘Hello’ in this example.</p>
<div class="highlighter-rouge"><div class="highlight"><pre class="highlight"><code><div>**Hello** CodeCarrot!</div>
</code></pre></div></div>
<h2 id="escaping-markdown-syntax">Escaping Markdown Syntax</h2>
<p>You may run into instances when the converter is interpreting your use of the syntax characters as a signal to create HTML elements when you don’t really want it too. This can be frustrating at first, but don’t fear there is a solution!</p>
<p>If you want the converter to ignore a character you simply prefix it with a backslash ().</p>
<p>For example, the asterisks in the example below are escaped with a backslash so the converter would not create an unordered list.</p>
<div class="highlighter-rouge"><div class="highlight"><pre class="highlight"><code>\* Item One
\* Item Two
\* Item Three
</code></pre></div></div>
<p>I’ve listed all of the characters used in Markdown syntax below for your reference.</p>
<div class="highlighter-rouge"><div class="highlight"><pre class="highlight"><code>\ ` * _ { } [ ] ( ) # + - . !
</code></pre></div></div>
<h2 id="tables">Tables</h2>
<p>Tables aren’t part of the core Markdown spec, but they are part of GFM and Markdown Here supports them. They are an easy way of adding tables to your email – a task that would otherwise require copy-pasting from another application.</p>
<div class="highlighter-rouge"><div class="highlight"><pre class="highlight"><code>Colons can be used to align columns.
| Tables | Are | Cool |
| ------------- |:-------------:| -----:|
| col 3 is | right-aligned | $1600 |
| col 2 is | centered | $12 |
| zebra stripes | are neat | $1 |
There must be at least 3 dashes separating each header cell.
The outer pipes (|) are optional, and you don't need to make the
raw Markdown line up prettily. You can also use inline Markdown.
Markdown | Less | Pretty
--- | --- | ---
*Still* | `renders` | **nicely**
1 | 2 | 3
</code></pre></div></div>
<p>Colons <code class="highlighter-rouge">:</code> can be used to align columns.</p>
<p>To align left.</p>
<div class="highlighter-rouge"><div class="highlight"><pre class="highlight"><code>|:-----|
</code></pre></div></div>
<p>To align center.</p>
<div class="highlighter-rouge"><div class="highlight"><pre class="highlight"><code>|:-----:|
</code></pre></div></div>
<p>To align right.</p>
<div class="highlighter-rouge"><div class="highlight"><pre class="highlight"><code>|-----:|
</code></pre></div></div>
<table>
<thead>
<tr>
<th style="text-align: left">Tables</th>
<th style="text-align: left">Are</th>
<th style="text-align: left">Cool</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align: left">col 3</td>
<td style="text-align: left">is right-aligned</td>
<td style="text-align: left">$1600</td>
</tr>
<tr>
<td style="text-align: left">col 2</td>
<td style="text-align: left">is centered</td>
<td style="text-align: left">$12</td>
</tr>
<tr>
<td style="text-align: left">zebra stripes</td>
<td style="text-align: left">are neat</td>
<td style="text-align: left">$1</td>
</tr>
</tbody>
</table>
<p>There must be at least 3 dashes separating each header cell. The outer pipes <code class="highlighter-rouge">(|)</code> are optional, and you don’t need to make the raw Markdown line up prettily. You can also use inline Markdown.</p>
<table>
<thead>
<tr>
<th style="text-align: left">Markdown</th>
<th style="text-align: left">Less</th>
<th style="text-align: left">Pretty</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align: left">Still</td>
<td style="text-align: left">renders</td>
<td style="text-align: left">nicely</td>
</tr>
<tr>
<td style="text-align: left">1</td>
<td style="text-align: left">2</td>
<td style="text-align: left">3</td>
</tr>
</tbody>
</table>
<h2 id="summary">Summary</h2>
<p>Markdown is a fantastic language for quickly putting together a blog post or some content for a website. Personally I use it a lot. In fact, I used it to write this article.</p>
<p>The main drawback of Markdown is that you are confined to a fairly limited subset of what is available in HTML. Most notably, you cannot define the majority of element attributes in Markdown alone. That said, Markdown wasn’t designed to be a replacement for HTML. It aims to make it simpler for web writers to create content. A goal that I think it achieves very well. The ability to mix-in HTML also allows you to circumvent the issue of being occasionally limited by the native Markdown syntax.</p>
<p>If you haven’t tried using Markdown before I encourage you to check it out. If you regularly write content for the web you could find that it makes your writing experience much more enjoyable.</p>yashumittalThe Markdown language was created in 2004 by John Gruber with substantial contributions from Aaron Swartz, with the goal of allowing people “to write using an easy-to-read, easy-to-write plain text format, and optionally convert it to structurally valid XHTML (or HTML)”.
https://cdn.codecarrot.net/images/learning-markdown.png
5 meaningful ways to make money blogging2017-08-27T22:30:00+00:002017-08-27T22:30:00+00:00https://blog.codecarrot.net/5-meaningful-ways-to-make-money-blogging<p>The burden is to create meaningful partnerships and authentic content — and if I want to really make a living, I have to be about more than just some sidebar ads and affiliate links. Sure, those things contribute, but I have to be meatier than that.</p>
<p>Here’s how I make that happen and how you can make money blogging as a lifestyle brand, too.</p>
<h2 id="1-write-sponsored-posts">1. Write sponsored posts.</h2>
<p>Sponsored posts are the moneymaker for the modern-day storyteller. They allow you to breathe life into a brand relationship so that it resonates with your readers. You can only do this successfully when a) your followers trust you, and b) you’re good at telling stories. Those of us who make our living as influencers in the lifestyle realm can command a pretty penny for allowing brands to access our creativity and our audiences in this way.</p>
<blockquote>
Sponsored posts are the moneymaker for the modern-day storyteller.
</blockquote>
<p>And, as other digital platforms have expanded, so has the sponsored post. The opportunity to work with brands has gone beyond the blog to include Facebook, Twitter, Pinterest and Instagram — which means influencers on all of these platforms can find monetary success.</p>
<h2 id="2-seek-brand-ambassadorships">2. Seek brand ambassadorships.</h2>
<p>When you really believe in a brand or a product, becoming a brand ambassador can be a great way to make money as well as to build your street cred. And yes, if you want to be a boss at digital influencing, your street cred is even more important than your bank account.</p>
<h2 id="3-become-an-expert">3. Become an expert.</h2>
<p>This way, people think of you whenever they think of a certain topic. Even in today’s world, where you can find the answer to literally every question online, experts are able to command respect (and money).</p>
<h2 id="4-sell-something-tangible">4. Sell something tangible.</h2>
<p>Like a book. It sort of takes care of No. 3, plus it allows for an income that doesn’t rely solely on page views. If books aren’t your jam, there are a ton of other things you can collaborate on or create solo that people might actually want to buy.</p>
<h2 id="5-build-partnerships">5. Build partnerships.</h2>
<p>You have a cool brand that people love engaging with, and so does other similar blogger who also has the ability to create something beautiful. Maybe it’s time to partner up. Aligning with a complementary brand to create something new is a lucrative way to help breathe life (and money) into your personal brand.</p>yashumittalThe burden is to create meaningful partnerships and authentic content — and if I want to really make a living, I have to be about more than just some sidebar ads and affiliate links. Sure, those things contribute, but I have to be meatier than that.
https://i.imgur.com/GUYo2QD.jpg
All you need to become Codecarrot client2017-08-27T22:00:00+00:002017-08-27T22:00:00+00:00https://blog.codecarrot.net/all-you-need-to-become-codecarrot-client<p>At Codecarrot, we had the pleasure to meet fantastic clients and teams. Spent many hours understanding their ideas, agreeing on application architectures, talking through the long-term development processes.</p>
<p>Some clients already had partially developed apps, others decided that their current development partners were not performing fast enough, others got overwhelmed by the amount of necessary work or had difficulty defining the necessary requirements. What these clients had in common though was a great idea which is all you need to get started.</p>
<p><strong>Your idea + initial budget from investors = success.</strong></p>
<p>We love working with startups and supporting them from the very beginning. Likewise we don’t mind jumping into an ongoing project, for today though, I’d like to discuss possibilities at the very beginning of your journey to a great product.</p>
<p>So, let’s start from the beginning and assume we start from scratch.</p>
<ul>
<li>You spent quite a long time figuring out what your potential customers/users need.</li>
<li>You talked it through with your partners, friends, family, potential investors.</li>
<li>You know how to fulfill the needs previously mentioned.</li>
<li>You feel confident that your application will meet the market’s demand (perhaps because of marketing research?)</li>
<li>You have initial budget to get started.</li>
</ul>
<p>You have all you need to get in touch with us and start the machine rolling. At this point we recommend using a tool called Product Discovery Sprint. This sounds impressive, but what is it? Let me explain:</p>
<p>For starters, you will be assigned a <strong>Project Manager</strong> and a <strong>Designer</strong>. Those two will take you through <strong>a 7 days sprint</strong> of:</p>
<ul>
<li>intense brainstorming,</li>
<li>creating personas of your users,</li>
<li>creating the user paths of those personas,</li>
<li>creating first mockups and views</li>
</ul>
<p>The key benefits of this process are <strong>capturing and documenting:</strong></p>
<ul>
<li>Definitions and goals.</li>
<li>The critical path diagram.</li>
<li>The user journey.</li>
<li>A prototype storyboard.</li>
<li>A testable prototype.</li>
<li>Basis for a further development plan.</li>
</ul>
<p>To sum up:</p>
<ul>
<li>Product Design Sprint is a tool that will give you a precise roadmap on where to go next.</li>
<li>You will be provided with an extensive report showing how to forge your idea into a live product.</li>
<li>This is the first step you need to take, to kick start with the development.</li>
<li>The technical aspects of the application will not be defined in detail, but sufficient enough to interest new investors and get funding necessary to start development.</li>
<li><a href="https://www.codecarrot.net/services/product-design">See this</a> for more info about Product Design.</li>
</ul>
<p>After the app is initially defined so <strong>what do I do next</strong>?</p>
<p>The answer is simple, either:</p>
<ol>
<li>Participate in a Scoping Session (recommended), or</li>
<li>Start development.</li>
</ol>
<p>Teams performing Scoping Sessions typically develop the product, so it’s a very important time for everyone to agree about as many details of the project as possible.</p>
<p>If you wish to see all the website we have served, follow <a href="https://www.codecarrot.net/clients">this link</a>.</p>
<p>Now we are ready to start developing your product! We are here to help, assist and support you from day one!</p>
<p>Thanks for reading and hope you enjoyed it.</p>
<p>P.S. Do not hesitate to reach out if you have a great idea for an app, we’re waiting for you :)</p>yashumittalAt Codecarrot, we had the pleasure to meet fantastic clients and teams. Spent many hours understanding their ideas, agreeing on application architectures, talking through the long-term development processes.
https://i.imgur.com/BtLNu4u.jpg
Effective Teamwork Starts with Shared Terms, Rules and Goals2017-08-27T21:30:00+00:002017-08-27T21:30:00+00:00https://blog.codecarrot.net/effective-teamwork-starts-with-shared-terms-rules-and-goals<p>Effective teamwork won’t happen without a common ground established among all members. Rules and goals that everyone agree to respect are key to a successful cooperation in any kind of project.</p>
<h2 id="understanding-in-the-first-place">Understanding in the First Place</h2>
<p>Recently, I’ve read <a href="https://www.medium.com/@hellostanley/design-doesnt-scale-4d81e12cbc3e#.rkp8qq3cs">this amazing article</a> about design adventures in Spotify, and I started to think about how important for a successful team are shared principles, goals and vocabulary. As a project manager, I work on different web and mobile projects at the same time. I believe that the success or failure of each project depends on whether all stakeholders are on the same page.</p>
<p>Shared concepts will save you time, money and a lot of stress. It is essential to establish a set of shared concepts before you get invested in actions.</p>
<h2 id="why-it-is-important">Why It Is Important</h2>
<p>Imagine you’re part of a football team. Your team will soon play in a very important match (the World Cup final for example). The problem is you don’t know the rules at all. You have no idea what you are supposed to do, where to run and why everybody is screaming on you. And now imagine if everybody else in the team has forgotten the rules. It would be a real mess, right?</p>
<p>You can’t win if you don’t know the rules of the game you’re playing.</p>
<p>The same applies to any other kind of teamwork. Without a mutual understanding of all the concepts, starting a new project will always be a struggle for team members.</p>
<h2 id="terms-rules-and-goals">Terms, Rules and Goals</h2>
<p>So it’s getting obvious that you need to understand specific vocabulary (pass, goal, offside), rules (each team consists of a maximum of eleven players) and goals/objectives (you need to have more goals scored than the opposite team) to enable your team to even attempt to win the game. Naturally, concepts will vary depending on what you are working at. In web development, we don’t deal with offsides – we deal with pull requests, devops and code review. It is crucial to make sure everybody understands what they mean and how important they are.</p>
<p>Terminology is important because it defines the vocabulary shared among team members. It helps us understand what we are doing. We can have different types of terminology:</p>
<ul>
<li>Names of the processes and departments in your company</li>
<li>Product design guidelines</li>
<li>Names of components, classes or methods in the code</li>
<li>Tables and values in the database</li>
</ul>
<p>Rules are actions which you should or shouldn’t perform. Those actions can be required, permitted or forbidden. Rules help us define how we’re going to do it. Let us consider a few examples:</p>
<ul>
<li>Project workflow</li>
<li>Deployment or QA checklist</li>
<li>Weekly, monthly or quarterly procedures (reviews, planning, etc.)</li>
</ul>
<p>Goals help us understand which direction we should follow and what we want to achieve in the end. Goals answer the question why we’re doing it in the first place. Some examples:</p>
<ul>
<li>Sprint/release goals</li>
<li>Product requirements</li>
<li>Revenue/sales targets</li>
<li>Company’s v2mom</li>
<li>Personal goals</li>
</ul>
<h2 id="how-to-create-shared-concepts">How to Create Shared Concepts</h2>
<p>Below you can find some recommendations on how to create and maintain shared concepts in your teams.</p>
<ul>
<li>Start with basic terms – you need to agree on the main subjects of your work and the most important definitions.</li>
<li>Make sure everyone has access to relevant information. Use team collaboration tools to create a knowledge base. I’m really into <a href="https://www.atlassian.com/software/confluence">Confluence</a>, but you just can start with google docs.</li>
<li>You won’t have a lot of rules at the beginning, but they’ll emerge naturally due to mistakes people make and obstacles they come across. Make sure you document the rules properly.</li>
<li>Set clear goals and make sure everybody knows and understands them.</li>
<li>Document changes, irrelevant terminology, rules or goals could cause a lot of problems. Make sure everybody is always up-to-date with any changes.</li>
</ul>
<p>The above concepts form the core of a team’s existence. Terminology represents the things that they do, rules show how they should do it, while goals indicate the purpose of why they do it. This sort of a map can help you manage your team more effectively and help them go in the right direction.</p>
<h2 id="ps-can-we-send-you-an-email">P.S. Can we send you an email?</h2>
<p>Once a week or so we send an email with our best content. We never bug you; we just send you our latest piece of content. <a href="#subscribe">Subscribe Here</a>.</p>yashumittalEffective teamwork won’t happen without a common ground established among all members. Rules and goals that everyone agree to respect are key to a successful cooperation in any kind of project.
https://i.imgur.com/F5om1Pv.jpg
12 Ways to Balance Your Work and Study Life2017-08-27T21:21:00+00:002017-08-27T21:21:00+00:00https://blog.codecarrot.net/12-ways-to-balance-your-work-and-study-life<p>Let’s be honest, web developers and designers aren’t particularly known for maintaining great work/life balance. Images of hackathons and intense work sessions come to mind easily. Too often people buy into the idea that “more” means “better” when in reality there is only so much quality work a normal person can do in a day/week/month/year. Why not try to be more intentional about your approach to finding balance?</p>
<h2 id="go-offline">Go offline</h2>
<p>We live such connected lives, which is a blessing and a curse. It’s important to make time to be unavailable. Cut out the noise and give your brain time to process what’s going on in your life, and ideally, be silent. People need time to recharge, and it’s hard to do when there are always little things nagging at our minds.</p>
<p>Have you heard of a technology sabbath? It’s a concept that is becoming more popular as people are discovering the benefits of building time into your routine to unplug from technology and focus on life around you.</p>
<h2 id="determine-what-is-most-important-to-you">Determine what is most important to you</h2>
<p>We only have so much time in a day to work with. You need to be deliberate about how you spend that time. The “jar of rocks” analogy is a great way to visualize this. If you fill your day first with small, insignificant tasks (the sand), then you won’t have room for your important work (the large rocks). So take the time to figure out your priorities and build your day around them.</p>
<p><img src="https://cdn.codecarrot.net/images/jar-of-rocks.jpg" alt="Jar of rocks" /></p>
<p>Be honest to yourself and others about your limitations</p>
<p>It’s hard to say “no” to people, but it’s one of the simplest ways to maintain balance in your life. You can’t do it all, and need to set boundaries for what is realistic.</p>
<h2 id="exercise">Exercise</h2>
<p>You should be exercising anyway, but life gets in the way, right? Well, there are many ways exercise can impact your day-to-day life in unexpected ways, including increased productivity and memory, increased decision-making skills and focus, and faster information processing.</p>
<h2 id="get-enough-sleep">Get enough sleep</h2>
<p>How can you expect to be at your best if you aren’t well rested? You may not think you have enough time to get a full night’s sleep, but you will likely make up for that “lost” hour or two by having more energy and focus. You can also try a cat nap during your lunch break for an energy boost in the afternoon.</p>
<h2 id="delegate">Delegate</h2>
<p>Think about the tasks in your life that you can delegate out. Not just simple tasks at work, but at home as well. See if your spouse or roommate can help out more, or if you can swing it, splurge on a housekeeper and gardener for a few hours a month.</p>
<h2 id="get-buy-in-from-your-family-and-friends">Get buy-in from your family and friends</h2>
<p>This is especially important for people who are working and studying. Working and studying is difficult, but hopefully temporary. Make sure that your family and friends understand your goals and what you are doing to achieve them. You might be surprised at how understanding they are, and how they are willing to help.</p>
<h2 id="reward-yourself">Reward yourself</h2>
<p>Don’t forget to reward yourself for a job well done. Whether it’s a nice dinner or a fun day trip over the weekend, when you work hard, find a way to reward yourself. This will encourage your brain to continue to work hard and strengthen good habits.</p>
<h2 id="live-by-the-8020-rule">Live by the 80/20 rule</h2>
<p>Your time is not spent with equal results. The concept is there are certain tasks, about 20% of your work, that lead to 80% of your results. Take a look at what you do and find what tasks produce the most impact. Try to do away with as much of the tasks that don’t fall into that super-productive category.</p>
<h2 id="express-gratitude">Express gratitude</h2>
<p>Make it a daily habit to list out things in your life for which you are grateful. Expressing gratitude has a host of benefits, including increased happiness, improved health, and increased mental alertness. This will also help you stay focused on the important things in your life.</p>
<h2 id="laugh">Laugh</h2>
<p>As life gets stressful, for some reason people tend to double down instead of finding a way to bring back a bit of joy. Laughter is good for your body and brain and I shouldn’t have to tell you to do it more . . .</p>
<h2 id="be-an-optimist">Be an optimist</h2>
<p>Thinking positively helps to reduce stress and anxiety, and when you are working hard, you need all the help you can get. Train your brain to look for the good in situations, and frame up problems as a challenge or opportunity to improve.</p>
<h2 id="ps-can-we-send-you-an-email">P.S. Can we send you an email?</h2>
<p>Once a week or so we send an email with our best content. We never bug you; we just send you our latest piece of content. <a href="#subscribe">Subscribe Here</a>.</p>yashumittalLet’s be honest, web developers and designers aren’t particularly known for maintaining great work/life balance. Images of hackathons and intense work sessions come to mind easily. Too often people buy into the idea that “more” means “better” when in reality there is only so much quality work a normal person can do in a day/week/month/year. Why not try to be more intentional about your approach to finding balance?
https://cdn.codecarrot.net/images/jon-flobrant-1362.jpg
What makes an effective landing page?2017-08-27T21:00:00+00:002017-08-27T21:00:00+00:00https://blog.codecarrot.net/what-makes-an-effective-landing-page<p>It takes a mere fraction of a second for a visitor to evaluate and form an opinion on your website (and as a result, your brand). Bearing in mind that itty-bitty detail, making the perfect first impression should be a top priority. So what does it take to win over these potential leads? A quality landing page that provides an awesome experience.</p>
<p>There’s no guaranteed formula for building a flawless landing page, but it’s not hard to see that some of the best and most effective sites have a number of things in common.</p>
<p><strong>Seven Must-Have Components of a Flawless Landing Page:</strong></p>
<ol>
<li>
<p><strong>Compelling imagery:</strong> The world runs on visuals! Choose <a href="https://www.unsplash.com/@yashumittal">high-quality, attention-grabbing images</a> or videos that are relevant to your cause. Bonus points if they spark an emotion!</p>
</li>
<li>
<p><strong>Attractive Design:</strong> Keep your design clean and simple, yet impactful. Color matters. Pick a scheme that sets the mood, and pair that with a seamless layout. Consider whitespace and legibility — give your content room to breathe.</p>
</li>
<li>
<p><strong>Powerful Copy:</strong> Intrigue. Empower. Persuade. The headline of the site is your most promising opportunity to hook attention. Concisely tell your visitors what you’re offering. The sub-headline should elaborate on the problem you’re solving, and ultimately persuade your visitor to buy, click, join, or at the very least, learn more.</p>
</li>
<li>
<p><strong>Easy Navigation:</strong> Anticipate what your users will be searching for and provide a clear path for them to get where they need to go.</p>
</li>
<li>
<p><strong>Effortless Call-To-Action:</strong> Be the solution your potential customers are looking for, and offer it to them in one click!</p>
</li>
<li>
<p><strong>Interactivity:</strong> Interactivity stimulates interest, and there are so many unique ways to keep your users engaged on the site: Try scroll storytelling like Tumblr or video surfing like Leap Second.</p>
</li>
<li>
<p><strong>Offer:</strong> Free stuff and discounts rock! Your visitors might be more inclined to sign up or drop their e-mail in exchange for an e-book, a free trial or a percentage off their first purchase.</p>
</li>
</ol>
<h2 id="ps-can-we-send-you-an-email">P.S. Can we send you an email?</h2>
<p>Once a week or so we send an email with our best content. We never bug you; we just send you our latest piece of content. <a href="#subscribe">Subscribe Here</a>.</p>yashumittalIt takes a mere fraction of a second for a visitor to evaluate and form an opinion on your website (and as a result, your brand). Bearing in mind that itty-bitty detail, making the perfect first impression should be a top priority. So what does it take to win over these potential leads? A quality landing page that provides an awesome experience.
https://i.imgur.com/PdhcC7S.jpg
10 reasons website needs mobile optimized2017-08-27T19:30:00+00:002017-08-27T19:30:00+00:00https://blog.codecarrot.net/10-reasons-website-needs-mobile-optimized<p>You’ve heard it before.</p>
<p>Not once. Not twice. I probably can’t even count it on two hands.</p>
<p>It’s no secret that mobile is here to stay. It’s no secret that businesses need to begin thinking about mobile users.</p>
<p>But why?</p>
<p>Sure, we all know that a responsive site makes mobile browsing simpler. But what makes this a NEED? Why is mobile-optimization a must for YOUR business?</p>
<p>Check out these 10 reasons your website can’t afford to remain unresponsive.</p>
<h2 id="1-everyones-on-mobile">1. Everyone’s on mobile.</h2>
<p>We are no longer living in a world where smartphone users can be considered the exceptions.</p>
<p>We are not even living in a world where excessive smartphone users can be considered exceptions.</p>
<p>Today, 1.2 billion people are accessing the web from mobile devices. An incredible 80% of all internet users use a smartphone. In other words, if they’re online, they are most likely on their phones.</p>
<p>And today’s statistics are only half the story. These numbers will be even more skewed towards mobile in the future. Simply put, you NEED to be thinking mobile, because EVERYONE is on mobile.</p>
<h2 id="2-over-half-of-web-traffic-is-mobile">2. Over half of web traffic is mobile.</h2>
<p>I have yet to meet a website owner who wasn’t interested in increasing traffic.</p>
<p>As of May, 2014 (over a year ago), mobile media consumption was 21% higher than that of desktop, accounting for a 51% of ALL digital media consumption.</p>
<p>This means that over half of all web traffic is via mobile. If you are interested in attracting mobile traffic (aka traffic), you need to be thinking mobile.</p>
<p>The obvious question that comes up here is, “Why can’t mobile users just engage with my desktop site via their phones?”</p>
<p>The answer to that is…</p>
<h2 id="3-mobile-users-behave-differently">3. Mobile users behave differently.</h2>
<p>While it’s theoretically the same people behind both mobile and desktop traffic, these people tend to behave differently across devices.</p>
<p>Despite limited bandwidth, mobile users tend to consume a disproportionately high amount of visual media, with a major focus on short video and images. Social media sites like Vine and Instagram achieved massive success from offering solely video and images respectively.</p>
<p>Capturing this traffic requires an optimized design, harnessing the power of these media types to engage users.</p>
<p>For example, <a href="//www.addthis.com">addthis</a> mobile-optimized share bar, his social shares immediately DOUBLED.</p>
<p><img src="https://cdn.codecarrot.net/images/screenshot_20170827-235216.png" alt="CodeCarrot Blog share bar" /></p>
<p>Imagine doubling your traffic with a few tweaks. This took literally 5 minute of Bryan’s time.</p>
<p>Making these adjustments is crucial for your bottom line, because…</p>
<h2 id="4-mobile-users-buy-more">4. Mobile users buy more.</h2>
<p>Across devices, mobile users actually spend more than their desktop counterparts.</p>
<p>Smartphone users account for the lowest dollar amount per transaction. These users are conditioned to make small, frequent purchases. If you are attempting to sell something below $10, mobile users are an ideal audience for your offer.</p>
<p>Tablet users, on the other hand, have the highest average transaction value of any device, including desktops.</p>
<p><img src="https://cdn.codecarrot.net/images/adobe-AOV-1.jpg" alt="AOV 2011 Calendar year" /></p>
<p>’t handle every type of screen, you are missing out on sales.</p>
<ol>
<li>Mobile landing pages require different strategies.</li>
</ol>
<p>Your landing page is your conversion workhorse. It HAS to get the job done if you are interested in generating online revenue.</p>
<p>But did you know that what works for desktop landing pages is NOT the same as what works for mobile landing pages? Certain principles remain constant, but mobile screens can’t handle the same style of presentation you would employ on a full desktop screen.</p>
<p>If your business is hoping to take advantage of the small, frequent purchasing behavior of mobile users, you’ll need to create responsive landing pages with mobile users in mind.</p>
<p><a href="//blog.getresponse.com/designing-perfect-mobile-landing-page.html">According to GetResponse</a>, mobile landing pages should include the following:</p>
<ul>
<li>5-word headlines</li>
<li>Minimalist design</li>
<li>Bright button CTA</li>
<li>Lightning fast page-load speed</li>
</ul>
<h2 id="7-google-favors-mobile-responsiveness">7. Google favors mobile responsiveness</h2>
<p>For some time now, Google has favored mobile friendliness in its SERP rankings.</p>
<p>As of April, however, the stakes have been raised, and mobile responsiveness is more important than ever for pleasing Google and acquiring organic traffic.</p>
<p>With Google’s latest major algorithm update, the company enacted significant penalties for websites failing to meet its standards for mobile friendliness. While this change wasn’t quite the “mobile-geddon” SEO’s predicted, it did create some waves, with mobile friendly pages taking much less of a hit.</p>
<p><img src="https://cdn.codecarrot.net/images/mobile-friendly-gains-and-losses.jpg" alt="Mobile friendly gains and losses" /></p>
<p>If you are serious about improving your organic traffic (or simply not losing it), you need to optimize your website for mobile.</p>
<h2 id="8-social-media-referrals-are-on-mobile">8. Social media referrals are on mobile.</h2>
<p>91% of mobile internet access is used for social activities. As social media continues to grow and evolve, it’s finding its primary hub on mobile devices.</p>
<p>If your business is involved social media marketing of any sort, there is a better than average chance incoming traffic will be accessing your site via mobile devices.</p>
<p>An unresponsive site can negate your content marketing efforts and waste your paid advertising dollars. If you want to take full advantage of your social audiences, you need a site designed to seamlessly catch their social browsing click-throughs.</p>
<h2 id="9-great-mobile-sites-differentiate-your-brand">9. Great mobile sites differentiate your brand.</h2>
<p>By this point, if your brand has yet to optimize its website, you may be feeling like you need to play catchup.</p>
<p>While that’s true to some extent, the reality is that many sites remain unoptimized for mobile. According to a recent survey, only 56% of small business websites are responsive.</p>
<p>What does this mean for your business?</p>
<p>It means you have a fantastic opportunity to differentiate yourself from the competition. Statistically, nearly half you competitors could have unoptimized sites. Furthermore, a big chunk of those who have implemented responsive design are probably doing a pretty poor job of it.</p>
<p>Optimized your site for mobile is an easy way to immediately gain an edge.</p>
<h2 id="10-mobile-advertising-is-still-underutilized">10. Mobile advertising is still underutilized.</h2>
<p>In the same way that mobile offers an incredible opportunity for brand differentiation, it also offers an unparalleled opportunity in advertising returns.</p>
<p>Americans currently spend 24% of their time on mobile devices, and yet only 8% of ad spending goes toward mobile advertising. According to Kleiner Perkins, this represents a $25 billion opportunity gap.</p>
<p><strong>Underutilized = cost-efficient</strong></p>
<p>Today is a prime time for investing in mobile advertising, but the channel won’t be underutilized for long. In the next 3 years, mobile ad spending is projected to hit $42 billion, quickly eliminating the opportunity gap and bringing up costs as the demand continues to increase.</p>
<p><img src="https://cdn.codecarrot.net/images/mobileforecast-digitaladvertisingrevenue.png" alt="Mobile Forecast Digital advertising revenue" /></p>
<p>Now is the time to invest in mobile ad spending, and you need a responsive design to accomplish this.</p>
<h2 id="get-mobile">Get Mobile</h2>
<p>The first step to optimizing for mobile is implementing a responsive website design.</p>
<p>Hire <a href="//www.codecarrot.net">CodeCarrot team</a> for making your website responsive.</p>
<p>The second step is optimizing your marketing efforts for mobile within your responsive design. This involves analyzing how customers are engaging with your site and adjusting accordingly.</p>
<h2 id="ps-can-we-send-you-an-email">P.S. Can we send you an email?</h2>
<p>Once a week or so we send an email with our best content. We never bug you; we just send you our latest piece of content. <a href="#subscribe">Subscribe Here</a>.</p>yashumittalYou’ve heard it before.
https://cdn.codecarrot.net/images/shutterstock_268450493.jpg
7 Handpicked UX tools for designers2017-08-27T19:30:00+00:002017-08-27T19:30:00+00:00https://blog.codecarrot.net/7-handpicked-ux-tools-for-designer<p>A master of UX design needs to master many skillsets: graphic design, prototyping, user research, and design collaboration.</p>
<p>Luckily, there’s no shortage of tools to help these individual skills. Here are 7 tools we’ve found useful for mastering UX design.</p>
<h2 id="image-editors">Image Editors</h2>
<p><strong>1. <a href="//www.sketchapp.com/">Sketch</a></strong></p>
<p><img src="https://cdn.codecarrot.net/images/sketch-professional-digital-design-for-mac.png" alt="Sketch Professional Digital Design for Mac" /></p>
<p>If Photoshop were made for interface digital design — websites, mobile UIs, etc. — it would be <a href="//www.sketchapp.com/">Sketch</a>. This Mac app works like a Photoshop-esque image editor, but with special features, digital designers will appreciate.</p>
<p>For starters, it integrates CSS logic at the beginning, which works wonders when it comes time for back-end development. Users can also create and export assets in different formats with the Automatic Slicing feature. New objects are automatically created in new layers, allowing creative combinations and simpler navigation. Even if designers can’t tell the difference from Photoshop, the developers will.</p>
<p><strong>2. <a href="//www.pl32.com/">PhotoLine</a></strong></p>
<p><img src="https://cdn.codecarrot.net/images/photoline-image-processing-design-software.png" alt="Photoline Image Processing Design Software" /></p>
<p><a href="//www.pl32.com/">PhotoLine</a> may not be as well known as other image editors (it’s been called “<a href="//forums.creativecow.net/thread/244/865892">one of the web’s best kept secrets</a>”), but what it offers can rival the best. You’ll find the common features digital designers love: photo manipulation, vector editing, desktop publishing, nondestructive layers, and more. But fans love the app’s exclusive features that can’t be elsewhere, such as multi-layered <a href="//www.openexr.com/">EXR</a> importing and exporting</p>
<p>The German team behind PhotoLine designed it with code efficiency as the goal, and that streamlined efficiency trickles down into all aspects. And don’t forget that, at €59, it’s a lot cheaper than its competitors, so take advantage of its little-known status while you still can.</p>
<h2 id="prototyping">Prototyping</h2>
<p><strong>3. <a href="//www.uxpin.com/">UXPin</a></strong></p>
<p><img src="https://cdn.codecarrot.net/images/uxpin-the-full-stack-ux-design-platform.png" alt="UXPin I The Full-Stack UX Design Platform" /></p>
<p>Named one of .net Magazine’s hottest new prototyping tool for 2015, <a href="//www.uxpin.com/">UXPin</a> is a full-fidelity collaborative design platform. From lo-fi wireframes to hi-fi prototypes, this tool lets you handle every stage of the design process in a single place with the team.</p>
<p>The app also allows seamless integration with Photoshop and Sketch files, so you can turn pixel-perfect mockups into working interactive prototypes.</p>
<h2 id="user-research">User Research</h2>
<p><strong>4. <a href="//www.usertesting.com/">UserTesting</a></strong></p>
<p><img src="https://cdn.codecarrot.net/images/usertesting-user-experience-research-platform.png" alt="UserTesting I User Experience Research Platform" /></p>
<p>For a minor fee, <a href="//www.usertesting.com/">UserTesting</a> handles all the time-consuming aspects of collecting user research. They recruit the users, administer the tests remotely, analyze the data, and deliver the results directly to you — within an hour, if you choose. The tests are also recorded, both the users’ faces and their screens, so you observe the tests as if you were actually there.</p>
<p>One of their advantages is their flexible options.You can test either pre-existing sites/apps, or experimental prototypes. The level of service is also scalable — you can design the test yourself or pay for the experienced UserTesting in-house team to do it. You can even hire one of their project managers to come on and oversee your progress.</p>
<p><strong>5. <a href="//www.optimizely.com/">Optimizely</a></strong></p>
<p><img src="https://cdn.codecarrot.net/images/optimizely-the-worlds-leading-experimentation.png" alt="Optimizely - The World's Leading Experimentation" /></p>
<p>While UserTesting is a general user research aid, <a href="//www.optimizely.com/">Optimizely</a> specializes in a single type of test, <a href="//www.optimizely.com/ab-testing/">A/B testing</a>, and perfects it. This service shows two variant screens to a pool matching your target users and records the statistics of which they prefer. You can test anything from color schemes, layouts, photo choices, or placements of calls-to-action.</p>
<p>Minor details like the time of day can corrupt the data of A/B tests, so a knowledgeable expert like <a href="//www.optimizely.com/">Optimizely</a> is a good ally. The convenience of use lets designers test experimental ideas, and provides hard evidence to defend your decisions to stakeholders.</p>
<h2 id="ideation">Ideation</h2>
<p><strong>6. <a href="//www.xmind.net/">XMind</a></strong></p>
<p><img src="https://cdn.codecarrot.net/images/xmind-the-most-popular-mind-mapping-software.png" alt="XMind - The Most Popular Mind Mapping Software" /></p>
<p>Organize both your thoughts and your team with <a href="//www.xmind.net/">XMind</a>, a visual organization aid and team task-manager.</p>
<p>Its Mind Mapping feature illustrates your project’s goals, timeline, progress, and requirements in a visually comprehensive way, and avoids a lot of the miscommunication when working across large groups — and with automatic cloud storage, it doesn’t matter where in the world group members are.</p>
<p><strong>7. <a href="//mural.ly/">Mural</a></strong></p>
<p><img src="https://cdn.codecarrot.net/images/mural-collaboration-tool.png" alt="Mural Collaboration Tool" /></p>
<p>Another great collaboration tool for remote group members, <a href="//mural.ly/">Mural</a> is a lot like a digital whiteboard you can share from multiple locations. It actually has a lot more potential than the one you have in your boardroom, for example, it can support video files and documents from Youtube, Vimeo Slideshare, Google Drive, and Evernote</p>
<p>It doesn’t do much more than that, but that’s enough. When most of the trouble with collaboration is getting everyone together in the same place, this tool saves you a lot of time and hassle.</p>
<h2 id="ps-can-we-send-you-an-email">P.S. Can we send you an email?</h2>
<p>Once a week or so we send an email with our best content. We never bug you; we just send you our latest piece of content. <a href="#subscribe">Subscribe Here</a>.</p>yashumittalA master of UX design needs to master many skillsets: graphic design, prototyping, user research, and design collaboration.
https://cdn.codecarrot.net/images/jo-szczepanska-57782.jpg
All new fascinating design for our blogging website2017-08-25T06:30:00+00:002017-08-25T06:30:00+00:00https://blog.codecarrot.net/all-new-fascinating-design-for-our-blogging-website<p>We started our <a href="/welcome-to-codecarrot-environment/">first blog</a> in the month of February and start posting few blogs, after getting feedbacks from readers and subscribe we thought of redesigning the blog website with a new face.</p>
<p><a href="https://www.behance.net/gallery/56071769/CodeCarrot-Blog">Click here</a> to see the new design.</p>
<h2 id="ps-can-we-send-you-an-email">P.S. Can we send you an email?</h2>
<p>Once a week or so we send an email with our best content. We never bug you; we just send you our latest piece of content. <a href="#subscribe">Subscribe Here</a>.</p>yashumittalWe started our first blog in the month of February and start posting few blogs, after getting feedbacks from readers and subscribe we thought of redesigning the blog website with a new face.
https://i.imgur.com/XnG5QtN.png
Finding the Time to Focus on Your Code2017-08-25T04:30:00+00:002017-08-25T04:30:00+00:00https://blog.codecarrot.net/finding-the-time-to-focus-on-your-code<p>Trying to focus on two things at once is hard. You may be able to eat and drive or listen to music while working. But it’s another thing to listen and talk at the same time. At the end of the day, only one task can have your undivided attention. And convincing ourselves that it’s possible to do both would be fooling ourselves.</p>
<blockquote>
People can’t multitask very well, and when people say they can, they’re deluding themselves.
</blockquote>
<p>When I first started learning code, I convinced myself that it was possible to watch my daughter and study in 15-minute sprints. I’d sit on the living room floor with my laptop while my daughter played with her toys.</p>
<p>This was short lived, and it wasn’t because I lacked discipline. I simply could not focus. My attention was divided. And while I had committed to learning in sprints, It was difficult to recall anything I studied. I learned the hard way that if I was going to get the most out of my studies, I needed complete solitude. And a lot of other things.</p>
<p>To do this, I had to ask myself some serious questions.</p>
<h2 id="1-when-is-the-best-time-to-focus">1. When is the best time to focus?</h2>
<p>After a series of Google searches, I walked away more confused than when I’d started. I discovered that the answer to this question was not in a Google result. I needed to think about me, and my unique situation. I had a daughter who needed my attention. And I couldn’t justify forcing her to share that time with anything else I had going on.</p>
<p>I decided to turn my 15-minute sprints into 45-minute sessions. I’ve always been able to do my best work late at night so I wanted to take advantage of that space. During the day, I’d reach out to friends or local businesses and offered to build their websites for free to gain experience.</p>
<h2 id="2-what-environment-enables-me-to-focus">2. What environment enables me to focus?</h2>
<p>As mentioned at the outset, focusing is hard. Even when you know exactly what you’re going to study, that doesn’t mean you’ll be motivated to do it. Personally, I need 3 things:</p>
<ol>
<li>A clutter free environment</li>
<li>Lots of natural light</li>
<li>Soft background music when possible</li>
</ol>
<p>Sitting in my daughter’s room surrounded by toys would not get the job done. What are the things that enable you to focus best? Having an environment free of distraction is usually a good start. Could you put your phone in “do not disturb” mode until you’re done studying? Think about the distractions that you face daily and try to remove them before they become an issue.</p>
<h2 id="3-am-i-in-a-clear-mental-space">3. Am I in a clear mental space?</h2>
<p>There may be instances where you have a good time and environment to study, but you just don’t feel like it. That’s okay. And it doesn’t make you a failure. The wrong thing to do would be to force myself to watch something I probably wouldn’t remember the next day. The emphasis here is quality over quantity.</p>
<p>The last thing you want to have is the <em>“let’s just get this out of the way”</em> mindset. This approach doesn’t help you learn anything. And you might find yourself circling back to that lesson down the road. There’s nothing wrong with saving it for the next day or doubling up later in the week.</p>
<p>If you put the same effort into learning code as you would a career job, then you’ll be prepared for anything you encounter professionally. It’s not the code itself that makes you successful. But it’s the resolve to give 100 percent to every task you’re assigned. If you give 60 percent effort while you’re learning, then how will that transition when you’re on the real job?</p>
<blockquote>
If you put the same effort into learning code as you would a career job, then you’ll be prepared for anything you encounter professionally.
</blockquote>
<p>There are other factors that can improve your focus when learning. For example, having a healthy routine, and avoiding stress can also impact your studying.</p>
<h2 id="ps-can-we-send-you-an-email">P.S. Can we send you an email?</h2>
<p>Once a week or so we send an email with our best content. We never bug you; we just send you our latest piece of content. <a href="#subscribe">Subscribe Here</a>.</p>yashumittalTrying to focus on two things at once is hard. You may be able to eat and drive or listen to music while working. But it’s another thing to listen and talk at the same time. At the end of the day, only one task can have your undivided attention. And convincing ourselves that it’s possible to do both would be fooling ourselves.
https://i.imgur.com/QBgev2n.jpg
Skills You Need to Master Time Management2017-08-24T06:30:00+00:002017-08-24T06:30:00+00:00https://blog.codecarrot.net/skills-you-need-to-master-time-management<p>When we are not able to complete the work on time, we all start complaining about the lack of time. So invest some time, read this article and learn the most crucial skills needed to manage time efficiently and have more time to do the things you love.</p>
<h2 id="1-goal-setting">1. Goal setting</h2>
<p>The <strong>S.M.A.R.T. method</strong> will help you set goals properly, while creating your goal/task you should make sure that it fulfills these 5 criteria.</p>
<ol>
<li>
<p><strong>Specific:</strong> Specify your goal as much as possible.</p>
</li>
<li>
<p><strong>Measurable:</strong> Fulfillment of your goal needs to lend itself to easy assessment. It gives us a chance to track progress easily.</p>
</li>
<li>
<p><strong>Attainable:</strong> Plan realistic goals, think of an goal which is possible to achieve with the skills, resources and time you have.</p>
</li>
<li>
<p><strong>Relevant:</strong> Understand the importance and benefits will it bring after task being completed.</p>
</li>
<li>
<p><strong>Time Bound:</strong> You need to set a deadline for your task. Most of us have a tendency to procrastinate, and without a time frame you might put off the execution of your plan forever.</p>
</li>
</ol>
<h2 id="2-time-tracking">2. Time tracking</h2>
<p>Tracking your time will gelp you manage your time better, that’s the only way to see when you waste too much time.</p>
<p><a href="https://toggl.com/">Toggl</a> is a very helpful app for time tracking that offers online time tracking based on tasks and projects, either through an interactive task timer or through manual entry.ng.</p>
<h2 id="3-prioritizing">3. Prioritizing</h2>
<p><strong>Do the biggest, most scary task first</strong>. This method is designed to help with procrastination <em>(the action of delaying or postponing somethin)</em>. If you start by doing million small tasks, you might end up not having time for the most important one.</p>
<p><img src="https://i.imgur.com/ZAcY163.png" alt="Prioritize Your Smart Task Image" /></p>
<p><strong>Quadrant I</strong> tasks that are urgent and important. They need to be done now.</p>
<p><strong>Quadrant II</strong> tasks that are important but don’t require immediate action. You should plan when you want to do them.</p>
<p><strong>Quadrant III</strong> tasks that are urgent but not actually important. You should consider delegating them.</p>
<p><strong>Quadrant IV</strong> tasks that are neither important nor urgent. You should eliminate them, because they are time wasters.</p>
<h2 id="4-planning">4. Planning</h2>
<p>When you already have planned goals and you have decided on their priorities it’s time to create a detailed, step-by-step plan on how to execute them. Plan the week ahead. <strong>Spend 30 minutes every Monday creating an action plan for the whole week.</strong></p>
<p>Use tools, try different ones and find your favourite.</p>
<ul>
<li><strong>Create a to-do list:</strong> use a ToDo app or pen and paper – striking out completed tasks will give you a great feeling of achievement.</li>
<li><strong>Keep a calendar:</strong> you can choose between traditional or digital like Google Calender.</li>
</ul>
<p>Remember to be realistic! First, try to estimate how much time you need for each tasks. <strong>Don’t overplan your day</strong>, it only helps you to get frustrated, not productive. <strong>Plan around 80% of your day, leave 20% for unexpected situations.</strong></p>
<h2 id="5-focus">5. Focus</h2>
<p>Even having the greatest plan won’t help you if you can’t focus on your tasks.</p>
<p><strong>Pomodoro <a href="https://pomodoneapp.com/">Timer</a>:</strong> is a tool to help you keep focused on one task only. You work in 25 min intervals with 5 min breaks. During breaks, you can reply to messages, get a coffee or eat a sandwich.</p>
<p><strong>Avoid distractions:</strong> Book yourself some time in your calendar for important meetings or when you just need to work on something. Let everyone know that you are busy and snooze notifications.</p>
<p><strong>Don’t participate in pointless calls and meetings:</strong> It is great to be involved in your team’s life, but you don’t need to go to every meeting you get invited to.</p>
<p><strong>Clean your Gmail and calendar once a month:</strong> Keep your inbox clean, create filters and filter out the messages that don’t concern you. Read e-mails 2 times per day. Tops.</p>
<p><strong>Remember that not every method will work for everyone:</strong> What works for one person might not necessarily work for someone with a different personality. Experiment and try out different methods. See what works best for you, and become a time management ninja.</p>
<h2 id="ps-can-we-send-you-an-email">P.S. Can we send you an email?</h2>
<p>Once a week or so we send an email with our best content. We never bug you; we just send you our latest piece of content. <a href="#subscribe">Subscribe Here</a>.</p>yashumittalWhen we are not able to complete the work on time, we all start complaining about the lack of time. So invest some time, read this article and learn the most crucial skills needed to manage time efficiently and have more time to do the things you love.
https://i.imgur.com/w8ZM6Yi.jpg
Open Source jQuery Plugins for Building Single-Page Website Layouts2017-08-24T06:30:00+00:002017-08-24T06:30:00+00:00https://blog.codecarrot.net/open-source-jquery-plugins-for-building-single-page-website-layouts<p>Typically a single-page website is focused on presenting a very focused goal or objective. These layouts work best for companies, freelancers, and Internet projects which need an online haven to share information. Sliding parallax menus are also common because it provides a natural interface transition between content areas.</p>
<p>Now you can obviously build a typical single page layout from scratch with some common knowledge of frontend techniques. But there are also many great jQuery plugins to assist with fixed nav menus, animations, parallax content, and other related features. I would like to present a number of these plugins to help developers build quick & efficient single-page web projects. All of these plugins are free and open source to use on any type of work.</p>
<h2 id="cool-kitten">Cool Kitten</h2>
<p><img src="https://cdn.codecarrot.net/images/cool-kitten-parallax-plugin.png" alt="Cool Kitten Parallax Plugin" /></p>
<p>This open source parallax solution has almost everything you need for a complete parallax website. The plugin allows for responsive layouts on smartphones and tablets, along with full-screen desktop monitors. It is described as more of a framework containing other HTML/CSS resources like <a href="//codecarrotnet.github.io/normalize.css">Normalize.css</a>.</p>
<p>Cool Kitten is a great choice for those just getting started with parallax design who also don’t want to build a lot of custom code. This plugin can be downloaded <a href="//github.com/jalxob/cool-kitten">right from Github</a> which includes a live demo sample. You can play around with this sample and easily customize your own parallax-style website design.</p>
<h2 id="smint">SMINT</h2>
<p><img src="https://cdn.codecarrot.net/images/smint-jquery-sliding-sticky-plugin.png" alt="SMINT jQuery Sliding sticky plugin" /></p>
<p>I really love SMINT because it is one of the simpler jQuery plugins which also supports natural sliding effects. The name stands for “Sticky Menu Including Navigation Thingy” which is another quick way to describe a single-page website. The parallax scrolling is an added benefit and keeping the navigation menu fixed at the top is beneficial to the interface design. The SMINT plugin has fantastic documentation and it provides a lot more customization for developers.</p>
<h2 id="ascensorjs">Ascensor.js</h2>
<p><img src="https://cdn.codecarrot.net/images/ascensor-js-plugin-parallax.png" alt="Ascensor js plugin parallax" /></p>
<p>Now this plugin is somewhat different from the other solutions. It is built for parallax sliding effects between div elements fixed on the same page. Ascensor can scroll vertically and horizontally using a small navigation system in the corner of the page. This is certainly more unique than other plugins – but if this style can fit your website then it is a wonderful choice. And there is more documentation found at the <a href="//github.com/kirkas/Ascensor.js">official Github repo</a>.</p>
<h2 id="curtainjs">Curtain.js</h2>
<p><img src="https://cdn.codecarrot.net/images/curtain-js-scrolling-parallax-plugin.png" alt="Curtain js scrolling parallax plugin" /></p>
<p>Although Curtain.js is no longer a currently maintained plugin, it still provides a nice starting point for building single-page layouts. Each panel is split horizontally and will unveil beneath the current panel as the user scrolls down the page. It almost seems like a curtain is rising to show the next panel, although this content is all located in the same HTML file.</p>
<p>The online demo for this plugin has been taken down. However the <a href="//llidesign.co.uk/iconic-furniture/">iconic furniture webpage</a> is still up using Curtain.js at the time of writing this article. Otherwise you are free to download a quick <a href="//github.com/victa/curtain.js">copy from Github</a> which also includes a local demo.</p>
<h2 id="skrollr">Skrollr</h2>
<p><img src="https://cdn.codecarrot.net/images/skrollr-easing-parallax-jquery-plugin.png" alt="skrollr scrolling jquery animation easing plugin" /></p>
<p>Here is another single-page parallax style plugin which provides a very simple foundation. You can animate new elements into the page with CSS3 transitions or jQuery easing functions. The <a href="//prinzhorn.github.io/skrollr/">live plugin demo</a> is very impressive once you scroll through all of the panels. It will require a lot more development work to get this designed exactly as you’d like. Skrollr is perfect because it can fit into any web project and still provides easy-to-read documentation [on the Github repo page](//github.com/Prinzhorn/skrollr.</p>
<h2 id="single-page-nav">Single Page Nav</h2>
<p><img src="https://cdn.codecarrot.net/images/single-page-nav-plugin-demo.png" alt="single page nav jquery open source plugin" /></p>
<p>I will highly recommend this plugin as a framework to build any single-page website. Single Page Nav allows you to create a fixed navigation panel which also highlights the currently active menu item. Check out the plugin’s <a href="//chriswojcik.net/demos/single-page-nav/">live demo page</a> to see what I mean. All the code documentation is straightforward and it’s built on top of jQuery easing functions.</p>
<p>Single Page Nav is probably one of the best plugins for those who are just getting started. Web developers who have not created many single-page layouts could use this plugin as an introduction to the design style. It is very simple to learn once you’ve practiced on a couple websites.</p>
<h2 id="jquery-one-page-nav">jQuery One Page Nav</h2>
<p><img src="https://cdn.codecarrot.net/images/jquery-one-page-nav-plugin-demo.png" alt="jquery one page nav plugin fixed navigation menu" /></p>
<p>This plugin is very similar to Single Page Nav although it was released beforehand. The script is a lot more “bare” in comparison which is great for developers who want something clean to start with. I really like jQuery One Page Nav because it also supports a fixed navigation with a highlighting class for the currently selected menu item. You can see how it works on this <a href="//davist11.github.io/jQuery-One-Page-Nav/">sample demo page</a> and download a local copy from Github. If you are having trouble working with Single Page Nav then give this plugin a try instead!</p>
<h2 id="jquerysnapscroll">jQuery.SnapScroll</h2>
<p><img src="https://cdn.codecarrot.net/images/jquery-snapscroll-snapping-plugin-demo.png" alt="jquery snapscroll snap plugin parallax" /></p>
<p>Although this plugin doesn’t provide full parallax functionality, it is useful if you have a design focused on vertical content. SnapScroll will automatically snap the page onto various content sections as the user scrolls down. The <a href="//wtm.github.io/jquery.snapscroll/">live demo</a> is a great way to understand how this works. You will need to design the full content sections yourself and style with CSS to fit the screen height. But SnapScroll can be most helpful in mobile webapps where the content may be enhanced with an auto-locking feature.</p>
<h2 id="jquery-waypoints">jQuery Waypoints</h2>
<p><img src="https://cdn.codecarrot.net/images/jquery-waypoints-scrolling-parallax-plugin-homepage.png" alt="jquery waypoints parallax scrolling plugin demo" /></p>
<p>The Waypoints plugin has gotten some notoriety because it can be included as a resource along with other plugins. Waypoints can allow developers to run functions once a user scrolls into a section of the page. This could be vertical or horizontal scrolling with parallax features. But Waypoints is fantastic to use in single-page website layouts because of the many advanced features. Take a peek at the <a href="//imakewebthings.com/jquery-waypoints/#shortcuts-examples">demo examples page</a> to see a small sample of what is possible. Waypoints is not some all-in-one solution but it can provide benefit those seeking out single-page development resources.</p>
<h2 id="jquery-parallax">jQuery Parallax</h2>
<p><img src="https://cdn.codecarrot.net/images/jquery-parallax-plugin-github-demo.png" alt="jquery parallax plugin open source demo webpage" /></p>
<p>For those who need something a bit different, jQuery Parallax is used for creating vertical sliding panels with different content. This parallax effect is really useful when displaying certain types of data or images. The <a href="//ianlunn.co.uk/plugins/jquery-parallax/">demo page</a> utilizes various background textures to distinguish between content sections. I would recommend this to anyone who needs a similar design style for building a vertical sliding webpage. The developer Ian Lunn also put up <a href="//ianlunn.co.uk/articles/recreate-nikebetterworld-parallax/">a brief tutorial</a> about how to create this effect yourself.</p>
<h2 id="singlejs">Single.js</h2>
<p><img src="https://cdn.codecarrot.net/images/single-js-jquery-plugin-demo-page.png" alt="single.js jquery javascript plugin parallax sliding" /></p>
<p>Single.js is very similar to jQuery Parallax but it has some different options. You can build forward/back links which automatically move between content panels. Additionally the plugin supports auto-resizing images for responsive layouts and retina devices. There is no online demo but you can download a copy <a href="//github.com/rafaelfragosom/singlejs">from Github</a> and check out the demo inside. Single.js is another great choice for building a vertical website layout with scrolling content sections.</p>
<h2 id="final-thoughts">Final Thoughts</h2>
<p>You can find single-page design inspiration all throughout Google. Modern web design has changed so rapidly even looking back 5 years ago. It is now so much easier to launch a basic single-page website in a day or a week and have it working within all major web browsers. I do hope these jQuery plugins can provide some benefit to freelancers and web developers. And don’t be afraid of trying out new plugins, either!</p>
<h2 id="ps-can-we-send-you-an-email">P.S. Can we send you an email?</h2>
<p>Once a week or so we send an email with our best content. We never bug you; we just send you our latest piece of content. <a href="#subscribe">Subscribe Here</a>.</p>yashumittalTypically a single-page website is focused on presenting a very focused goal or objective. These layouts work best for companies, freelancers, and Internet projects which need an online haven to share information. Sliding parallax menus are also common because it provides a natural interface transition between content areas.
https://cdn.codecarrot.net/images/jqueryblog.png
12 SEO Tips to Improve Website Performance and Drive More Traffic2017-08-23T06:30:00+00:002017-08-23T06:30:00+00:00https://blog.codecarrot.net/12-seo-tips-improve-website-performance-drive-traffic<p>SEO is really important for many projects. It can increase the number of people who view your application or even boost conversions! For example, <a href="https://www.businessinsider.com/most-online-shoppers-are-using-search-engines-before-they-buy-2016-4?IR=T">in e-commerce, 38.9 percent of purchases came from search engines such as Google</a>.</p>
<p>Also, search engines can make use of the website’s content to allow the user to buy products straight from the search engine. Here are a couple of tips you can use to make sure that search engine robots will love your website.</p>
<h2 id="1-make-sure-your-app-is-mobile-first">1. Make Sure Your App is Mobile-first</h2>
<p>Mobile is a major platform on the web these days. According to TechCrunch, 51% of Internet traffic comes from mobile devices. To make sure that your application is mobile-friendly, you should code for mobile first and then progressively enhance the experience for tablets and desktops or a high-DPI display.</p>
<h2 id="2-make-your-images-as-small-as-possible">2. Make Your Images as Small as Possible</h2>
<p>Images are what the web is all about now. The downside of using images is that they take a lot of space and bandwidth if you don’t compress them properly.</p>
<p>According to HTTP Archieve, 61 percent of a website’s page weight on a desktop computer is images.</p>
<p>You should use tools to compress images to strip all meta tags, convert your images to JPEG <em>(if they aren’t transparent)</em> and lower their quality – the human eye won’t see the difference unless the user focuses on the image and zooms it.</p>
<p>Using media queries on images is also a good practise to use different sizes images based upon screen size.</p>
<h2 id="3-deliver-your-content-over-cdn">3. Deliver your content over CDN</h2>
<p>A content delivery network is a system that uses distributed servers to deliver websites and other web content depending on user’s location, and website’s content.</p>
<p>Essentially, a way of taking a websites static files, like CSS, images, and JavaScript, and delivering them through web servers that are closer to the user’s physical location. Shorter proximity amounts to faster load time.</p>
<h2 id="3-make-sure-you-have-text-on-your-website">3. Make Sure You Have Text on Your Website</h2>
<p>Text is the kind of information that computers and, consequently, search engine robots find the easiest to aggregate.</p>
<p>It’s quite easy for such websites as the Guardian or the New York Times, since they offer mostly articles, but it can be different on e-commerce sites, which chiefly consist of photos of products. It’s a good practice to make sure that each product has a unique description.</p>
<p>Another way to improve SEO in e-commerce is to implement a blog in your application, where you will report the updates of your application. The more text there is in your app, the easier it will be to aggregate the content on your website.</p>
<h2 id="4-make-sure-you-have-good-page-load-speed">4. Make sure you have good page load speed</h2>
<p>Quickly loading pages are crucial not only for efficient SEO but also for a good UX. Users don’t like to wait for content to show on a website they are trying to browse, and neither do search engine web crawlers.</p>
<p>To achieve fast pageloads, you can make sure that the server generates responses faster, add pagination or infinite scroll, add responsive images using the imgsrc attribute for the img tag, load images on scroll, reduce CSS and JS script sizes, load stylesheets or scripts in an asynchronous way, and many other things.</p>
<p>You can <a href="https://developers.google.com/speed/pagespeed/insights/">test the page load speed</a>. Remember to test it on various links in your application to get a more general overview.</p>
<h2 id="5-make-your-app-pwa">5. Make Your App PWA</h2>
<p>Progressive Web Apps (PWA) is quite a new technology introduced by Google to bring native experience to web applications.</p>
<p>They mostly consist of a JavaScript web worker caching the content from your application and manifest file, which can provide a more native experience without the need for building a separate application.</p>
<p>PWA allows you to cache javascript or css files to reduce bandwidth and improve performance. When a visitor arrives at your site the cached version will be served up unless it has changed since the last cache.</p>
<h2 id="6-use-breadcrumbs">6. Use Breadcrumbs</h2>
<p>Breadcrumbs give web crawlers an idea of how your website is structured. In the picture below, you can see that the Guardian uses breadcrumbs to define what article is about. The most obvious use case in e-commerce is to show the category of the product to which a given link leads.</p>
<p><img src="https://i.imgur.com/dqFkYes.png" alt="Using Breadcrumbs for SEO Tips" /></p>
<h2 id="7-translate-your-routes">7. Translate Your Routes</h2>
<p>Web search engines like to have different paths for content in different languages. If your application is served in many different languages it’s good to translate the paths leading to them, for example:</p>
<div class="highlighter-rouge"><div class="highlight"><pre class="highlight"><code>//www.my-website.co/products/t-shirts/fox-cool-designer - English version
//www.my-webstie.pl/produkty/t-shirts/lis-fajny-projektant – Polish version
</code></pre></div></div>
<p>Additionally, adding hreflang tags to your site will inform web crawlers of the language of a given link.</p>
<h2 id="8-make-a-sitemap-of-your-application">8. Make a Sitemap of Your Application</h2>
<p>This is pretty simple. A sitemap is an XML file that consists of the URLs that are in your application. This makes a lot easier for search bots to crawl your website. You can also adjust the weight of each link or the frequency at which it should be checked by search engines.</p>
<h2 id="9-make-sure-your-content-is-accessible">9. Make Sure Your Content is Accessible</h2>
<p>There are a few important things such as adding alt attributes to images or a table of contents for bigger pages. Another cool thing you can do is to add transcriptions for your audio and video files. Again, more text means that it will be easier for search engine bots to index your website.</p>
<p>With these nine simple tips, you can make your website search engine-friendly and as a result substantially improve its accessibility, performance and conversion rate.</p>
<h2 id="10-reduce-the-number-of-http-requests">10. Reduce the number of HTTP requests</h2>
<p>Each time someone visits a webpage, the web browsers tries to fetch some pages from the hosts. These files contain any text, images, and multimedia that exist on that webpage.</p>
<p>The more HTTP requests, the longer your site takes to load. And larger files will take even longer to transfer.</p>
<ul>
<li>Check how many HTTP requests your site currently makes</li>
<li>Remove unnecessary images</li>
<li>Reduce the file size for remaining images</li>
<li>Evaluate other parts of your page that are contributing to page load time</li>
<li>Combine CSS files together</li>
</ul>
<h2 id="11-load-javascript-asynchronously">11. Load JavaScript asynchronously</h2>
<p>Websites today are increasingly integrated with third party content: social media, chat features, commenting services, information feeds, and others.</p>
<p>So if you load async then in the event the third-party crashes, your page won’t be held up trying to load that resource. Async loading can also speed up page loads.</p>
<h2 id="12-review-your-hosting-service-plan">12. Review your hosting service plan</h2>
<p>If you’ve gone through the checklist above and still find that web performance is impacted, check with your hosting provider to see whether you have shared or dedicated hosting.</p>
<p>It is possible you might have exceeded the limits of your hosting plan, which may impact your website speed. If this is the case, then it may be time to consider a dedicated plan where you have sole access to the server.</p>
<h2 id="ps-can-we-send-you-an-email">P.S. Can we send you an email?</h2>
<p>Once a week or so we send an email with our best content. We never bug you; we just send you our latest piece of content. <a href="#subscribe">Subscribe Here</a>.</p>yashumittalSEO is really important for many projects. It can increase the number of people who view your application or even boost conversions! For example, in e-commerce, 38.9 percent of purchases came from search engines such as Google.
https://i.imgur.com/7ETzmRQ.jpg
How to Use Social Media Logos on Your Website2017-08-23T06:30:00+00:002017-08-23T06:30:00+00:00https://blog.codecarrot.net/how-to-use-social-media-logos-on-your-website<p>It’s tough to find a site on the web today that doesn’t include Facebook, Twitter, and other social media logos in its design. You probably want to include them on your own site, but where do you find the actual icons? And are there rules for how to use them?</p>
<p>How many times do you think that you see the facebook logo every day not just on the web but on television billboards, pizza boxes same with the Twitter logo or Tumblr or Pinterest?</p>
<p><img src="https://cdn.codecarrot.net/images/codecarrot-social-media-section.png" alt="CodeCarrot Social Media Section" /></p>
<p>Social media logos are everywhere and for good reason, users know what they mean and what to expect when they see them or click on them and on the web social media icons are a great way to direct your users to your social media profiles all well using minimal screen real estate but…</p>
<p>When you’re designing your site where are you actually getting those icons from, it’s simple enough to go to Google Images and find some.</p>
<p>There are lots of different ones there but which ones do you pick, not all of them look the same. Does it matter which ones you use?</p>
<p><img src="https://cdn.codecarrot.net/images/giphy-yes.gif" alt="Hundred Percent Yes" /></p>
<p>A hundred percent yes, it does matter every social media site has their own brand guidelines that it’s your job to follow.</p>
<p><img src="https://cdn.codecarrot.net/images/facebook-brand-resource-center.png" alt="Facebook logo trademark property" /></p>
<p>That Facebook logo that’s a trademarked property that belongs to Facebook, you are legally allowed to use it on your site but only if you follow their rules.</p>
<p><img src="https://cdn.codecarrot.net/images/search-facebook-brand-guidelines-on-google.png" alt="Search Facebook brand guidelines on google" /></p>
<p>Finding a social media company’s brand guidelines is easy, just Google Facebook or twitter or whatever logo you’re looking for plus the words brand guidelines. At or near the top of the search results is going to be just what you’re looking for you, just need to make sure you’re going to an official website if it’s a Twitter logo you’re looking for make sure you’re looking at the brand guideline page on <a href="//twitter.com/codecarrotnet">twitter.com</a>.</p>
<p>Don’t get all your information about social media logs from blog posts, they might go out of date quickly.</p>
<p>Facebook and Twitter and all these other companies are going to keep their brand guidelines page up-to-date so you always have the latest and greatest logo to work with each site is going to have these logos in different file formats for you to download and use but they’re also going to have guidelines that you have to follow.</p>
<p><img src="https://cdn.codecarrot.net/images/twitter-brand-guidelines-website.png" alt="Twitter Brand Guidelines Website" /></p>
<p>Twitter, for example, wants you to make sure that their logo always has the bird facing to the right and they also require a certain amount of space around the logo if you don’t follow the brand guidelines of the site whose logo you’re using you don’t have their permission to be using in the first place.</p>
<p>Make a point to check the brand guidelines a couple of times every year or whenever you make design changes to your site.</p>
<p>If the logo gets updates and you’re still sticking with an older version it’s going to make you look behind the times and that is never a good thing on the web so take a few minutes look at the icons you’re using on your site then check those branding guidelines and make sure that you’re up to date.</p>yashumittalIt’s tough to find a site on the web today that doesn’t include Facebook, Twitter, and other social media logos in its design. You probably want to include them on your own site, but where do you find the actual icons? And are there rules for how to use them?
https://cdn.codecarrot.net/images/socialmedia_guide.png
Top 5 Tips for Learning2017-08-23T04:30:00+00:002017-08-23T04:30:00+00:00https://blog.codecarrot.net/top-5-tips-for-learning<p>Learning is hard. It takes time and effort and is a never ending pursuit. So how do we make the most out of our time and effort? Here are my <strong>Top 5 Tips for Learning</strong>.</p>
<h2 id="1-spaced-learning">1. Spaced Learning</h2>
<p>If you’ve ever been one to cram the night before an exam, you may have found that this works in the short-term and you receive a decent grade on the exam. However, you probably remember very little by the following week. Many people do the same thing when they’re trying to learn to code. They cram all their study into a Saturday. While it’s great to have a longer period of time to really focus on figuring something out, there’s only so much information your brain is able to absorb at one time. Instead, break that learning up throughout the week, even if it’s only 15min. First thing in the morning, before bed, or during a lunch break are great times to fit this in.</p>
<p><strong>Action:</strong> Block out 15-30 minutes at least 3 times a week for learning.</p>
<h2 id="2-chunking">2. Chunking</h2>
<p>Your brain can only hold about 4 things in working memory. This is why learning to coding is hard. There are all the syntax rules, different types of variables, conditionals statements, functions, objects, and… we’re already past 4 and that’s just a high-level overview. Each of these concepts contains many distinct pieces of information. So how do you learn all these new concepts if you can’t store it all in working memory? The secret is chunking. It’s kind of like the high-level overview. Once you understand how the syntax works, you don’t have to worry about each individual rule.</p>
<p><img src="https://cdn.codecarrot.net/images/chunking.png" alt="chunking" /></p>
<p>Here’s an explanation of chunking by Barbara Oakley: “When you are first chunking a concept, its pre-chunked parts take up all your working memory, as shown on the [above] left. As you begin to chunk the concept, you will feel it connecting more easily in your mind, as shown in the center. Once the concept is chunked, as shown on the right, it takes up only one slot in working memory. It becomes one smooth strand that is easy to follow and use to make new connections. The rest of your working memory is left clear. That dangling strand of chunked material has increased the amount of information available to your working memory. Think of it like the slot in working memory is a hyperlink that has been connected to a big web page.”</p>
<p><strong>Action:</strong> Deliberately practice each concept until you no longer have to consciously think about each individual part.</p>
<h2 id="3-prime-for-focus">3. Prime for Focus</h2>
<p><strong>We can’t multitask.</strong> Many people pride themselves on being good at multitasking. But multitasking is a myth. Our brains can only concentrate on one thing at a time, so they are constantly switching focus. This leads to “continuous partial attention”. We struggle to give any task our full attention, even for 15 minutes.</p>
<p><strong>Physical Distractions.</strong> Hunger, thirst, aches and pains, and messy surroundings, all contribute to the distractions we each face on a consistent basis. To maximize our ability to focus, we need to minimize our distractions. Straighten your desk, use the restroom, have a snack, drink some water and take 5 minutes to move and stretch.</p>
<p><strong>We are creatures of habit.</strong> Routines help us to be more productive. A bedtime routine can help us fall asleep faster and sleep more restfully. In the same way having a study routine will prepare your mind to perform at its peak.</p>
<p><strong>Action:</strong> Create a <a href="/finding-the-time-to-focus-on-your-code">learning routine</a> that minimizes both physical and electronic distractions. This will help you get the most out of your 15-3o minutes of study.</p>
<h2 id="4-apply-what-you-learn">4. Apply What You Learn</h2>
<p>I may attend a conference, listen to a podcast, read a book, or watch a video in which I learn <strong>about</strong> something. But I haven’t really <strong>learned</strong> something until I’ve put it into practice. As I’m building something, I discover new things to learn and build the connections between what I already know and what I am trying to learn. One of the ways I combat Imposter Syndrome is by reminding myself I may not know something YET, but I can learn.</p>
<p><strong>Action:</strong> Do you have a project idea? Start building it. This is where that extra weekend time can be most useful. Deliberately practicing what you’ve learned.</p>
<h2 id="5-sleep">5. Sleep</h2>
<p>This might be my favorite tip. Did you know that sleep actually helps you learn new things? Remember that chunking I talked about at the beginning of this article? When you sleep, your brain is able to make connections between the new concepts you’re learning and other knowledge that has already been internalized. Sleep helps you see the big picture and come up with creative solutions. Just taking a break to let your mind wander can have some of the same benefits.</p>
<p><strong>Action:</strong> If you’re struggling with something that is particularly challenging, step away and do something else to take your mind off the problem. Or better yet, sleep on it.</p>
<p>Hopefully, these tips help you make the most of your time and effort while you’re learning. I am constantly tweaking my own goals and routines to fit with my current situation and help me pursue life to the fullest. Have additional tips you’d like to share? We’d love to hear about them in the comments below.</p>
<h2 id="ps-can-we-send-you-an-email">P.S. Can we send you an email?</h2>
<p>Once a week or so we send an email with our best content. We never bug you; we just send you our latest piece of content. <a href="#subscribe">Subscribe Here</a>.</p>yashumittalLearning is hard. It takes time and effort and is a never ending pursuit. So how do we make the most out of our time and effort? Here are my Top 5 Tips for Learning.
https://cdn.codecarrot.net/images/pexels-photo-68562.jpeg
How to Install Rails 5 on Linux2017-08-22T21:30:00+00:002017-08-22T21:30:00+00:00https://blog.codecarrot.net/installing-rails-5-linux<p>We figured we’d share those directions here, as a little nudge for those of you who still haven’t discovered how awesome Rails is.</p>
<p>We’ve set up guides for 3 different operating systems:</p>
<ul>
<li><a href="/installing-rails-5-windows">Windows</a></li>
<li><a href="/installing-rails-5-mac/">Mac</a></li>
<li>Linux (you are here!)</li>
</ul>
<p>We’re not going to mess with installing a fancy database, alternate testing frameworks, or anything like that; this is an easy, bare-bones installation that will let you try Rails and see if it’s right for you. We chose Ubuntu as the distribution to demonstrate for Linux, but you should be able to adapt these directions for other distros.</p>
<ul>
<li>We’ll use “rvm”, the Ruby Version Manager, to install a new version of Ruby.</li>
<li>We’ll use our newly-installed Ruby tools to install the Rails library itself.</li>
<li>Lastly, since Rails includes several JavaScript-based features, we’re going to need a JavaScript runtime. So we’ll install Node.js.</li>
</ul>
<p>First, open a terminal. If you haven’t done that before, you can click the button in the upper-left to search your computer, and type “terminal”. Click the “Terminal” application in the list of results. Once that’s done, you’ll be ready to follow along for the rest of these directions.</p>
<h2 id="ruby-version-manager-rvm">Ruby Version Manager (rvm)</h2>
<p>We need to install rvm, the Ruby Version Manager. rvm will download, compile, and install new Ruby versions for us.</p>
<p>But to install rvm, we first need the “curl” program. We’ll install that via a package manager. In your terminal, run this command:</p>
<p><code class="highlighter-rouge">sudo apt-get install curl</code></p>
<p>You’ll need to provide your system password. When the installation is complete, you’ll be returned to your system prompt.</p>
<p>Now we’re ready to install rvm. Copy and paste these two commands into your terminal:</p>
<div class="highlighter-rouge"><div class="highlight"><pre class="highlight"><code>gpg --keyserver hkp://keys.gnupg.net --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3
\curl -sSL https://get.rvm.io | bash -s stable
</code></pre></div></div>
<p>(Yes, that is a backslash before the “curl” command. It’s there to avoid potential version conflicts.)</p>
<p>rvm is now installed, but it won’t be available until you open a new terminal window. So go ahead and open a new window from the menu. Then, try running the “rvm” command all by itself. If it outputs usage information, you’ll know it’s working.</p>
<h2 id="ruby">Ruby</h2>
<p>Now that rvm is installed, we can have it install a new Ruby version for us. From your terminal, run:</p>
<p><code class="highlighter-rouge">rvm install 2.3.1</code></p>
<p>rvm may need to install some packages that Ruby depends on. If it asks, type your system password and press Enter to continue.</p>
<p>When it returns to the system prompt, Ruby will be installed. But it’s not available in your terminal yet. If you type ruby -v to look at your ruby version, you’ll probably either get a message saying Ruby is NOT installed, or you’ll get an older version of Ruby. To tell rvm to use the Ruby version you just installed, and to use that version by default in the future, run:</p>
<p><code class="highlighter-rouge">rvm use 2.3.1 --default</code></p>
<h2 id="setting-your-terminal-for-login-shell">Setting your terminal for login shell</h2>
<p>When you try to run the “rvm use” command, you may get an error: “RVM is not a function… You need to change your terminal emulator preferences to allow login shell.” If that happens, you’ll need to go to a search engine to figure out how to enable login shell for your terminal.</p>
<p>If you don’t know what terminal program you’re using, you can look in the About menu. Ubuntu comes with “Gnome Terminal” by default, so that’s what we used for this installation. So we’d type into a search engine: “gnome terminal login shell”.</p>
<p>Among the results, we found a page that said “you have to enable ‘Run Command as a login shell’ in the gnome-terminal ‘Profile Preferences’, reachable from the Edit menu.” So we followed the menus:</p>
<ul>
<li>“Edit”</li>
<li>“Profile Preferences”</li>
<li>“Command” tab</li>
<li>Check “Run command as a login shell”</li>
<li>Click “Close”</li>
<li>Open another new terminal window so it takes effect</li>
</ul>
<p>After that, we ran <code class="highlighter-rouge">rvm use 2.3.1 --default</code> again, and it worked.</p>
<p>Of course, these particular directions will only help you if you’re using Gnome Terminal. If you’re using a different program, try your own web search.</p>
<h2 id="rails">Rails</h2>
<p>Now it’s time to install Rails. Rails comes as a Ruby “gem”. A gem is a library, a collection of reusable code, that can be automatically downloaded and installed on your system, using the “gem” tool. In your terminal, run:</p>
<p><code class="highlighter-rouge">gem install rails --version 5.0.0</code></p>
<p>The “gem” program will download and install that version of the Rails gem, along with all the other gems Rails depends on.</p>
<h2 id="nodejs">Node.js</h2>
<p>There’s one last thing we need to take care of… Some libraries that Rails depends on require a JavaScript runtime to be installed. Let’s install Node.js so that those libraries work properly. In your terminal, use your package manager to install the nodejs package:</p>
<p><code class="highlighter-rouge">sudo apt-get install nodejs</code></p>
<p>You’ll be prompted for your system password again, and then Node.js will be installed.</p>
<h2 id="ps-can-we-send-you-an-email">P.S. Can we send you an email?</h2>
<p>Once a week or so we send an email with our best content. We never bug you; we just send you our latest piece of content. <a href="#subscribe">Subscribe Here</a>.</p>yashumittalWe figured we’d share those directions here, as a little nudge for those of you who still haven’t discovered how awesome Rails is.
https://cdn.codecarrot.net/images/148.jpeg
How to Install Rails 5 on Mac2017-08-22T20:30:00+00:002017-08-22T20:30:00+00:00https://blog.codecarrot.net/installing-rails-5-mac<p>We figured we’d share those directions here, as a little nudge for those of you who still haven’t discovered how awesome Rails is.</p>
<p>We’ve set up guides for 3 different operating systems:</p>
<ul>
<li><a href="/installing-rails-5-windows">Windows</a></li>
<li>Mac (you are here!)</li>
<li><a href="/installing-rails-5-linux/">Linux</a></li>
</ul>
<p>We’re not going to mess with installing a fancy database, alternate testing frameworks, or anything like that; this is an easy, bare-bones installation that will let you try Rails and see if it’s right for you.</p>
<ul>
<li>We’ll use Homebrew, a software package installer, to install some libraries that both Ruby and Rails rely on.</li>
<li>Then we’ll use “rvm”, the Ruby Version Manager, to install a new version of Ruby. Macs already come with a version of Ruby installed, but it’s usually a little out of date. rvm will install an up-to-date version alongside your existing version.</li>
<li>Lastly, we’ll use our newly-installed Ruby tools to install the Rails library itself.</li>
</ul>
<p>First, you’ll need to open a terminal. If you haven’t done this before, visit your Applications folder in the Finder, then open the “Utilities” folder, and double-click the “Terminal” app. Once that’s done, you’ll be ready to follow along for the rest of these directions.</p>
<h2 id="homebrew">Homebrew</h2>
<p>Installing Rails requires several software packages. And Homebrew, the package manager, can automatically download and install these packages for us. So let’s start by installing Homebrew.</p>
<p>Copy and paste this Ruby command into your terminal, then hit the Return key to run it:</p>
<div class="highlighter-rouge"><div class="highlight"><pre class="highlight"><code>/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
</code></pre></div></div>
<p>(Macs actually come with a version of Ruby pre-installed. It’s a bit outdated, but it’s recent enough to install Homebrew for us.)</p>
<p>When the install finishes, you’ll see the dollar sign prompt again. Now it’s time to install our first Homebrew package. For security reasons, we’re going to need an encryption tool named “gpg”, so let’s install that. In your terminal, run:</p>
<p><code class="highlighter-rouge">brew install gpg</code></p>
<p>Wait a bit, and when it returns to the command prompt, the gpg software will be installed.</p>
<h2 id="ruby-version-manager-rvm">Ruby Version Manager (rvm)</h2>
<p>And now we’re ready to install rvm, the Ruby Version Manager. rvm will download, compile, and install new Ruby versions for us.</p>
<p>Copy and paste these two commands into your terminal:</p>
<div class="highlighter-rouge"><div class="highlight"><pre class="highlight"><code>gpg --keyserver hkp://keys.gnupg.net --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3
\curl -sSL https://get.rvm.io | bash -s stable
</code></pre></div></div>
<p>(Yes, that is a backslash before the “curl” command. It’s there to avoid potential version conflicts.)</p>
<p>rvm is now installed, but it won’t be available until you open a new terminal window. So go ahead and open a new window from the menu. Then, try running the “rvm” command all by itself. If it outputs usage information, you’ll know it’s working.</p>
<h2 id="ruby">Ruby</h2>
<p>Now that rvm is installed, we can have it install a new Ruby version for us. Run this command from your terminal:</p>
<p><code class="highlighter-rouge">rvm install 2.3.1</code></p>
<p>When it returns to the system prompt, Ruby will be installed. But it may not be available in your terminal yet. To tell rvm to use the Ruby version you just installed, and to use this version by default in the future, run this command in your terminal:</p>
<p><code class="highlighter-rouge">rvm use 2.3.1 --default</code></p>
<h2 id="rails">Rails</h2>
<p>Now it’s time to install Rails. Rails comes as a Ruby “gem”. A gem is a library, a collection of reusable code, that can be automatically downloaded and installed on your system, using the “gem” tool. In your command prompt, run:</p>
<p><code class="highlighter-rouge">gem install rails --version 5.0.0</code></p>
<p>The “gem” program will download and install that version of the Rails gem, along with all the other gems Rails depends on.</p>
<h2 id="ps-can-we-send-you-an-email">P.S. Can we send you an email?</h2>
<p>Once a week or so we send an email with our best content. We never bug you; we just send you our latest piece of content. <a href="#subscribe">Subscribe Here</a>.</p>yashumittalWe figured we’d share those directions here, as a little nudge for those of you who still haven’t discovered how awesome Rails is.
https://cdn.codecarrot.net/images/screen-shot-22.41.17.png
How to Install Rails 5 on Windows2017-08-22T19:30:00+00:002017-08-22T19:30:00+00:00https://blog.codecarrot.net/installing-rails-5-windows<p>We figured we’d share those directions here, as a little nudge for those of you who still haven’t discovered how awesome Rails is.</p>
<p>We’ve set up guides for 3 different operating systems:</p>
<ul>
<li>Windows (you are here!)</li>
<li><a href="/installing-rails-5-mac/">Mac</a></li>
<li><a href="/installing-rails-5-linux/">Linux</a></li>
</ul>
<p>We’re not going to mess with installing a fancy database, alternate testing frameworks, or anything like that; this is an easy, bare-bones installation that will let you try Rails and see if it’s right for you.</p>
<ul>
<li>We’ll use a program called “Ruby Installer” to install the Ruby programming language.</li>
<li>Then we’ll use Rubygems, a tool that’s included with our Ruby installation, to automatically download and install the Rails library.</li>
<li>We’ll install a Ruby “Development Kit” that Rails needs to work correctly.</li>
<li>Lastly, since Rails includes several JavaScript-based features, we’re going to need a JavaScript runtime. So we’ll install Node.js.</li>
</ul>
<p><strong>Ready? Let’s get started!</strong></p>
<h2 id="ruby">Ruby</h2>
<p>First, we need an installation of the Ruby programming language. We’re going to use a precompiled version of Ruby called Ruby Installer.</p>
<ul>
<li>Download and run <a href="//dl.bintray.com/oneclick/rubyinstaller/rubyinstaller-2.2.5.exe">Ruby Installer</a> from rubyinstaller.org. (For convenience, we linked directly to the version you need. The rubyinstaller.org site hosts its files on bintray.com.)</li>
<li>Allow the download to finish, then go to your Downloads folder, and open the “rubyinstaller” program. An installation wizard will open. Check “Add Ruby executables to your PATH”, then click Install. Wait while the installer runs, and click Finish when done.</li>
<li>To access Ruby, go to the Windows menu, click All Programs, scroll down to Ruby, and click “Start Command Prompt with Ruby”. A command prompt terminal will open. If you type <code class="highlighter-rouge">ruby -v</code> and press Enter, you should see the Ruby version number that you installed.</li>
</ul>
<h2 id="ruby-development-kit">Ruby Development Kit</h2>
<p>At this point, we could attempt to install Rails. But some of the libraries Rails depends on need some “build tools” in order to be compiled, and Windows lacks those tools by default. (You’ll know this is happening if you see an error when attempting a Rails install: “Gem::InstallError: The <code class="highlighter-rouge">‘[gem name]’</code> native gem requires installed build tools.”) To fix this, we need to install the Ruby “Development Kit”, which includes those build tools.</p>
<ul>
<li>Download the <a href="//dl.bintray.com/oneclick/rubyinstaller/DevKit-mingw64-32-4.7.2-20130224-1151-sfx.exe">Ruby Development Kit</a>. (This download also originates from rubyinstaller.org, and is also hosted on bintray.com.)</li>
<li>When it’s done, go to your downloads folder and double-click the DevKit executable.</li>
<li>We need to specify a folder where we’re going to permanently install the DevKit. I recommend installing it in the root of your hard drive, at “<code class="highlighter-rouge">C:\RubyDevKit</code>”. (Don’t use spaces in the directory name.)</li>
</ul>
<p>Now we need to make the DevKit tools available to Ruby.</p>
<ul>
<li>Back in your command prompt, change to the the DevKit directory. (“Directory” is another name for a folder.) Type “<code class="highlighter-rouge">cd C:\RubyDevKit</code>”, or whatever other directory name you installed it in.</li>
<li>Next we need to run a Ruby script to initialize the DevKit setup. Type “<code class="highlighter-rouge">ruby dk.rb init</code>”.</li>
<li>Now we’ll tell that same script to add the DevKit to our Ruby installation. Type “<code class="highlighter-rouge">ruby dk.rb install</code>”.</li>
</ul>
<p>The DevKit should now be available for your Ruby tools to use when installing new libraries.</p>
<h2 id="rails">Rails</h2>
<p>Now it’s time to install Rails. Rails comes as a Ruby “gem”. A gem is a library, a collection of reusable code, that can be automatically downloaded and installed on your system, using the “gem” tool. In your command prompt, type:</p>
<p><code class="highlighter-rouge">gem install rails --version 5.0.0</code></p>
<p>This will ensure you’re downloading the correct version of the gem. Once you press Enter, the “gem” program will download and install that version of the Rails gem, along with all the other gems Rails depends on.</p>
<h2 id="nodejs">Node.js</h2>
<p>One last thing. . . Some libraries that Rails depends on require a JavaScript runtime to be installed. Let’s install Node.js so that those libraries work properly.</p>
<ul>
<li>Download the <a href="//nodejs.org/dist/v4.4.7/node-v4.4.7-x86.msi">Node.js installer</a>.</li>
<li>When the download completes, visit your downloads folder, and run the “node-v4.4.7.pkg” installer.</li>
<li>Read the full license agreement, accept the terms, and click Next through the rest of the wizard, leaving everything at the default.</li>
<li>A window may pop up asking if you want to allow the app to make changes to your computer. Click “Yes”.</li>
<li>When the installation is complete, you’ll need to restart your computer so Rails can access Node.js.</li>
<li>Once your computer restarts, don’t forget to go to the Windows menu, click “All Programs”, scroll down to Ruby, and click “Start Command Prompt with Ruby”.</li>
</ul>
<h2 id="ps-can-we-send-you-an-email">P.S. Can we send you an email?</h2>
<p>Once a week or so we send an email with our best content. We never bug you; we just send you our latest piece of content. <a href="#subscribe">Subscribe Here</a>.</p>yashumittalWe figured we’d share those directions here, as a little nudge for those of you who still haven’t discovered how awesome Rails is.
https://cdn.codecarrot.net/images/screen-shot-10.21.38.png
What’s the best programming language for a beginner to learn right now?2017-08-22T18:09:00+00:002017-08-22T18:09:00+00:00https://blog.codecarrot.net/whats-the-best-programming-language-for-a-beginner-to-learn-right-now<p>If you’re new to coding, you may be asking yourself: where is the best place to start? You’ve heard the names of countless programming languages flying around, but it’s hard to know which one is right for you. There are a few different approaches you can take to choosing your first language. Choose a language that sounds the most interesting to you so you can work on a project that is going to drive your learning and progress. But, if you aren’t sure what type of projects work for you, it’s worth noting that there is one particularly popular language that’s in high-demand and coincidently it’s also very approachable and digestible for beginners.</p>
<h2 id="so-which-beginner-language-is-it">So which beginner language is it?</h2>
<p>While we attended conferences throughout the year, we asked developers we met – some who knew over 20 programming languages – which languages they would recommend for beginners and aspiring developers. Overwhelmingly, one language dominated all of their answers: Python.</p>
<p>As developer, we can described, <em>“Python is really great for a beginner because it’s not verbose. Once you start learning it lets you play with a lot of things quickly.”</em> The benefit of this for a beginner is that it won’t take you long to grow your skills and see the results in your work.</p>
<p>We then took the conversation one step further and were curious what our expert teachers would say. So we asked a few of them which languages they would recommend for an absolute beginner. Their answer? You guessed it. Python. It reads like pseudocode. You can sit down and read it, which is great for a beginner.</p>
<p>So the overall winner: Python. If you’d like to know more about Python – including the fact that it was named after Monty Python in the late 1980s – and what you can do with it, <a href="/learning-python-from-zero-to-hero">check out this great article</a> that explains exactly that.</p>yashumittalIf you’re new to coding, you may be asking yourself: where is the best place to start? You’ve heard the names of countless programming languages flying around, but it’s hard to know which one is right for you. There are a few different approaches you can take to choosing your first language. Choose a language that sounds the most interesting to you so you can work on a project that is going to drive your learning and progress. But, if you aren’t sure what type of projects work for you, it’s worth noting that there is one particularly popular language that’s in high-demand and coincidently it’s also very approachable and digestible for beginners.
https://cdn.codecarrot.net/images/pexels-photo-293336.jpeg
Do you need your own website to sell jewelry online?2017-08-21T06:30:00+00:002017-08-21T06:30:00+00:00https://blog.codecarrot.net/do-you-need-your-own-website-to-sell-jewelry-online<p>If you sell jewelry online, chances are you use one of the many eCommerce platforms for makers, such as Flipkart or Amazon. So is it even worth spending the time and effort to create your own eCommerce website when you have so many big-name platforms to choose from? In a word, yes. Maintaining your own site is a fantastic way to sell jewelry online.</p>
<h2 id="sell-jewelry-online-without-the-middleman-in-3-steps">Sell jewelry online (without the middleman) in 3 steps</h2>
<ol>
<li>Name your shop.</li>
<li>Create your eCommerce store.</li>
<li>Fill your jewelry cases.</li>
</ol>
<p>Before we walk through the process of building your own online store, let’s talk a little bit about what makes this an attractive option for serious artisans and jewelers.</p>
<h2 id="why-do-i-need-my-own-store">Why do I need my own store?</h2>
<p>While I’m not saying shut down your Etsy shop, it’s worth investing time and money in your own website, especially if you’re serious about taking your jewelry-making career to the next level.</p>
<p><strong>Instant credibility</strong></p>
<p>Having your own website makes your business look legit. On your own site, you have the ability to fully customize your own branding and layout in a way that you can’t on sites like Etsy. You can direct the flow of traffic, encourage people to <a href="/beginners-guide-to-starting-an-email-list">sign up for your newsletter</a> (hello, handy pop-ups!) and show them similar products they might like.</p>
<p><strong>All the profits</strong></p>
<p>Anytime you sell jewelry online on someone else’s site, you’re giving up a portion of the profits in the form commission. Sell that same bracelet or necklace from your own website, and the profits are all yours.</p>
<p><strong>Your own identity</strong></p>
<p>Having your own website also makes your brand more memorable. How many times have you heard someone say, “I got this on Etsy!” instead of, “I got it from this cute online shop called Two Little Peonies?” Yep, raising my hand here on this one.</p>
<blockquote>
When you sell jewelry online via your own website, people look at your jewelry as its own entity instead of just another piece in a sea of products.
</blockquote>
<p>While you might be immersed in the world of Etsy and know it better than your best friend, your average customer might not realize they’re buying something from you, an individual jewelry designer, instead of from Etsy itself.</p>
<p><strong>A (more) captive audience</strong></p>
<p>In fact, on Etsy a potential customer could inadvertently click a link that takes them out of your shop. It’s much easier to keep visitors on your own site when they’re not distracted by all the pretty shiny objects floating around those big eCommerce platforms.</p>
<p><strong>Control over your destiny</strong></p>
<p>When a site makes a major change to their platform — and that’s been known to happen — it can impact the flow of traffic to your individual shop and ultimately the number of sales you make. On your own website, you decide what changes to make. If you don’t like them or they have a negative impact on sales, just change it back!</p>
<div class="callout">
When you sell on another eCommerce platform, you’re completely at their mercy.
</div>
<p>And what happens if the eCommerce platform you’re selling your jewelry through decides to suddenly close or suspend your shop without any warning? (Yes, that can happen.) Poof, there goes your entire customer base and sources of traffic.</p>
<h2 id="how-to-sell-jewelry-online-a-quick-start-guide">How to sell jewelry online: A quick-start guide</h2>
<p>If the thought of setting up your own website makes you want to hyperventilate, take a deep breath. If you’re in this for the long haul, you’ll find it’s worth it. It’s not something that needs to happen overnight. Break it down into smaller steps, and before you know it, you’ll be able to sell jewelry online from your very own store.</p>
<h2 id="1-name-your-shop">1. Name your shop</h2>
<p>The very first step is to get your domain name. If your jewelry business already has a name, that’s the best place to start. Go to domain registrar website, type “yourjewelrybusiness” into the box up top, and see what comes up. If it’s available, huzzah! Now, go purchase it before someone snatches it. Even if you’re still days away from setting up your own website, the low cost of holding onto that domain far outweighs the cost you could incur should someone else get it before you.</p>
<blockquote>
In the event that your domain is already taken, Domain registrar will give you other domain name possibilities, including extension options and variations on your shop name. Maybe you’ll find something you like even better!
</blockquote>
<p>Consider adding the word “shop” or “jewelry” after your company’s name if the .com isn’t available.</p>
<p>With .jewelry or .shop, you can give your online store a unique — and relevant — web address.</p>
<p>Perhaps one of the most important considerations when choosing your domain name is to make sure it’s memorable and easy to spell. While Google is pretty good at figuring out wonky spellings, you don’t want to lose out on potential jewelry sales because your clever name is way too complicated to figure out.</p>
<h2 id="2-create-your-ecommerce-store">2. Create your eCommerce store</h2>
<p>It’s now time to get your <a href="https://www.codecarrot.net/">website developed</a> where you can sell jewelry online. Start by choosing a <a href="https://www.codecarrot.net/">host</a>. You can hire <a href="https://www.codecarrot.net/">CodeCarrot development team</a> to do the heavy lifting for developing your eCommerce website for you.</p>
<p>The two main things you will need are payment gateways and an SSL certificate.</p>
<p><strong>Payment gateway</strong></p>
<p>Popular payment gateways include PayTM, Instamojo and PayU. You can set up one or multiple gateways — you just need a bank account to link it to so the money has a place to go.</p>
<p><strong>SSL certificate</strong></p>
<p>An SSL Certificate turns the http at the beginning of your web address to https. To see this in action, click on your browser bar right now. See the green https:// and the padlock icon? That tells you that this website is protected by an SSL certificate. That’s how you know that any information you send to or receive from this website will be encrypted and hidden from hackers and thieves.</p>
<div class="callout">
More and more shoppers are looking for the https prefix before submitting credit card info to a website.
</div>
<p>Even if you have a payment gateway set up with a secure third-party provider, you still need the SSL Certificate to sell jewelry online. It shows your customers that you’re serious about protecting their information.</p>
<h2 id="3-fill-your-jewelry-cases">3. Fill your jewelry cases</h2>
<p><img src="https://i.imgur.com/eGCV3Pq.jpg" alt="Sell Jewelry Online Ring" /></p>
<p>Now that your store is set up, it’s time to fill it with your beautiful, handmade jewelry! Be sure to use well-lit, high-resolution photos to highlight your pieces. Add in compelling sales copy and use language that will resonate with your ideal customer. Try to incorporate relevant keywords when you can to increase your chances of being found in search results.</p>
<p>Once your shop is set up, you’re ready to go! Be sure to test it out to make sure the checkout process works and everything flows smoothly. Before you know it, you could find yourself saying goodbye to the big eCommerce platforms. And hello to your own jewelry store <a href="https://www.codecarrot.net/">developed by CodeCarrot</a></p>
<h2 id="ps-can-we-send-you-an-email">P.S. Can we send you an email?</h2>
<p>Once a week or so we send an email with our best content. We never bug you; we just send you our latest piece of content. <a href="#subscribe">Subscribe Here</a>.</p>yashumittalIf you sell jewelry online, chances are you use one of the many eCommerce platforms for makers, such as Flipkart or Amazon. So is it even worth spending the time and effort to create your own eCommerce website when you have so many big-name platforms to choose from? In a word, yes. Maintaining your own site is a fantastic way to sell jewelry online.
https://i.imgur.com/Yk6UZPC.jpg
Google’s mobile-first index - How you can prepare your website2017-08-20T06:30:00+00:002017-08-20T06:30:00+00:00https://blog.codecarrot.net/googles-mobile-first-index-how-you-can-prepare-your-website<p>It’s not a long time, until your website search ranking will start to degrate in the <a href="/google-search-algorithm">Google Search results</a>. Why?</p>
<p>Becuase Google is planning to add mobile-first indexing to their search algorithm in the near future. You don’t have to worry about Google turning your rankings upside down. The following information explains the steps you should take to get ready.</p>
<h2 id="what-does-mobile-first-indexing-mean">What does mobile-first indexing mean?</h2>
<p>Right now, Google crawls the web from a desktop user’s point of view and catalogs websites based on their desktop version. Being mobile-friendly improves a site’s SEO, but the actual content of a mobile site doesn’t affect the desktop site’s ranking in SERPs currently.</p>
<div class="callout">
Mobile use has started overtaking desktop use
</div>
<p>In May 2015, Google announced that more searches were conducted from mobile devices than from desktop computers in 10 countries around the world, including the U.S. In November 2016, StatCounter reported that more than half of worldwide internet usage was conducted on smartphones and tablets.</p>
<p><img src="https://i.imgur.com/3z1lddx.png" alt="Internet Usage Worldwide" /></p>
<p>This shift toward mobile shows no signs of slowing down, and Google wants to make sure it’s providing a good user experience for mobile users, as well as desktop users. Switching to a mobile-first index will help them do that.</p>
<p>After making the switch, Google will crawl the web from a mobile point of view – that is, it will catalog and rank sites based on their mobile versions instead of their desktop versions.</p>
<h2 id="what-you-need-to-know-about-the-mobile-first-index">What you need to know about the mobile-first index</h2>
<p>First of all, take a deep breath. This change isn’t going to happen immediately. At SMX Advanced, Gary Illyes of Google emphasized that the change is “many quarters away” and probably won’t occur until 2018. So, while it’s important to prepare, you have plenty of time to make sure your site is ready.</p>
<p>Second, you probably don’t have to worry about the switch causing a big change in your rankings, especially if you prepare well. Google is aiming for a “quality-neutral” launch, and they won’t roll out the new mobile-first index until they’ve tested it thoroughly.</p>
<blockquote>While it’s always best to be mobile-friendly, you won’t disappear from Google if you don’t have a mobile site by the time the change happens.</blockquote>
<p>Google will continue indexing your desktop site from the perspective of a mobile user. Your site’s ranking may change, but people will still be able to find you in search results. This of course begs the question: Is there anything I need to do to prepare?</p>
<h2 id="you-dont-need-to-change-anything-if">You don’t need to change anything if…</h2>
<p>Webmasters and SEOs tend to panic whenever Google makes a big change. This time, though, there may not be any need to worry. Many sites won’t even be affected by Google’s new index. In a nutshell, this update is about improving users’ search experience on mobile. Many mobile sites are hard to access, poorly structured or light on actual content. Sites like this will probably be penalized once the new index rolls out.</p>
<p>On the other hand, if your mobile site provides the same quality and user experience as your desktop site, you don’t need to worry about the new mobile-first index. The easiest way to make sure you’re covered is by using responsive web design that keeps your code and content consistent across all devices.</p>
<div class="callout">
If you already have a responsive site, you’re all set – no need to change anything.
</div>
<p>If your mobile site is lacking compared to your desktop site, however, there are a number of ways you can improve it before Google’s update is released. Here are several things you can do to keep ranking well in a mobile-first world.</p>
<h2 id="how-to-prepare-if-youre-not-currently-mobile-friendly">How to prepare if you’re not currently mobile-friendly</h2>
<p>Take these steps to prep if your current website is not mobile-friendly:</p>
<p><strong>Use responsive design</strong></p>
<p>First things first: Consider switching to responsive web design ASAP. Responsive web design is useful because it keeps your site consistent, no matter what device someone is using to view it. Your HTML stays the same across all devices. The only thing that changes is your CSS, so your site looks nice on a variety of screen sizes. Below is an example of how responsive design adjusts your site’s appearance on a smartphone.</p>
<p><img src="https://i.imgur.com/Dz1WhNO.png" alt="Responsive Mobile Design" /></p>
<div class="callout">
Responsive design is one of the most practical ways to make your site mobile-friendly.
</div>
<p>It’s also less likely to cause technical problems than other solutions, like having a separate mobile site. If you build a responsive site before the new mobile-first index launches, you probably won’t have to worry about anything else on this list.</p>
<p><strong>Check your content</strong></p>
<p>If you don’t think you’ll be able to make a responsive site by the time the new index launches, the next best thing you can do is to make sure your mobile content is the same as your desktop content.</p>
<blockquote>Don’t scale back your content just so it fits on a smaller screen – having less content typically means having fewer keywords to rank for.</blockquote>
<p>Any information visitors can find on your desktop site should be available on your mobile site, too.</p>
<p>Keep in mind that, after the update, Google won’t penalize you for hiding content in expandable sections like tabs or accordions. For mobile users, these features are critical to user experience, since they keep sites organized and simple to navigate on a small screen. Just make sure your hidden content is clearly labeled and easy to find.</p>
<p>At right, note the example of expandable content on the mobile version of Wikipedia.</p>
<p><strong>Keep technical details in mind</strong></p>
<p>Once you’ve gone over your mobile site’s content, take some time to ensure your site’s architecture is sound. It should be easy for users to locate and navigate to different sections of your site. Most importantly, check that all of your internal links are working. Lots of mobile sites have problems with dead or non-functional internal links, and this doesn’t just create headaches for your visitors – it also prevents Google’s crawlers from indexing all your pages.</p>
<p>Then, take a look at your structured data. Structured data is important, both in terms of telling Google what your website is about and organizing your information in SERPs, but many mobile websites don’t make good use of it.</p>
<div class="callout">
Make sure your schema markup is consistent between your desktop site and your mobile site.
</div>
<p>Don’t use unnecessary markup, though, since that might slow your site down. If you need help updating your structured data, Google’s markup helper will guide you through the process. To go through your website pages, type in your mobile URLs.</p>
<p><img src="https://i.imgur.com/vufXrlq.png" alt="Structured Data Markup Helper" /></p>
<p>Last but not least, if you haven’t done so yet, verify your mobile site on Google Search Console. This makes it so Google can find and index your mobile site instead of your desktop site.</p>
<p><img src="https://i.imgur.com/jWINJ3Z.png" alt="Welcome to Search Console" /></p>
<p><strong>Run tests</strong></p>
<p>To make sure that your improved mobile site works the way you expect it to, use Google’s helpful Webmaster tools to run some tests on your site.</p>
<ul>
<li>Check your site’s mobile-friendliness with the Mobile-Friendly Test.</li>
<li>Check your structured markup for errors with the Structured Data Testing Tool.</li>
<li>Use the Fetch as Google tool to look at your site through the eyes of a crawler. Make sure it can see everything you want it to see.</li>
<li>Check the speed of your mobile site with Google’s PageSpeed Insights Tool.</li>
</ul>
<h2 id="the-takeaway">The takeaway</h2>
<p>Google’s new mobile-first index will change the internet, but that doesn’t mean you have to change your entire SEO strategy. Instead, start thinking like Google, and look at your site primarily from a mobile perspective. Focus on making your mobile site as informative, user-friendly and structurally sound as possible. With a little preparation, you won’t have to stress over the change, and your rankings may even improve.</p>yashumittalIt’s not a long time, until your website search ranking will start to degrate in the Google Search results. Why?
https://i.imgur.com/pEcM6Wy.jpg
Ruby on Rails - Pros & Cons2017-08-20T04:30:00+00:002017-08-20T04:30:00+00:00https://blog.codecarrot.net/pros-cons-ruby-on-rails<p>We’re big fans of Ruby on Rails and over the years we’ve had countless conversations about the pros and cons of Ruby.</p>
<p>Selecting a technology for your web app is a challenge that every product or business owner has to face. If you make the right choice, it will give you a solid base for growth and expansion. If you choose wrong though, it may cost you.</p>
<p>Ruby on Rails, or Rails, is a popular server-side web application framework built on the Ruby programming language.</p>
<p>As a full-fledged web framework, RoR <em>(a.k.a Ruby on Rails)</em> offers many components of a successful web project, providing default structures for a database. In addition to MVC, Rails emphasizes the use of other well-known software engineering patterns and paradigms, including convention over configuration (CoC), don’t repeat yourself (DRY), and the active record pattern.</p>
<p>Still, to decide whether RoR is a good fit for your project, you need to know what makes this framework different from others. To help you build a deeper understanding of RoR, let’s dive in its main strengths and limitations.</p>
<h2 id="ror-pros">RoR Pros</h2>
<h3 id="1-best-industry-standards">1. Best Industry Standards</h3>
<p>Ruby on Rails is an opinionated framework which means it guides you into their way of doing things. It promotes the best standards and practices of web development.</p>
<p>The central pillar of the Rails philosophy is the DRY <em>(Don’t Repeat Yourself)</em> principle that ensures a clear separation of concerns and maintainability of your application. The framework embraces the principle of CoC <em>(convention over configuration)</em>, according to which Rails defaults to a set of conventions that specify the best way of doing many things.</p>
<p>No matter how complex your application is, it can be easily extended with new features and the philosophy behind is MVC <em>(Model-View-Controller)</em> that promotes modularity and extensibility of your applications.</p>
<p>Just to show the level of complexity one can achieve using RoR, take a look at Airbnb, GitHub, SlideShare, Dribbble, Bloomberg, CrunchBase, and Shopify have also trusted Ruby on Rails and built on a complex architecture of version control and distributed software development, which is successfully managed by an RoR framework.</p>
<h3 id="2-speed-of-development">2. Speed of Development</h3>
<p>RoR was created with the high velocity of prototyping and application development in mind. Its well-developed system of modules, generator scripts, and an efficient package management system allow scaffolding a complex application in just a few commands. One can achieve rapid application development thanks to the expressive and concise nature of Ruby language, and also to dozens of open-source libraries for just about any purpose, which the Ruby community calls ‘gems’.</p>
<p>As an added bonus, Rails ships with a default ORM system (ActiveRecord), which helps developers quickly put application and data logic together and deploy a fully functional prototype to be expanded with new features later.</p>
<h3 id="3-vibrant-ror-community">3. Vibrant RoR Community</h3>
<p>Rails is an open-source web framework supported by a talented community members. Using RoR in their own projects, they are interested in the constant improvement of the code base and bring new functionalities.</p>
<p>RoR’s ecosystem contains many “gems”, i.e. pieces of software that can be added into your project. Ruby community takes care of that. Almost any functionality you might think of has already been created. A community that runs Rails also ensures that the framework is regularly updated, issues are fixed, and security is kept up-to-date with the best industry standards.</p>
<h2 id="ror-cons">RoR Cons</h2>
<h3 id="1-runtime-speed-and-performance">1. Runtime Speed and Performance</h3>
<p>One of the most frequent arguments against RoR is its ‘slow’ runtime speed, which makes it harder to scale your RoR applications. While it’s true that other top environments and frameworks <em>(Node.js or Django)</em> are somewhat faster than RoR.</p>
<p>In most cases, performance issues your RoR application will face will be linked to the server or database architecture and the skillfulness of your engineering team rather than RoR itself. Performance considerations should be still kept in mind, though.</p>
<p>Twitter, for example, struggled to improve RoR’s performance that deteriorated after the social network became very popular, it is unlikely that your application will witness performance bottlenecks, unless it has a user base comparable to such large websites as Twitter. Although <a href="/why-did-twitter-switch-from-ruby-on-rails">Twitter did not abandon RoR completely</a>, it had to replace certain internal communication components and server daemons with Scala solutions.</p>
<h3 id="2-lack-of-flexibility">2. Lack of Flexibility</h3>
<p>RoR is an opinionated framework with a lot of hard dependencies and modules. To kickstart the project, your developers should configure routing, database migrations, and other modules shipped with the framework.</p>
<p>These default modules are good if you want to create an application with some standard functionalities, but they might backfire on you if you have something unique in mind.</p>
<p>In this case, it may be harder to adjust RoR to your product’s needs. At some point, you will have to make a difficult choice between giving a deep overhaul to your Rails application or using another framework that better suits your requirements.</p>
<h3 id="3-high-cost-of-wrong-decisions-in-development">3. High cost of wrong decisions in development</h3>
<p>Wrong architecture decisions during the initial stages of your project might cost you more in Rails than in any other framework.</p>
<p>Since prototyping with Rails is incredibly fast, an engineering team inexperienced in Rails might make unobvious mistakes that will gradually destroy your application’s performance in the future. These structural deficiencies will be hard to fix because Rails is an open framework, where all components are tightly coupled and depend on each other.</p>
<p>For instance, too much reliance on ActiveRecord makes an application logic tightly coupled with database models, which leads to maintainability problems in the long run. At CodeCarrot, we have patterns that help us prevent these issues from the beginning.</p>
<h2 id="conclusion">Conclusion</h2>
<p>Ruby on Rails is definitely one of the best web development frameworks to consider for your next project. With RoR you can do pretty much the same as with other good frameworks.</p>
<p>The excellent community, a quality code base, the sheer size of the module database, and the maintainability of RoR applications made it the preferred choice for such successful projects as Airbnb, GitHub, BaseCamp, Zendesk, and Bloomberg. RoR is definitely a good choice if your project has tight deadlines and budget requirements.</p>
<p>On the other hand, a less opinionated framework such as Node.js may be a better choice for innovative web development solutions that require a total control over the framework architecture, modules, database integrations, and server deployment. The same will apply if you are building I/O-heavy Real-Time Applications for which performance and scalability are a major concern.</p>
<h2 id="ps-can-we-send-you-an-email">P.S. Can we send you an email?</h2>
<p>Once a week or so we send an email with our best content. We never bug you; we just send you our latest piece of content. <a href="#subscribe">Subscribe Here</a>.</p>yashumittalWe’re big fans of Ruby on Rails and over the years we’ve had countless conversations about the pros and cons of Ruby.
https://i.imgur.com/JSa7XoK.jpg
Google Tools Every Online Business Should Know2017-07-14T06:30:00+00:002017-07-14T06:30:00+00:00https://blog.codecarrot.net/google-tools-for-online-business-marketing<p>Google rules! Wouldn’t you say? The search engine giant processes more than 40,000 search queries every second! While the entire world uses Google to satiate its curiosity, it’s a lot more than just a search engine. There are a whole bunch of Google tools that your online business can use <em><strong>(for free)</strong></em> and help more people discover you.</p>
<h1 id="5-google-tools-your-online-business-should-know">5 Google Tools your Online Business Should Know</h1>
<p>Here is a list of 5 amazing Google tools for your online business + 3 bonus tools that can propel your business to success:</p>
<h2 id="1-google-adsense">1. Google Adsense</h2>
<p><a href="https://support.google.com/adsense/">Google Adsense</a> is an advertising tool that can help you earn money on your website via ads.</p>
<p><strong>Whose ads?</strong> People who have signed up with the Google Adwords program. Basically, they pay Google for placing ads and Google allows you to choose what ads (among these) you would want to show on your website, while also giving you a part of the money these advertisers paid Google.</p>
<p>This tool can not just help you get passive income but also help improve your reader/customer service by choosing to show broadly relevant ads on your website.</p>
<h2 id="2-google-adwords--keyword-planner">2. Google Adwords + Keyword Planner</h2>
<p>Want more people outside of your circle to discover your online business via Google? Try advertising with Google. <a href="https://adwords.google.com/">Google Adwords</a> is a paid tool that allows you to bid on keywords (search terms ) that you want to rank/appear on.</p>
<p>Think of it like paying for a huge billboard. You can choose where this billboard will be placed – on the highway, near a crossroad or atop a railway crossing bridge. The bigger your billboard, the more you have to pay. The longer you want your ad to stay on, the longer you have to pay.</p>
<p>Google Adwords is all that – only online. When someone searches for your paid keyword, Google will show your website on top of the search page. This tool also comes equipped with a <a href="https://backlinko.com/google-keyword-planner">Keyword Planner tool</a> that can help you identify which words are highly searched in your category. Targeting a niche keyword is a good idea but going too niche can be futile. Looking for emerging trends can help identify the right keywords.</p>
<h2 id="3-google-trends--google-correlate">3. Google Trends + Google Correlate</h2>
<p>The key to good advertising is to tap into the heart of your target audience. Timing plays a huge part in determining what your audience wants. <a href="https://trends.google.co.in/trends/">Google Trends</a> is a great tool to identify what your audience (or the whole world for that matter) is currently interested in. This can not just help you determine what your audience is looking for but also figure out new product ideas and understand how to beat your competition!</p>
<p><a href="https://www.google.com/trends/correlate">Google Correlate</a> is an extension of Google Trends. Use this tool if you are in a seasonal business. The tool can give you in-depth insights into the patterns of demand for a certain product or service.</p>
<h2 id="4-google-analytics--url-builder">4. Google Analytics + URL Builder</h2>
<p>All your marketing and advertising efforts will go waste if you don’t measure how your ads are doing. Why would you want to pour in your money and time on something that does not yield you anything?</p>
<p>Enter <a href="https://analytics.google.com/analytics/web/">Google Analytics</a> – a magic tool that doesn’t just help you analyze how much traffic you are getting and from what sources but also helps you understand your customer base in depth via beautiful data charts with appropriate filters and much more.</p>
<p>How do you track certain ad campaigns? Brand them.</p>
<p>Another feature that comes along with Google analytics is the very handy <a href="https://ga-dev-tools.appspot.com/campaign-url-builder/">Google URL builder tool</a>. This helps you craft custom links that can help you track where traffic to your website is coming from. You can also build SEO-friendly links with this tool.</p>
<p><strong>Pro Tip:</strong> Use <em><strong><a href="https://goo.gl/">goo.gl</a></strong></em> to shorten your links and keep track of how much traffic you’ve been getting on the link.</p>
<h2 id="5-google-webmasters-tool">5. Google Webmasters Tool</h2>
<p>The <a href="https://www.google.com/webmasters/#?modal_active=none">Google Webmasters tool</a> is your master key to being found on the web. Think of it like telling Google, “hey! this is my address.” Using Webmasters will optimize your website for search engines, meaning you show up better in search terms.</p>
<p>Webmasters is a free tool. Link your website and AdWords account to the tool to start configuring it. Submit your sitemap (which you can create <a href="https://www.xml-sitemaps.com/">here</a>), set a robots.txt file to tell Google what pages of your website you don’t want to show and set up other customizable elements of your website to start getting insights on what you should improve to appear immediately when someone searches with your focus keywords.</p>
<p>Using these tools can help you get massive traffic to your <a href="https://www.codecarrot.net/">website</a> or <a href="https://www.codecarrot.net/store">online store</a>.</p>
<p>Read this blog on <a href="/what-are-hashtags-and-why-you-need-to-start-using-them-on-social-media/">hashtags and why you need to start using them on social media</a>.</p>
<p>Don’t have an website? Want a free website? Try <a href="https://www.codecarrot.net/">CodeCarrot Free Website Development Plan</a>. You can get your website developed with lots of added features like shopping cart, pro analytics, your own integrated payments and even SEO-optimised!</p>
<p>Give your business an online presence with your own website! Start the <a href="https://www.codecarrot.net/">CodeCarrot experience</a> now.</p>
<h2 id="ps-can-we-send-you-an-email">P.S. Can we send you an email?</h2>
<p>Once a week or so we send an email with our best content. We never bug you; we just send you our latest piece of content. <a href="#subscribe">Subscribe Here</a>.</p>yashumittalGoogle rules! Wouldn’t you say? The search engine giant processes more than 40,000 search queries every second! While the entire world uses Google to satiate its curiosity, it’s a lot more than just a search engine. There are a whole bunch of Google tools that your online business can use (for free) and help more people discover you.
https://i.imgur.com/WocOJA7.jpg
A Guide to Finding the Perfect Referral Program for Your Business2017-07-13T06:30:00+00:002017-07-13T06:30:00+00:00https://blog.codecarrot.net/perfect-referral-program-for-business<p>Have you been thinking of starting a refer and earn program for your business but aren’t sure about where to get started? We have you covered! Here is a beginners’ guide to a refer and earn scheme that will work for your business.</p>
<h2 id="what-is-a-referral-program">What is a Referral Program?</h2>
<p>A referral program is a marketing tool where you reward your customer to refer your business to a friend/colleague. A refer-and-earn program can help you multiply your business, raise brand awareness and increase your marketing ROI.</p>
<h2 id="why-choose-a-referral-program">Why Choose a Referral Program?</h2>
<p>You are probably reading this because you’re unsure about your referral program. Does your business really need a referral program? Let us help you with that. Here are a few reasons why you should choose a referral program.</p>
<p>As per research:</p>
<ul>
<li>One in 3 people adopt a business due to referrals.</li>
<li>Using a referral business improves customer retention rate by 37%</li>
<li>Referral Programs help improve sales revenue significantly.</li>
<li>A referral program influences 20 to 50% of buying decision of a customer.</li>
<li>Referral leads are 10 times more valuable.</li>
<li>A good referral program builds a great deal of trust among customers.</li>
</ul>
<h2 id="how-to-find-the-right-referral-program-for-your-business">How to Find the Right Referral Program for your Business</h2>
<p>If you’re sold on the idea of getting a referral program for your business, here is the next step – finding the right referral program.</p>
<p>To understand what referral program would suit your business the best, ask yourself these questions:</p>
<ul>
<li>Who is my customer? What kind of incentive/gift would they enjoy?</li>
<li>What will this referral program do for me?</li>
<li>Will this program only help you get new customers or will it benefit existing customers too.</li>
</ul>
<h2 id="types-of-referral-programs">Types of Referral Programs</h2>
<p>Once you have your priorities straight about what your referral program will do for you, choose from the below programs:</p>
<h2 id="implied-referrals">Implied Referrals</h2>
<p>Implied referral is a non-tangible referral program, where you aren’t directly giving the customers an incentive but are requesting them to endorse your business.</p>
<p>For example, you request a client to keep a brochure or catalog in their office or home so that other people visiting your client can look at it and try it out.</p>
<p>This works for a nice service-related business like an interior decorator or a jewelry designer etc.</p>
<h2 id="tangible-referrals">Tangible Referrals</h2>
<p>Tangible referral is a referral scheme where you offer a tangible incentive to your customer, which is not in the form of cash. For example: a buy one, get one offer; Bring a friend to an event or send a gift to your customer and ask them to share it with their friends.</p>
<p>Ideally, the product that you are promoting has your brand on it. This helps you improve brand awareness.</p>
<h2 id="community-referrals">Community Referrals</h2>
<p>Community referral programs build emotion for your brand. In such a program, you partner with a non-profit organization and donate a certain part of the proceeds or donate every time a customer purchases something from your business.</p>
<h2 id="direct-referrals">Direct Referrals</h2>
<p>A direct referral rewards program is where an existing customer helps sign up another new customer and both get a reward. This is by far, the most popular form of referral program.</p>
<p>Did we mentioned that you can make your business online with a free website with <a href="https://www.codecarrot.net/">CodeCarrot</a>.</p>
<p>GoOnline with your own website? <a href="https://www.codecarrot.net">Get started today</a>!</p>
<h2 id="ps-can-we-send-you-an-email">P.S. Can we send you an email?</h2>
<p>Once a week or so we send an email with our best content. We never bug you; we just send you our latest piece of content. <a href="#subscribe">Subscribe Here</a>.</p>yashumittalHave you been thinking of starting a refer and earn program for your business but aren’t sure about where to get started? We have you covered! Here is a beginners’ guide to a refer and earn scheme that will work for your business.
https://i.imgur.com/VCMEtdD.png
5 Easy Ways to Raise Money for Your Small Business2017-07-11T06:30:00+00:002017-07-11T06:30:00+00:00https://blog.codecarrot.net/5-easy-ways-raise-money-small-business<p>Do you have a great business idea but don’t have the money to start off? Raising funds for your business is not as hard as you think. Here are five easy ways to raise money for your small business:</p>
<p><img src="https://i.imgur.com/WzbmKxJ.gif" alt="Paisa Paisa" /></p>
<h2 id="do-it-on-your-own">Do it On Your Own</h2>
<p><strong>Because nothing is easier than emptying your own pockets first!</strong></p>
<p>Before going around and asking people to invest in your business, look in your own account. Tap into your savings. Although it’s risky, it’s your best bet because it shows you are serious about your business and you won’t just run away with someone else’s money. This subconsciously lends a trust factor to your business.</p>
<p>Go on to <strong>bootstrap –</strong> fancy word for recycling your money. Every little rupee you make out of your initial investment goes right back in the business until you are comfortably profitable.</p>
<p><strong>Here are a few tips to bootstrap easily:</strong></p>
<ul>
<li>Share office space/work from home.</li>
<li>Negotiate with suppliers and service providers to give you discounts.</li>
<li>Use your own resources optimally.</li>
<li>Hire local – interns and college students.</li>
</ul>
<p>Remember to save big when you are doing it all on your own.</p>
<h2 id="your-immediate-circle">Your Immediate Circle</h2>
<p>You can request your immediate social circle – you friends, family and colleagues to invest in your business idea. This is an easy way because people close to you are more likely to believe in your vision. However, there is also a high risk of ruining personal relationships.</p>
<p>To avoid confusions, borrow limited amounts of money and ask your friends/colleagues to get legal advice to keep costs to a minimum should things go wrong.</p>
<p>You can also consider crowdfunding your idea. There are <a href="https://techstory.in/crowdfunding-websites-india/">several online websites</a> where you can pitch your idea. Investors decide to fund you in exchange for some sort of ownership in the business and expect a chunk of profit when you start making money.</p>
<h2 id="business-loans">Business Loans</h2>
<p>Borrowing loans from banks have become easier today. In the latest budget, Finance Minister Arun Jaitley increased the lending limit to small businesses to 2.4 trillion! This is the best time to avail loans for your business.</p>
<p>You can approach the government to fund your idea. The government of India has introduced special schemes to finance small businesses.</p>
<p>Some non-profit organizations or NGOs also <a href="https://indiamicrofinance.com/list-government-schemes-ngos">support small businesses financially</a>.</p>
<h2 id="angel-investors--venture-capitalists">Angel Investors & Venture Capitalists</h2>
<p>Angel investors and VCs are very similar. Both are interested in investing in your business, both want a share of your business and profits in return. The only difference is, VCs also want a seat in your office – they want a seat in your board or have some managing rights in your company.</p>
<p><img src="https://i.imgur.com/vZ30oxD.gif" alt="Throwing Money" /></p>
<p>Angel investors need to be registered with the Securities Exchange Commission of India and need to have a net worth of at least Rs.20 Lakhs. You can look for Angel Investors at forums like <a href="https://angel.co/?utm_source=codecarrot_blog&utm_medium=website">Angellist</a> and <a href="https://www.microventures.com/?utm_source=codecarrot_blog&utm_medium=website">MicroVentures</a>. VCs are usually large companies that are ready to fund you. <a href="https://inc42.com/resources/top-47-active-venture-capital-firms-india-startups/?utm_source=codecarrot_blog&utm_medium=website">Here</a> is a list of famous VCs in India.</p>
<p><strong>Pro Tip:</strong> Checkout this massive <a href="https://www.howtostartanllc.org/the-guide-to-finding-investors/?utm_source=codecarrot_blog&utm_medium=website">guide to finding investors</a>.</p>
<h2 id="incubators-accelerators-and-contests">Incubators, Accelerators and Contests</h2>
<p>Startup or small business incubators and accelerators are usually angels or VCs that seek to help a small business grow. Startups are admitted in small batches, 1-3 businesses in a year and are given funding + mentoring to help the business grow.</p>
<p>Incubators and accelerators are involved in every stage of the small business’ growth. However, the focus is on the first few years of growth.</p>
<p>While Accelerators don’t offer office space and other physical amenities to a startup, accelerators do.</p>
<p><a href="https://thehackerstreet.com/top-50-incubators-accelerators-india/">Here</a> is a list of popular Incubators and Accelerators in India.</p>
<p><strong>Contests</strong> are another way of securing funding for your business. This includes winning a reality show or a startup event, also probably organized by an angel or VC. A prize money is declared on winning a competition, which can be used as seed funding for your business.</p>
<p><img src="https://i.imgur.com/SqnVExl.gif" alt="Money Falling" /></p>
<p>Think your business is not worth taking the risk for? If these stupid businesses can make millions, so can yours!</p>
<p><strong>Bonus Point:</strong> If you have a product or service you want to sell and have a low investment plan, don’t worry!</p>
<p>Get your website development from CodeCarrot - Within your budget! <a href="https://www.codecarrot.net">Contact us</a>.</p>
<h2 id="ps-can-we-send-you-an-email">P.S. Can we send you an email?</h2>
<p>Once a week or so we send an email with our best content. We never bug you; we just send you our latest piece of content. <a href="#subscribe">Subscribe Here</a>.</p>yashumittalDo you have a great business idea but don’t have the money to start off? Raising funds for your business is not as hard as you think. Here are five easy ways to raise money for your small business:
https://i.imgur.com/2jKO2XE.jpg
How Can Developers Impact Your SEO Ranking?2017-07-10T06:30:00+00:002017-07-10T06:30:00+00:00https://blog.codecarrot.net/how-can-developers-impact-your-seo-ranking<p>When you think about SEO, probably the first thing of is your site’s position on Google Search Results. Indeed, you may find your website at the lower postition than expected. However, it’s not the only thing you should focus on.</p>
<p>Nowadays more important than ever and it is necessary for every webmaster to understand the true meaning of SEO.</p>
<p>A big potential for <a href="/12-seo-tips-improve-website-performance-drive-traffic/">improving SEO</a> is hidden in your code. Taking care of its quality can bring measurable results for website accessibility and result in driving more traffic to your app.</p>
<h2 id="importance-of-seo">Importance of SEO</h2>
<p>Imagine you’ve build an application spending a huge amount of time and money, but still not many users notice it. This may be the result of a low position on browser searches on Google. In fact, there are more than <strong>3.5 billion searches per day and 1.2 trillion searches per year</strong>.</p>
<p>It creates an enormous business potential for every busienss, but you need to know how to leverage the power of Search results. Increasing your position in browser searches with SEO and SEM can be a good solution for the above described problem.</p>
<h2 id="what-is-seo">What is SEO</h2>
<blockquote>
the process of affecting the visibility of a website or a web page in a search engine’s unpaid results.
</blockquote>
<p>Alright, let’s translate that to English.</p>
<p>SEO <em>(a.k.a Search engine optimization)</em> is a marketing technique focused on growing visibility in organic (non-paid) search engine results. SEO can help you increase organic traffic on your website and improve revenue by reaching out to more people.</p>
<p>Many businesses struggle with specifying who should be accountable for SEO. I’ve often encountered the approach where all those responsibilities are put on the content team, underestimating the developers’ role in achieving favorable results. It can be a deleterious strategy.</p>
<p>As Mozilla defined, SEO consists of not only creative elements but also a lot of technical aspects that improve rankings, drive traffic, and increase awareness in search engines.</p>
<p>Your developers have a huge influence over SEO. Moreover, your dev team’s wrong doings might cause an absolute failure of your SEO activities, so keep them focused on SEO.</p>
<h2 id="what-affects-your-seo">What affects your SEO</h2>
<p>First things first. SEO cannot help you if you don’t have good content. The content you put on your website needs to be relevant from your visitor’s point of view. When your web app connects reads and authors, the content should be focused around reading, writing etc.</p>
<p>It’s also recommended to make your content keyword-rich, but don’t exaggerate. Google crawlers matter, but at the end of the day you write for human-beings not machines.</p>
<p>Along with the content, you should also keep your eye on the technical stuff. <a href="https://support.google.com/webmasters/answer/35769?hl=en">Things like the title attribute, alt attribute for images, subpages naming, domain and many more are important</a>.</p>
<p>Browsers will search for your web app and then qualify it based on the mentioned factors. Google counts <a href="/google-ranking-factors">more than 200 ranking factors</a> before showing the search results.</p>
<h2 id="how-developers-can-impact-seo">How developers can impact SEO?</h2>
<p>As mentioned before, developers have a significant role in impacting the SEO. Firstly, they can substantially improve your position on the Search Engine Result Page (SERP), but also their mistakes in crucial areas may affect all efforts of the content team.</p>
<p>In order to avoid such scenario, you can take advantage of the tools such as <a href="https://developers.google.com/speed/pagespeed/insights/">Google’s PageSpeed Insights</a> that enable you to both measure your website condition from the search engine’s perspective and help optimise different variables to improve app performance.</p>
<p>Here’s a bunch of ranking factors, check the <a href="/google-ranking-factors">full list here</a>.</p>
<ul>
<li>Improving the speed of an application</li>
<li>High quality of your code can prevent the vast majority of bugs and app crashes</li>
<li>Use proper tags like title attribute, alt attribute for images, subpages naming, alt attributes on images and CSS classes instead of inline styles</li>
<li>Implement an SSL certificate</li>
<li>Using <a href="https://schema.org/">Schema.org</a> for structured results on Google</li>
</ul>
<h2 id="wrap-up">Wrap-up</h2>
<p>Developers are important in fulfilling your SEO strategy and they should be involved in planning, execution and analysis of your web app accessibility through search engines.</p>
<p>Keep in mind that building a position in search engines is a complex process and it can take time before it brings results. But don’t get discouraged. When you combine a great content team with support from developers and incorporate SEO in regular activities, there is a sweet fruit at the destination of every strategy.</p>
<h2 id="ps-can-we-send-you-an-email">P.S. Can we send you an email?</h2>
<p>Once a week or so we send an email with our best content. We never bug you; we just send you our latest piece of content. <a href="#subscribe">Subscribe Here</a>.</p>yashumittalWhen you think about SEO, probably the first thing of is your site’s position on Google Search Results. Indeed, you may find your website at the lower postition than expected. However, it’s not the only thing you should focus on.
https://i.imgur.com/vJlfRHa.jpg
Firebase for Android Devs - How You Can Benefit from It2017-07-09T04:57:51+00:002017-07-09T04:57:51+00:00https://blog.codecarrot.net/firebase-for-android-devs-how-you-can-benefit-from-it<p>We want our apps to contain a richer feature set, more stable, and used by more users. This can cut down the cost of your most important resources: time and money. It would be fortune if <em>someone have already build the solution</em> ready to be used.</p>
<p>Hang on, I got something for you.</p>
<p>Firebase provides with dozens of different services that cover a lot of areas, including app testing, backend options, different app variants and more. It is a mobile and web application development platform.</p>
<p><img src="https://i.imgur.com/gnGSogI.png" alt="Firebase platform feature image" /></p>
<h2 id="firebase-test-lab">Firebase Test Lab</h2>
<p>Run automatic and customized tests for your app on virtual and physical devices hosted by Google. Use Firebase Test Lab throughout your development lifecycle to discover bugs and inconsistencies so that you can offer up a great experience on a wide variety of devices.</p>
<h2 id="firebase-crash-reporting">Firebase Crash Reporting</h2>
<p>Reduce your troubleshooting time by turning an avalanche of crashes into a manageable list of issues. Get clear, actionable insight into which issues to tackle first by seeing the user impact right in the Crashlytics dashboard. Realtime alerts will help you stay on top of stability even on the go. Crashlytics is the primary crash reporter for Firebase.</p>
<h2 id="google-analytics">Google Analytics</h2>
<p>Analyze user attributions and behavior in a single dashboard to make informed decisions on your product roadmap. Gain realtime insights from reports, or export your raw event data to Google BigQuery for custom analysis.</p>
<h2 id="remote-config">Remote Config</h2>
<p>Customize how your app renders for each user. Change the look and feel, roll out features gradually, run A/B tests, deliver customized content to certain users, or make other updates without deploying a new version—all from the Firebase console. Monitor the impact of your changes and make adjustments in a matter of minutes.</p>
<h2 id="app-indexing">App Indexing</h2>
<p>Re-engage users with their installed apps with this Google Search integration. If users have your app and they search for related content, they could launch it directly from the results. If users don’t have your app yet, an installation card shows up when they search for similar apps.</p>
<h2 id="push-notifications">Push Notifications</h2>
<p>Send messages and notifications to users across platforms—Android, iOS, and the web—for free. Messages can be sent to single devices, groups of devices, or specific topics or user segments. Firebase Cloud Messaging (FCM) scales to even the largest apps, delivering hundreds of billions of messages per day.</p>
<h2 id="ab-testing">A/B Testing</h2>
<p>Improve your app by running product and marketing experiments, without worrying about setting up the infrastructure to run A/B tests. Customize experiments to suit your goals. Test a variety of updates to your app, like message copy or new features. Then, only roll-out changes proven to move the needle on your key metrics.</p>
<h2 id="dynamic-links">Dynamic Links</h2>
<p>Use Dynamic Links to deliver a customized user experience for iOS, Android, and the web. You can use them to power mobile web to drive native app conversions, user to user sharing, social and marketing campaigns, and more. Dynamic Links provides you with the attributions you need to better understand your mobile growth.</p>
<h2 id="authentication">Authentication</h2>
<p>Manage your users in a simple and secure way. Firebase Auth offers multiple methods to authenticate, including email and password, third-party providers like Google or Facebook, and using your existing account system directly. Build your own interface, or take advantage of our open source, fully customizable UI.</p>
<p>As you can see, Firebase is a great solution for developers, but that’s not everything Firebase has to offer – for more info about their other services, such as AdWords, AdMob and other services targeted at backend developers, visit <a href="https://firebase.google.com/">Firebase’s website</a>.</p>yashumittalWe want our apps to contain a richer feature set, more stable, and used by more users. This can cut down the cost of your most important resources: time and money. It would be fortune if someone have already build the solution ready to be used.
https://i.imgur.com/oZRnWLu.png
How to Market Your Small Business in India2017-07-05T06:30:00+00:002017-07-05T06:30:00+00:00https://blog.codecarrot.net/how-to-market-your-small-business-in-india<p>Any successful business owner will tell you; marketing is the key to a growing business. And, as Constantin Stanislavsky said, “there are no small parts, only small actors”. So whether you’re selling books out on the street or coaching material on the internet, here are some ideas to market your small business:</p>
<h2 id="1-build-a-website-for-your-business">1. Build a Website for Your Business</h2>
<p>With the rapid use of the internet today, it is very important to have a website for your business. This way, you will be able to easily reach a large audience without much effort.</p>
<p>Websites provide a platform where you can conveniently display the goods and services offered by your business. You should ensure that the website has a friendly user interface and that the prices of all your products are clearly shown. You can ask <a href="https://www.codecarrot.net/">CodeCarrot</a> for integrating payment gateway with your website, so that you can start collecting payments for your products and services from your website.</p>
<p>Apart from a website, think about a mobile app for your business, if it is financially feasible.</p>
<h2 id="2-keep-your-customers-happy">2. Keep Your Customers Happy</h2>
<p>Happy customers are the best marketers for your company. Customer satisfaction is an important part of any business. Knowing what the client likes and dislikes enables you to know which areas of your business are okay, which ones should be eliminated and which ones should be improved.</p>
<p>The analytics of your business include knowing when you receive most customers, which products are bought most, how much customers pay, how often a particular customer returns and many other insights. These details may seem small but they help in marketing your business.</p>
<h2 id="3-leverage-affiliate-partnerships">3. Leverage Affiliate Partnerships</h2>
<p>Don’t take on all the burden of selling yourself, set up mutually profitable systems to do that for you. Starting an affiliate network to help you with the sales of your products is the right way to go. The affiliate program works by having others market your products and in turn, you pay them a certain percentage as commission for each product sold.</p>
<p>Affiliates enable a business to penetrate into areas that it may not have reached otherwise.</p>
<h2 id="4-market-your-products-and-services-with-discounts">4. Market Your Products and Services with Discounts</h2>
<p>Try not to undervalue your product by giving it away for free, but the next best way to attract eyeballs is discounts.
Use discounts as a marketing strategy to draw more clients to your business, it’s a powerful pull mechanism. You can generate public or private discount coupons or even create links that redirect customers to special promotions sites.</p>
<p>When a customer successfully buys your products at a discounted price, they will in all probability refer others to you and your business will continue to thrive. Either way, once you have a customer it’s easier to pitch to him/her than to a stranger.</p>
<h2 id="5-build-a-database-and-up-sell">5. Build a Database and Up-sell</h2>
<p>Keeping a record of your customers is one of the areas where most businesses go wrong. The probability of a person who has purchased a particular good or service returning to order more is very high.</p>
<p>The details that one should keep include the full names, email, postal address and phone number. Include other details that you might deem important, specific to your business. All this can be captured in a checkout form or an opt-in form on your website.</p>
<p>This way, any time you have new products or promotions on offer, you can send the information to all your current clientele.</p>
<p>If you want to get a bit more advanced, you can run drip marketing campaigns. Drip marketing helps you stay in touch with your leads, prospects and customers in an automated way. Drip email marketing is the most common form of drip marketing.</p>
<h2 id="6-outsource">6. Outsource</h2>
<p>As a small business owner, you might not have the needed expertise in all areas that pertain to running a business. You might also not have enough resources to hire highly skilled professionals to work with you full time. This is where outsourcing comes in.</p>
<p>Get other people to market your business for you. From <a href="https://www.codecarrot.net/">designing your website</a>, logo or even writing the content for your websites, there is a large base of freelancers ready to do the job for you at a fair price. This way, your business will be properly presented in order to increase the number of sales. Money invested in money gained.</p>
<h2 id="conclusion">Conclusion</h2>
<p>Always remember that marketing, when done the right way, will boost your income and make your small business grow. The ideas mentioned above will give you a head start.</p>
<p>Once you implement them, you will be able to steadily increase your earnings and sustain business. And of course, Instamojo.com should be your go-to if you want to collect payments online!</p>
<h2 id="ps-can-we-send-you-an-email">P.S. Can we send you an email?</h2>
<p>Once a week or so we send an email with our best content. We never bug you; we just send you our latest piece of content. <a href="#subscribe">Subscribe Here</a>.</p>yashumittalAny successful business owner will tell you; marketing is the key to a growing business. And, as Constantin Stanislavsky said, “there are no small parts, only small actors”. So whether you’re selling books out on the street or coaching material on the internet, here are some ideas to market your small business:
https://i.imgur.com/lGffbfu.png
Turn Your Small Business Into a Brand2017-07-03T06:30:00+00:002017-07-03T06:30:00+00:00https://blog.codecarrot.net/turn-your-small-business-in-to-a-brand<p>If you have already set up your small business online, now it is time to turn your business into a brand. Branding your business in a cost-effective fashion could be a tricky job if you do not know where and how to start. We have put together a few quick and easy tips that can help you brand your small business and fetch the maximum gains out of it.</p>
<h2 id="define-your-brand">Define Your Brand</h2>
<p>Branding your business lead you towards the path of discovering your business better. It requires reviewing and assessment to de-mark its actual position in the market. <strong>Start with answering these to define your business:</strong></p>
<ol>
<li>What is the goal of your business?</li>
<li>How can your products and services benefit others?</li>
<li>What is the image of your business among prospects and customers?</li>
<li>Name the qualities that you can relate to your business.</li>
</ol>
<p><img src="https://i.imgur.com/LAJjqef.png" alt="Brand" /></p>
<h2 id="follow-this-checklist">Follow this Checklist</h2>
<p>Do Your Research: Identify the needs and practices of your existing customers and prospects. Try to figure out how and what they think and work on defining your business accordingly. Once you have defined your business you need to spread the word. Here’s how you can do that</p>
<p><strong>Make a logo:</strong> and place your logo prominently everywhere you can to increase brand visibility.</p>
<p><strong>Create a Tagline:</strong> Write a short simple and to the point tagline that describes your business and its motto effectively. Ensure that your tagline communicates your idea behind your band.</p>
<p><strong>Pitch:</strong> Make and practice a pitch which explains how your products/or services are better than you competitors.</p>
<p><strong>Connect with the Audience:</strong> You can speak, write, teach, or present your niche expertise at various platforms along with your logo, goal and tagline for easy recall.</p>
<p><strong>Use Social Media:</strong> Make some noise about your brand. Promote your brand across all the actively used social media channels available. Networking, word-of-mouth and referrals are traditional yet effective methods to spread the word about your products and services.</p>
<p><strong>Blogs and Content Marketing:</strong> You could even blog or use content marketing to help customers and relate with your brand by providing them with relevant and informative content that is useful for them. You could even write and issue press releases to the media, post press releases to your website or directly onto the internet and pitch feature story ideas to the media.</p>
<p><strong>Stay in Touch:</strong> Keep the communication on. Stay in touch with your customers and prospects via email, newsletters It is good to be conversational. Keep the communication aligned with your brand.</p>
<p><strong>Be in-sync:</strong> Stick to a single theme. Keep the format, color and designs in-sync while designing your templates and marketing material. It need not be fancy or complex, just ensure it is all consistent.</p>
<p><strong>Participate in Business Events:</strong> To make your brand visible and to aid easy recall you can even participate in business events, conferences, seminars and product launches held in your city and if convenient even elsewhere.</p>
<p><strong>Keep Your Word:</strong> Deliver what you promised you would. Your customers would refrain from coming back to you is you do not live up to their expectations. This will help your brand have a positive recall.</p>
<p>Don’t have an online business? Getting an website with <a href="https://www.codecarrot.net">CodeCarrot</a> is super easy!</p>
<h2 id="ps-can-we-send-you-an-email">P.S. Can we send you an email?</h2>
<p>Once a week or so we send an email with our best content. We never bug you; we just send you our latest piece of content. <a href="#subscribe">Subscribe Here</a>.</p>yashumittalIf you have already set up your small business online, now it is time to turn your business into a brand. Branding your business in a cost-effective fashion could be a tricky job if you do not know where and how to start. We have put together a few quick and easy tips that can help you brand your small business and fetch the maximum gains out of it.
https://i.imgur.com/pcBLSFy.png
Why We Use PostCSS at CodeCarrot2017-07-02T06:30:00+00:002017-07-02T06:30:00+00:00https://blog.codecarrot.net/why-we-use-postcss-at-codecarrot<h2 id="why-postcss">Why PostCSS</h2>
<blockquote>
PostCSS is a tool for transforming styles with JS plugins. These plugins can lint your CSS, support variables and mixins, transpile future CSS syntax, inline images, and more.
</blockquote>
<h2 id="how-does-it-work">How does it work?</h2>
<p>PostCSS alone doesn’t actually do anything on its own – it parses CSS into an Abstract Syntax Tree (AST) represented in JSON and then stringifies it back into CSS. What enables its power are plugins, which get the parsed version and can transform it freely with JavaScript. Here’s a visual representation:</p>
<div class="highlighter-rouge"><div class="highlight"><pre class="highlight"><code>original.css -> Parser -> Plugins -> Stringifier -> output.css
</code></pre></div></div>
<h2 id="comparison-with-sass">Comparison with SASS</h2>
<p>PostCSS provides all the features that SASS has. There is a package name <a href="https://github.com/jonathantneal/precss">PreCSS</a> which does exactly the same.</p>
<p>Best thing about PostCSS is it can run after a SASS compilation, applying its transforms to the resulting CSS. This makes it very easy to integrate it even into SASS-heavy projects.</p>
<p>New projects can use just the PostCSS with plugin like PreCSS. It allows us to replace SASS features found in new web standards, such as variables, and leave those available exclusively in SASS, such as nesting.</p>
<h2 id="does-it-require-a-lot-of-setup">Does it require a lot of setup?</h2>
<p>It depends. If your project already has Webpack/Gulp/Grunt or some other tool, you can start working with PostCSS after installation.</p>
<p>If it doesn’t work, example config <em>(using webpack)</em>:</p>
<div class="highlighter-rouge"><div class="highlight"><pre class="highlight"><code>// install postcss with autoprefixer
npm install --save-dev postcss autoprefixer
// add webpack loader
{
key: 'style',
test: /\.s?css$/,
loader: ExtractTextPlugin.extract('css!sass!postcss')
}
// define plugins (in webpack's module.exports)
postcss: [
require(‘autoprefixer’)
]
</code></pre></div></div>
<h2 id="keeping-our-stack-tight">Keeping our stack tight</h2>
<p>Because it’s very easy to add new plugins, it’s also difficult to enforce a single stack through many projects. If stacks differ, new developers need to learn new syntaxes and features This is both the greatest strength and the greatest drawback of PostCSS if looking from a company’s perspective.</p>
<h2 id="postcss-pros">PostCSS pros</h2>
<ul>
<li>Allows for the usage of the most current web standards</li>
<li>Enables modular, more maintainable CSS</li>
<li>Allows picking a setup catered to one’s needs</li>
<li>Easy to write own plugins</li>
<li>Easy to add to existing Webpack/Gulp/Grunt/whatever setup</li>
<li>Can work alongside SASS</li>
<li>Faster compilation than SASS</li>
</ul>
<h2 id="postcss-cons">PostCSS cons</h2>
<ul>
<li>One more tool</li>
<li>Doesn’t support Rails Asset Pipeline</li>
<li>Requires a task runner/module bundler to work</li>
<li>Harder to maintain across different projects</li>
</ul>
<h2 id="conclusion">Conclusion</h2>
<p>PostCSS provides a set of extremely useful features that would make every CSS codebase more maintainable, and it can work alongside SASS or even replace it.</p>
<h2 id="ps-can-we-send-you-an-email">P.S. Can we send you an email?</h2>
<p>Once a week or so we send an email with our best content. We never bug you; we just send you our latest piece of content. <a href="#subscribe">Subscribe Here</a>.</p>yashumittalWhy PostCSS
https://i.imgur.com/WNNfSL5.jpg
7 Best Google Chrome Extensions for Small Businesses2017-07-01T06:30:00+00:002017-07-01T06:30:00+00:00https://blog.codecarrot.net/7-best-google-chrome-extensions-for-small-businesses<p>It’d be fair to say Chrome is one of the most popular browser and installing extensions on top of it can make your life so much easier for anyone on the internet.</p>
<p>Browser extensions and plugins or tools that help with managing tasks online. Google Chrome has an extension for everything you want to do online; some great chrome extensions for small businesses too.</p>
<h2 id="1-convergehub-lead-generator">1. <a href="https://chrome.google.com/webstore/detail/convergehub-lead-generato/mjcffemmfdpcjekgonelgmphacdhhbod">Convergehub Lead Generator</a></h2>
<p>Looking for new leads on social media? Why do yourself when you can get an extension to do that for you! Convergehub, a CRM platform came up with a chrome extension that allows you to collect all your leads’ contact details and pre-fills a form that you can later access in your Convergehub account. This is great if you are looking to build a database from your social media contacts.</p>
<p><strong>BONUS:</strong> You may also like the <a href="https://chrome.google.com/webstore/detail/boomerang-for-gmail/mdanidgdpmkimeiiojknlnekblgmpdll">Boomerang</a> The ultimate email productivity tool. Send later, track responses, use AI to write better emails, and free yourself from email interruptions.</p>
<h2 id="2-trello">2. <a href="https://chrome.google.com/webstore/detail/trello/dmdidbedhnbabookbkpkgomahnocimke">Trello</a></h2>
<p>An entrepreneur like you must have so many things to keep in mind. Keeping track of all the stuff can easilt get bit messier. Step away from writing down on papers and using Trello cards and access your Trello boards from the Omnibox.</p>
<h2 id="3-google-hangouts">3. <a href="https://chrome.google.com/webstore/detail/tellq-click-to-call-exten/nejgjdchlppiojlbelendnlgfnmbkgfa?hl=en">Google Hangouts</a></h2>
<p>Every lead is important for your business, why not do a video chat with your lead and keep in touch. Message your clients, start free video or voice calls, and hop on a conversation with one person or a group.</p>
<h2 id="4-asana--manage-projects-">4. <a href="https://chrome.google.com/webstore/detail/asana-extension-for-chrom/khnpeclbnipcdacdkhejifenadikeghk">Asana – Manage Projects </a></h2>
<p>Asana is a great tool that can help you organize your tasks and manage your projects efficiently. You can also assign people to tasks and share the tasks with them to keep a check on completion. With the Chrome Extension, you can add tasks from any website, save articles you want to read and share them with your assignees.</p>
<h2 id="5-docusign--digital-signature">5. <a href="https://chrome.google.com/webstore/detail/docusign-secure-electroni/goblijolcnempeilmnkmfbhohlpngemd?hl=en">Docusign – Digital Signature</a></h2>
<p>Struggling with digital signatures? Don’t worry! Let this Chrome Extension do all the work for you. With Docusign, you can put your signature on any/all PDF, Word or email docs just by clicking on the extension. Sign up and store your signature in Google Drive with Docusign and access it whenever you need it. You can also make edits whenever you want!</p>
<h2 id="6-buffer--social-media-management">6. <a href="https://chrome.google.com/webstore/detail/buffer/noojglkidnpfjbincgijbaiedldjfbhh?hl=en">Buffer – Social Media Management</a></h2>
<p>With the Buffer tool, you can post on multiple social media simultaneously. You can also schedule posts and push them out at any time you want. With the chrome extension, you can access Buffer whenever and add posts to queue that can be spaced out over time throughout the day.</p>
<h2 id="7-1password-x--password-manager">7. <a href="https://chrome.google.com/webstore/detail/1password-x-%E2%80%93-password-ma/aeblfdkhhhdcdjpifhhbdiojplfjncoa?hl=en">1Password X – Password Manager</a></h2>
<p>Having troubles remembering passwords? Cleaned up your browser and now all the stored passwords are gone1? Password to the rescue! The best way to experience 1Password in your browser. Easily sign in to sites, generate passwords, and store secure information.</p>
<p><strong>BONUS:</strong> You may also be interested in <a href="https://chrome.google.com/webstore/detail/toby-for-chrome/hddnkoipeenegfoeaoibdmnaalmgkpip?hl=en">Toby for Chrome</a>, an awesome extension that helps you organize the multiple tabs on your window! Better than bookmarks. Organize your browser tabs and access them quickly anywhere.</p>
<p>Want to increase the reach and sales of your small business? Why don’t you make your small business online with a website. We provide website development and designing service, <a href="https://www.codecarrot.net/">click here</a> to get started.</p>
<h2 id="ps-can-we-send-you-an-email">P.S. Can we send you an email?</h2>
<p>Once a week or so we send an email with our best content. We never bug you; we just send you our latest piece of content. <a href="#subscribe">Subscribe Here</a>.</p>yashumittalIt’d be fair to say Chrome is one of the most popular browser and installing extensions on top of it can make your life so much easier for anyone on the internet.
https://i.imgur.com/RxBJrWO.png
Introducing CodeCarrot Podcast - A New Podcast With Yashu Mittal2017-06-27T23:30:00+00:002017-06-27T23:30:00+00:00https://blog.codecarrot.net/introducing-codecarrot-podcast-with-yashu-mittal<p>It’s summer time, so why not start a new podcast?</p>
<p>Each week, our Founder & CEO - Yashu Mittal will be sharing one thing he’s learned throughout his career as a entrepreneur — from tips to make your team more productive and happier at work, lessons to help accelerate your learning, advice to help you build a business that your customers and employees will love, and more.</p>
<p>So we’d go grab a chia (aka Tea), talk about a topic on the walk over, come back to our office, and sit down for 15-20 minutes to record a new episode.</p>
<iframe width="560" height="315" src="https://www.youtube.com/embed/_r_rjDDIhNA?rel=0" frameborder="0" allow="autoplay; encrypted-media" allowfullscreen=""></iframe>
<h2 id="the-places-you-can-listen-to-codecarrot-garage-podcast">The Places You Can Listen To CodeCarrot Garage Podcast</h2>
<p>You can catch <a href="https://blog.codecarrot.net/category/podcast/">CodeCarrot Blog Podcast</a> in all of the places that you listen to your favorite podcasts — just search for CodeCarrot Podcast — but here are the links so you can subscribe right here, right now so you never miss a new episode:</p>
<ul>
<li>Listen to <a href="https://www.youtube.com/playlist?list=PLVKRaOCbg3OGBf4Q0nBAP3QsnhV46QJEC">CodeCarrot Podcast on Youtube</a></li>
</ul>
<p>And don’t hesitate to send or tweet us feedback about the show, including what you want to hear more of.</p>
<p><a href="https://www.codecarrot.net/">Click here to learn about how CodeCarrot helps business to make an online presence for their business.</a></p>
<p>Be the first to know when a new episode of CodeCarrot Garage Podcast comes out.</p>
<h2 id="ps-can-we-send-you-an-email">P.S. Can we send you an email?</h2>
<p>Once a week or so we send an email with our best content. We never bug you; we just send you our latest piece of content. <a href="#subscribe">Subscribe Here</a>.</p>yashumittalIt’s summer time, so why not start a new podcast?
https://cdn.codecarrot.net/images/codecarrot-podcast-banner.png
How to write a great blog post2017-06-27T06:30:00+00:002017-06-27T06:30:00+00:00https://blog.codecarrot.net/how-to-write-a-great-blog-post<p>Blogs have become the go-to for sharing information, whether on a product, service or general topic of interest.</p>
<p>As of late 2016, data showed that 77 percent of online users read blogs, and companies that maintain a blog have 55 percent more website visitors. If you’re a professional looking to build authority, a business trying to boost content marketing, or an expert hoping to share insights, knowing how to write a great blog post can be extremely valuable.</p>
<p>Blogging doesn’t come naturally to everyone, though. The main difference between blogging and other types of writing, academic or otherwise, is the format and style.</p>
<blockquote>
Blog posts need to be bite-size; not in word count, but in style. That means the structure should lend itself to scannable, easy reading.
</blockquote>
<p>Running a blog also requires more than just writing articles. Nailing down a <strong>content calendar</strong> and <strong>distribution plan</strong> is critical to making your work worth the time you put into it.</p>
<p>The following guide is a resource to help you write your first blog post and create a strategy that will make it easy to rinse and repeat your efforts week after week.</p>
<h2 id="the-anatomy-of-a-great-blog-post">The anatomy of a great blog post</h2>
<p>The format of a blog post is different from that of an academic paper or even a news piece. Articles</p>
<p>in a blog should always have the following:</p>
<p><strong>Scannable formatting:</strong> Use bullets and sub-headers to break up the content. Include keywords in your sub-headers when possible, which helps to boost the SEO of your post as well.</p>
<p><strong>Images:</strong> Images can add value to your content and separate paragraphs of text. If you use charts or other graphics found online, be sure to source them properly by including a clickable URL at the bottom of the post or under the image.</p>
<p>Capture your blog readers’ attention with <em>eye-catching images</em> in every blog post.</p>
<p><strong>Paragraph length:</strong> Keep sentences concise and paragraphs short — two to five sentences max.</p>
<p><strong>Word count:</strong> There’s a place for both short and long content on your blog. While the average word count of top-ranking content (in Google) is between 1,140 and 1,285 words, short blog posts are easier for the reader to digest (and for you to produce). Make room for both in your content calendar.</p>
<p><strong>Enticing headline:</strong> Your headline should accurately reflect the topic of your post, while also encouraging potential readers to click and share. Here is a great resource for testing different headline formulas: 52 Headline Hacks.</p>
<h2 id="how-to-write-a-great-blog-post--the-first-time">How to write a great blog post … the first time</h2>
<p>Writing is the hardest part of blogging, especially on days when you’re feeling uninspired. Follow these six steps every time you sit down to write.</p>
<p><strong>Step 1: Pick a topic</strong></p>
<p>Determine your topic based on the audience you’re speaking to. If you build a content calendar before you start writing (see more about that below), you’ll already have a topic lined up. If you’re still brainstorming, dig through similar blogs for inspiration. You can also use <a href="https://adwords.google.com/home/tools/keyword-planner/">Google’s Keyword Tool</a> to find SEO terms with high search volume and low competition. Basing a topic around these keywords will help drive organic traffic because it means you are providing information people are already searching for.</p>
<p><strong>Step 2: Outline your post</strong></p>
<p>Write the skeleton of your article first. For me, this process is a mix of taking notes and doing some research. I start by writing the sub-header ideas that I already have in mind, fill in those sections based on initial research, and then write anything that comes to mind right then so I don’t forget it.</p>
<p><strong>Pro tip:</strong> I always leave the introduction for last, so when writing it, I have a clear idea of what I’m introducing the reader to.</p>
<p><strong>Step 3: Fill in the blanks</strong></p>
<p>As you fill out the article, section by section, ask yourself questions as you go. This helps you find gaps where statistics and expert quotes should be added.</p>
<p>For example, if I wrote, “Most bloggers struggle with determining topics for their posts,” I’d then look for a quote to support that. The following sentence might be, “In fact, 30 percent of professionals bloggers surveyed cited this as their number one challenge in content creation, according to a study by the American Blogging Society.”</p>
<blockquote>
Pulling supportive information from quality sources adds value and legitimacy to your work .
</blockquote>
<p>End your post by writing the intro based on how your article evolved during the production process.</p>
<p><strong>Step 4: Review and revise</strong></p>
<p>It’s time to go back and edit. Read the entire article once for any glaring mistakes. Add more quotes and stats as necessary. Once you’re done making edits, give it another read-through.</p>
<p><strong>Step 5: Get a second set of eyes on it</strong></p>
<p>Once you are done writing and reviewing your own work, send your post to someone else for proofing. Ask them to point out any grammatical errors, in addition to gaps in the content. If you share your article via Google Docs or Microsoft Word, they can leave comments, rather than making direct edits or putting notes into the text.</p>
<p><img src="https://i.imgur.com/VwfLI9a.jpg" alt="Proofreading" /></p>
<p>Credibility is everything. Get a second set of eyes on your copy before you publish a blog post.
Step 6: Look for engaging visuals</p>
<p>Find a great feature image, and any others that would support your text. You can download great free photos at <a href="https://unsplash.com/@mittalyashu">Unsplash</a>, <a href="https://stocksnap.io/">StockSnap.io</a> and <a href="https://pixabay.com/">Pixabay</a>. There are also free photos at <a href="https://www.freepik.com/">Freepik</a>, but you have to include a source link somewhere in your post. I usually put it at the bottom.</p>
<p>Learn more about 43+ Unique Places to Find Remarkable Free Photos.</p>
<h2 id="dont-forget-distribution">Don’t forget distribution</h2>
<p>You’ve spent time writing and publishing, and now it’s time to get eyes on your new blog post. There are a number of ways to do this — via social media, email, distribution sites and even advertising. Here are a few of the easiest ways to promote your blog post after publishing.</p>
<p><strong>Social media:</strong> Share your blog post on the social platforms which you’re active. Use a clever caption that doesn’t repeat the headline, but entices the reader to click through. For example, with a list post, you might write: “Are you as shocked about #5 as we are?” If you maintain a social calendar, plug articles into it before writing. Make sure your social strategy lines up with your content calendar so articles are ready in time for sharing.</p>
<blockquote class="twitter-tweet" data-theme="light" data-link-color="#2B7BB9"><p lang="en" dir="ltr">Beginner's <a href="https://twitter.com/hashtag/guide?src=hash&ref_src=twsrc%5Etfw">#guide</a> to starting an <a href="https://twitter.com/hashtag/email?src=hash&ref_src=twsrc%5Etfw">#email</a> list <a href="https://t.co/pTH7NAz0mL">https://t.co/pTH7NAz0mL</a> <a href="https://twitter.com/hashtag/marketing?src=hash&ref_src=twsrc%5Etfw">#marketing</a> <a href="https://twitter.com/hashtag/emailmarketing?src=hash&ref_src=twsrc%5Etfw">#emailmarketing</a> <a href="https://twitter.com/hashtag/business?src=hash&ref_src=twsrc%5Etfw">#business</a></p>— CodeCarrot (@codecarrotnet) <a href="https://twitter.com/codecarrotnet/status/977162425622507521?ref_src=twsrc%5Etfw">March 23, 2018</a></blockquote>
<script async="" src="https://platform.twitter.com/widgets.js" charset="utf-8"></script>
<p><strong>Email marketing:</strong> If you’re interested in developing a readership, now’s the time to start building a <a href="/beginners-guide-to-starting-an-email-list">subscriber list</a>. Email is a great platform for sharing blog posts in a weekly or monthly newsletter.</p>
<p><strong>Auto-sharing:</strong> There are two ways to get your blog posts shared automatically via WordPress, the most popular (and in my opinion, the best) blogging platform available. The first is connecting WordPress with your social media profiles. When you publish, this automatically shares the post for you. You can also put a “Follow My Blog widget” in your sidebar on post pages. When people sign up, they’re automatically sent your new articles when they go live.</p>
<h2 id="how-to-write-a-great-blog-post-it-takes-planning-ahead">How to write a great blog post: It takes planning ahead</h2>
<p>Planning is the key to being able to write a great blog post on a regular basis. The first step is brainstorming topics to choose from. When you’re ready to write, you can pick a topic and go, rather than having to brainstorm something each time. Use the same tactics suggested in Step 1 to create this list.</p>
<p>Make sure you have a mix of evergreen and timely topics. Evergreen content is content that can live forever and still be relevant and valuable, whereas timely content has an expiration date. For example:</p>
<ul>
<li><strong>Timely:</strong> The Best Reactions to Trump’s Last Speech</li>
<li><strong>Evergreen:</strong> Presidential Elections: How They Divide Friendships</li>
</ul>
<p>Additionally, don’t forget to brainstorm topics that promote your business in a casual and organic manner. For example, avoid posts like, “10 Reasons to Work with Our Marketing Agency,” and instead focus on topics that lend themselves to a natural company mention, such as “10 Ways to Achieve Your Business Marketing Goals.” Then mention your organization as a resource in the text.</p>
<p>Once you have a list of ideas, put all of your topics into a content calendar. Arrange them to correspond with seasons, holidays and other times of the year that are important to your readership or business.</p>
<p><img src="https://i.imgur.com/6HchndR.jpg" alt="Calendar" /></p>
<p>Create an editorial calendar to plan blog posts that make sense for your readers and your business, at the right time.</p>
<p>Finally, set a publishing schedule for yourself (or your team). Be realistic about what you or your team will have time for. If you’re a business looking to aggressively build your blog, try publishing at least twice a week. Neil Patel tested the theory of posting more frequently and examined how that affects blog traffic. His findings were shared on <a href="https://autogrow.co/how-does-content-marketing-quantity-increase-traffic/">AutoGrow.co</a>:</p>
<blockquote>
“KISSmetrics only started to see big traffic increases when I started to publish five pieces of content a week. But with KISSmetrics, we went from publishing two a week straight to five a week [and later to six]. My experience of working with 20 of the top 100 blogs showed that if we published three pieces of content each day (21 pieces a week), we could easily get our traffic to over a million visits a month over time.”
</blockquote>
<p>Obviously, it might not be doable for you to post three articles a day as a small business.</p>
<blockquote>
Consider the max number of posts you can create — without sacrificing quality — and start there.
</blockquote>
<p>Increase this number over time as you’re able to allot more budget, labor and hours into your blog.</p>
<h2 id="looking-forward">Looking forward</h2>
<p>Knowing how to write a great blog post can be a challenge on its own, much less maintaining a blog and producing content consistently. However, with a content calendar in place and a production schedule you can maintain, you can start creating blog posts on a regular basis. Soon, it will just be an item on your to-do list or another part of your successful content marketing plan.</p>
<p>Work through the growing pains, be flexible with expectations, and watch your blog evolve into a valuable piece of online real estate.</p>
<h2 id="ps-can-we-send-you-an-email">P.S. Can we send you an email?</h2>
<p>Once a week or so we send an email with our best content. We never bug you; we just send you our latest piece of content. <a href="#subscribe">Subscribe Here</a>.</p>yashumittalBlogs have become the go-to for sharing information, whether on a product, service or general topic of interest.
https://i.imgur.com/zopBaAR.jpg
How to remove .php, .html, .htm extensions with .htaccess2017-06-26T06:30:00+00:002017-06-26T06:30:00+00:00https://blog.codecarrot.net/how-to-remove-php-html-htm-extensions-with-htaccess<p>When you have newly uploaded your website on servers you don’t want to see those extensions along with your, in order to make the URLs more user and search engine friendly. I stumbled across tutorials on how to remove the .php extension from a PHP page. What about the .html? I wanted to remove those as well! In this article, you’ll will learn how to it easily, by editing the .htaccess file.</p>
<h2 id="what-is-an-htaccess-file">What is an .htaccess file?</h2>
<p>An .htaccess file is a simple ASCII file that you create with a text editor like Notepad or TextMate. It provides a way to make configuration changes on a per-directory basis.</p>
<blockquote>
Note that .htaccess is the file’s extension. It isn’t file.htaccess, it is simply .htaccess
</blockquote>
<p>.htaccess files affect the directory in which they are placed and all sub-directories. For example if there is one .htaccess file located in your root directory of yoursite.com, it would affect yoursite.com/content/, yoursite.com/content/images/, etc.</p>
<p>It is important to remember that this can be prevented — for example if you don’t want certain .htaccess commands to affect a specific directory — by placing a new .htaccess file within the directory you don’t want affected with the changes, and removing the specific command(s) from the new .htaccess file that you do not want affecting this directory.</p>
<h2 id="features">Features</h2>
<p>With an .htaccess file you can:</p>
<p>Redirect the user to different page</p>
<ul>
<li>Password protect a specific directory</li>
<li>Block users by IP</li>
<li>Preventing hot linking of your images</li>
<li>Rewrite URIs</li>
<li>Specify your own Error Documents</li>
</ul>
<p>In this article we’ll be focusing only on rewriting URIs.</p>
<h2 id="removing-extensions">Removing Extensions</h2>
<p>To remove the .php extension from a PHP file for example yoursite.com/wallpaper.php to yoursite.com/wallpaper you have to add the following code inside the .htaccess file:</p>
<div class="highlighter-rouge"><div class="highlight"><pre class="highlight"><code>RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^([^\.]+)$ $1.php [NC,L]
</code></pre></div></div>
<p>If you want to remove the .html extension from a html file for example yoursite.com/wallpaper.html to yoursite.com/wallpaper you simply have to alter the last line from the code above to match the filename:</p>
<p><code class="highlighter-rouge">RewriteRule ^([^\.]+)$ $1.html [NC,L]</code></p>
<p>That’s it! You can now link pages inside the HTML document without needing to add the extension of the page. For example:</p>
<p><code class="highlighter-rouge"><a href="//whatever.com/wallpaper" title="wallpaper">wallpaper</a></code></p>
<h2 id="adding-a-trailing-slash-at-the-end">Adding a trailing slash at the end</h2>
<p>I received many requests asking how to add a trailing slash at the end. Ignore the first snippet and insert the following code. The first four lines deal with the removal of the extension and the following, with the addition of the trailing slash and redirecting. Link to the HTML or PHP file as shown above. Don’t forget to change the code if you want it applied to an HTML file.</p>
<div class="highlighter-rouge"><div class="highlight"><pre class="highlight"><code>RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^([^/]+)/$ $1.php
RewriteRule ^([^/]+)/([^/]+)/$ /$1/$2.php
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} !(\.[a-zA-Z0-9]{1,5}|/)$
RewriteRule (.*)$ /$1/ [R=301,L]
</code></pre></div></div>
<p>Some people asked how you can remove the extension from both HTML and PHP files. I haven’t got a coding solution for that. But, you could just change the extension of your HTML file from .html or .htm to .php and add the code for removing the .php extension.</p>
<h2 id="ps-can-we-send-you-an-email">P.S. Can we send you an email?</h2>
<p>Once a week or so we send an email with our best content. We never bug you; we just send you our latest piece of content. <a href="#subscribe">Subscribe Here</a>.</p>yashumittalWhen you have newly uploaded your website on servers you don’t want to see those extensions along with your, in order to make the URLs more user and search engine friendly. I stumbled across tutorials on how to remove the .php extension from a PHP page. What about the .html? I wanted to remove those as well! In this article, you’ll will learn how to it easily, by editing the .htaccess file.
https://cdn.codecarrot.net/images/remove-extensions-with-htaccess.png
Beginner’s guide to starting an email list2017-06-26T06:30:00+00:002017-06-26T06:30:00+00:00https://blog.codecarrot.net/beginners-guide-to-starting-an-email-list<p>If you’re like most people, you started blogging to share information and make money while at it. But to make money with your blog, you need to get visitors to your site. And how can you drive traffic to your blog to show off all that glorious new content? It’s all about starting an email list.</p>
<p>Yep, you’ve probably heard this from Internet marketers and fancy-shmancy peeps online pushing “sales funnels” and “opt-ins” and all those content marketing and email marketing buzzwords.</p>
<p>Why is starting an email list so important?</p>
<p>Let me guess, if you’re just starting out in the blogosphere you probably don’t have the cash for promotion.</p>
<p>But you need to promote your blog content to get new readers, which will attract potential sponsors and make all kinds of good stuff happen as your blog readership grows.</p>
<p>Email is your best friend.</p>
<p>For just a few cents per message, you can send kick-ass email campaigns that drive people back to your blog.</p>
<p>There are many email marketing websites out there, all you need is to select which fulfils your requirements. Most of them have easy-to-use templates that you can copy and paste your words of wisdom into, along with cool tools that make your emails sexy and reader friendly. And they usually have analytical tools that let you know who is reading your goodies. All of the guesswork is handled for you.</p>
<p>Once you’ve got your handy new email marketing software all set up (or maybe even before), it’s time to start getting people to sign up.</p>
<h2 id="how-do-you-get-people-to-join-your-email-list">How do you get people to join your email list?</h2>
<p>OK, here’s how you do NOT get people on your list: buy them. That’s right — you can buy email lists. But don’t. Just don’t. It’s more than bad manners to solicit people who didn’t ask to receive your emails; it’s unethical. Plus, using anonymous lists could get you flagged as a spammer and barred from using most email marketing services. Ouch.</p>
<blockquote>
To put it mildly, sending random emails to people these days pisses them off. No one likes to be added to a list without their permission. It’s the fastest way to tick off potential readers and to get your address sent over to spamville.
</blockquote>
<p><img src="https://i.imgur.com/OaY30Vs.jpg" alt="No Junk Mail" /></p>
<p>You want to create a list of people who actually agree to be on your list. The best way to get them to agree? Make it easy! Include a big, fat sign-up button on your blog. Most good email marketing programs also enable you to add a sign-up form to your Facebook page.</p>
<div class="callout">
Make it easy to subscribe to your emails by putting a sign-up button on your home page.
</div>
<p>The next best way to get people to sign up? Give ‘em a gift! Everybody likes gifts. In this case, said gift is called an opt-in incentive. For the Internet biz-challenged, that’s usually a freebie or discount you offer to convince people to join your email list. They request said freebie and by requesting it, they understand that they are going to receive emails from you.</p>
<p><strong>Note:</strong> Some freebie gluttons are going to opt-in, get the freebie, and then unsubscribe. That’s OK, because if they don’t want your words of wisdom, they’re not the high-quality email subscribers you want. Let ’em go. At least they gave you some pageviews long enough to get the goods, right? Right!</p>
<h2 id="once-they-join-how-do-you-keep-them">Once they join, how do you keep them?</h2>
<p>Aside from the people who get the freebie and bounce, some of the things you need to keep people on your list include (but are not limited to):</p>
<p><strong>Eye-catching subject lines</strong></p>
<p>Most people’s inboxes are more crowded than fish market. With all that competition for attention, your emails need to have subject lines that jump out and entice the viewer to click and view. In fact, boring subject lines could land your emails in the junk folder. Some email providers filter consistently unopened emails from the same sender to the spam box.</p>
<p><strong>Content that matters to your fans</strong></p>
<p>If your subscribers stop caring about what you’re writing, you’ve lost them. Like if they signed up to receive content about desserts, and you start sending them emails about chicken. That might feel like bait-and-switch territory.</p>
<p><strong>Subscriber exclusives</strong></p>
<p>Let your subscribers know you think they’re special by giving them exclusive freebies like ebooks, webinars, audio seminars or reports. What better way to keep loyal fans happy than to give them things that the common blog reader can’t get? People like to feel as though they are VIP, so treat them as such!</p>
<p><strong>Don’t email them every day!</strong></p>
<p>Nothing is more annoying than getting too many emails from one person. Personally, if I receive a daily email from anyone, I’ve been known to unsubscribe within less than a week. Emailing your subscribers more than once a week is probably too much. Instead, why not create one newsletter that gives a weekly recap of everything they might have missed? If you fear you are sending too many or too few emails, conduct a survey with your subscribers to get their input.</p>
<h2 id="whats-next">What’s next?</h2>
<p>Starting an email list might take a little time and effort, but it’s totally worth it if you’re serious about blogging for the bacon. When you start to gain loyal fans who really want to receive your emails because your content adds value to their lives, well, that’s an exciting thing indeed. Later, you can use all those emails to send truth bombs, knowledge nuggets and, once in awhile, special offers that may make you some bank.</p>yashumittalIf you’re like most people, you started blogging to share information and make money while at it. But to make money with your blog, you need to get visitors to your site. And how can you drive traffic to your blog to show off all that glorious new content? It’s all about starting an email list.
https://i.imgur.com/BIebtOI.jpg
Introducing CodeCarrot Profiles - A Whole New Way To Connect With People2017-06-24T06:30:00+00:002017-06-24T06:30:00+00:00https://blog.codecarrot.net/codecarrot-profiles<p>We’re reinventing the business card with CodeCarrot Profiles. Now each one to whom you share your profile will have everything they need to know about you, all in one place.</p>
<div class="callout">
Whoever gets closest to the people wins.
</div>
<p>The longer is the means of communication, more you are pushing people further away from you.</p>
<p><img src="https://i.imgur.com/lSo4lh2.jpg" alt="Best Communication Model" /></p>
<p>Our mission here at <a href="https://www.codecarrot.net/">CodeCarrot</a> is to help business to give them an online presence to increase the reach for their business.</p>
<p>And today, we’re launching another tool that you use to connect with people in a modern and personal way: <a href="https://www.codecarrot.net/profiles">CodeCarrot Profiles</a>.</p>
<h2 id="introducing-codecarrot-profiles-your-digital-business-card">Introducing CodeCarrot Profiles: Your Digital Business Card</h2>
<p>People expect a direct line with their friend, family while connecting. They don’t want to do on different mode of communication and then wait for hours to hear back.</p>
<p>And now with CodeCarrot Profiles, people will always be able to connect with you directly and personally.</p>
<p>A <a href="https://www.codecarrot.net/profiles">CodeCarrot Profile</a> is like a digital business card.</p>
<p>Let’s take mine profile for example:</p>
<p><img src="https://i.imgur.com/HFwzSj6.png" alt="Yashu Mittal - CodeCarrot Profiles" /></p>
<p>I am the Founder and CEO of CodeCarrot Company</p>
<p>I can create my profile and then share the link with all of my friends, family, customers and the people that I work with. For example:</p>
<div class="callout">
profiles.codecarrot.net/yashumittal
</div>
<p>I can even put that link in my email signature or even in my twitter bio, and then all the people that have the link will be able to:</p>
<ul>
<li>See mine contact information and social profiles.</li>
<li>Call me or schedule a meeting.</li>
<li>Learn more about me personally.</li>
</ul>
<h2 id="reinventing-the-business-card">Reinventing The Business Card</h2>
<p>Business cards have helped to start so many conversations over the years. But now with CodeCarrot Profiles, there’s a new type of business card: one that matches the way that people actually interact today online.</p>
<h2 id="how-to-get-your-codecarrot-profile">How To Get Your CodeCarrot Profile</h2>
<p>All you need is to enter your details and hit the submit button. You will get an email about profiles which will contain the link of your CodeCarrot Profile.</p>
<h2 id="ps-can-we-send-you-an-email">P.S. Can we send you an email?</h2>
<p>Once a week or so we send an email with our best content. We never bug you; we just send you our latest piece of content. <a href="#subscribe">Subscribe Here</a>.</p>yashumittalWe’re reinventing the business card with CodeCarrot Profiles. Now each one to whom you share your profile will have everything they need to know about you, all in one place.
https://i.imgur.com/YI2fq98.png
How to Start Free Twitter Marketing2017-06-24T06:30:00+00:002017-06-24T06:30:00+00:00https://blog.codecarrot.net/how-to-start-free-twitter-marketing<p>Nearly 313 million users are active on Twitter every month. With real time engagement, <strong>Twitter makes it easy for you to engage directly with the target audience.</strong> Twitter helped the online ecosystem transform brand communication into brand conversion.</p>
<p>While other social marketing channels such as Facebook and Instagram focused on visual first approach, Twitter single handedly changed the management of online identity establishment. Twitter is an essential tool for small business looking to reach out to prospect customers. Here are few simple tips which you can use to start free marketing on Twitter:</p>
<h2 id="create-profile">Create Profile</h2>
<p>Create Twitter profile and use it to communicate with your target audience. Update bio and put your website link. Add custom background and profile pic strategically that clearly signifies the product and segment in which you are operating.</p>
<h2 id="connect-relevant-people">Connect Relevant People</h2>
<p>Simple and fast, Twitter allows your small audience to develop and connect with a niche and targeted audience. You can engage people before they become your friends. It makes twitter an interesting marketing platform where you can <strong>filter 99 percent of junk that doesn’t qualifies to be your leads.</strong></p>
<p>Use Twitter search to identify the influencers and experts in your segment. Start engaging such people by re-tweeting their posts and participating in the Q/A session.</p>
<h2 id="use-hashtags">Use Hashtags</h2>
<p>Monitor latest trends as it will help you find a way to make a relevant connection. Run campaigns as per the trending hashtags and reach out to new people. By putting your brand in front of the trending topics, your handle will be seen by people tweeting around that particular hashtags.</p>
<h2 id="content-marketing">Content Marketing</h2>
<p>You must give your followers the reasons to follow you back and spread message. Don’t create content for just the sake of creating content. <strong>Add value preposition.</strong> If you are not sure about the topics, take help from Twitter Analytics. Interests are categorically divided into unique and top. Just use top interests list as it also contains the unique interest topics.</p>
<h2 id="the-twitter-road">The Twitter Road</h2>
<p><strong>Research Competition:</strong> Know what your competitors are doing and stay ahead from them.</p>
<p><strong>Build Audience:</strong> Engage audience, respond to questions, share interesting links and monitor trends.</p>
<p><strong>Arrange Twitter Chats:</strong> Organize your own chat or participate in one. Add value!</p>
<p><strong>Add CTA:</strong> Try options such as- Sign up now, Call now, Register Now, Use App, Send Inquiry etc.</p>
<h2 id="ps-can-we-send-you-an-email">P.S. Can we send you an email?</h2>
<p>Once a week or so we send an email with our best content. We never bug you; we just send you our latest piece of content. <a href="#subscribe">Subscribe Here</a>.</p>yashumittalNearly 313 million users are active on Twitter every month. With real time engagement, Twitter makes it easy for you to engage directly with the target audience. Twitter helped the online ecosystem transform brand communication into brand conversion.
https://i.imgur.com/V86yb6z.jpg
Why website design is important?2017-06-23T06:30:00+00:002017-06-23T06:30:00+00:00https://blog.codecarrot.net/why-website-design-is-important<p>You may ask yourself why seek help updating your current website? Yes, your current website looks outdated compared to the competition but does a credible, compelling website design really matter?</p>
<p>A studies show a well-built website will generate better customer traffic and an improved user interface will increase conversion – generating new business at an exponential rate. But how? How can something as superficial as your company’s website design impact the success of a business? There are many reasons why a well designed website will attract your ideal customer and prompt dialogue with your firm.</p>
<h2 id="navigation">Navigation</h2>
<p>Possibly the most important part of a website is the navigation. The navigation of a website can make or break a site, which is especially true for robust websites with many pages. Website navigation typically includes a navigation bar or list of labels that differentiate the pages of the website.</p>
<p>Good navigation should be easy to find and comprehend – making for quick and easy travel throughout the entire website.</p>
<h2 id="brand-consistency">Brand Consistency</h2>
<p>If your company has a logo and that logo is utilised frequently in print materials (i.e. business cards, pamphlets, letterheads, etc.), then the logo, logo/brand colours, brand messaging and imagery used for print must be carried over into the website design. It is important for your customers to be able to recognise your brand in all forms of communication so they associate your brand position and promise with your business.</p>
<h2 id="reading-patterns-and-seo">Reading Patterns and SEO</h2>
<p>Most people are comfortable reading a web page the same way they read a book, from top to bottom, left to right. Web designers also take this into account when designing for a website. This will help get the message across more effectively for website visitors who could be current or potential customers.</p>
<p>With <strong>CodeCarrot <a href="//www.codecarrot.net/">website development plan</a></strong>, you can get a SEO ready website.
Many people do not know that placing important information in these areas of a website also improves search engine optimization (SEO).</p>
<p>When you include important company-related keywords into the html-based text, search engines such as Google and Bing are able to crawl your website easily, increasing your search engine placement and giving your website and firm more overall visibility.</p>
<h2 id="content">Content</h2>
<p>The content of your site literally communicates your company’s brand position and promise. There are other very important elements that are considered when a copywriter creates the content and the designer creates the complementary visual environment for the content.</p>
<p>Making the message short and to the point, yet warm and welcoming (depending on the industry) helps the reader to remember the message easier. Also, when there is too much text on a page, the page becomes visually cluttered making it more difficult for a reader to physically read the page, let alone remain interested in reading the page.</p>
<p>Insert the text into their design, which typically includes plenty of negative space. This empty space lets the reader’s eyes rest so they do not tire of reading.</p>
<p>Let’s look at some reasons why we love web design so much—and some benefits to your business what will make you love it as well.</p>
<p><strong>1. Good Sites Increase Customer Conversions</strong></p>
<p>If you have a well-designed site for your business, you’ll get more customer conversions. This is because good sites lead customers to what they’re supposed to do without distraction or fluff. Whatever action you want your customers to take when they reach your page, you can guide them to that action with elements of web design. Just make sure your site is easy to navigate and don’t waste your customers’ time.</p>
<p><strong>2. Sites Can Help Your Branding</strong></p>
<p>If you have a shoddy looking website, it’s going to hurt your brand. A scammy-looking website will drive customers away. On the other hand, an elegant site can help people connect with your branding. Creative but simple websites send the message that your brand is useful, modern, and service-based. Having a user-friendly page makes potential customers more likely to reach out or trust you enough to contact you. Your site directly reflects your branding, but don’t let that scare you. Instead, realise the potential it provides—you have ultimate control over how visitors perceive your company.</p>
<p><strong>3. Responsive Web Design Helps You Reach More Customers</strong></p>
<p>More and more users do business on their mobile phones these days. If you take advantage of responsive web design, your business can have a new set of customers. You can gear business towards those people who aren’t always near a computer. Using web design effectively allows you to capitalize on the technology of the time to gain all the customers you can.</p>
<p><strong>4. Beauty And Functionality</strong></p>
<p>Artwork is beautiful, but is it always functional? Websites can be both, which is another reason we love them so much. Web design is an amazing blend of logic and creative thought. It’s easy to forget how much we need and appreciate good sites until we see a bad one. Practical aesthetics allow websites to turn emotional appeal into solid action.</p>
<p>We create data driven products. You can make your business online with a website, get your website designed with <a href="//www.codecarrot.net/">CodeCarrot</a></p>
<h2 id="ps-can-we-send-you-an-email">P.S. Can we send you an email?</h2>
<p>Once a week or so we send an email with our best content. We never bug you; we just send you our latest piece of content. <a href="#subscribe">Subscribe Here</a>.</p>yashumittalYou may ask yourself why seek help updating your current website? Yes, your current website looks outdated compared to the competition but does a credible, compelling website design really matter?
https://i.imgur.com/cLvA68m.jpg
7 Creative Ways to Surprise And Delight Your Customers2017-06-18T06:30:00+00:002017-06-18T06:30:00+00:00https://blog.codecarrot.net/7-creative-ways-to-surprise-and-delight-your-customers<p>As the web continues to drastically change how we purchase the products and services, entrepreneurs are finding a renewed faith in the power of a great customer experience.</p>
<p>Why might that be?</p>
<p>Busiess Owners need to be keen as to what their unique selling proposition is. In other words, why should a customer buy from you if they could pick up by going to their local market?</p>
<p>In addition to the uniqueness of your products and the prices you’re able to offer, there is one other point of difference that can tip the scales in your favor—delivering an outstanding customer experience.</p>
<p>It’s been proven in a number of consumer studies that a vast majority of consumers will pay for better service, and since a great experience is a known cause for increased brand loyalty and word of mouth referrals.</p>
<p><img src="https://i.imgur.com/4LhG3Ox.png" alt="Trust through the Advertisements" /></p>
<p><strong>If you can’t go toe-to-toe with the big guys on price, amazing service should be your winning proposition.</strong></p>
<p>But how can you deliver that vaunted “amazing” service? You’re likely not surprised to hear that great customer service really boils down to taking care of customers, and providing them with a ‘WOW’ experience that leaves a lasting impression.</p>
<p>Below, I’ll highlight 6 exceptional ways to ‘WOW’ the socks off of your customers, without breaking the bank.</p>
<h2 id="1-the-classic-freebie">1. The Classic Freebie</h2>
<p>If you’ve ever read that fascinating study about the power of mints—where waiters received a 21% better tip when they left two free mints—you know that reciprocity is a powerful psychological trigger, and that it doesn’t take much for a gift to leave an impact.</p>
<p>Small gifts to customers (a free comb after a haircut, etc.) are nothing new, so today I thought I’d highlight a great example of a company that took things to a whole new level.</p>
<p><img src="https://i.imgur.com/PpL88OQ.jpg" alt="Gifts" /></p>
<h2 id="2-a-thank-you-note">2. A Thank You Note</h2>
<p>With the endless amount of options out there, is it really so much to ask that a business say “Thanks!” to a new customer? You might think that thank you notes have lost their impact, being that they are such a tried and true tactic, but you would be dead wrong.</p>
<p>In fact, it’s been argued that technology has actually made the handwritten note somewhat of a lost art, allowing it to leave an even larger impact today than it would have in years past, especially from a business.</p>
<p>There are so many instances of customers being truly appreciative of thank you notes.</p>
<p><img src="https://i.imgur.com/cDukHmQ.jpg" alt="Thank You Card" /></p>
<p>Here are some quick tips on writing a killer thank you note:</p>
<ul>
<li>If it’s financially feasible, try to use quality stationary. Some of the stationary sets on sites like Pinhold are quite nice for the price.</li>
<li>Be sure to mention the customer’s name, and not for some gimicky persuasion reason, but because it’s common courtesy!</li>
<li>Express your gratitude, clearly stating the reason for sending the note.</li>
<li>Mention details about what you enjoyed about your experience with this customer (a fantastic opportunity to be specific and thoughtful).</li>
<li>Allude to your future interactions with the customer (when will you make contact next?)</li>
<li>Close with professional but warm sign-off and a signature (examples: Best, Kindest Regards, Sincerely, Cheers, etc.)</li>
<li>Can’t you find the time to show customers you care with a little handwritten gratitude?</li>
</ul>
<h2 id="3-check-in-with-customers">3. Check in With Customers</h2>
<p>Even if your business doesn’t lend itself to something that personalized, remember through the power of email marketing, you could always set up a follow-up email to check in with customer and see how they are doing.</p>
<p>This can be especially powerful for large purchases or “habit forming” purchases. If you sell products for a hobby, for instance, it might be nice to check in with those who have purchased a beginner’s set or beginner equipment to see how they are doing.</p>
<p><img src="https://i.imgur.com/gGtXbKR.jpg" alt="Check in With Customers" /></p>
<p>Imagine the impression a business would leave if after buying your first set of golf clubs, you got an automated email from “Jim” asking you how they were treating you, and if you’ve been able to hit the driving range yet? Pretty powerful stuff, and all hinging on the very frugal cost of a personal follow-up email.</p>
<p>This is also useful for birthdays, holidays, or even better, some other personal event that you learned about from a customer.</p>
<h2 id="4-get-proactive-about-service">4. Get Proactive About Service</h2>
<p>Too often, businesses see customer service as a reactionary task rather than an opportunistic one.</p>
<p>For example: a potential customer had added a few clothes to their shopping cart, but upon seeing the shipping costs (it was international), they had to leave without a purchase.</p>
<p>Seeing that the cart had been left full, the Shop employee reached out to the customer via email with some creative solutions on how they could ship the products to the customer for less. The customer ended up completing his purchase and buying more from shop, and I think his comment in that second email say it all:</p>
<blockquote>
"Wow. My mind is blown. This is potentially the best customer service I have ever experienced."
</blockquote>
<p>For instance, if a customer is having problem getting “started” (whatever that may mean for your product) and is stuck on step 3, after solving their problem, ask if you can be assistance on step 4.</p>
<p>This form of “social sensitivity”—or understanding of how others feel—can be a great asset in predicting where customers may run into trouble next, so you can swoop in and help them before it happens.</p>
<h2 id="5-sweat-the-small-stuff">5. Sweat the Small Stuff</h2>
<p>In many ways, great customer service really is just about sweating the details. It’s been proven that “even a dime can make a difference” in reciprocity. People respond with goodwill for even the smallest acts of kindness.</p>
<p><strong>Consider this tale:</strong></p>
<p>When a woman in the store lost the diamond from her wedding ring, she became distraught and began crawling around on the ground looking for the ring. A Nordstrom employee saw her crawling under the clothing racks. Once he found out what was wrong, he immediately got on his hands and knees and joined the search!</p>
<p>When the duo came up empty-handed in the search for the ring, the employee asked for assistance from two building service workers. Together, they sifted through vacuum bags until they found the diamond mixed in with dust and dirt.</p>
<p>Try to “default to yes” for small, reasonable requests that customers make, most of which are sincere and simply looking for a helping hand.</p>
<h2 id="6-go-beyond-help-content">6. Go Beyond “Help” Content</h2>
<p>I’ve always thought the term content marketing was a bit odd, given that the “marketing” part of the equation really just comes from helping customers. In that sense, relationship marketing, through the act of building relationships with customers by being genuinely useful, seems far more relevant.</p>
<p>The problem is that many companies stop at help content and FAQs alone, forgetting that all content is marketing. What this means is that helping people solve their problems decreases the likelihood that they’ll “date around.”</p>
<p>You’re actually seeing an example of this in action right now! <a href="https://blog.codecarrot.net/">The CodeCarrot Blog</a> regularly delivers great ecommerce related content to their current and prospective customers, all of which goes hand in hand with the web and mobile application development service we provide.</p>
<p><img src="https://i.imgur.com/5yQCFVz.jpg" alt="Helping Each Other" /></p>
<p>Let’s say you own a local shop that sells eatable items. How cool would it be to hold regular events where you bring in experts to talk about ingredients and health related issues? The more educated your customers become, the more they will appreciate what you sell, thus the more valuable they are to your business.</p>
<p>Great information not only educates, it motivates.</p>
<p>This is often even more apparent for online businesses. You can use your blog, webinars, whitepapers and free coaching to help people make the most of your product or service.</p>
<p>Help customers get better at doing what they do, and help them understand how your service can become a key component of improving. In the age of the web, education can be used to take the place of promotion in winning over customers.</p>
<h2 id="7-stop-customer-complaints-before-they-happen">7. Stop Customer Complaints before they Happen</h2>
<p>No one wants to hear bad news. <strong>Especially if it’s a customer complaint</strong></p>
<p>But what if you could stop customer complaints before they happen? No, we’re not suggesting you break out the Ouija board just yet.</p>
<p><a href="/how-to-stop-customer-complaints-before-they-happen/"><img src="https://i.imgur.com/2oDfxxT.jpg" alt="How to stop customer complaints before they happen" /></a></p>
<p>All it actually takes is a little empathy and foresight.</p>
<h2 id="ps-can-we-send-you-an-email">P.S. Can we send you an email?</h2>
<p>Once a week or so we send an email with our best content. We never bug you; we just send you our latest piece of content. <a href="#subscribe">Subscribe Here</a>.</p>yashumittalAs the web continues to drastically change how we purchase the products and services, entrepreneurs are finding a renewed faith in the power of a great customer experience.
https://i.imgur.com/J1OjL2K.jpg
How to get the highest paying job in your field2017-06-13T09:30:00+00:002017-06-13T09:30:00+00:00https://blog.codecarrot.net/how-to-get-the-highest-paying-job-in-your-field<p>Job searching is incredibly stressful, daunting and overwhelming. In order to get the interview, you need a resume that enhances as well as emphasizes your skills to the prospective employer. Numerous studies show that an average of 250 resumes are submitted for each job posting and employers only spend 5-7 seconds reviewing each resume. With such a small amount of time to spare, your resume must stand out among the rest.</p>
<h2 id="results-matter">Results Matter</h2>
<p>It takes practice, sophistication and technique to write the perfect resume. In this easy-to read guide, I am going to provide you with expert tips on how to get the highest paying job in your field with the perfect resume website.</p>
<p>It doesn’t matter if you are entering the workforce right out of college or if you are an executive who is taking the next step into a high-ranking management position. The perfect resume website will help you in any industry or at any level in your career. The perfect resume website will enable you to earn the job that makes you more money and leads to more growth.</p>
<blockquote>
A sleek resume website highlighting your experience could help you stand out from other candidates — or even help a hiring manager find you to fill a position.
</blockquote>
<p>And while you could just copy and paste your resume onto a web page, the online possibilities really are endless, so why not go big or go home?</p>
<p>Don’t worry, though; this doesn’t have to take weeks of your life. If you want to turn your resume into a website that impresses-all of which <a href="//www.codecarrot.net/">CodeCarrot will do it for you</a>.</p>
<p>I hope that these tips will help you achieve the greatest reward.</p>
<p>Are you ready to make more money? Let’s go.</p>
<h2 id="what-constitutes-the-perfect-resume-website">What constitutes the perfect resume website?</h2>
<p>It is a fact that employers spend 5-7 seconds reviewing your resume. One mistake, and you’re out of the interviewing game. So, how do you grab the reader’s attention? It’s a simple show vs. tell mentality.</p>
<p>Looks are everything when it comes to resume website. In that very short amount of time employers spend glancing at your resume website, they have already judged you before seeing you and certainly before speaking to you. If you are a terrible communicator on paper, chances are, your interviewing skills will not be any better. Do you think an employer is willing to take that risk and interview you?</p>
<p>The first glance at a candidate’s resume is similar to the first glance on a first date. How would you prepare for a first date? You would shower, groom yourself and dab on some cologne or perfume to ensure you smell as fabulous as you look. First dates are all about first impressions. In the resume writing world, no one cares about who you are on the inside. LOOKS MATTER when it comes to your resume. Accept it and abide by it.</p>
<p>There are three (3) top areas to focus on in helping you write the perfect resume and we want to share them with you. Are you ready?</p>
<p><strong>Here they are:</strong></p>
<ol>
<li>Branding and targeting</li>
<li>Professional experience</li>
<li>Organization and layout</li>
</ol>
<h2 id="branding-and-targeting">Branding and targeting</h2>
<p>Your resume is your branding. The perfect resume website will target yourself for the right position and industry. The perfect resume website begins with a succinct professional summary that summary provides an introduction to the reader of who you are. Think of it as the catchy summary on the insert of a book. In marketing your resume website, you have to be creative and collaborative. Notice I did not say “objective.” If you are using an “objective” in your resume, you are likely getting thrown into the “no-interview” pile.</p>
<p>This may come as a total shock to you, but employers know your objective. If they didn’t, you wouldn’t be sending in your resume to their company. They know you want a job with their company doing exactly what the job description states.</p>
<p>Ask yourself, what special skills do you have that make YOU different from the next person?</p>
<p>Remember this is for a job interview, not for a Friday night date.</p>
<p>Now that you know that, emphasize your skills and potential.</p>
<h2 id="professional-experience">Professional experience</h2>
<p>Responsibilities are great, but an employer wants relevant and results-driven experience that will separate you from the other candidates.</p>
<p>The most important thing to remember is that you are not writing your resume for you to look at and admire all of your accomplishments. You are writing your resume for your audience. You must tailor towards the industry and include specific key achievements and value that you bring to the job and company.</p>
<p><a href="//www.codecarrot.net/"><img src="https://cdn.codecarrot.net/images/kards-template.png" alt="Resume Website" /></a></p>
<p>Would you like to use this template for your own resume website?</p>
<h2 id="organization-and-layout">Organization and layout</h2>
<p>Sophistication is the theme when it comes to the organization and layout of your resume website. How your resume looks is just as important as what it says. If the resume does not catch the reader’s eye with a strong organization and layout, then it will certainly be thrown into the “no interview” pile. The headings must stand out in plain view and at first glance. Your job titles should also stand out. Descriptions should begin with strong action verbs.</p>
<p>Now that I’ve provided you these three (3) basic, but important, tips on how to write the perfect resume, I want to give you the lowdown on why you should hire a certified professional resume writer to help you craft that perfect resume.</p>
<p><strong>Do I really need a Resume Website?</strong></p>
<p>Now we have come down to the very important question that you are still asking: Do I really need a Resume Website? <strong>(Read this article also: <a href="/why-should-i-have-a-website/">Why Should I have a Website?</a></strong> We recognize and acknowledge that it is hard to write about yourself and detail your own work history in a methodical way. Re-evaluating your resume and determining whether it needs to be overhauled by a resume website is easy.</p>
<p><strong>Ask yourself these questions:</strong></p>
<ol>
<li>Does your resume properly highlight your accomplishments?</li>
<li>Does your resume contain a strong organizational framework of your skills?</li>
<li>Does your resume provide you with a targeted and focused branding?</li>
<li>Does your resume contain the right keywords that align with the job position?</li>
</ol>
<p>The above questions are the most common elements that employers seek out when reviewing your resume. If you have answered “no” to any of those four (4) questions, now ask yourself these three (3) honest questions:</p>
<ol>
<li>Is your current resume working for you?</li>
<li>Are you sending out your resume day after day with no response?</li>
<li>Are you getting calls for interviews with companies that offer your dream job?</li>
</ol>
<p>If you have answered “yes” to any of these questions, it is highly recommended that you have your resume immediately reviewed and written by a certified professional who knows what it takes to have your resume read by the prospective employer and grab his/her attention in those 5-7 seconds.</p>
<p>Let <strong>CodeCarrot help you take your career to the next level by crafting the perfect resume website</strong> for you so that you can get the highest paying job in your field.</p>
<p>Stop wondering. Act now by getting your free resume reviewed, today.</p>
<h2 id="ps-can-we-send-you-an-email">P.S. Can we send you an email?</h2>
<p>Once a week or so we send an email with our best content. We never bug you; we just send you our latest piece of content. <a href="#subscribe">Subscribe Here</a>.</p>yashumittalJob searching is incredibly stressful, daunting and overwhelming. In order to get the interview, you need a resume that enhances as well as emphasizes your skills to the prospective employer. Numerous studies show that an average of 250 resumes are submitted for each job posting and employers only spend 5-7 seconds reviewing each resume. With such a small amount of time to spare, your resume must stand out among the rest.
https://cdn.codecarrot.net/images/highest-paying-job-in-your-field.jpg
Why should I have a website?2017-06-13T06:30:00+00:002017-06-13T06:30:00+00:00https://blog.codecarrot.net/why-should-i-have-a-website<p>By creating a website, you are creating an online presence. This allows you to connect with people that you might not otherwise be able to reach. Whether you’re making a basic website with contact information for your medical practice, creating a landing page for your freelance work, a multi-page experience for your wedding photography business or you just want a place to blog about your thoughts on food – having a website will give you a dynamic advantage.</p>
<p>To get started you don’t need to know how to code – CodeCarrot will do it for you. Website gives your visitor an enjoyable experience that feels natural from either a desktop or mobile device.</p>
<h2 id="reason-1--online-brochure">Reason #1 – Online brochure</h2>
<p>Companies spend millions creating brochures and distributing them. By having a website you can skip that entirely. Your potential customers can find out about you and any of your products online. If you get most of your business through networking and personal connections, then they will want to check out your website.</p>
<h2 id="reason-2--more-customers">Reason #2 – More customers</h2>
<p>More than 2.4 billion people use the internet every day, and some 90% of those have purchased something, or contacted a company, online in the last 12 months. So by not having a website, you will be missing out on a big piece of the pie.</p>
<h2 id="reason-3--business-value">Reason #3 – Business value</h2>
<p>Have you tried getting a business loan recently? It’s not easy, but if you try and the bank manager asks to see your website, you better have a pretty good one. It doesn’t just stop with the bank, the perceived value of your business will be lower in everyone’s eyes – especially your customers.</p>
<h2 id="reason-4--influence">Reason #4 – Influence</h2>
<p>By having a website potentially thousands of people are going to see it. You are able to influence people’s decisions and educate them.</p>
<h2 id="reason-5--time-to-show-off">Reason #5 – Time to show off</h2>
<p>You know that great feeling you get when people recognize your work? Well, by having a website you can show off what you do and take pride in your work.</p>
<h2 id="reason-6--helps-with-business-goals">Reason #6 – Helps with business goals</h2>
<p>That’s right! When it comes to writing the content for your website you are going to revisit things about your business that you haven’t in years. You will most likely reassess your business goals.</p>
<h2 id="reason-7--low-barriers-of-entry">Reason #7 – Low barriers of entry</h2>
<p>Ever wanted to start a business? Well, now you can do it with virtual space. In fact, by using some free website providers you don’t have to pay a penny.</p>
<h2 id="reason-8--24-hours-per-day">Reason #8 – 24 hours per day</h2>
<p>Your website runs 24/7 without any supervision or need to lock it up. You can always be there for your customers.</p>
<h2 id="reason-9--communication-with-customers">Reason #9 – Communication with customers</h2>
<p>By having a blog or even just a feed on your website, you can update customers on your newest offers, products, promotions, events, photos, or any other content.</p>
<h2 id="reason-10--marketing">Reason #10 – Marketing</h2>
<p>The internet has opened up a whole new world of marketing that didn’t exist before. Your website can attract new business by using a whole host of low cost marketing techniques.</p>
<h2 id="reason-11--customer-support">Reason #11 – Customer support</h2>
<p>You can greatly reduce the cost of customer support by have a ticketing system, or even just an FAQ on your website. I can think of about 5 companies off the top of my head that streamline your customer service straight from your website.</p>
<h2 id="reason-12--contactcodecarrotnet">Reason #12 – contact@codecarrot.net</h2>
<p>I know there are other ways to do this, but by having a website you can have your own email contact@yourwebsite.com. It is more professional and easier to remember. I know you love your yourname123@gmail.com, but it doesn’t really resonate with customers.</p>
<h2 id="reason-13--press-releases">Reason #13 – Press releases</h2>
<p>I know that sounds a bit far out, but it is true. You can run really cheap press releases online about your business, but to do it you will require a website. In fact, I have had clients who were absolute nobodies get one million views on YouTube because of online press releases.</p>
<h2 id="reason-14--stick-it-to-the-man">Reason #14 – Stick it to the man</h2>
<p>The best answer to “Why do I need a website?” would be that you can stick it to the man. It is the easiest way to quit your job and earn a living.</p>
<h2 id="reason-15--any-topic-or-hobby-will-do">Reason #15 – Any topic or hobby will do</h2>
<p>Do you love sports? How about ballet, alternative dance, photography, holidays, Kit-Kats, cars, skateboards, science or animals? Well, then you have a business idea just waiting to happen. The internet has room for an unlimited number of niche blogs that can attract traffic and revenue. Just pick something you love and start writing about it.</p>
<h2 id="reason-16--connect-with-fellow-web-masters">Reason# 16 – Connect with fellow web masters</h2>
<p>On a little side note, if you own a website you get to call yourself a ‘web master’. Pretty cool! But reason #16 for ‘why I need a website’ is that you can easily make new business and personal connections with other website owners. This can lead to extra streams of income for you!</p>
<h2 id="reason-17--gives-you-a-voice">Reason #17 – Gives you a voice</h2>
<p>Have you ever been in an argument with someone and said “Well, I have written an article about that on my website, and actually, that isn’t the case.” It feels great! For some reason people don’t want to argue with you if you’ve written about something on your website. It also gives you a place where you can voice your opinion without judgment. If someone leaves you a comment you don’t like you can just drag it over to the spam folder.</p>
<h2 id="reason-18--do-business-your-own-way">Reason #18 – Do business your own way</h2>
<p>You don’t need permission from your boss or company lawyer as no else is asking her to stop and you can a world class business with thousands of customers.</p>
<h2 id="reason-19--beat-the-big-guys">Reason #19 – Beat the big guys</h2>
<p>Have you ever wanted to get into business, but don’t know how to compete with all the big names out there? By creating an incredibly beautiful website with a solid strategy behind it you can smash the big guys to pieces. You have no chance of building bigger skyscrapers, but your website can break down the perceived wall between you and them.</p>
<h2 id="reason-20--instant-credibility">Reason #20 – Instant credibility</h2>
<p>Have you ever had difficulty making that sale? Or convincing someone that you are the real deal. By having a well structured website you can foster instant credibility with anyone. You can provide the ultimate proof that you are, in fact, the realest of all deals (couldn’t resist that phrase).</p>
<h2 id="reason-21--helps-you-to-find-a-new-job">Reason #21 – Helps you to find a new job</h2>
<p>I bet you didn’t see this one coming. I have been harping on about how a website can help your business, but it can help you personally too. Not only can a website host your resume or CV, but by owning and managing your website you have demonstrated tons of hard and soft skills. Having worked in HR once upon a time, I know it is valuable.</p>
<h2 id="ps-can-we-send-you-an-email">P.S. Can we send you an email?</h2>
<p>Once a week or so we send an email with our best content. We never bug you; we just send you our latest piece of content. <a href="#subscribe">Subscribe Here</a>.</p>yashumittalBy creating a website, you are creating an online presence. This allows you to connect with people that you might not otherwise be able to reach. Whether you’re making a basic website with contact information for your medical practice, creating a landing page for your freelance work, a multi-page experience for your wedding photography business or you just want a place to blog about your thoughts on food – having a website will give you a dynamic advantage.
https://cdn.codecarrot.net/images/why-should-i-have-a-website.png
Relax your CSS with Normalize.css2017-06-04T06:30:00+00:002017-06-04T06:30:00+00:00https://blog.codecarrot.net/relax-your-css-with-normalize.css<p><a href="//codecarrotnet.github.io/normalize.css/">Normalize.css</a> is a small CSS file that provides better cross-browser consistency in the default styling of HTML elements. It’s a modern, HTML5-ready, alternative to the traditional CSS reset.</p>
<ul>
<li><a href="//codecarrotnet.github.io/normalize.css/css/normalize.min.css">Normalize.css project site</a></li>
<li><a href="//codecarrotnet.github.io/normalize.css/css/normalize.css">Normalize.css source on GitHub</a></li>
</ul>
<p><strong>Pro Tips:</strong> Want to know some extra about <a href="/applying-normalize-css-to-relax-your-css-file">normalize.css and it usage</a>.</p>
<h2 id="overview">Overview</h2>
<p>Making your CSS files relax with Normalize.css as it is an alternative to CSS resets.</p>
<p><strong>The aims of normalize.css are as follows:</strong></p>
<ul>
<li>Preserve useful browser defaults rather than erasing them.</li>
<li>Normalize styles for a wide range of HTML elements.</li>
<li>Correct bugs and common browser inconsistencies.</li>
<li>Improve usability with subtle improvements.</li>
<li>Explain the code using comments and detailed documentation.</li>
<li>It supports a wide range of browsers (including mobile browsers) and includes CSS that normalizes HTML5 elements, typography, lists, embedded content, forms, and tables.</li>
</ul>
<p>It supports a wide range of browsers (including mobile browsers) and includes CSS that normalizes HTML5 elements, typography, lists, embedded content, forms, and tables.</p>
<p>Despite the project being based on the principle of normalization, it uses pragmatic defaults where they are preferable.</p>
<h2 id="normalize-vs-reset">Normalize vs Reset</h2>
<p>It’s worth understanding in greater detail how normalize.css differs from traditional CSS resets.</p>
<p><strong>Normalize.css preserves useful defaults</strong></p>
<p>Resets impose a homogenous visual style by flattening the default styles for almost all elements. In contrast, normalize.css retains many useful default browser styles. This means that you don’t have to redeclare styles for all the common typographic elements.</p>
<p>When an element has different default styles in different browsers, normalize.css aims to make those styles consistent and in line with modern standards when possible.</p>
<p><strong>Normalize.css corrects common bugs</strong></p>
<p>It fixes common desktop and mobile browser bugs that are out of scope for resets. This includes display settings for HTML5 elements, correcting <strong>font-size</strong> for preformatted text, SVG overflow in IE9, and many form-related bugs across browsers and operating systems.</p>
<p>For example, this is how normalize.css makes the new HTML5 <strong>search</strong> input type cross-browser consistent and stylable:</p>
<div class="highlighter-rouge"><div class="highlight"><pre class="highlight"><code>Addresses appearance set to searchfield in S5, Chrome.
Addresses box-sizing set to border-box in S5, Chrome (include -moz to future-proof)
</code></pre></div></div>
<div class="highlighter-rouge"><div class="highlight"><pre class="highlight"><code>input[type="search"] {
-webkit-appearance: textfield; /* 1 */
-moz-box-sizing: content-box;
-webkit-box-sizing: content-box; /* 2 */
box-sizing: content-box;
}
</code></pre></div></div>
<p>Removes inner padding and search cancel button in S5, Chrome on OS X</p>
<div class="highlighter-rouge"><div class="highlight"><pre class="highlight"><code>input[type="search"]::-webkit-search-decoration,
input[type="search"]::-webkit-search-cancel-button {
-webkit-appearance: none;
}
</code></pre></div></div>
<p>Resets often fail to bring browsers to a level starting point with regards to how an element is rendered. This is particularly true of forms – an area where normalize.css can provide some significant assistance.</p>
<p><strong>Normalize.css doesn’t clutter your debugging tools</strong></p>
<p>A common irritation when using resets is the large inheritance chain that is displayed in browser CSS debugging tools.</p>
<p>This is not such an issue with normalize.css because of the targeted styles and the conservative use of multiple selectors in rulesets.</p>
<p><strong>Normalize.css is modular</strong></p>
<p>The project is broken down into relatively independent sections, making it easy for you to see exactly which elements need specific styles. Furthermore, it gives you the potential to remove sections (e.g., the form normalizations) if you know they will never be needed by your website.</p>
<h2 id="how-to-use-normalizecss">How to use normalize.css</h2>
<p>First, install or <a href="//codecarrotnet.github.io/normalize.css/css/normalize.css">download normalize.css</a> from GitHub or use the CDN method. There are then 2 main ways to make use of it.</p>
<p><strong>Approach 1:</strong> use normalize.css as a starting point for your own project’s base CSS, customising the values to match the design’s requirements.</p>
<p><strong>Approach 2:</strong> include normalize.css untouched and build upon it, overriding the defaults later in your CSS if necessary.</p>
<h2 id="closing-comments">Closing comments</h2>
<p>Normalize.css is significantly different in scope and execution to CSS resets. It’s worth trying it out to see if it fits with your development approach and preferences.</p>
<p>The project is developed in the open on GitHub. Anyone can report issues and submit patches. The full history of the project is available for anyone to see, and the context and reasoning for all changes can be found in the commit messages and the issue threads.</p>
<h2 id="ps-can-we-send-you-an-email">P.S. Can we send you an email?</h2>
<p>Once a week or so we send an email with our best content. We never bug you; we just send you our latest piece of content. <a href="#subscribe">Subscribe Here</a>.</p>yashumittalNormalize.css is a small CSS file that provides better cross-browser consistency in the default styling of HTML elements. It’s a modern, HTML5-ready, alternative to the traditional CSS reset.
https://cdn.codecarrot.net/images/relax-your-css-with-normalize-css.jpg
How to stop customer complaints before they happen2017-06-03T06:30:00+00:002017-06-03T06:30:00+00:00https://blog.codecarrot.net/how-to-stop-customer-complaints-before-they-happen<p>No one wants to hear bad news. <strong>Especially if it’s a customer complaint</strong></p>
<p>But what if you could stop customer complaints before they happen? No, we’re not suggesting you break out the Ouija board just yet.</p>
<p>All it actually takes is a little empathy and foresight.</p>
<p>We’ve put together a collection of the most common sources of customer complaints (and how to fix them) to help you create a better experience for your customers before they have the chance to get frustrated.</p>
<blockquote>
Complaints can be a useful tool for discovering where your business needs to improve, but it’s much better to be able to get that insight without upsetting a customer at the same time.
</blockquote>
<p>Let’s get into it.</p>
<h2 id="why-do-customers-complain">Why Do Customers Complain?</h2>
<p>Customers complain when they feel frustrated or not satisfied with your product and services.</p>
<p>That doesn’t mean that customers only complain when they can’t do something. Frustration happens any time <strong>the results of an action don’t match the expectation</strong> - when you do something and it doesn’t turn out how you thought it would.</p>
<p>These frustrating moments can occur at any point in your customer’s experience, whether customer is purchasing any product or service. For instance, maybe their order never arrives or your services are a complete mess. Potentially frustrating scenarios are everywhere.</p>
<p>You need to anticipate and eliminate these opportunities for frustration, so that your customers can discover, purchase, and enjoy your products and services without hitting any roadblocks (and without sending you a complaint about their less-than-stellar experience).</p>
<h2 id="the-most-common-sources-of-frustration-for-customers">The Most Common Sources of Frustration for Customers</h2>
<p>While complaints can take many forms, there are a few key things that can leave customers dissatisfied if they aren’t handled properly. If you can master these critical issues, your business will start getting less complaints and more <a href="/7-creative-ways-to-surprise-and-delight-your-customers">happy customers</a> instead.</p>
<p>Keeping your customers happy is all about managing expectations. Most customer complaints are caused by a disconnect between expectation and reality, so you need be able to more accurately align your customers’ expectations with likely outcomes.</p>
<p>Let’s take a look at some of the most common causes of complaints and how your business can get on top of them before they turn your customers away.</p>
<p><strong>Product and Services Issues</strong></p>
<p><em>“Where’s my order?”</em></p>
<p><em>“Your services are very poor!”</em></p>
<p>If you’ve gotten that question before, then you definitely understand the importance of being able to deliver your products safely and on time and to provide high quality of services to the customers.</p>
<p>Your customers put a lot of trust in you to get them your product or services and if they feel uncertain about when their package or service is going to show up <em>(or if it’s going to show up at all)</em>, the complaints will start rolling in.</p>
<p>To keep your customers in the loop, offer order tracking and notify them about services whenever possible. If your customers can keep an eye on the progress of the product and services in real time, they’ll have a more clear understanding of when their order should arrive and you’ll be able to reduce the potential for complaints based on shipping delays or uncertainty.</p>
<p><strong>Inaccurate Product or services, Photos and Descriptions</strong></p>
<p><em>“It’s not described properly.”</em></p>
<p>Try to see things from your customers’ perspectives: <strong>What would you want to know before purchasing the product or services?</strong></p>
<p>There’s nothing worse than placing an order, waiting 5-7 business days for it to show up, and then realizing it doesn’t fit properly.</p>
<p>When product and service doesn’t look, feel, or fit the way your customers imagined that they would, it’s easy to understand their disappointment.</p>
<p>Writing product and services descriptions with important details is a great way to accurately describe your product and services and give your customers a reasonable idea of what they should expect when placing an order.</p>
<p>Don’t be afraid to be as transparent as possible. For instance, if a product runs small or large, be up front about it. Your customers will appreciate it and your honesty will help build trust with your audience.</p>
<p>Inaccurate product and services photography can also be a source of frustration for your customers. Ordering a product and realizing that the texture or colour is completely different once you take it out of the box is a terrible feeling and can lead to complaints, returns, and customers that never come back.</p>
<p>To help your customers decide if your products are right for them, it’s also important to enable reviews and integrate social media feeds into your product pages.</p>
<p>Not only will this approach give hesitant customers the extra push they need to place an order, but it will also give them an inside look at what real people think about your products and service. Product reviews and photos will set your customer’s’ expectations at a realistic level and make sure that they’re satisfied with their orders.</p>
<p><strong>Website Responsiveness and Usability</strong></p>
<p><em>“Your website sucks on mobile.”</em></p>
<p>Try to imagine your website as a real life storefront: Can your customers easily find you? Is your store a complete mess? Is it difficult for your customers to actually purchase your products?</p>
<p>Keeping your website clean, organized, and easy to navigate is just as important as having a neat and tidy brick-and-mortar shop.</p>
<p>To avoid annoying your customers, you need to put a mobile responsive website at the heart of your website strategy. Nearly ⅓ of smartphone users will immediately navigate away from a website if it takes too long to load or they can’t find what they’re looking for right away.</p>
<p>That’s huge, especially since more than half of all Google searches are now happening on smartphones and tablets rather than computer and laptops. However, if you get a website with CodeCarrot, you’ll be good to go since <a href="https://www.codecarrot.net/">every template</a> is already fully mobile responsive.</p>
<p>Load times in particular take a toll on your customers’ patience. According to <a href="https://www.thinkwithgoogle.com/articles/speed-is-key-optimize-your-mobile-experience.html">Google</a>, 40% of customers will abandon a website if it takes longer than three seconds to load. Wondering how your website stacks up? Try running it through <a href="https://developers.google.com/speed/pagespeed/insights/">Google’s PageSpeed Insights</a>.</p>
<p>If your website has a physical location, you should also think about how easy it is for your customers to find your contact details.</p>
<p>When customers visit a brick-and-mortar store’s website, they’re looking for address and location information above anything else. And half the time, those local searches actually result in <a href="https://think.storage.googleapis.com/docs/how-advertisers-can-extend-their-relevance-with-search_research-studies.pdf">customers showing up to the business’ physical shop</a> within 24 hours.</p>
<p>Here’s a quick checklist with the details that every business needs to have on their “Contact Us” page to avoid frustrating customers who are trying to get in touch:</p>
<ol>
<li>Hours of operation</li>
<li>Address and location for brick-and-mortar stores</li>
<li>Phone number</li>
<li>Email address</li>
<li>Social media links</li>
</ol>
<h2 id="3---templates-for-dealing-with-customer-complaints">3 - Templates for Dealing with Customer Complaints</h2>
<p>Despite your best efforts, you may still get customer complaints from time to time.</p>
<p>It’s important to not let these complaints eat away at you. Instead, see them as a chance to make your product and services better. Try to look past the negative feedback and uncover the lesson at the core of the complaint.</p>
<div class="callout">
Remember: If someone is complaining, it means they're looking for a solution.
</div>
<p>They aren’t trying to hurt you. They aren’t out to get you. They’re frustrated and they need help.</p>
<p>As a business owner, <strong>it might not be your fault, but it is your responsibility</strong>. You need to deal with these complaints and find a solution that works.</p>
<p>It isn’t always easy to come up with the right words, especially if you’re dealing with a particularly emotionally-charged message. But with the right templates, writing a response can be a lot less stressful.</p>
<p>It’s crucial that you don’t just copy and paste these templates verbatim. Customers can spot a canned response from a mile away. Instead, use them as a guide for crafting a helpful and unique email.</p>
<p>Here are three basic email templates that you can use as a jump-off point for responding to complaints.</p>
<p>Here are three basic <a href="https://www.dropbox.com/s/un2drb0bq9ujgny/e-mail-template-for-responding.pdf?dl=0">email templates</a> that you can use as a jump-off point for responding to complaints.</p>
<h2 id="create-a-better-shopping-experience-for-your-customers">Create a Better Shopping Experience for Your Customers</h2>
<p>Customer complaints aren’t necessarily a bad thing, <strong>but a satisfied customer is much better than an upset one</strong>.</p>
<p>Now that you understand why your customers complain, it’s time to get out there and give them the best shopping experience possible. After all, your business is here to serve your customers, so their thoughts and opinions need to be at the core of your strategy.</p>
<h2 id="ps-can-we-send-you-an-email">P.S. Can we send you an email?</h2>
<p>Once a week or so we send an email with our best content. We never bug you; we just send you our latest piece of content. <a href="#subscribe">Subscribe Here</a>.</p>yashumittalNo one wants to hear bad news. Especially if it’s a customer complaint
https://i.imgur.com/2oDfxxT.jpg
How Websites Work?2017-06-01T06:30:00+00:002017-06-01T06:30:00+00:00https://blog.codecarrot.net/how-websites-work<p>We’ll run down the basics - without getting too technical, promise! - on web servers and domain names, what they do for you and how to find what you need to get started. Before that,</p>
<div class="callout">
Answer this quiz:
</div>
<p>Manish decided to launch the website, but he was not aware of the purchasing the domain name and hosting and only hire the developer for website development.</p>
<p>What do you think, is it important <strong>to get the domain name and hosting?</strong></p>
<h2 id="hosting">Hosting</h2>
<p>A website is your business’s home on the Internet. It’s where potential customers can come and learn about your business and what it has to offer them.</p>
<p>Let’s say you decide to open a bakery in the real world. First you’d have to rent a space to house it, right? A website is no different. Only you’re not renting space in a posh locality, you’re renting space on a server.</p>
<p>There are loads of services out there that take care of this automatically… but here’s a quick overview so that you have an idea about what’s happening behind the scenes. OK, hang with us, here comes a bit of technical information.</p>
<p>A server is a computer connected to the Internet, with software that allows it to store or “host” the pieces of your website: the code, the images, the video clips, and anything else that makes up your site.</p>
<p>It’s called a server because it ‘serves’ up the right content when requested - that is, when someone wants to view a page on your website.</p>
<p>There are many companies and services that will rent you space on a server and host your website. Think of it like a bricks and mortar shop, you pay an ongoing hosting fee, which is a bit like paying rent, leaving them to take care the technical aspects of running a server so you don’t have to.</p>
<p><img src="https://cdn.codecarrot.net/images/web-hosting-like-real-e-state.png" alt="Web Hosting like Real E-State" /></p>
<p><strong>Online real E-State</strong></p>
<p>Want an easy way to picture how your domain name and website work together? Real estate. Your website is your house, sitting on a piece of property with a street address. That property is known as your hosting account - the space on the Internet where you place the files that make up your website. People find those files (which you see as your website) by going to your online street address. This is your domain name.</p>
<p>Hosting puts your website on the internet. Once your domain name is registered you can <a href="//www.instamojo.com/codecarrot/cloud-hosting-plan/">buy cloud hosting</a> from CodeCarrot only at <strong>Rs.150/mo</strong>.</p>
<h2 id="internet-protocol-address">Internet Protocol Address</h2>
<p>Every single server in the world has its own address. This is called an IP address, which is short for internet protocol. All you need to know is, it’s a long string of numbers that means any device connected to the internet can talk to the server and find it.</p>
<p>Luckily, you don’t need to understand what they’re saying to each other, all you need to do is choose a nicer name to reference that numeric IP address. Which brings us nicely to the second part of this session - the web address, or ‘domain name.’</p>
<p>Your domain name is how potential customers will find you - the same way people would find our real world bakery: by the sign above its door.</p>
<p>It’s the thing you type into the browser window to get to any website. Like <a href="//www.codecarrot.net/">www.codecarrot.net</a> or www.yourbusiness.com. Let’s take a minute to break it down.</p>
<p>Everything after the ‘WWW dot’ is actually what’s known as the domain name. It’s the part that lets people find your website, so pretty important.</p>
<p>Any device that searches for this address - a tablet, a smartphone, a laptop - is communicating with the server. The server then sends that device all the correct pieces it needs to display the website - things like images and code - so that whoever is on the other end of the device can view your pages.</p>
<h2 id="domain-name">Domain name</h2>
<p>When someone types your web address into their browser, here’s what basically happens. First, their browser figures out which server holds the content, and heads over to that server.</p>
<p>The browser then says, “Hey, would you mind giving me all the elements I need to show a person this web page?”</p>
<p>The Server replies, “Sure, I’m sending along 5 images, 2 scripts, and a few additional files.” The browser puts all the pieces together, and the person sees your nicely formatted web page.</p>
<p>And that’s pretty much it, except they’d actually be talking in really confusing bits and bytes, not English. But that wouldn’t make any sense to us, so…</p>
<p><strong>To sum up:</strong> Deciding to build a website for your business starts with understanding how it all works together: A server ‘hosts’ your site, and a domain name helps people find it.</p>
<h2 id="ps-can-we-send-you-an-email">P.S. Can we send you an email?</h2>
<p>Once a week or so we send an email with our best content. We never bug you; we just send you our latest piece of content. <a href="#subscribe">Subscribe Here</a>.</p>yashumittalWe’ll run down the basics - without getting too technical, promise! - on web servers and domain names, what they do for you and how to find what you need to get started. Before that,
https://cdn.codecarrot.net/images/how-websites-work.jpg
What are hashtags and why you need to start using them on social media2017-05-30T06:30:00+00:002017-05-30T06:30:00+00:00https://blog.codecarrot.net/what-are-hashtags-and-why-you-need-to-start-using-them-on-social-media<p>Hashtags, hashtags, hashtags! You see them online, on just about every social network website. Sometimes you see them in abundance. Sometimes they’re silly, and sometimes they look like they serve a purpose. So, what are hashtags and why should you care?</p>
<p>In this article, you’ll find out what hashtags are, why you should start using them with your social media posts, and how to maximize your reach with them.</p>
<h2 id="what-are-hashtags">What are hashtags?</h2>
<p>Hashtags aren’t new. Hashtags are words or short phrases that are preceded by the symbol (#), which is most commonly known as the number sign. These terms are clickable, and allow you to identify specific topics.</p>
<p>If you’re one for official definitions and search for “what are hashtags” online, you’ll find this definition:</p>
<blockquote>
"On social-media websites, a word or phrase preceded by a hash mark (#), used within a message to identify a keyword or topic of interest and facilitate a search for it."
</blockquote>
<p>For example, in Twitter, under the hashtag <a href="https://twitter.com/search?q=%23codecarrot&src=typd">#codecarrot</a>, you can find out what people from around the world have been tweeting about that topic. This is also particularly handy for events or conferences, especially to track and document vital information such as what attendees, speakers and event organizers are talking about.</p>
<p><a href="https://twitter.com/search?q=%23codecarrot&src=typd"><img src="https://i.imgur.com/Tum7g2u.png" alt="Hashtags Twitter Example" /></a></p>
<p>With hashtags, you can use all lowercase, or even use camel case lettering, but no spaces. Hashtags are not case-sensitive. For example, if you want to use #CodeCarrot instead of <a href="https://twitter.com/search?q=%23codecarrot&src=typd">#codecarrot</a>, the term will still click through to the same topic stream.</p>
<h2 id="where-can-you-use-hashtags">Where can you use hashtags?</h2>
<p>You can use hashtags on most social networks like Facebook, Twitter, Instagram, Google Search, YouTube, Pinterest, Tumblr, Vine and Flickr.</p>
<p>Unfortunately, LinkedIn does not use hashtags, so if you’ve been using them, you probably should stop, as they are not really effective on that social network.</p>
<h2 id="why-should-you-use-hashtags-in-your-social-media-posts">Why should you use hashtags in your social media posts?</h2>
<p>You should use hashtags in your social media posts because they can be searched. If you’re trying to increase your reach, using hashtags will put your posts in the streams that people are searching for.</p>
<p>Crazy as it is, people are actually using social media to look for things that they can find on Google or Bing. In fact, many companies do use social media as part of their SEO strategy.</p>
<p>If you’re planning to sell your services or products, and are investing in advertising, you can optimize your ad with a couple hashtags to reach more people. It doesn’t cost anything to add hashtags. So why not give it a try?</p>
<h2 id="how-can-you-maximize-your-reach-by-using-hashtags">How can you maximize your reach by using hashtags?</h2>
<p>Maximizing your reach by using hashtags boils down to the fact that you need to do some research. Yes, it’s much like researching keywords for your website’s content. Make a list of terms, and look to see if that hashtag is trending or if it has a large enough volume of people using it. If you just add a hashtag all willy-nilly to your social media posts, you aren’t going to get as much reaction.</p>
<div class="callout">
Use hashtags responsibly
</div>
<p>While some people joke around and use hashtags frivolously, they are not always effective in increasing reach when used without any research. If you’re talking about blogging, use #blogging. If you’re talking about search engine optimization, use #SEO. You can use a couple hashtags, but make sure to keep them relevant to what you’re posting.</p>
<p>You can research hashtags with a few different tools. Here are just a few of the many tools out there that you can use to look up search terms, including hashtags, and plan your social media campaigns.</p>
<p><strong>Google Trends</strong></p>
<p><img src="https://i.imgur.com/r7WfWJh.jpg" alt="Google Trends" /></p>
<p>Google Trends allows you to search for just about any term, including hashtags. You can search based on location, by time, by category, and by type of search. So, you can look for specific hashtags that have been used in videos on YouTube, images, news, or even Google Shopping.</p>
<p>Plus, you can use Google Trends to figure out the best time to post using a particular hashtag. This is great because if a term is constantly trending during certain days or certain hours, you can schedule your posts for better reach.</p>
<h2 id="the-big-takeaway">The big takeaway</h2>
<p>The point is, you need to get on the wagon and use hashtags for social media. Yes, it might be as tedious as doing keyword research, but the end result is a return on investment - which means traffic, engagement and likely more money in your pocket.</p>
<p>Do you use hashtags for your social media marketing strategy? If so, what tips do you have to help others needing a helping hand in social media? What tools do you like to use when researching for the best hashtags for your campaigns? Please share in the comments!</p>
<h2 id="ps-can-we-send-you-an-email">P.S. Can we send you an email?</h2>
<p>Once a week or so we send an email with our best content. We never bug you; we just send you our latest piece of content. <a href="#subscribe">Subscribe Here</a>.</p>yashumittalHashtags, hashtags, hashtags! You see them online, on just about every social network website. Sometimes you see them in abundance. Sometimes they’re silly, and sometimes they look like they serve a purpose. So, what are hashtags and why should you care?
https://i.imgur.com/IviOOvo.png
How to improve webpack build performance by 95%2017-05-05T09:58:10+00:002017-05-05T09:58:10+00:00https://blog.codecarrot.net/how-to-improve-webpack-build-performance-by-95<p>If you are using frameworks such as react and redux, and webpack for the build process. No doubt you will face performance issues with the new tools and libraries adopted along the way.</p>
<p>TL;DR: You can try with multiple configurations to accelerate the webpack build performance for a webapp that supports 25 locales</p>
<ul>
<li>a single CPU
<ul>
<li>enabling caching on the babel-loader improves performance by <strong>26%</strong></li>
<li>enabling caching and parallel processing with uglifyjs-webpack-plugin v1 improves performance by <strong>45%</strong></li>
<li>NOT exporting an array of configurations from webpack.config.js improves performance by <strong>28%</strong></li>
</ul>
</li>
<li>10 CPUs
<ul>
<li>leveraging node.js Child Process API improves performance by <strong>67%</strong></li>
</ul>
</li>
</ul>
<p><strong>Result:</strong> build performance improved by <strong>95%</strong></p>
<h3 id="if-your-build-machines-have-limited-memory-dont-export-an-array-of-configurations-in-your-webpackconfigjs-file">If your build machines have limited memory, don’t export an array of configurations in your webpack.config.js file</h3>
<p>Webpack allows you to <a href="https://webpack.js.org/configuration/configuration-types/#exporting-multiple-configurations">export multiple configurations</a> as an array from the webpack.config.js file. Previously we were taking advantage of this feature to export an array of 25 configurations, one for each locale, so when we run webpack all 25 locales’ bundles are built at the same time.</p>
<p>This could be a useful feature if you only have a small set of configurations, however, in our case, it made the build process very <strong>memory intensive</strong> and unoptimized. Initially, we set the –max_old_space_size (memory limit) of the node process running webpack to 4GB, by doubling the limit to 8GB, we improved the performance by 50% (build time down from 3.35 hours to 1.7 hours).</p>
<p>However, with the same memory limit, when switched to running webpack on each configuration sequentially, we improved the performance by another 28% compared to processing multiple configurations at the same time.</p>
<h2 id="enable-caching-on-the-babel-loader">Enable caching on the babel-loader</h2>
<p><a href="https://github.com/babel/babel-loader#options">Babel-loader caching</a> can be easily enabled with the cacheDirectory option. With</p>
<div class="highlighter-rouge"><div class="highlight"><pre class="highlight"><code>loader: 'babel-loader?cacheDirectory
</code></pre></div></div>
<p>babel-loader caches its results in node_modules/.cache/babel-loader by default. After enabling caching with babel-loader we improved the build performance by another 26%. Although configurations vary among locales, most of the modules are the same. By enabling caching, expensive babel recompilations are avoided for subsequent locales being processed.</p>
<h2 id="the-new-uglifyjs-webpack-plugin-v1-makes-a-huge-difference">The new uglifyjs-webpack-plugin v1 makes a huge difference</h2>
<p>You’re probably already using the UglifyJS plugin that ships with webpack 3, <a href="https://webpack.js.org/plugins/uglifyjs-webpack-plugin/">webpack.optimize.UglifyJsPlugin</a>, either by adding it explicitly into the configuration or running webpack with -p flag. It is identical to uglifyjs-webpack-plugin v0.4.6, which has UglifyJS v2 at its core.</p>
<p>The new <a href="https://github.com/webpack-contrib/uglifyjs-webpack-plugin">uglifyjs-webpack-plugin</a> v1 uses UglifyJS v3 under the hood and is scheduled for webpack 4. Its new features such as multi-process parallel running support and caching capability improved the build performance significantly by 45%.</p>
<p>In order to use uglifyjs-webpack-plugin v1 today with webpack 3, you need to</p>
<ul>
<li>add “uglifyjs-webpack-plugin”: “1.0.1” to devDependencies</li>
<li>remove -p flag passed to webpack, to avoid uglifyjs-webpack-plugin v0.4.6 from running unnecessarily</li>
</ul>
<p>Then add the plugin with cache and parallel options enabled and you’re good to go!</p>
<div class="language-js highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="k">new</span> <span class="nx">UglifyJsPlugin</span><span class="p">({</span>
<span class="na">cache</span><span class="p">:</span> <span class="kc">true</span><span class="p">,</span>
<span class="na">parallel</span><span class="p">:</span> <span class="kc">true</span>
<span class="p">})</span>
</code></pre></div></div>
<h2 id="take-advantage-of-your-multi-core-build-machine">Take advantage of your multi-core build machine</h2>
<p>In case your build machine has multiple CPUs, you can take advantage of those for your webpack build by using node.js <a href="https://nodejs.org/api/cluster.html">Cluster</a> and <a href="https://nodejs.org/api/child_process.html">Child Process</a> API, or <a href="https://github.com/rvagg/node-worker-farm">worker-farm</a>. By enabling 9 webpack configurations being processed in parallel, we managed to shorten the build process for processing all 25 configurations by 67%.</p>
<p>Reliability is important for asset building, if you want to make sure that in case where build for a single locale fails, the entire build should fail loudly. Also, to prevent potential race conditions, you should disable babel-loader and uglifyjs-webpack-plugin cache options since multiple processes running in parallel are all trying to read/write to the file system simultaneously.</p>
<p>With <a href="https://github.com/rvagg/node-worker-farm">worker-farm</a>, the script for building all locales looks like the following</p>
<p><img src="https://i.imgur.com/hbYTJ40.png" alt="code snippet" /></p>
<p>Before you went with our own multi-core solution you should also try <a href="https://github.com/trivago/parallel-webpack">parallel-webpack</a> which promises to run webpack configurations in parallel, however it didn’t make much improvement to build performance. Having to work with another interface that’s slightly different from webpack is also undesirable.</p>yashumittalIf you are using frameworks such as react and redux, and webpack for the build process. No doubt you will face performance issues with the new tools and libraries adopted along the way.
https://i.imgur.com/WVkQCKM.png
How to Start Freelancing - 5 Steps to go from 0 to Rs.50,000 per month2017-04-30T06:30:00+00:002017-04-30T06:30:00+00:00https://blog.codecarrot.net/how-to-start-freelancing-earn-from-0-to-50000-per-month<p><img src="https://cdn.codecarrot.net/images/ultimate-guide-to-freelancing-jobs.png" alt="The ultimate guide to Freelancing Jobs" /></p>
<p>I think you’ll agree with me when I say:</p>
<div class="callout">
Earning money online is hard.
</div>
<p>You’ll come across fraudsters asking for registration fees & surveys/PTC sites which never pay you. Sometimes you might feel like you’re wasting your time, earning nothing. This is why you need to know about freelance jobs.</p>
<p>Freelance is where you solve a client’s problems or needs with your skills and get paid for it.</p>
<p>Here’s the best part:</p>
<ul>
<li>You never have to worry about whether you’ll be paid or not.</li>
<li>You don’t have to pay a single rupee to start earning.</li>
<li>and you’ll earn money by doing what you’re good at.</li>
</ul>
<p>This is the basic idea of <strong>how freelancing works:</strong></p>
<ol>
<li>A client posts a task on a freelance site.</li>
<li>You apply for the task telling the client why you’re suitable for the task.</li>
<li>He/she review’s your profile and selects you.</li>
<li>You complete the task.</li>
<li>You get paid.</li>
</ol>
<p>Freelancing has helped thousands of people make extra income, working from their home. Many even quit their jobs once they start earning a steady stream of income via freelancing. After reading this post, you’ll know how to start freelancing in the field you’re skilled in.</p>
<p>Freelancing is perfect for people who are skilled at something.</p>
<p>But, even if you don’t have any skills right now, you can learn the skills needed for the field you’re interested in.</p>
<p><strong>Follow the step-by-step process to get started:</strong></p>
<h2 id="step-1-choose-the-field-you-want-to-work-in">STEP 1: Choose the field you want to work in</h2>
<ol>
<li>You can <strong>choose any fields</strong> you want to work in.</li>
<li><strong>Select the field in which you are most skilled</strong> or experienced in. (or simply select a field which you’re interested.)</li>
<li><strong>See if you can complete some of them</strong>. If you find that you can do it, proceed to the next step.</li>
</ol>
<p>If you’re still not able to find anything suitable for you, consider learning the skills required for the jobs you like to do. Know that, everything and anything you want to learn is a search away.</p>
<h2 id="step-2-prepare-your-profile">STEP 2: Prepare your profile</h2>
<p>Found tasks you can complete?</p>
<p>Yes?</p>
<p>Great! Now you can start creating your profile.</p>
<p>Nearly all clients, who are interested in working with you, will check out your profile page to evaluate you.</p>
<p>So you’ll need to make it attractive to land more projects.</p>
<p>To get some ideas & inspiration for building your profile, take a look at other freelancer’s profiles in your field.</p>
<p>Most people are lazy and write only 2 or 3 lines in their description. Such kind of profiles rarely gets hired. So this is your chance to get an easy advantage by not being lazy and win more jobs.</p>
<p><strong>The following are the things that should be in your profile:</strong></p>
<ul>
<li><strong>Your photo</strong>: A high quality smiling headshot of yourself.</li>
<li><strong>A Professional Title</strong></li>
<li><strong>Overview:</strong> List your competitive advantages & strengths (i.e. things that make you unique or special). Try to write everything from client’s perspective. For example: Say what the client will get by hiring you, how will you will solve their problem?; etc. Strictly avoid typos and grammatical errors.</li>
<li><strong>Hourly rate:</strong> Select your hourly rate based on other freelancers in your field.</li>
<li><strong>Portfolio (very important):</strong> Upload some of your work samples you’ve created in the past.</li>
</ul>
<p>If you don’t have any samples to show, start creating it now. It doesn’t have to be the work that you did for clients. It can be something which you did for practice also.</p>
<p><strong>For example:</strong> If you’re a writer, you simply can write an article and add it to your portfolio; or if you’re a designer, you can create a logo for an imaginary company and upload the image.</p>
<p>Don’t worry about making your profile perfect yet. You can tweak it over time.</p>
<p>Once you’re done, submit all your details to CodeCarrot team for development of your website and choose the free plan.</p>
<p>After you submit your details, CodeCarrot team will start developing your website. It usually takes about 1-2 working days.</p>
<p>While you wait for approval and development of website, try taking a few skill tests to make your profile even more attractive.</p>
<h2 id="step-3-sharepromote-your-website">STEP 3: Share/Promote your website</h2>
<p><img src="https://cdn.codecarrot.net/images/share-and-refer.gif" alt="Share and refer your website to others" /></p>
<p>Once your website is developed and live, it’s time to share and promote it. So, that your website can come under the notice by the clients.</p>
<p>This can be done by sharing the website link social media or creating paid ads.</p>
<h2 id="step-4-giving-your-first-proposal">STEP 4: Giving your first proposal</h2>
<p>Now comes the exciting part: <strong>Giving proposal</strong></p>
<p>Since you’ll be competing with other freelancers, your proposal is easily the most important factor in winning the job.</p>
<p>A proposal is where you tell the client why you’re suitable for the job and the price at which you can do it for.</p>
<p>Before you give your proposal, it’s very important to understand the biggest concern on every client’s mind when hiring. It is this:</p>
<blockquote>
"Can you deliver?"
</blockquote>
<p>or</p>
<blockquote>
"Do you have the ability to do what the job requires?"
</blockquote>
<p>So it is very important to address the client’s needs in your proposal. Tell the client you can get the results that he is looking for.</p>
<p>Clients are smart enough to know the difference between a proposal written specifically for them, and a proposal that was copy-and-pasted.</p>
<p>Most people use a generic copy-pasted robotic cover letters. So stand out from them by personalizing your proposal as much as possible.</p>
<p><strong>Here are some tips & tricks to write a better proposal & win your first project:</strong></p>
<ul>
<li>
<p><strong>Ask questions:</strong> Ask good questions if some information is missing from the job description. This lets the client know that you are knowledgeable and can execute the job correctly.</p>
</li>
<li>
<p><strong>Show you’re a good listener:</strong> If the client has asked any question, answer them in your proposal.</p>
</li>
<li>
<p><strong>Provide similar samples:</strong> Add a link to your work sample which is relevant to the job. Share only your best works.</p>
</li>
<li>
<p><strong>Tell them you’re new & give a discount:</strong> Since you’re new, it is actually better to tell the client that this is your first time even though you have a good experience in the field. Also mention you are willing to give a discount since he/she will be your first client.</p>
</li>
<li>
<p><strong>Use speed to your advantage:</strong> When you’re trying to get your first job, speed is your weapon. Try to bid on the project as soon as it’s posted and get the conversation started with the employer. The trick is to impress the client before everyone else bids. Keep refreshing your Job Feed page and wait until a project shows up that matches your skills.</p>
</li>
<li>
<p><strong>Keep it short:</strong> Keep your proposal short and to the point. Minimize talking too much about yourself and focus on what the client will get from hiring you. Talk about how you’re going to approach the job.</p>
</li>
<li>
<p><strong>Show your enthusiasm:</strong> Let the person know you want to start the project soon. Example: Tell the client you can start working on the project as soon as he/she picks your bid.</p>
</li>
<li>
<p><strong>Include time estimation:</strong> Tell the client how fast you can complete the job.</p>
</li>
</ul>
<p>Try to do quick jobs that are easy to complete in a short period of time. This will help you get feedback quickly.</p>
<h2 id="step-5-how-to-choose-your-pricing">STEP 5: How to Choose Your Pricing?</h2>
<p>When you’re choosing your price for the job, never give the impression that you’re a cheap freelancer.</p>
<p>Every client wants their project to get the best results. If you bid too low, he/she will think you’re desperate to get the job and won’t provide the same quality as other freelancers.</p>
<p>Bidding low prices will only attract small and petty clients who are better to be avoided.</p>
<p>Therefore when you start, I recommend bidding the average market rate for the job (under the client’s budget). You can also strategically place your bid slightly below the average bid. Also try using the discount trick as stated above.</p>
<p>Do a research on your market and get an idea of the average market rates for the job.</p>
<p><strong>After submitting your proposal:</strong> If a client responds to your proposal, always try to reply as quickly as possible. In general, try to be online as often as you can if you are looking for your first job.</p>
<h2 id="step-6-preparing--setting-expectations">STEP 6: Preparing / Setting expectations</h2>
<p>When a potential client is interested in you, some might want to talk/chat with you before they give you the job.</p>
<p>A lot of clients use video chat for this purpose, so make sure it’s installed on your computer.</p>
<p><strong>Choosing Your Payment Terms</strong>
<strong>Once you’re hired</strong> it’s recommended to clarify your payment terms and the work you’ll be delivering to the client.</p>
<p>Before you start working, make sure the client has made the advance payment according to work. If not tell the client that you can start working only after he/she has made an advance payment.</p>
<p>Also agree on the things you’ll be delivering to the client (these are called ‘deliverables’). For example, a logo, a 500-word article, etc are deliverables.</p>
<p>Specify the limits for the work, such as the number of words in the article.</p>
<p><strong>For large projects:</strong> Before any work begins, you and your client should break up the work into small parts (called milestones) and decide how much should be paid for completion of each milestone.</p>
<p>For example, if the job requires you to write 5 articles, make each article as a milestone and ask the client to release funds on completion of each article separately.</p>
<p><strong>For small projects:</strong> It’s okay to work without on advance payment on one condition: The client should have a good rating & feedback from other freelancers. If the client is new, do not agree to work without the advance payment.</p>
<p><strong>Be clear on what the client wants:</strong> Use a any word processor and allow the client to list all the features they want. Specify the limits such as the number of words for article.</p>
<p>Clearly identify things which you cannot do and tell the client which features will cost more.</p>
<p>This way if the client is asking for more than agreed, you can clearly show them and request additional payment for extra features they’re asking for.</p>
<h2 id="step-7-youre-hired-go-do-an-awesome-job">STEP 7: You’re Hired: Go do an awesome job</h2>
<p><img src="https://cdn.codecarrot.net/images/handshake-between-two-party.jpg" alt="Check before you accept the Job" /></p>
<p><strong>Check before you accept the Job</strong></p>
<p>Once you find a job you like and interested to work then you can accept the job.</p>
<p>But when it comes to accepting the job, success is a two-way street. It is not only yours’ job to match the required of the client, however, but also the client’s job to match themselves to a position that they know they will like.</p>
<p>Once you start working, communicate with the client & keep them updated.</p>
<p>Your goal should be the client’s satisfaction because that will highly increase your chance of getting more work in the future.</p>
<p>Remember, your online reputation is a major driver in growing your business.</p>
<p>So be sure to go the extra mile to do a great job to get good feedback.</p>
<p><strong>PRO Tip:</strong> After you complete the job & the client is satisfied, ask for more projects & referrals. Tell the client about other services you provide.</p>
<h2 id="ps-can-we-send-you-an-email">P.S. Can we send you an email?</h2>
<p>Once a week or so we send an email with our best content. We never bug you; we just send you our latest piece of content. <a href="#subscribe">Subscribe Here</a>.</p>yashumittal
https://cdn.codecarrot.net/images/start-freelancing-work.png
Why you should have a personal website?2017-03-02T06:30:00+00:002017-03-02T06:30:00+00:00https://blog.codecarrot.net/why-you-should-have-a-personal-website<p>It’s a fact. If you don’t manage your online image, it will manage you. Remember those embarrassing pics and videos you posted on Facebook. Your parents saw them next day. That late night party tweet? Bet you wish you could take that one back. But for many people, this issue gets real when they decided to look for a job. That’s when they decided to look for a job. That’s when they realize they have to control what potential employers see about them online. And there’s no better way to do it than with a personal website.</p>
<p>I’m a great believer in the power of a website to promote a brand.</p>
<p>But you don’t have to be a multinational company to benefit from the promotional power of the web. Anyone who wants to make an impression online - whether it’s to land a sweet new job, promote a pet project, or just connect with like-minded netizens - can do it with a personal website.</p>
<p><img src="https://cdn.codecarrot.net/images/lady-working-illustration.png" alt="Why you should have a personal website?" /></p>
<h2 id="beyond-social-media">Beyond Social Media</h2>
<p>Let’s say you have a kick-ass social media profile. Do you <em>really</em> need a personal website? “Yes”.
Why?</p>
<blockquote>
"The more pieces of original work you have to show, the more important it is to have your own site. If someone is claiming to be an expert in something, I want to see the evidence."
</blockquote>
<p>Yes, you can attach documents, photos, videos and slides to your social media profile, but you’re limited in how many files you can upload. And you can’t include customer testimonials - a must for independent contractors looking to get hired.</p>
<h2 id="benefits-of-a-personal-website">Benefits of a personal website</h2>
<p>According to Forbes, more than half of all hiring managers are more interested in personal websites than any other branding tool. A custom website gives you free reign over what’s on it, so of course a headhunter would expect it to provide the best view of your personality, skills and experience.</p>
<p><strong>Having your own personal website:</strong></p>
<ol>
<li>Gives you complete freedom to show who you are, in everything from colors to layout to the type of imagery you choose.</li>
<li>Shows you’re serious about your career and willing to put in time and effort to move up.</li>
<li>Serves as a living archive of your job history, education, accomplishments and hobbies.</li>
<li>Can feature customer testimonials, as well as numerous pictures, project documents and videos.</li>
</ol>
<p>Running a business while also looking for a job? Having a separate website for your job search just makes sense. That way, clients won’t be confused by seeing a resume and recruiting managers are never presented with a shopping cart.</p>
<h2 id="its-all-starts-with-a-domain-name">It’s all starts with a domain name</h2>
<p>Getting a Personal website all starts with a domain name. Behind every website, there’s a domain name. I like to think of it this way: Just as we give friends our street addresses so they can find our houses, we give people our domain names to help them locate our websites. It’s what they type into their browser bar to find us online. Only in this case, the real estate’s virtual.</p>
<p>There are many domain provider out there in the market.</p>
<h2 id="then-the-fun-begins">Then the fun begins</h2>
<p>Once you’ve found your domain name, the next step is to build a website. There are many website building tools out in the market for building websites.</p>
<p>It’s not always you have time or talent to build one, that’s why <strong>CodeCarrot</strong> comes in as a Web and Mobile Application Developer. Providing <a href="//www.codecarrot.net/">website development service</a>.</p>
<p>It’s a mobile world, so make sure the website you end up with will be viewable on mobile devices like smartphones and iPads. Nothing turns visitors away faster than a website that’s hard to see or use on the device they happen to be using at the moment.</p>
<p>Once your website is live, show it off! Add your web address to your business card, resume, email signature and social media profile. Keep your site up to date, even after you’ve landed the new job. You never know when a hiring manager might be looking for someone like you to fill an even better position.</p>
<p>Do you also <a href="//www.codecarrot.net">want a website</a> for yourself? Get a successful project with <a href="//www.codecarrot.net">Codecarrot</a>.</p>yashumittalIt’s a fact. If you don’t manage your online image, it will manage you. Remember those embarrassing pics and videos you posted on Facebook. Your parents saw them next day. That late night party tweet? Bet you wish you could take that one back. But for many people, this issue gets real when they decided to look for a job. That’s when they decided to look for a job. That’s when they realize they have to control what potential employers see about them online. And there’s no better way to do it than with a personal website.
https://cdn.codecarrot.net/images/have-a-personal-website.jpg
20 Sublime Text Plugins for Pro2017-03-01T10:52:30+00:002017-03-01T10:52:30+00:00https://blog.codecarrot.net/20-sublime-text-plugins-for-pro<p>In a few short years, <a href="https://www.sublimetext.com/">Sublime Text</a> has evolved as the development tool of choice for serious and casual programmers alike, alongside Code and Atom. It is freemium, lightweight, cross-platform compatible and endless customization options.</p>
<p>One reason for Sublime Text’s popularity is its large library of plugins. Installation is as easy as placing the plugin in the packages directory.</p>
<h2 id="1-package-control">1. <a href="https://packagecontrol.io/">Package Control</a></h2>
<p>Installing a Sublime Text plugin is not difficult, but it certainly a time-consuming process.</p>
<p>The Sublime Text package manager that makes it exceedingly simple to find, install and keep packages up-to-date by putting a right inside Sublime.</p>
<p>Use it to quickly find and install the right plugin automatically, without ever leaving Sublime.</p>
<h2 id="2-sublime-git">2. <a href="https://sublimegit.net/">Sublime Git</a></h2>
<p>Sublime Git is a full-featured Git plugin. This plugin places the power of Git right inside Sublime Text. Instead of switching back and forth from terminal to editor, use this plugin for Git commands, from creating new branches to commiting files..</p>
<h2 id="3-sidebarenhancements">3. <a href="https://github.com/titoBouzout/SideBarEnhancements">SideBarEnhancements</a></h2>
<p>This plugin provides enhancements to the operations on Sidebar of Files and Folders, adding useful options, such as: new file/folder, edit, open/run, reveal, find in selected/parent/project, cut, copy, paste, paste in parent, rename, move, delete, refresh and many others. You can set up your own shortcut keys for each of these commands.</p>
<h2 id="4-githubinator">4. <a href="https://github.com/ehamiter/ST2-GitHubinator">GitHubinator</a></h2>
<p>This plugin automatically search the selected lines and shows you if the code exists on a GitHub or BitBucket repository? Without opening any new browser windows.</p>
<p><img src="https://i.imgur.com/vBUciTH.png" alt="GitHubinator Image Example" /></p>
<h2 id="5-focus-file-on-sidebar">5. <a href="https://github.com/miguelgraz/FocusFileOnSidebar">Focus File on Sidebar</a></h2>
<p>Sublime Text has two options regarding its sidebar: <code class="highlighter-rouge">Toggle Side Bar</code> and <code class="highlighter-rouge">Reveal in Side Bar</code>, people want to browse their files tree right on the opened file’s folder, which isn’t possible with those two options alone. Focus File on Sidebar gives you another option to <code class="highlighter-rouge">Focus</code>. It allows to open sidebar and move focus right to the opened file’s place on project’s tree.</p>
<h2 id="6-ctags">6. <a href="https://github.com/SublimeText/CTags">CTags</a></h2>
<p>This plugin provides support for working with tags generated by Exuberant CTags. The ctags command is searched for on the system PATH. It works by doing a binary search of a memory-mapped tags file, so it will work efficiently with very large <em>(50MB+)</em> tags files if needed.</p>
<h2 id="7-coffeescripthaml">7. <a href="https://github.com/jisaacks/CoffeeScriptHaml">CoffeeScriptHaml</a></h2>
<p>Sublime Text doesn’t have a good support with with <a href="https://github.com/netzpirat/haml-coffee">.hamlc files</a>. Installing CoffeeScriptHaml will do all the syntax highlighting all the <code class="highlighter-rouge">.hamlc</code> files.</p>
<h2 id="8-gitgutter">8. <a href="https://github.com/jisaacks/GitGutter">GitGutter</a></h2>
<p>While working on a Git repository it difficlt to figuring out whether a specific line has been modified or not.</p>
<ul>
<li>GitGutter places an icon indicating inserted, modified or deleted lines</li>
<li>diff popup with details about modified lines</li>
<li>status bar Text with information about file and repository</li>
<li>goto change to easily navigate between modified lines</li>
</ul>
<p><img src="https://i.imgur.com/kXgIait.gif" alt="GitGutter Image Example" /></p>
<h2 id="9-dashdoc">9. <a href="https://github.com/farcaller/DashDoc">DashDoc</a></h2>
<p>DashDoc provides integration of <a href="http://kapeli.com/dash">Dash</a> <em>(on OS X)</em>, <a href="https://zealdocs.org/">Zeal</a> <em>(on Linux)</em> and <a href="https://zealdocs.org/">Zeal</a> or <a href="https://velocity.silverlakesoftware.com/">Velocity</a> <em>(on Windows)</em> into Sublime Text to work with lots of APIs.</p>
<h2 id="10-bracket-highlighter">10. <a href="https://github.com/facelessuser/BracketHighlighter">Bracket Highlighter</a></h2>
<p>Every programmer knows the pain of manually matching brackets on every line of code. Bracket Highlighter matches a variety of brackets such as: <code class="highlighter-rouge">[]</code>, <code class="highlighter-rouge">()</code>, <code class="highlighter-rouge">{}</code>, <code class="highlighter-rouge">""</code>, <code class="highlighter-rouge">''</code>, <code class="highlighter-rouge">#!xml <tag></tag></code>, and even custom brackets.</p>
<p><img src="https://i.imgur.com/L9Yit9z.png" alt="Bracket Highlighter Image Example" /></p>
<h2 id="11-glue---a-terminal-for-sublime-text">11. <a href="/glue-a-terminal-for-sublime-text">Glue - A Terminal for Sublime Text</a></h2>
<p><a href="/glue-a-terminal-for-sublime-text">Glue</a> is a plugin that provides an interface to your shell from the Sublime Text. It features command entry within the Sublime Text editor window, standard output display in an editor view, and it works with most system utilities. This includes any compiled or interpreted source that you develop which effectively allows you to create Sublime Text extensions in any programming language that your system supports.</p>
<h2 id="12-sassscss">12. <a href="https://github.com/MarioRicalde/SCSS.tmbundle">SASS/SCSS</a></h2>
<p>SASS/SCSS takes CSS syntax to the next level. It is an expanded version that includes all the CSS features plus Sass features. Semi-colons and brackets are still used, but you don’t have to worry about indentation or white spaces.</p>
<h2 id="13-search-stack-overflow">13. <a href="https://github.com/ericmartel/Sublime-Text-2-Stackoverflow-Plugin">Search Stack Overflow</a></h2>
<p>Simple search on Stack Overflow utility for Sublime Text 2</p>
<p>If you do a lot of searches on StackOverflow, then we got a helping hand for you a plugin name <strong>Search Stack Overflow</strong> it will find exactly what you are looking for on StackOverFlow.</p>
<h2 id="14-sublimelinter-ruby">14. <a href="https://github.com/SublimeLinter/SublimeLinter-ruby">SublimeLinter-ruby</a></h2>
<p>This linter plugin for SublimeLinter provides an interface to linting via ruby -wc. It will be used with files that have the “Ruby” syntax.</p>
<h2 id="15-sublime-rubocop">15. <a href="https://github.com/pderichs/sublime_rubocop">Sublime RuboCop</a></h2>
<p>This plugin runs Ruby based style guide and checks RuboCop on your Ruby files in the editor. It will mark issues right inside the view but it can also be called as a “compiler” from the ST menu.</p>
<h2 id="16-rspec">16. <a href="https://github.com/SublimeText/RSpec">RSpec</a></h2>
<p>RSpec is a Behavior Driven Development (BDD) testing framework designed for Ruby that makes Test Driven Development (TDD) easier, specify Ruby apps and contains plenty of snippets and syntax highlighting. Although this problem is no longer maintained, feel free to improving this plugin by creating an issue.</p>
<h2 id="17-jsformat">17. <a href="https://github.com/jdc0589/JsFormat">JsFormat</a></h2>
<p>JsFormat is a javascript formatting plugin. All settings can be customized to suit your needs. It uses jsbeautifier to format whole js or json files, or the selected portion(s).</p>
<h2 id="18-nettuts-fetch">18. <a href="https://github.com/weslly/Nettuts-Fetch">Nettuts+ Fetch</a></h2>
<p>Fetch the latest version of remote files and zip packages</p>
<p>It automatically pull the latest version of a remote file and zip packages.</p>
<h2 id="19-sass-textmate-bundle">19. <a href="https://github.com/nathos/sass-textmate-bundle">Sass textmate bundle</a></h2>
<p>This add-on adds syntax highlighting and tab/code completion for Sass and SCSS files. It features Zen Coding shortcuts for many CSS properties, making you look like some kind of stylesheet wizard to everyone around you. You’ve got to like that.</p>
<h2 id="20-custom-themes">20. Custom Themes</h2>
<p>It is not exactly a ‘plugin’, custom themes can improve the UI of your text editor. Many authors have created themes for Sublime Text, you’ll find plenty of <a href="https://packagecontrol.io/browse/labels/theme">custom themes online</a>.</p>
<p>There are many other plugins ranging from the simple to the complex. Once you incorporate them into your workflow, you will see a massive boost in your productivity.</p>yashumittalIn a few short years, Sublime Text has evolved as the development tool of choice for serious and casual programmers alike, alongside Code and Atom. It is freemium, lightweight, cross-platform compatible and endless customization options.
https://i.imgur.com/1ZJIEXn.jpg
Welcome to CodeCarrot Blogs2017-02-25T06:30:00+00:002017-02-25T06:30:00+00:00https://blog.codecarrot.net/welcome-to-codecarrot-blogs<iframe src="https://anchor.fm/codecarrot/embed/episodes/Welcome-to-CodeCarrot-Blogs-e1oi7k/a-a492ir" height="102px" width="100%" frameborder="0" scrolling="no"></iframe>
<hr />
<p>We are very excited to announce the launch of <strong><a href="/">CodeCarrot blog</a></strong>, an Agile team with excellent track record & great communication skills. We love Web and mobile application development! Ping us!</p>
<p>More than half of the population of the world is doing business online, whether it’s a industrial business or selling handmade stuff in the market.</p>
<p>You won’t believe that every search Google process more than <strong>40,000 search queries</strong>. But point is if your business doesn’t have any online presence how will people will came to know about your business.</p>
<p>That’s right you need a website?</p>
<p>We believe that your business should also own a space in the virtual world, where your website comes into existence and works as a shop for selling your products and services on your behalf.</p>
<h2 id="ps-can-we-send-you-an-email">P.S. Can we send you an email?</h2>
<p>Once a week or so we send an email with our best content. We never bug you; we just send you our latest piece of content. <a href="#subscribe">Subscribe Here</a>.</p>yashumittal
https://i.imgur.com/wEk87yc.png