- Javascript 12
- Rails 11
- Golang 10
- Architecture 9
- Security 9
- Elixir 8
- Ruby 7
- Blog 4
- Git 4
- RubyGem 4
- Rust 3
- Technology 3
- Gem 2
- Mongodb 2
- SEO 2
- AI 1
- Automation 1
- Avataree 1
- CLI 1
- CheatSheet 1
- Database 1
- Gravatar 1
- HTTP2 1
- IoT 1
- JavaScript 1
- Management 1
- Methodology 1
- Motivation 1
- OperatingSystems 1
- Plugin 1
- Process 1
- Rails3 1
- Ruby19 1
- Server 1
- Sinatra 1
- url_shortener 1
Javascript
An introduction to Bun.sh (Another JavaScript Runtime)
What’s new in ECMAScript 2022 (Javascript)
ECMAScript 2022 is the going to be released soon. Here are some new features that have been incorporated and could be used in javascript in upcoming time.
An Introduction to Deno
A secure runtime for JavaScript and TypeScript. — by (Deno.land)[https://deno.land/]
Using React’s new Effect Hooks
React has added a new feature named Effect Hooks. So what’s the effect hooks and why were they needed. Effect Hooks allows programmer to use some of the React’s class properties (state and others) without actually extending it, in function component. React class comes with a lot of features but mostly we need is state, props and side effect functions (e.g componentDidMount
, componentDidUpdate
and componentWillUnmount
)
What’s new ECMAScript 2017
Two years ago when ECMAScript 2015 (colloquially known as a ES6) was standardized there was a massive update to the language. Announced at the same time was a yearly release plan that aims to deliver a new version of the language annually and ship it with the proposals that are ready at the time of the TC39 meeting. The list of language improvements is open and you can track it on the TC39 Github account. Following are some noticeable changes in 8th edition or es8 or ECMAScript2017
Promises in ES6
In JS world, promise
s always been a controversial topic. Interestingly, There are lots of libraries out there implementing promise in there own tastes. jquery’s deferred, q, bluebird, deferred.js to name just a few. Opinions conflict over using async, generators, callbacks etc. But thank God; ECMA has now officially implemented promises in ES6. That’s a good news for JS community over having a single standard implementation of promises.
When not to use Arrow Function
Arrow Functions
Top ES6 feature one should know
So ES6, sounds a new cool name around the corner in tech distrct. If you are still not aware what ES6 is, its a new and improved JavaScript version over ES5. Here are some top feature that a Javascript developer should know.
How does it work - Core Javascript (Part 2)
How does it work - Core Javascript (Part 1)
JSDB - (A JIT interpreter for JavaScript)
Frankly I used to be frightened from working with JavaScript but since I started working with Core JavaScript(in Titanium) my interest grew for this language. I started hacking around the stuff in JavaScript, but being a Ruby developer from heart I do not want to leave command line and to test the code I have written, I needed some sort of compiler or interpreter like Ruby’s IRB. So as usual I hit the Google but for my misery I found nothing.
Pretty Radio Buttons
This tutorial is an extension of Aaron’s blog. This tutorial shows how to implement radio button using checkboxes and css with the help of jQuery.
Rails
Shortly (A cleaner Ruby wrapper for various url shortener services)
As mentioned in header Shortly is a cleaner Ruby wrapper for various url shortener services. It support maximum number of url shortener services out there huh(excluding url shortener services whose own url are not even short. Believe me they are many).
Avataree (A ruby gem for Gravatar services)
Avataree is a gem to make your project/app deal with Gravatar services for profile and images in a simplified ruby manner.
Flash/SilverLight Player Plugin for Rails 3
It’s been long time since I wrote my last post about Meta programming; I did not find time as I was busy, finally I spared some time from my hectic schedule to upgrade my old plugins to rails 3.
Metaprogramming in Rails
Meta-programming means your programming language is writing code for you. And for sure Ruby is a great language having all cool features.Rails being a great ruby framework encashes all features of ruby. Rails itself uses meta-programming every where.
Action Mailer Configuration for Google app or Gmail
Recently I needed to setup smtp server to send mail. nothing was new, I simply used rails ActionMailer as one should be. It should have been working, but wait; ohhhhhh snap, it was not!
Webrat Steps extension (Be more DRY)
Recently when I was working with Cucumber and Webrat, I found default webrat definition very interesting. Even in some case I didn’t even had to write a single step definition. But while proceeding I found that something is missing from webrat definition. So I decided to extend it. And come up with some methods defined as below. To use them just download this file and put it under features/step_definitions/ You can copy below code clipboard.
What is Rake in Ruby
This article has been updated in 2016
Difference Between Gem and Plugin
Now a days many developers are developing web application using ruby on rails. But a few of them know what actually the difference between “Gem” and “Plugin”.
Working with namepaced model
Sometime we have to work with namespaced model in Ruby on Rails to keep our code clean.
Translating Date and DateTime in Rails
I was using newdesk’s translate plugin for generating unicode. But there was no way by i can translate date and date_time. So I had to find another way.
Here I am telling you guys what i did
New Ways of rendering partials
I was working on project when I bumped into a new feature, rather an old one; I don’t care although, that we can render partial without writing partial or locals. Check it out how?
before
Golang
Why one should learn Go, in 2019
Go was first appeared on November 10th, 2009 designed by Rob Pike, Ken Thompson and Robert Griesemer. Go was introduced as a new system programming language with quick build times, great tooling, simple concurrency model, and a different approach to object-orientation.
Serving static files with golang or gorilla mux
Today, we are going to demonstrate how one could serve static site/ content using golang’s net/http
or using gorilla/mux
. Let us create base for this. First we would create a directory
Interfaces in Golang
Golang implements interfaces as types and as collection of methods(specs for what should be considered of that type). Let’s first talk about collection of methods (specs that other types could implement)
Go waitgroup with goroutines
Previously in Golang Concurrency we talked about how goroutines in Go language works. Today we will focus on providing robustness to our previous talk by using semaphores from Golang sync package.
Go lang and MVC
Its been long since working with go language, been awesome experience so far. This post is regarding how one can structure go application in MVC structure like Rails. This example would be using Martini - A Golang MVC and Gorm - A Golang MVC, for demonstration purpose only.
Go to Go - Struct and Methods
Go has a speciel type struct
to define custome type with named fields. Struct act like collection of attributes/properties similar to classes in OOPS languages out there, but not exactly.
Go to Go - Packages
Go is modern language, so it has to take care of current software development practices; code reuse or DRY (Don’t Repeat Yourself) being one of them. In go code can be packed into modules and shipped. Lets look into how go uses packages.
Go to Go - Concurrency Part#2
In last part, where we discussed Golang Concurrency, we talked about goroutines
and channels. As discussed there is much more to channels, liked channel direction, by default a channel is bi-directional, but it can be restricted to sending or receiving.
Go to Go - Concurrency Part#1
Go came to existance to solve problems being faced by today’s software, one of them is concurrency (ability to execute stuff in parallel while providing control and communication among them). To solve this go has provided goroutines to execute stuff in parallel.
Go to Go - An Introduction to Go language
First of all Happy New year to all. Great now we should be having a good start for the year 2014. So coming to the point. Being a developer I have worked on server languages and tools, naming ruby, rails, javascript, titanium, mongodb a few.
Architecture
12 Design Principles you can implement in Rust
Rust is a language of this generation where we need be highly productive as a developer at the same time writing memory efficient, world class softwares
Design Dig - Rust Design Principles
If you stumbled upon this article, either you have already heard and is interested in Rust programming language, or you may already be working with it. But here is a brief intro
GraphQL vs REST for API’s
Design Dig - ReactJS Design Principles
gRPC-Communication between Microservices
A high-performance, open-source universal RPC framework
Design Dig - Oauth 2.0
Risk in system design
Risk In System design
Design Patterns
In software engineering, design patterns are software development patterns that make code re-usable and less bug-prone. These are tried and tested patterns that fit in particular scenarios.
How stuff work Hypertext Transfer Protocol (HTTP)
Whenever you visit a page on the web, your computer uses the Hypertext Transfer Protocol (HTTP) to get that page from another computer somewhere on the Internet.
Security
Safety Mechanism in Ruby on Rails
Rails became popular and still heavily used by enterprises for its focus on efficiency and productivity. It comes with most suitable defaults for each environment for developer to more focus on building than configuring.
How does it work TOTP (Time Based Authentication) app
Late in the day one may have encountered many application asking for Second Factor authentication. Most of those uses OTP (One Time Password) via email or SMS. However we have new competitor in this arena, called TOTP (Time Based OTP) apps. There are many big players are in the race, i.e Google Authenticator and Microsoft Authenticator App
How Stuff Works - SMTP through WireShark
The SMTP (Simple Mail Transfer Protocol) is an Internet standard communication protocol for electronic mail transmission. Most of mail servers use SMTP protocol to send/receive email messages. Most email clients available today uses SMTP only for relaying messages to another mail server. But Mail client software on your desktop/laptop/electronic devices uses IMAP/POP3 to pull emails from its servers. So in simple terms SMTP is to communicate between/among Mail Server(s) to Mail Server(s). SMTP is implemented upon TCP (Transmission Control Protocol)
API Security - Best Practices and Checklist
Recently API’s (Application Programming Interface) are becoming hot cakes. Implementing API for your application is no more a niche thing but became essential. With advent of multi-faceted application interface (i.e Mobile Apps, Desktop Apps, Web Apps and Other Consumer applications). Its a great tool to expose your application consumption via own and third-party developers looking to integrate with your app. This enhances your audience reach and aid to consumers.
(JWT) JSON Web Tokens for API
In modern era, Authentication and authorization are used widely in mostly every app out there. While authentication establishesh user’s (or machine’s/thing’s) identity, authorization is way to know what kind of access is that user is granted, marking the periphery one is allowed to wander.
How Stuff Works - TCP through WireShark
The TCP (Transmission Control Protocol) is one of the base protocols of the Internet protocol suite implemented. It came into existance when initial work was being done for IP (Internet Protocol) and with an urge to make UDP more reliable.
Authenticate Machines not Users
I have been dealing with servers, deployments and system security since long time. One practice that I see and looks much evil to me is using password authentication while deploying to server and/or using password directly into deployment scripts.
What not to write in Robots.txt
Robots.txt is a vital part of most/all of websites. It feeds the robots from different search engine e.g. Google, Bing etc.
Layman’s guide for Cyber Security
Technology has greatly evolved, businesses have gone online, so is digital payment transaction [source]. But to our dismay, cybersecurity awareness is still lowest in India. Banks, financial institutions have adopted digital transactions, online banking but customer awareness is where they fail utterly.
Elixir
Introduction to Maps in Elixir
Elixir v0.13 has introduced Maps
, a key value store. Quoting elixir 0.13 docs
Elixir - Introducing Event Server
So very first behaviour server of OTP that we are gonna look in is Generic(I am guessing what gen means in erlang) event server.
Elixir - Introducing OTP
Erlang system is tried and tested for years and known for fault tolerance, robustness, ditributed operation handling and concurrency. OTP, stands for Open Telecom Platform, even though there is nothing specific about telecom.
Elixir - Static file server
I made to write static file server, can be used as CDN server. Find it at BagwanPankaj@Github
Elixir - Quote Unquote
Most functional languages are great in treating/presenting everything as data. Elixir is no less, it has power to present anything into data using its powerfull quote
, unquote
.
Elixir - Lightweight Processes and spawning a proess
Erlang is popular because of its lightweight processes, actors and working rightly in distributed system. Elixir brings that on Lets look
Elixir - First real world example - Fibonacci
I am not gonna use hello world
example, because that is too simple and boring as well. So lets start with fibonacci series example.
Introduction to Elixir
Elixir is a functional, meta-programming aware language that translates to Erlang VM. It is a dynamic language with flexible syntax and macro support that leverages Erlang’s abilities to build concurrent, distributed and fault-tolerant applications with hot code upgrades.
Ruby
QuickTips Ruby1.9 [Part 3] Default and Splat arguments
Ruby 1.9 has changed the way it used to deal with default arguments. The good news is it supports defaults arguments to be at beginning of methods. See gist below for example:
QuickTips Ruby1.9 [Part 2] Basic
Base Object is now BasicObject not Object in Ruby 1.9
QuickTips Ruby1.9 [Part 1] Hash
Changes in Hash In Ruby19 hash becomes ordered, don’t believe it see it yourself. Keys will be in order they are inserted.
Magic of default_proc in hash
Monkey Patching done in a right way (Have some mercy on legacy Ruby)
Classes in Ruby are open; right. That means you can do anything with them, monkey patching around it. But stop doing it before you run into any trouble. I myself used to do it.
Shortly (A cleaner Ruby wrapper for various url shortener services)
As mentioned in header Shortly is a cleaner Ruby wrapper for various url shortener services. It support maximum number of url shortener services out there huh(excluding url shortener services whose own url are not even short. Believe me they are many).
Avataree (A ruby gem for Gravatar services)
Avataree is a gem to make your project/app deal with Gravatar services for profile and images in a simplified ruby manner.
Blog
Moving blogs to Jekyll
I am an avid blogger since long and pretty much used every DIY blogging engine, out there, naming few
Jekyll Static Site - Best Practices, Tips and Tricks
Jekyll is one of the most static site generator (SSG). It empowers developers to generate static site quickly and easily. And this can be hosted on Github (with in-built support for Jekyll). Currently it is a great tool for building blogs, portfolios and other websites.
How Stuff Works - Advance Jekyll
Jekyll is a static site generator. That means, that you give some info to it and get HTML pages as a result. It’s ok when the site is pretty simple or even single page. What about more complicated websites? Will Jekyll handle it? Will it be convenient?
Liquid References for Jekyll
Git
21 Git Commands you probably didn’t know
If anyone have ever browsed the git manual (man git
), then one may have noticed there are a whole lot more to git than what most of us use on a daily basis.
GIT TIP#3 Cherry pick - only pick what is needed
Git is most popular distributed version control system used by developers now a days. And most popular workflow being used is of feature-branch-workflow. In this developer working on feature would shoot off a new branch called feature-branch and give it a meaningful name.
GIT TIP#2 Squash merge commit instead of merge
Git is most popular distributed version control system used by developers now a days. And most popular workflow being used is of feature-branch-workflow. In this developer working on feature would shoot off a new branch called feature-branch and give it a meaningful name.
GIT TIP#1 Using stash effectively
everyone who uses GIT, knows about stash, here are some quick tip about using stash effectively
RubyGem
Version bump for Humongous
Its been very long since I have updated humongous. I had long list of issues to work upon. Finally I had some time to look back to it and other open source projects.
Shortly (A cleaner Ruby wrapper for various url shortener services)
As mentioned in header Shortly is a cleaner Ruby wrapper for various url shortener services. It support maximum number of url shortener services out there huh(excluding url shortener services whose own url are not even short. Believe me they are many).
Avataree (A ruby gem for Gravatar services)
Avataree is a gem to make your project/app deal with Gravatar services for profile and images in a simplified ruby manner.
Flash/SilverLight Player Plugin for Rails 3
It’s been long time since I wrote my last post about Meta programming; I did not find time as I was busy, finally I spared some time from my hectic schedule to upgrade my old plugins to rails 3.
Rust
Introducing WebAssembly using Rust
WebAssembly (abbreviated WASM) is a binary instruction format for a stack-based virtual machines. WASM is designed as a portable compilation target for programming languages, enabling deployment on the web for client and server applications.
Best Top 6 Rust frameworks to watch out in 2023
In 2023, which Rust web framework will be the best for looking into before you start developing APIs and web applications? Here, we’ll look at some of the most popular frameworks currently in use or looks promising. We’ll also explore look at some simple examples to look at their design principles
Concurrency with Rust
Technology
WebSockets vs WebRTC - Which one to use
A Look into Video Streaming - MPEG-DASH vs HLS
Streaming is a way of delivering data over the Internet so that a device can start displaying the data before it fully loads. Video is streamed over the Internet so that the client device does not have to download the entire video file before playing it.
Clustering - Multi-core utilization for Node.JS
While building an application in today’s era; a developer would definitely wish to leverage underlying OS multi-core architecture for performance. Since [JavaScript] is single threaded application meaning that only one thread can run at any given time, hence by default JavaScript can only leverage single core CPU. To come about this, Node.JS has introduced Cluster API. In this article we will have a look at Cluster API, create child processes, and how to use it.
Gem
Shortly (A cleaner Ruby wrapper for various url shortener services)
As mentioned in header Shortly is a cleaner Ruby wrapper for various url shortener services. It support maximum number of url shortener services out there huh(excluding url shortener services whose own url are not even short. Believe me they are many).
Avataree (A ruby gem for Gravatar services)
Avataree is a gem to make your project/app deal with Gravatar services for profile and images in a simplified ruby manner.
Mongodb
Version bump for Humongous
Its been very long since I have updated humongous. I had long list of issues to work upon. Finally I had some time to look back to it and other open source projects.
Humongous: A Ruby MongoDB Browser
I recently wrote a lightweight MongoDB browser; written in ruby. It has been written; while keeping non ruby user/developer in mind, for simple use. That means it can be just installed as normal rubygems and fired from console as ususal unix command.
SEO
SEO CheatSheet - Easy Search Engine Optimization (SEO) for beginners and newbie
Search engine optimization (SEO) is the process of improving the quality and quantity of website traffic to a website or a web page from search engines. SEO targets organic traffic rather than direct traffic.
SEO CheatSheet - 10 Technical SEO Checklist for beginners
If you are a writer/blogger, hosting a blog or planning to host one soon. If you are new to SEO (Search Engine Optimization) or never heard of it; this is the right place to start from
AI
Accessing Raspberry Pi 2 using laptop/desktop display and keyboard
There is a lot of buzz regarding IoT (Internet of Things). So we have got our own Raspberry Pi 2 devise to experiment with it. Though we are building something serious, but here is something for starters to access Raspberry Pi 2 using networking.
Automation
Back to Top ↑Avataree
Avataree (A ruby gem for Gravatar services)
Avataree is a gem to make your project/app deal with Gravatar services for profile and images in a simplified ruby manner.
CLI
Shortly (A cleaner Ruby wrapper for various url shortener services)
As mentioned in header Shortly is a cleaner Ruby wrapper for various url shortener services. It support maximum number of url shortener services out there huh(excluding url shortener services whose own url are not even short. Believe me they are many).
CheatSheet
Git CheatSheet - 51 Commands you should know about
Git is a distributed version control system that aid developers working on a project to collaborate seamlessly while also having edge of being distributed so a repository can have multiple remote repository for easy collaboration among multiple teams
Database
Indexes do not scale, choose them wisely
Indexes are most commonly related to improving database speed, query efficiency and lowering latency. As in wikipedia
Gravatar
Avataree (A ruby gem for Gravatar services)
Avataree is a gem to make your project/app deal with Gravatar services for profile and images in a simplified ruby manner.
HTTP2
Back to Top ↑IoT
Accessing Raspberry Pi 2 using laptop/desktop display and keyboard
There is a lot of buzz regarding IoT (Internet of Things). So we have got our own Raspberry Pi 2 devise to experiment with it. Though we are building something serious, but here is something for starters to access Raspberry Pi 2 using networking.
JavaScript
NodeJS High CPU Usage
A single instance of a Node.JS application runs on only one thread and, therefore, doesn’t take full advantage of multi-core systems. And because of it Node.JS is not suitable for CPU/processor intensive tasks
Management
Back to Top ↑Methodology
Back to Top ↑Motivation
Learning is like rowing upstream; not to advance is to drop back
Learning is like rowing upstream; not to advance is to drop back—
OperatingSystems
Back to Top ↑Plugin
Flash/SilverLight Player Plugin for Rails 3
It’s been long time since I wrote my last post about Meta programming; I did not find time as I was busy, finally I spared some time from my hectic schedule to upgrade my old plugins to rails 3.
Process
Team should work like an open source project
Your team should work like an open source project. On the artificial adoption of open source process and communication in software development organizations.
Rails3
Avataree (A ruby gem for Gravatar services)
Avataree is a gem to make your project/app deal with Gravatar services for profile and images in a simplified ruby manner.
Ruby19
Back to Top ↑Server
How Stuff Works - Nginx
Assume this - you are done developing your web application and now you need to search for right web server for your production, that is fast secure and reliable.
Sinatra
Shortly (A cleaner Ruby wrapper for various url shortener services)
As mentioned in header Shortly is a cleaner Ruby wrapper for various url shortener services. It support maximum number of url shortener services out there huh(excluding url shortener services whose own url are not even short. Believe me they are many).
url_shortener
Shortly (A cleaner Ruby wrapper for various url shortener services)
As mentioned in header Shortly is a cleaner Ruby wrapper for various url shortener services. It support maximum number of url shortener services out there huh(excluding url shortener services whose own url are not even short. Believe me they are many).