Friday, March 24
Why to choose yarn over npm!
Since the domination of Javascript over web began, we developers have been creating and using modules or packages in our projects which make our lives easier.
Packages save us from "reinventing the wheel" and allow reusability in code.
These packages come with their own set of dependencies (other files or libraries that the package requires to function) which may be either flat i.e. just one package or nested dependency - package requiring another package as dependency and so on.
To easily handle packages and their dependencies we have package managers. These allow packages to be installed along with their dependencies and free up our To-Do list of effort required to manage them.
In Javascript we have "package.json" a file we keep track of all packages required for project.
Until now, npm has been the de-facto package manager to be used in Node projects till Facebook introduced us to yarn. Yarn has been gaining a lot of traction mainly in projects using ReactJS.
So let's see the comparison between the two.
npm
npm commands follow the following structure:
npm <command> [args]
npm initTo install all dependencies from package.json -
npm installTo install a specific package -
npm install <package-name>Example: npm install express
A specific version can be installed by -
npm install [package-name]@versionTo uninstall a package -
npm uninstall [package-name]
Yarn
Apart from doing what npm does, yarn outsmarts npm by caching packages that are downloaded once on a system, so you don't have to re-download whole package tree every time you setup. Yarn also parallelises operations to maximize resource utilisation so install times are faster.
Usage
brew install yarnTo initialise a project by creating package.json file -
yarn initTo install all dependencies from package.json -
yarn installTo install a specific package -
yarn add [package-name]To uninstall a package -
yarn remove [package-name]
Advantages of Yarn over npm
1. Yarn has Security-centric design and verifies integrity with checksums for every package installed before execution.2. We can install packages from either bower or npm without any hassle.
3. Yarn uses lockfile for locking all dependencies following deterministic approach in package management, i.e. for same package.json all machines will all have same source tree of dependencies installed in their node_modules folder.
4. npm is non-deterministic package manager, which doesn't guaranteed lockfile, and deterministic algorithm for installs.
5. By using yarn we may stay assured that an working install on one system will work exactly the same way on any other system.
6. We can selectively upgrade specific packages using "yarn upgrade-interactive"
7. Yarn is network resilient, so install won't fail because of a single failed request. Failed ones are retried later on.
Sunday, July 17
Facebook’s new ‘Happening Now’ feature is a fail
It was just few days back that we informed you about Facebook’s new ‘Happening Now’ feature that Facebook team planned to roll out (as a testing feature) for limited amount of users. Guess what? The idea of Facebook for testing and launching this ‘Happening Now’ feature is extremely opposed by the large number of people using Facebook.
In previous post of ‘Happening Now’ mentioned Facebook’s statement about its new feature, which says:
Sunday, July 10
Facebook introduces new and easier way to tag your friends in a post
Mark Zuckerberg and his team always comes up with some new exciting and mind-boggling features for Facebook audience. Today, Facebook team via their Official Twitter account has reported a new surprising feature which helps a Facebook user to tag his/her friends in an entirely different manner inside a Facebook post.
Previously, Facebook users were able to use this feature by typing the ‘@’ sign followed by a friend’s name, but now there is no need of ‘at sign’ for tagging friends in a post, by the introduction of this new feature a user can tag a friend by simply writing his/her name and selecting it from the drop down menu. The picture below will guide you in 3 easy steps on how it actually works: Step 1: Type your friends name starting with a capital letter: for example ‘Jeff’ instead of ‘jeff’. (Note: If you begin writing a friend’s name with a small letter, then this feature will not be able to display you the drop-down list of friends) Step 2: Select the friend you want to tag from the drop-down menu and press right click or enter button:Following this step will create a hyperlink to the selected friend’s profile in your post. (Note: There is no limit of tagging friends in a post, which means you can tag as many friends as you want, until you reach the character limit) Step 3: Shorten your friend’s name: Now this is something unique, the feature let you erase the first name or last name from the tag – for example, you tagged Jeff Kanter, now you can either keep ‘Jeff’ by removing Kanter or alter it other way around by saving the tag as ‘Kanter’ and deleting Jeff. However, this new feature is not been introduced in Facebook app for Android, iPhone and other Smartphones. Let us know if you would like developers to add this feature in Facebook application for Smartphones and Tablets by Commenting in the Box below.
Tuesday, July 5
Facebook reportedly taking Skype relationship further with video chat
Though Facebook was ultimately not in the mix to buy Skype, the relationship is still going strong and will reportedly result in Skype’s video chat service finally coming to Facebook next week.TechCrunch reports that Facebook’s“awesome” announcement July 6 will include word that desktop Facebook users will be able to conduct video calls via Skype. The details are little hazy about how it all comes together and whether Facebook users will need to download the Skype client for the computer, but TechCrunch said it will be an in-browser experience for users. If true, it makes a lot of sense and is something we’ve talked about before during speculation about a potential acquisition or partnership. Facebook has been growing as a communications service, with its unified inbox and its instant messaging service. And it has been looking to branch out with its purchase of messaging app Beluga and its commenting plugin. Integrating Skype will allow it to take the next step in interaction, which is increasingly turning to video chat. Apple has helped accelerate video chat with its FaceTime technology, and now video conferencing is becoming a crowded market. By getting on board with Skype, Facebook can also blunt some of the advances of Google+, which has a slick group video chat feature called Hangouts. Om remarked at the Google+ launch that Hangouts could bring Skype to its knees. Combining with Facebook could help avoid that fate. It’s unclear if Skype on Facebook would include free group video chats, which is a premium feature on Skype, but it could easily be an option. Skype service could also be a big boost for Facebook’s mobile app if the service is eventually integrated. Video chat integration would further strengthen Skype and Facebook’s relationship. Skype has added Facebook integration into its software, allowing people to instant message, tap their Facebook contacts and “like” or comment on a friend’s Facebook status. That allowed Facebook to appeal to Skype’s base, which currently numbers 170 million connected users. By getting onto Facebook’s platform and reaching its more than 700 million users, Skype can further realize its larger ambitions to be on all screens, from mobile to TV sets. Together, they can keep users from spending time on other sites and services. This becomes more important with competition from Google, which has the potential to tie up more user time with Google+ in combination with its existing properties. With Skype now a Microsoft property, there’s additional logic to a partnership with Facebook, which Microsoft has a small stake in. Together, all three are better positioned to contain Google as it continues to grow. We still have to see if this pans out, but again, this seems like a logical and expected step. By bringing Skype into Facebook, it lets both get what they want. And it shows that Facebook didn’t have to buy Skype to get what it needs.
Monday, July 4
Hulu halts Facebook Connect after exposing user data
Updated. Hulu’s Facebook Connect integration apparently isn’t going as planned. The ability to log in is offline as of this writing, with many people reporting issues with the sign-in option earlier today. According to some, those issues led some users to be signed in to other people’s Hulu accounts, exposing their user account data in the process.
Friday, July 1
Facebook to launch ‘something awesome’ next week: Zuckerberg
Thursday, June 30
SOCIAL NETWORKING: IS YOUR CHILD AN ADDICT?
From being just a fad, Facebook has grown to the point where users are being afflicted with FAD (Facebook Addiction Disorder). And children are as vulnerable as adults.
A standard nine student of a reputed city school had to miss a term because he was in depression. He would make up excuses to miss school, grew listless and would spend a lot of time locked up in his room. Concerned by his behavior, his parents took him to a psychologist and that’s when he divulged the cause of his angst. They found out that his depression was not due to academics, but because his friends from school had taken to teasing him about his weight on a social networking site. After sessions of counseling, coupled with intervention on the part of the school teachers, he finally came out of his depression.
A matter of great concern was that he was targeted on a social networking site, which is a public forum. This is not a one-off occurrence; many such incidents have come to light in recent years on social networking sites, and looking at the ever increasing number of kids signing up at social networking sites, it will be a serious issue in the coming years.
Saturday, June 25
New Facebook App to Notify Users about Malicious Content
At a time when the virtual space, especially social networks are rife with spam attacks, and hackers on the loose, an attempt by a bunch of students surely seems to be a force to reckon with.
Students belonging to the University of California’s graduate class, Md. Sazzadur Rahman and Ting-Kai-Huang, and a company run by the school’s alumnus, put their heads together and developed a free Facebook application called MyPageKeeper.org, which the founders claim is capable of detecting spam, malware that are found on the walls, and news feeds of the user’s Facebook account. The app, according to the founders aims at delivering real-time protection from viruses, spam to the users. Web protection service, StopTheHacker.com encouraged the construction of the app.
The recent spate of malware attacks on Facebook, and other web domains have given more than enough reasons for attempts like these. Facebook, at present has over a staggering 700 million members, and miscreants have found it to be a place where it was easy to target people into letting spam into their profiles. Contradicting this, MyPageKeeper.org once installed into one’s profile, begins actively scanning the user’s wall posts, news feeds to see if any malicious content was posted. If found any, the app would immediately notify the user of the same and prompt him to remove the malicious content. The app, for now can be downloaded for free offwww.MyPageKeeper.org. Although just recently started, the app already has won the confidence of several users.


