To pray or to not

“Prayer is a request to God to change the way the universe works” – Spinoza

Which won’t!

Even though God isn’t answering your prayer and the universe isn’t changing just to be nice to you, it isn’t useless.

The subconscious need to pray and the act of praying let’s you recognize the problem as you deliver the prayer to the soul in yourself which is the only right seeker to God who’ll listen to you.

Standard

Fixing a damaged Windows + Linux boot setup

I ran across this case on my second machine which had this dual boot setup. The Red Hat installation took a 50gb storage and windows took the remaining out of a standard 500gb hard disk drive.

There are two things that form the concept of booting and will block your path:

  • bootable disks, and
  • bootloader

Bootable disks are about partitioning your local drive and creating bootable USBs or disks containing the OS setup.

You won’t have to deal with the secondary bootloader of your other OS. But the primary one, whether Windows boot loader or Linux ones not fun to poke around the internet with hardly any hope from the stackexchange and ubuntu Q/A conversations looking for the command that will do the job for you.

Linux boot loader

So okay, mild disturbances to your partition configuration are gonna hurt the boot and will land you to the grub command line.

So if stuck at grub command line during boot, use commands:

chainloader (hd0,0)+1

+1 means the first sector in partition 0 of disk 0

And then use the second command:

boot

TAB completion works in grub which is useful to find out what disks and partitions are there.

Command to fix Windows MBR

This is the easy part. When you’ve booted into the Windows OS, and you have to set Windows bootloader to be the default, run Command Prompt as admin. And this comes handy:

bootsect /nt60 SYS /mbr

The thing about boot disks

Diskutil is one cool program you can use either from command line or the GUI in macOS to configure disk partitions. On windows, there are a plethora of software but disk management serves the need too. Run diskmgmt.msc from the run program (Ctrl+R).

diskutil list

This is the command line you use for burning ISO images to a removable drive.

sudo dd if=/iso_path of=/dev/rdisk bs=1m

Windows UEFI boot needs FAT32 format USBs so dd wouldn’t format the USB to boot successfully on a windows machine. But this is still useful for creating boot disks for Linux and Macs.

Read this small article which has a useful description about handling the.

Standard

How to Install Git and OS X Command Line Utils without installing Xcode

The download size of Xcode is more than 2.5 gb and it’ll be more after the installation. Its better to download just the command line tools.
 
  1. Download the latest version of command line from the Apple Developer Downloads page (Download the latest version available in the list. Look by release date. Make sure its not a beta version)
  2. Open the .dmg file and install the tools (This will install gcc, ruby and other necessary tools)
  3. Go to Homebrew website – to find the install instruction. It is just a single ruby command.
  4. Installing Homebrew will give you all sorts of possibilities where
Now for installing Git and other tools, use the brew command.
Running brew on a few packages (like macvim) will still require a full Xcode installation to install. But you can visit the official site of those tools to download them. 😉
Standard

Newton’s Fractals – Generating Images from Roots

SSOΔ

img1

Fractals have always amazed me. Every time I see a fractal, I can get just as excited as the first time I saw the mandelbrot set. In this post, we’ll go through a method, which can generate beautiful structures from simple functions.

Link to the source code for this project: https://github.com/SSODelta/newtons-fractals

For a real-valued function $latex f(x)$, a root is any $latex x$, which satisfies $latex f(x) = 0$. A trivial case might be $latex x=0$ for the function $latex f(x) = x^2$. This is also what is found with the famous solution $latex frac{-b pm D}{4cdot a cdot c}$ to the quadratic equation $latex f(x) = a cdot x^2 + b cdot x + c$.

Sometimes however, a second degree equation does not have any real solutions. That is when $latex D < 0$. A quadratic equation will, however always have two solutions in the complex plane.

The…

View original post 468 more words

Standard

God vs Science

The student begins to explain.

‘You can have lots of heat, even more heat, super-heat, mega-heat, unlimited heat, white heat, a little heat or no heat, but we don’t have anything called ‘cold’. We can hit down to 458 degrees below zero, which is no heat, but we can’t go any further after that. There is no such thing as cold; otherwise we would be able to go colder than the lowest -458 degrees. Every body or object is susceptible to study when it has or transmits energy, and heat is what makes a body or matter have or transmit energy. Absolute zero (-458 F) is the total absence of heat.

You see, sir, cold is only a word we use to describe the absence of heat. We cannot measure cold. Heat we can measure in thermal units because heat is energy. Cold is not the opposite of heat, sir, just the absence of it.’

Silence across the room. A pen drops somewhere in the classroom, sounding like a hammer.

‘What about darkness, professor.. Is there such a thing as darkness?’
‘Yes,’ the professor replies without hesitation. ‘What is night if it isn’t darkness?’
‘You’re wrong again, sir. Darkness is not something; it is the absence of something. You can have low light, normal light, bright light, flashing light, but if you have no light constantly you have nothing and it’s called darkness, isn’t it? That’s the meaning we use to define the word. In reality, darkness isn’t. If it were, you would be able to make darkness darker, wouldn’t you?’
The professor begins to smile at the student in front of him. This will be a good semester.

