Posts
Seems like a known bug.
Upgrade from 22.04 LTS to 24.04 LTS and the connection to internet is broken
In my case, I upgraded to 24.04.1. The bug still is there. The fix I do is from this place. I have to do it almost every time I open the OS.
sudo rm /etc/resolv.conf
sudo dhcpcd
Now as mentioned in the post internet is back but the icon on the taskbar is still broken. To fix this UI, this is the command.
The latest LTS release of Ubuntu, 24.04 is having a very unstable installer.
I could install it from the installer in some machines without any problem.
However, the installer simply is a UI only update. On the UX side it fails completely. Seems there is no error handling done. On simplest of things, the installer just shuts down.
On one of my laptops, I find it is very difficult to go forword with installation. Made an attempt to install the previous version of Ubuntu, which is 22.04 and it went smooth.
React Native still is and better than ever the toolchain for crossplatform application development. As usual the new version React Native toolchain keeps on changing. The documentation of the toolchain also keeps on changing(they call it evolving, not me).
Starting a new project is now done as this
npx @react-native-community/cli init MyNewReactNativeApp
For a particular version of React Native, the command is like this.
npx @react-native-community/cli init MyApp --version "0.75"
This is basically using the community cli
In package.json
there is a script
section. From here one can run NPM Scripts.
"scripts": {
"one": "scriptOne.js",
"two": "scriptTwo.js"
}
These can be run like this.
npm run one
This particular line will run scriptOne.js
. This is powerful as we could take Node’s power and run any automated task for ourselves.
At first this seemed simple to me. Soon I came across cross-platform bugs. Since we are writing this in JS
, it could be run anywhere Node
is available. Now that could be a tricky thing. Some environments deal with certain things in a certain way. This is not a big thing if the script is written to handle those situations. Another thing is Node
versions. If the script is written using certain API of a particular Node
version, it is better to keep an eye on new releases of Node and update the script if there are breaking changes.
We will be talking about Windows 11 and NeoVIM. It can be seen as general Windows not specific to Windows 11, since I have done it in Windows 11, thought would mention it here in order to avoid the confusion.
On Windows machines I avoided configuring or even using NeoVIM. Thought it would be much more painful here as compared to Linux. So started using NeoVIM on WSL. Configured and ready within a couple of minutes as that is basically all Linux. Then I thought, let me try on Windows once and that would be final. If it runs fine if not better. It seemed the people at NeoVIM has made it clear that this thing is for everyone, including Windows people.
Configuring NeoVIM is straight forward. All one need to know is, where to put what.
Here is a list of references to get started with it.
For me, it was not difficult as I just needed a decent text editor with a file tree. All I did is pull the respective github repos into the folder and call them from init,lua
. This is nice and fine but since the configuration is too easy and Lua
just feels good to play with, thinking of confuguring it further and play with plugin managers.
I never thought, the day will come! The story of VIM addiction and NeoVIM adoption.
In search of a code editor which is available everywhere, from Desktop to servers, I accidentally got used to vi
some years back. I had to edit some files on the server or they call it Cloud
, the only editor available there was vi
. I just used it and forgot it as it was not even close to anything that modern code editors offer.
Is it a library or a framework?!
Do not know, but everyone is using it.
Must be good.
Hype Driven Development.
It should be a known story for experienced developers. For new developers it is alright to start here.
The problem is never the tool itself. How it is been used, the implementation details. That is the place, where it matters.
During the last days of FlashPlayer, the company and the community both jumped into Flex, the framework and the tool-chain to say, everything can be fixed with it
! Any and all problems seemed just not enough for Flex. It can do this, it can do that and the story went on. This is what happens when you try to please the corporates
. FlashPlayer and Flash IDE are still the best ones out there for a creative and interactive experience. This can not be said for Flex, which is a corporate pleasing Framework / tool chain on top of FlashPlayer. Un/Fortunately the whole Flex thing went down and took Flash with it.
Installing Linux side by side on a Windows machine, was and still is simple.
However, now a days there is one more / extra step before installing Linux(specifically Ubuntu) on a Windows machine. Now a days the hardware and the boot option comes with a setting called Secure Boot
. This option is by default it is enabled for a new laptop running on Windows 11. This is to make the system secure at boot level and Windows 11 requires this option to be available in order to be installed on the system.
I always knew this from my experience that, Windows, the OS is broken
in a lot of ways for development. However, once I shifted out of it never thought about it. In a recent turn of events, I am back in a Windows Machine
for ReactNative development. And the old ghosts are back alive! Tried a lot of things, but the old trick did the job for me.
In my project, I was constantly getting this error while building for Android.
For sometime now, I was searching for an alternative for Go. While the language itself is nice and I am productive with it, there are reasons to look elsewhere.
Now stared with Zig.
While working with Go, I thought there could not be simpler thing than this. Installation is smooth, works on every platform and fast. Infact this blog runs on Hugo, which runs on Go. But lately there are data mining and other corporate politics is happening in that space. After all Google!
This is addition to the last two posts regarding Yarn.
Now after working with it for more than 2 years, it feels that Yarn 1 is more useful. Though, technically Yarn 2 has all the best intentions and implementations, there are situations where Yarn 1 just works.
How to remove Yarn 2 completely from Ubuntu
I am using NVM for managing different NodeJS versions. So the removing of some files and folders may be different in terms of their path
. However overall it will be the same process if one has installed Yarn on a standalone NodeJS installation.
I was holding myself from saying anything about it for last two and half years. The incredible journey to the release of the first product and now the second product is online to the global audience.
The team is beautiful. Fast. To the point. Remote.
It is an honor to work with the team. While serving the world and releasing updates, it never felt anyone is down. Energy is high and flowing. The high efficient machine.
In my last post I talked about the problem with Ubuntu 23.04.
While my laptop was workable but not optimal. I could not controll the brightness of the screen. I was hoping Ubuntu will fix this with an update. And that is what has happened.
sudo apt update
sudo apt upgrade
Those two are not new to any Ubuntu user. But with these two, Ubuntu got the fix for the brightness control problem. There might be other fixes too. For me, I got the things I was waiting for.
I updated my machine to Ubuntu 23.04.
There are so many things which are just smoother to work with.
The system itself, seems to be faster. I think this is because Snaps just start instantly! I did not believe this for the fist time! This one is the best thing to happen in my opinion. I have tried opening everything that should take sometime to open, but no the just open instantly.
This is about implementing an idea and seeing it in the market.
Jump into it. Give it all that you have and see.
There is a huge difference between just sitting in the side and validating something or putting the effort to actully make it. As I see it, failed in terms of market and money is fine. But that gives immense idea about the reality of the world. If you know to code, making a software product is easy. Very easy. Do it and see.
Namaskaram.
It happened last week, Inner Engineering Completion in person program, near me. Personally, it was a long wait to be a part of this event in person. Never thought, it would be such a surprise to me! Overall it was as usual, pleasant and smooth with high energy flowing all-around. I bow down to all the volunteers
, who brought it here.
Being a Volunteer in the event has a different meaning altogether.
What is the big deal?! It should work.
Yep, it is true.
The deal is, who takes the instructions seriously.
I am talking in general here. Once you accept something as valuable, a book or a guide, then taking it as instructed makes a whole difference. Problem arises when one becomes a little casual about the instructions of value. Then it does not matter, what are you doing, there will not be desired result.
This is always the case. It is always OR
never AND
.
There are talks about how technology is the key to a successful product. May be it is true in the beginning, till one has to maintain it. Almost all successful products in the market are not of the latest technolgy. There are some parts of it is new technology, but majority is old, very old. The technology they use are once new, but now it is old and that is ok. No one cares what the technology it uses behind the scenes. As long as it solves the purpose, it is fine.
Working in Yarn was a little involved. That is Yarn version 1. One has to play around with Node and NPM to make things setup. With Yarn version 2 and above, this is mostly done by Node and a new utility called corepack
.
Now, Yarn does not need to be installed as a global package. Yarn can be enabled for individual projects (individual folders).
The
corepack enable
is all there is to it.
Open the command prompt and move to the folder, where Yarn
is needed.
Once there, either initialise an empty Yarn project. That will takecare of everything.
Updating a state in React looks something like below.
const [count, setCount] = useState(0)
setCount(5)
Here the new value of the count
is provided to setCount
. That updates the state
of count
to its new value.
This is the most used form of the state
update.
However, there is another form of this functionality. This looks like below.
setState( previousState=>{
// Do Something with Previous Data
// And return the newly created Data
return( newState )
} )
So the code setCount(5)
will become like below.
The game of React is in its components. Almost everything here is a component. Sooner or later the need to pass properties to components will arise. This is straight forward as we know like this.
<MyComp myTitle='Nice Component' />
Inside component we can access this with props.myTitle
.
const MyComp = (props)=>{
return(
<div>
{ props.myTitle }
</div>
)
}
This can also be written as below.
const MyComp = ( {myTitle} )=>{
return(
<div>
{ myTitle }
</div>
)
}
There is a nice magic
props
that React has, on all the components. That is known asprops.children
.
React defines and speculates about how to manage code files for components. There are so many documentation and tools available as per the best practices and perfect scenaios. However as per my experience no perfect scenario
ever worked for any individual or company.
There is difference between perfect scenario and working scenario.
While everyone should try to stick to the best practices and perfect scenarios, it is a perpetual job. It never ends. Cause may be anything, but it never gets complete. There exists a working scenario.
My working machine is a Linux
machine for some years now.
I never felt this kind of freedom and productive before. Now I can say it is even better than MacOS
in terms of developer freedom and easiness. It is better than Windows
in terms of GUI applications. The time has gone when Linux
used to be command only. Today the GUI applications are much better in Linux than Windows.
SVG is fine jsut to know it as an image format.
However, to deal with SVG on a web application as a developer is a different thing. SVG is too generic for better or worse as Javascript. Unless you know your way through it, it might seem confusing or easy.
First is there are many ways to include SVG in web.
The basic is just the tag itself. It is a valid HTML tag. So basically the SVG thing can be added inside an HTML page as tags like div
and span
.
Installing a VIM
plugin in Ubuntu is not that complicated as it used to be. All one has to do is put the plugin in a proper folder. However, do not confuse yourself VIM
with VI
. By default Ubuntu comes installed with VI
and not VIM
. Even if you put the VIM
plugin in the proper place, it will not reflect in this editor.
First install VIM.
For Ubuntu it is just sudo apt install vim
. This is the critical step. Next is NERDTree
a popular plugin and a must have for any VIM
user. The path to put a plugin for NERDTree is similar as
In the noisy space of Javascript and Javascript Frameworks, this one is nice and quiet. The simplicity of this framework dragged me into it. This happens to me for a new framework which does the thing and keeps it simple. Same thing happened to me when React came in. Appart from its corporate backing, it did work for a couple of years. As usual slowly complexity built arround it. I am afraid Alpine might go that route. But till then let’s enjoy it.
Python is powerful like anyother programming language. However the simplicity of it makes it more beautiful.
I was trying to automate some of my tasks and this needed copying of a folder with all its files and folders and files inside those folders to a new location. With Python it just took some lines and the task is done!
import shutil
shutil.copytree(source_folder, destination_folder, dirs_exist_ok = True)
The shutil is a utility to deal with file operations. The trick here is dirs_exist_ok
parameter. The official document says it is a new addition in version 3.8.
This should be a one liner as per the Yarn Docs.
It doesnot work always like that.
The problem
This happens if you have installed the latest version of Yarn. Then and only then one can change Yarn
versions. After installing the latest version of Yarn
, we can use the old version by setting Yarn to older version.
yarn set version classic
The classic
version is 1.x
version.
At this point we are good for our projects which use Yarn
version 1.x.
The thing is, Apple does not care about anything else but money.
- Apple products are good.
- They work as Apple expects them to work.
- People just follow along and pride themselves for having an Apple device.
- The products die when Apple wants them to die.
Now my device, MacBookPro which is still good in terms of Hardware, Apple software does not get updated in this. As per Apple the device needs an upgrade. Well that is when I thought of other options. I am definitely not going to get another Apple developer machine. I brought this one to learn ObjectiveC
and later it helped me learn Swift
. That is all and that is done.
Powerline is a wonderful utility apart from visually pleasing shell prompts.
In the early days it was a whole lot of effort to install and apply it to Linux / Ubuntu. However the situations have changed. Now it is
sudo apt install powerline
and there you have it.
Now to add this to Fish, the best way is to use Oh My Fish. Once Oh My Fish is installed, enable bobthefish
theme. This can be done by using the command below.
Setting up any UNIX like system comes down to a single startup file. There could be many, if one wants to, the freedom is always there. But generally it starts at a single point.
OSX / MacOS
In this land the file is .bash_profile
. Almost all the things can be configured here.
UBUNTU / Linux
Here the file is .bashrc
. All the PATH
and systemwide settings reside here.
Both of these files stay in the
root
of theuser
home folder in bothMacOS
andUBUNTU
. This folder is referred as~/
in both the Operating Systems.
The year started slow but kept up the steadiness. There were a lot of endings and new beginnings. As always if it flows, it is life.
Tech and work
A new project started.
For a long long time I was in a stealth mode. Bootstrapping and failing, then start over again and fail. The cycle finally ended. There are huge experience gain in terms of building a product and selling it. It is not just technical but a product is much more than that. One must try it. Atleast once in a lifetime.
The outcome is huge.
The natural progress of the frontend tooling. Whether you like it or not, change
is here to stay. At the moment the frontend frameworks have reached a point, where we need something else to have a better Developer Experience.
Applications were always like this and will remain like this.
What could change is how
we write these applications. Divisions have been made to separate the concerns. However in frontend, we had put very little effort in terms of development for a long long time. We had Flash
for a long time. It did its job, but in native browser the whole thing changed when jQuery
entered. Almost all websites were made with jQuery.
The thing that is fixed in code
is the change. While lot of books and philosophy is done towards how to reuse the code, very little is focused towards the change
!
The reality of the life of the code is very different from the literature around it.
All the reusabilty and other thoughts look good in books. In reality I have hardly seen any code is re-used. This is not to diminish the reusabilty of the code. But only if you code to re-use it
then this is obviously heading towards disaster.
The age old problem which repeats itself is, how to make a single code base for a project which is delivered to multiple platforms?!
Many tachnologies has come and promised the same thing. The end result is to enter the corporate space. Why!? Money.
This is the true story of all the technology stacks which promise to have a single codebase. Some really nice technologies has come and stayed for good, some vanished without leaving a trace.
A must upgrade version of React is React 17. I was surprised by the things it brings to the equation.
I was working on a project which is old. Not so old but kind of not recent also. And we just pushed our production application to live environment.
At that point I have some time to update the project. So I did. The first upgrade I thought should be the React
library itself. This project was made with create-react-app and not exited the flow. I was a little worried as to whether to update it or not. Because in past I have maintained a React project for some years and knew the pain of upgrading. And this time the project is on create-react-app. However I took the chance and did upgrade the react-script
and other libraries used in the project manually using yarn. After all this I was hoping things will break and complain about missing dependencies
and all that.
For last 5 months, I was working on a new project. Finally it went live last week.
It is such an experience to be involved in this kind of projects.
In terms of frontend technology it is React through and through. It was a re-write of the old project. The project has a global reach and directly affects people. Whatever we are doing has a direct effect on the general people. So the feedback loop is very small. We have to be on the edge all the time. Any small UX change has an immediate reaction from the user and reaching us within minutes. It is exciting and lot involved.
Hugo is fast and just works. However there are certain things you must take into consideration while hosting it.
Till now one thing I came across is the path
for css
files. Hugo provides template short codes to deal with them.
The templating system cares for empty spaces in the template.
You should be extra careful not to put them.
For example href="{{ .Site.BaseURL }}css/2021.css"
and href="{{ .Site.BaseURL }} css/2021.css"
are different. Can you see there is a space between }}
and css/2021.css
in the second example. These kind of things will break the site or theme or both.
A long wait is finally over.
For a long long time I was lazy and was avoiding the work. But here it is.
Moved to the Hugo Engine from Wintersmith Engine.
Never thought I will continue this way. But this is good to start over and over again. This is life if one wants to live. Re-start, Re-build, Re-structure and keep living.
The last blog is here for the new visitors here.
For last some years my frequency of blogging was slower than usual. That was another reason, why I was not putting effort on upgrading to new engine. Somehow things are moving in a different direction. That made me think, if I am going to do it anyway, why not now. So the upgrade. And with this, I have released the theme(GoWalk) of this site as opensource. It is simple and open, customise it and use it, if you want.