‘So what point are you making, young man?’

‘Yes, professor. My point is, your philosophical premise is flawed to start with, and so your conclusion must also be flawed.’
The professor’s face cannot hide his surprise this time. ‘Flawed?

Can you explain how?’

‘You are working on the premise of duality,’ the student explains.. ‘You argue that there is life and then there’s death; a good God and a bad God. You are viewing the concept of God as something finite, something we can measure. Sir, science can’t even explain a thought.’ ‘It uses electricity and magnetism, but has never seen, much less fully understood either one. To view death as the opposite of life is to be ignorant of the fact that death cannot exist as a substantive thing. Death is not the opposite of life, just the absence of it.’ ‘Now tell me, professor… Do you teach your students that they evolved from a monkey?’

‘If you are referring to the natural evolutionary process, young man, yes, of course I do.’

‘Have you ever observed evolution with your own eyes, sir?’

The professor begins to shake his head, still smiling, as he realizes where the argument is going. A very good semester, indeed.

‘Since no one has ever observed the process of evolution at work and cannot even prove that this process is an on-going endeavor, are you not teaching your opinion, sir? Are you now not a scientist, but a preacher?’

The class is in uproar. The student remains silent until the commotion has subsided.

‘To continue the point you were making earlier to the other student, let me give you an example of what I mean.’ The student looks around the room. ‘Is there anyone in the class who has ever seen the professor’s brain?’ The class breaks out into laughter. ‘Is there anyone here who has ever heard the professor’s brain, felt the professor’s brain, touched or smelt the professor’s brain? No one appears to have done so. So, according to the established rules of empirical, stable, demonstrable protocol, science says that you have no brain, with all due respect, sir.’ ‘So if science says you have no brain, how can we trust your lectures, sir?’

Now the room is silent…. The professor just stares at the student, his face unreadable. Finally, after what seems an eternity, the old man answers. ‘I Guess you’ll have to take them on faith.’

‘Now, you accept that there is faith, and, in fact, faith exists with life,’ the student continues. ‘Now, sir, is there such a thing as evil?’

Now uncertain, the professor responds, ‘Of course, there is. We see it Everyday. It is in the daily example of man’s inhumanity to man.. It is in The multitude of crime and violence everywhere in the world. These manifestations are nothing else but evil.’
To this the student replied, ‘Evil does not exist sir, or at least it does not exist unto itself. Evil is simply the absence of God. It is just like darkness and cold, a word that man has created to describe the absence of God. God did not create evil. Evil is the result of what happens when man does not have God’s love present in his heart. It’s like the cold that comes when there is no heat or the darkness that comes when there is no light.’
The professor sat down.

If you read it all the way through and had a smile on your face when you finished, mail to your friends and family with the title ‘God vs Science’

PS: the student was Albert Einstein

 

(From the book – God vs Science by Albert Einstein)

Standard

What programming language are you learning?

Image

I recently got a mail from my friend saying:
(if (learning-programming? [shubham])
        (println (language-preferences [shubham]))
        (println (reason [shubham])))

Well the conversation got me into the new languages of the modern day developers.

Just like most human use English over the web to communicate, developers use these programming languages. While in older times when you got to see floppy disks in real life, the purpose of these languages was to communicate with the compters in general. But while you were debugging your intricate C loop, the world has pretty far changed to make languages more like reading your favorite novel. The goal is now to make the language more easier to read so that the code and be easily understood and modified.

In most Indian colleges, they teach you stuff like – C, C++ and Java for the most in terms of langauges and you spend you nights completing you final year projects in them.
All these while somewhere in the open world of Internet are lurking some new languages ready to look at your face and say to you – “You still code in it. Get a life!”
This because you don’t need to effort that hard. Believe me I have met Java developers who haven’t the word ‘design patterns’ and developers who write intense multitasking programs in Java. And I believe they seriously need to get a life.

But in reality these languages don’t really matter the most in your pack of skills. The objective of the making software products is to do it as simply as you can. So if you’re trying to hardcode a web application using HTML, CSS and JavaScipt, someone will just use Google App Engine and will get enough time to watch loads of lolcats before his lunch break.
While you spent semesters learning to code, a lecturer might have stood up and said that he’s gonna end programming in a single 50 minutes lecture and he did. So must for my three school years struggling with BASIC and then Java.

There are emerging new things everyday. There’s languages like Clojure which will make tasks like AI simpler and languages like Python and Ruby to make you type less and there’s Scala to make some parts of programming further simpler. Your C code of a hundered lines can be written in four lines of Python.

Well you need to learn one thing – You’re just as powerful as the weapon you chose.
I have been a C purist and struggling out in this world to code less has been real fun to me and so will it be for you.

[Edit]

Standard