Welcome, Guest: Register On Nairaland / LOGIN! / Trending / Recent / New
Stats: 3,148,012 members, 7,799,455 topics. Date: Tuesday, 16 April 2024 at 09:40 PM

LSarcastic's Posts

Nairaland Forum / LSarcastic's Profile / LSarcastic's Posts

(1) (2) (of 2 pages)

Programming / Re: For Django Developer by LSarcastic: 11:49pm On Jul 23, 2020
You've got a solid point man.
Taofeekdboy:

I understand you perfectly but there are some scenarios where AbstractUser is a better approach as well and based on the example I made earlier, it is a better approach, when you are writing permissions, it is a better approach to inherit from AbstractBaseUser when you know what you are doing. Using User model directly is very tho because if things go wrong then it can be fatal.
Programming / Rust: The Most Impressive Kid On The Block by LSarcastic: 5:47pm On Jul 19, 2020
Since the influx of Rust into the Programming ecosystem and its being loved by the community, what is your view on the language?
What projects have you worked on with it?
Programming / Re: 30 Things You Should Not Say To A Developer by LSarcastic: 5:38pm On Jul 19, 2020
I have a business idea (This one offs me to a gargantuan extent)
I want to learn hacking
Can you hack Facebook?
Come and teach me
You'll just be sitting down in front of PC everyday doing nothing

1 Like

Programming / Re: For Django Developer by LSarcastic: 5:30pm On Jul 19, 2020
I believe that by 'knowledge' it's not only Django and Flask but HTML and CSS. Yes, you can call yourself a Backend developer. You'll have to prove it with projects though.
Heylonmusk:
Can I call myself a BACKEND developer if I have knowledge of Django or flask alone.

1 Like

Programming / Re: For Django Developer by LSarcastic: 5:28pm On Jul 19, 2020
I think the OneToOne relationship is a better approach. One thing I've learnt about OOP is the SOLID principle. Responsibilities should be divided across classes and models. Leave the User model to handle core Django features while you have a different model that provides other functionalities for a user. So many things could go wrong with Abstract User.

Taofeekdboy:

Sure it can be done like that as well, but there are some scenarios where you dealing with two different groups, maybe students and teachers or premium users and free users, you can easily add student identifier and teacher identifier through AbstractUser, this will simplify things and make code cleaner.
Programming / Re: For Django Developer by LSarcastic: 5:18pm On Jul 19, 2020
EngtTemmy:
Can Django be used on Android phone?
Yeah, you can. For details, just quote this message
Programming / Re: Why Self Taught Programmers Over “Exaggerate”. by LSarcastic: 8:44pm On Jul 05, 2020
sexylassie2:


Not true, even curriculum of Cs is filled with advanced mathematics.

Go check the countries with the best programmers, mathematics is a top priority in their curriculum.

Yeah, it is filled with advanced mathematics. But that is limited to the scope of computer science as a course and not programming as a discipline. When it comes to programming, knowledge of mathematics is not required but it is helpful. You can't tell me that to build Nairaland, Seun Osewa did some differential calculus to make db queries.

Same as Python. Python is not only for ML and AI. You can use it to build websites and write small scripts to automate stuffs. Not everyone learns Python to do ML and AI(like me for example). I used Python(Django specifically) to build https://www.bonychicken.com and I did not do a single calculation.

As I said, if you're talking about ML and AI, you're right. But if you're referring to Python or Programming in general, your statement is false.

5 Likes

Programming / Re: Nairaland Should Switch To Python/django. Opinion by LSarcastic: 11:00pm On Jul 01, 2020
fortifiedng:
What do you guys think about this? Your opinion. Let's discuss.
From a user's point of view, I see no reason to do this. Django won't make the site any better than it is based on the way the site works. The site already works well and is fast enough.

Except if there are new features and we've got a lot of backend logic that needs calculations, you don't need Django here. Besides that can be accomplished with serverless functions.

Or if the site employs lots of programmers and they feel working with Python will make them more productive than ever. Except that, there is absolutely no reason to do so.
Programming / Re: Why Self Taught Programmers Over “Exaggerate”. by LSarcastic: 10:50pm On Jul 01, 2020
sexylassie2:
For all those learning and advertising python to wannabe programmers, stop wasting your time.

If you don't have good mathematics background or love for data,you will fail big time.

Not really. If you're talking about data science and ML then you're definitely right.

But if you're talking about programming in general, you're dead wrong.
Programming / Re: My Python Journey by LSarcastic: 10:45pm On Jul 01, 2020
Gcool2:

Wow! This u great...I hope to get comfortable up to this level one day..still learning basics with "Automate the boring stuff with python"

Any advise for me bruv..if u don't mind can I reach u on WhatsApp?
Send me a main first at ayodeji@bonychicken.com. We'll talk from there.
Programming / Re: What Made You Pick Interest In Programming by LSarcastic: 8:56pm On Jun 29, 2020
MountainView:
Hello there, my fellow programmers and aspiring , now let me ask you,

Why did you choose to become a programmer??


For me, i picked interest after watching the TV series Kyle XY and I've enjoyed the journey so far...

Mine was crazy. It was just after I wrote WAEC back in 2015. I was jobless and entered into a state of emptiness. Though we were not mandated to do so, I still went to school everyday. It happened day after day until I stumbled on a movie(It's always a movie, isn't it cheesy). I still can't remember the name up till now; an Indian movie about a group of guys who stole tons of gold to be transported. Among the team of thieves was a hacker who eventually sabotaged the entire team with his skills.

I was impressed with that and started trying to get into the field. I was also motivated by the lack of some features I fantasized on in the games I play. I felt 20 people should play PES as multiplayer, each controlling a single player. I got an application from Playstore: XeusHack. I started stuffs there and learned a lot. I would use ideas I learned to play on my dad's PC, making zip bombs, batch files and the sorts. I didn't understand any of the things I typed then.

I then got to a particular topic: Programming. The article then was like, if you can't make your own tools, you're nothing more than a script kiddie. It then listed dozens of programming languages, classifying them by usage. At the bottom of the list were two languages tagged as: "for proffesionals". These two languages were Python and Ruby. Since Python was at the top of the list, I Googled it and got an interpreter: QPython(It's still my favorite Android interpreter and I still use it till date due to it's tight coupling with Linux). It's name is now QPython3L.

My first program in Python(you can guess it) was Hello, world! The moment I ran that code, that was the last time I ever though about hacking. I delved deep into Python and I've not looked back from Programming ever since.

6 Likes

Programming / Re: Have Mobile/web App Ideas-let Me Work With You For Free by LSarcastic: 8:31pm On Jun 29, 2020
trytillmake:
Willing to partner with any one with good profitable ideas for a web/mobile app that has the potential of blowing in the Nigerian market and possibly the world for free.

So anyone interested

Call/whatsapp -- 08025877792
Email me on - jiroe9000@gmail.com --- or check my signature for number lets talk.. meet up - lets change the world.

[Note: the idea must be profitable in the short or long run]
What is your stack? You didn't state it
Programming / Re: I Need Your Explanation Here Pls by LSarcastic: 8:24pm On May 31, 2020
stanliwise:
it’s a new line character not necessarily carriage return although it kinda do the two.
You're right. I'll edit the answer to portray it. Thanks

1 Like

Programming / Re: I Need Your Explanation Here Pls by LSarcastic: 6:11pm On May 26, 2020
manuel4real:
Good day nairalanders. I started learning Python programming language on solo learns a few days ago. While learning I came across this and my question is:

1. Why will someone need to add \n to his program? For instance, print('come\\nhere') gives come\nhere. What's the need for the \n there? Of what importance is It?

"\n" (backslash n) is basically a newline character. Meaning whenever the program encounters it in a string, the rest of the string is moved to the next line. So, if I run:
print("Hello\nworld"wink

The output will be:
Hello
world

On the other hand, there are cases where you'd like to display "\n" on the screen. Using
print("Hello\nworld"wink
will interpret the character as a newline and you don't want that. The only option is to use another backslash to "escape" it. That means doing
print("Hello\\nworld"wink
instead.

That's why you'll see double backlash in some cases.

Nairaland's parser automatically converts right parentheses to an emoji.
Programming / Re: Which Of Them Is Better To Learn (flutter Or Java) by LSarcastic: 6:02pm On May 26, 2020
This is for those complaining about system issues while working with flutter. The performance of a PC is not totally dependent on RAM. Before you decide to pick up technologies that are highly dependent on performance, take a look at what I call: The overall PC power. And this includes but are not limited to:

- Processor: I don't even need to explain this
- Clock speed: Clock speed is fundamentally a variable on how fast your processor works. Sometimes a higher clock speed will benefit you if you closely align its increase with your PC hardware.
- Number of cores: In many cases, an increase in the number of cores your PC has reduces the work load of the PC due to the increase in number of "workers". [Read generalization below]
- Compatibility between the tech and the processor you use. Those who work with video and graphics would understand this better. Before picking up something performance intensive to work with on your PC, really check out the requirements of such a software and rate your own. It's not all about RAM.
- RAM: Well, you know about this. RAM is basically a faster and readily available memory for applications to access. The higher the RAM, the higher the space available for the application to use. When you run apps like Android Studio on a PC with 2GB RAM, since the RAM isn't enough memory to run the app, some stuffs are stored on the ROM instead. This reduces the speed due to the fact that the ROM is not as fast as the RAM and serves more of an archive purpose than an on-demand purpose.
- Drive: For short, SSDs are way faster and better than HDDs.

Generalization: Most times, everything I wrote up there is relative. There are cases where fewer cores with a CPU is faster than high number of cores. But that depends greatly on whatever app you're running.

In short, don't ignore other requirements of the tech you're using. Don't just stare at the RAM and then hop off saying, my RAM is ×2 of what they even mentioned, I can run it.

1 Like

Literature / Re: A horror series: Death Tales by LSarcastic: 1:25am On May 25, 2020
Title: Sticks and Stones May Break My Bones | Issue #3

She was always drawn to cars and was staring at the finish of the 'Tortoise' car. I had promised her that I would make it as good as new even though it had been by the roadside for time much longer than age itself and had become as decrepit as possible.

"I can bring the jack now? So you'll check the nether regions of the car", she said while picking up the jack and setting it under the car. It was funny she called it 'nether regions' but I had little to say about it.

She proceeded to cranking up the jack. Slowly, the car was lifted up amidst painful groans from the already loose metal.

When the back of the car was high enough, I slid a mat under it and retrieved the car keys from my pocket and faced her, "This is your part, you'll go under and place your hand on the exhaust to see if it's hot when I start the car"
She wasn't too smart about exhausts...

As I walked to the driver's side of the car, she slid under with her waist and legs sticking out... Exactly as I wanted...

I turned back and picked up a big stone. Walking to the Jack, I hit it as hard as hell. 500+ kg of metal and rubber came crashing down on her...

Red flowed beautifully, making the black earth more art-like...

The grey mass of brains were not too visible. The crushed waist was like pudding, except it wasn't baked.

I never told her to fix the Jack, I hate people making decisions on their own...

Death count: 3
Death Quote: "The beauty of death is that, you only see it once"
Programming / Re: My Python Journey by LSarcastic: 2:47pm On May 23, 2020
ShadowM:
Hello if any one of you is good with PYTHON programming and has a laptop and stable internet connection please contact me. I have works( Assignments) from mostly students in the U.S. that you would help with. Also be ready to hold video calls by 1,2 or 3 am at night due to time difference. Drop your numbers I'll contact you via whatsapp

I sent you a request through mail.
Programming / Re: My Python Journey by LSarcastic: 2:46pm On May 23, 2020
Gcool2:

Wow! This u great...I hope to get comfortable up to this level one day..still learning basics with "Automate the boring stuff with python"

Any advise for me bruv..if u don't mind can I reach u on WhatsApp?
Yeah you can send me a request via email for a chat. We'll discuss that way. I don't feel comfortable with my contact being put there.
Programming / Re: Why Do Developers Think Jquery Is Obsolete? by LSarcastic: 8:03pm On May 17, 2020
Shepherdd:


I once read on Quora about an interviewer that said in their company, during the interview process if you use one single line of jQuery code you get disqualified automatically you won't even be considered. And jQuery is not like PHP. PHP is a turing complete programming language where you could build anything you can drea of while jQuery is just an abstraction over JavaScript.

Don't you understand the point I'm making when comparing JQuery to PHP? We all know JQuery is not a language (¬_¬) I'm comparing the philosophy behind their usage. PHP is almost down the list when it comes to techs you would use to build something huge. Same as JQuery in the world on front-end technology. But they will be still be heavily used in years to come

It like you don't even understand my point of view at all. Your rant is: JQuery is useless and has reached the end of its lifespan. I'm saying "No it hasn't. Even if it is declining in use, people will still use it for years to come." This is our point of contention. No one says it's impossible to do without JQuery. It's important you understand my view so the discussion won't be sidetracked.

Besides, if you're even using an abstraction in a job interview for any type of programming job, you're basically useless. It's like using Bootstrap when you're called for a CSS interview. It doesn't mean he is saying JQuery is repulsive in such organization. Besides, if you read the comments on that post, you'll see varying opinions on that fact. I'm sure you probably did not consider the comment section. Quora users are very opinionated and will express themselves in the comment section

1 Like

Programming / Re: My Python Journey by LSarcastic: 1:14am On May 16, 2020
yemyke001:



Please boss, what kind of project are you referring to after learning python.. Please can you give examples.. Cos I have learnt python and I wish to build projects as well. All I do is exercises from various sources. Thank you
Since you learnt just Python. I suggest you start using Python in your day to day activities. Use Python to automate some tasks for yourself. Let me give an example.
There was a day I was told to supervise people who were loading goods into a van from a warehouse slightly far away. I was told to count the amount they loaded. Personally, I was busy with my phone and I knew that I'd most likely forget how many I had counted. I simply wrote a Python script to do that for me. All it does is initialize a variable and add 1 to it whenever I press ENTER. That way, I don't need to remember how many I have counted.
Whenever they load into the van, I switch to the running script and press enter and then go back to what I was doing.

Doing things this way helps you while you enjoy yourself. Then move on to Python libraries and frameworks that enable you to do more with Python. You should be comfortable with Python before doing this or you'll hate yourself.
Python is general purpose, so pick an area of programming you want to do and pick a Python framework for it. You'll become an expert.

Web: Django(really massive), Flask(mini framework)
Desktop apps: Kivy, PyQT, Tkinter. The first two are really massive.
Data science/ML: Anaconda stack

Just a few to mention.

Cheers!

3 Likes 1 Share

Programming / Re: My Python Journey by LSarcastic: 1:06am On May 16, 2020
SqueezedPant:



This is exactly what I'm doing currently , I've got up to 10 ebooks on python here and I've promised myself I would finish everything before I start the videos.
I'll be frank with you bro, you'll never finish even two out of those 10. Learning is not about how many books you read but by how effectively you put what you learn into practice. Pick one out of them and follow it to the end and it will be enough for you. You can only scan through others in case they have topics you haven't learned.

1 Like

Literature / Re: Horror In Two Sentences.. by LSarcastic: 7:49am On May 15, 2020
With Pepsi in my hand, I stared at the baby in her arms and smiled, "You are going to starve if you don't eat". "Oh yes, I know", she grumbled and then softly pinched the baby's face. In one move she pulled off the skin of the baby's face. The howl was terrible...


Check out the series I just started here https://www.nairaland.com/5858538/horror-series-death-tales-little
Literature / Re: A Horror Series: Death Tales {the Little Pen} - Issue #2 by LSarcastic: 1:48am On May 15, 2020
I'll continue on the thread of the first issue here https://www.nairaland.com/5858531/horror-series-death-tales
Literature / Re: A horror series: Death Tales by LSarcastic: 1:45am On May 15, 2020
Title: The little pen | Issue #2

I was done with school! Totally!
I walked briskly down the pedestrian bridge and landed at the bus stop. There was no crowd this time at least. A boy with a tray on his head caught my eye. It was strange to see someone who hawked pens on a highway.

My thoughts were cut short when a barrage of taxis came through. The driver of the a car at the stop then waved at me and I wasted little time getting in. I had barely shut the door when I heard the scream.

The door didn't shut and the scream persisted. I looked outside and saw the boy wide-eyed, pain on his face and it took me a split second to realise that I had shut the door on his hands. I frantically hurried and opened the door. His tray was on the ground and the pens scattered around.

Surprisingly, he smiled and there was no trace of pain on his face. I apologized and we both packed up the pens and entered the car and the driver lurched the car forward.

The boy looked at me and smiled, I smiled back. He then picked a pen and unscrewed the top. The only other passenger in the car was oblivious of our actions.

It all happened in a blur... The pen suddenly moved in a wide arc and buried itself in the soft part at the side of the driver's neck. Blood spurted out in a frenzy and the car started to move wildly. I had little on my mind as the boy faced me again and spoke calmly, "The driver did not say 'sorry' to me".

No one else died during the accident...

Death count: 2
Death quote: "The pen is not mightier than the sword, only subtler
Literature / A Horror Series: Death Tales {the Little Pen} - Issue #2 by LSarcastic: 1:36am On May 15, 2020
I was done with school! Totally!
I walked briskly down the pedestrian bridge and landed at the bus stop. There was no crowd this time at least. A boy with a tray on his head caught my eye. It was strange to see someone who hawked pens on a highway.

My thoughts were cut short when a barrage of taxis came through. The driver of the a car at the stop then waved at me and I wasted little time getting in. I had barely shut the door when I heard the scream.

The door didn't shut and the scream persisted. I looked outside and saw the boy wide-eyed, pain on his face and it took me a split second to realise that I had shut the door on his hands. I frantically hurried and opened the door. His tray was on the ground and the pens scattered around.

Surprisingly, he smiled and there was no trace of pain on his face. I apologized and we both packed up the pens and entered the car and the driver lurched the car forward.

The boy looked at me and smiled, I smiled back. He then picked a pen and unscrewed the top. The only other passenger in the car was oblivious of our actions.

It all happened in a blur... The pen suddenly moved in a wide arc and buried itself in the soft part at the side of the driver's neck. Blood spurted out in a frenzy and the car started to move wildly. I had little on my mind as the boy faced me again and spoke calmly, "The driver did not say 'sorry' to me".

No one else died during the accident...

Death count: 2
Death quote: "The pen is not mightier than the sword, only subtler
Literature / A horror series: Death Tales by LSarcastic: 1:28am On May 15, 2020
Title: Light and Happy | Issue #1

I walked into the classroom feeling groggy and tired from the walk. The lecturer looked at me with proud eyes, and smiled to the rest of the class as if to show to my classmates how irresponsible I was.
A few laughs were heard. You know I've got almost no friends. I walked to a seat and sat down.

Then she pushed it further and said, "Can you help us with this question? You seem to know better than us all", she smiled mockingly. I looked at the board and saw a question, and the word "electricity" stood out; and I smiled, surprising her.

I pulled out the high tension wire from my bag and felt the blade in my pocket. She looked at me questioningly and glanced at the rest of the class. I reached her and collected the marker. "What are you doing with-", she barely talked when I replied, "To answer the question".

She looked and me and then faced the class. She had barely turned when I turned around and caught her neck in a vice-like grip, reaching for the blade in the same move and holding it close to her neck. "Leave the class if you want to live", I said to the others.

The class was empty in less than 8 seconds. She was scared, I could feel her fear and I loved it. She mumbled a few pleas and ignoring her, I tied her wrists with the wire and plugged the end to the socket by the wall.
She screamed before, during and after I switched on the socket.
The taste of burnt human flesh isn't too bad after all...

Death count: 1

Death quote: "The price of death easy to pay, yet few dare to buy it."
Programming / Re: Why Do Developers Think Jquery Is Obsolete? by LSarcastic: 12:30am On May 15, 2020
Johnmattee:

Bootstrap 5 is dropping jQuery, go to their website or Google it...so jQuery has outlived its usefulness.

Still, I insist it hasn't. There are hundreds of thousands of websites that would still use it. True, you no longer need it as before.
There are dozens of frameworks who still trust JQuery and won't make the major lead to using vanilla JS.
JQuery right now is just like PHP. There are alternatives and better options but people will still use it.

The fact that you no longer use it doesn't mean people wouldn't use it. It still powers dozens of legacy websites and it will power more still. The only thing is, the use would decrease. But it won't go away anytime soon.

1 Like

Programming / Re: Learning Python Kivy by LSarcastic: 5:56pm On May 14, 2020
Samcent:


Nice work! Which tools did you use for the frontend?

I agree with you 100% on django documentation.

Good to know you are also good with Kivy. I learnt the developers have stepped up efforts to make it competitive with regards to mobile app development. I also hope they come up with a beginner friendly documentation.

Thanks for your input.



Thanks for the complement. I used plain ol Bootstrap. Then I added a few of my custom JS and CSS to it. The JS I applied was heavy while I only wrote a few lines of CSS to help.

Kivy team is trying. The only problem is, Kivy might never make much impact in the mobile app development path. That's because Python is not still supported out of the box by Android or iOS. In fact whenever you make a Kivy app for Android, you'll have to include the entire Python run time which will increase the size of your app. The community is clamoring for Python support. Even Guido Van Rossum(Python's daddy) mentioned it in a recent conference. Kivy is already on the stage but there are too much obstacles in the way.
Let's hope better for Python and the mobile stage.

Cheers!
Programming / Re: Programmers Chat Room. by LSarcastic: 5:50pm On May 14, 2020
iCode2:
Thanks much @ LSarcastic, Lordpeckxy
We've all got to give back to the community
Cheers!
Programming / Re: Why Do Developers Think Jquery Is Obsolete? by LSarcastic: 1:03am On May 14, 2020
Karlebolu:
Why?

This days, developers tend to go the way of angular, vue, react and the likes and what most of them believe is that Jquery has passed it's prime.

Why?

I remember a day I decided to use vanilla Javascript for a website I was working on https://www.bonychicken.com I spent four days debugging a simple selector. I asked for help on all possible places. Everyone agreed there was no bug in my code. It eventually worked when I gave up on my stubborness and used JQuery, it worked like a charm.

It is true that JQuery is past its prime but it is so damned useful. People would say you could do it all with vanilla JS. Fine. Build your website with it and tell me what happened. Javascript has improved but not enough to ignore JQuery all together. That's why Bootstrap, the world's number one frontend framework still ships Jquery with it.
They are not stupid.

2 Likes

Programming / Re: Please Advise Me! by LSarcastic: 12:54am On May 14, 2020
Genesiszero:
Hello friends, I'm a bit confused about myself!

I'm a student in one of the country's university.

I've been coding right from the age of sixteen, I love computers very much. I applied computer science but was given mathematics. Having stayed at home for quite some times, so I decided to just go with the hope of changing back to computer science my dream course.

I'm currently in 200lv I've been to so many offices in the admin to meet people who might help me to switch over but it seems as if not having anybody in these country is a problem.

I struggle so hard to read even though I'm not good with maths and I made 3.83 CGPA after my first year with no Carry over. I feel so dejected and not happy, I needed my dream course.

We did series of programing languages like Python, latex, mathlab, c++ and c and I was so happy for I feel at least doing what I love, since I've been writing codes in these language I feel as if its a revision for me, my friends were finding it difficult as some of them don't even know what a programming language is, I took both my maths course mates and computer science students tutorial.

I want to change since it's my initial plan to switch both I've not gotten anyone to help unlike some schools where you can apply for a change of course.

These is my passion and what I love, I'm gifted with computers, I've written series of projects even while I was still struggling for admission.

Pls help me and advice me on what to do.....and can one Have Bsc mathematics and do masters in computer science

They say computer science is same as maths but I disagree because computer programming is a logical maths unlike the real maths where you solve only x and y and it's only ends in the board with no real life application.


The world is going digital and IT is the real deal. Can a maths graduate have the same career prospect as computer science graduate


Alright, let me give you a piece of my heart:
Finish the mathematics but retail your focus on computer. The thing now is, look deeply into mathematics and begin to find computer in it. When you do calculus, don't just look at equations, see how these things are applied in computing. You'll notice you begin to grow a lot of interest in both mathematics and computer. I must tell you, in Nigeria school system, they almost teach nothing in computer science. I'm in CS presently and I can boldly tell you this. They'll teach you archaic things you'll probably never use. Most of us devs are self taught. You already have the advantage we CS folks don't have: your access to mathematics knowledge. Use it well

And yes, you can do your masters in Computer Science. I'll advice you, if you can afford it, don't ever do your masters in Nigeria.

cheers!
Programming / Re: Node Js Is Dead ? Long Live Deno Js by LSarcastic: 12:43am On May 14, 2020
pajosh:
Deno is a new runtime for JavaScript and TypeScript, created by Ryan Dahl – the original creator of Node.js. The project is intended to fix design problems in Node.js described in Dahl’s famous talk “10 Things I Regret About Node.js”. We talked to Krzysztof Piechowicz (adesso AG) about the differences between Node.js and Deno. In the iJS video, Piechowicz goes into the topic in more detail and shows what is possible with Deno.
Deno versus Node.js
JAXenter: Hello Krzysztof! You are an expert in Deno – a new JavaScript Framework created by the Node inventor Ryan Dahl. Can you briefly explain what Deno is exactly?
Deno aims to fix Node.js design mistakes and offers a new modern development environment.
Krzysztof Piechowicz: Deno is a new platform for writing applications using JavaScript and TypeScript. Both platforms share the same philosophy – event-driven architecture and asynchronous non-blocking tools to build web servers and services. The author of Deno is Ryan Dahl, original creator of Node.js. In 2018, he gave the famous talk “10 Things I Regret About Node.js“ and announced his new project – Deno. Deno aims to fix Node.js design mistakes and offers a new modern development environment.
JAXenter: How does Deno differ from Node.js?
Krzysztof Piechowicz: Both platforms serve the same purpose, but use different mechanisms. Deno uses ES Modules as the default module system, whereas Node.js uses CommonJS. External dependencies are loaded using URLs, similar to browsers. There is also no package manager and centralized registry, modules can be hosted everywhere on the internet. Contrary to Node.js, Deno executes the code in a sandbox, which means that runtime has no access to the network, the file system and the environment. The access needs to be explicitly granted, which means better security. Deno supports TypeScript out of the box, which means that we don’t need to manually install and configure tools to write TypeScript code. Another difference is that Deno provides a set of built-in tools, like a test runner, a code formatter and a bundler.
Deno – an example
JAXenter: Can you pick out a difference and demonstrate it with an example?
Krzysztof Piechowicz: In my opinion, the most important difference is how modules are imported. As I mentioned, Deno doesn’t use the CommonJS format and doesn’t provide a package manager like npm. All modules are loaded directly in code using an URL.
Here is a Node.js example:
And here is a Deno example:
At first glance, the Node imports look simpler, but there are a few advantages to using the Deno style. By importing code via URL, it’s possible to host modules everywhere on the internet. Deno packages can be distributed without a centralized registry. There is also no need for the package.json file and a dependency list, because all modules are downloaded, compiled and cached on the application run.
JAXenter: What is the current status of Deno? Can it already be used in production?
Krzysztof Piechowicz: Deno is still under heavy development and isn’t production-ready yet. There is also no official date for the release of the 1.0 version.
The future of Deno
JAXenter: What’s the next step with Deno? Is it actively being developed? By whom, in which direction?
The goal of Deno is not to replace Node.js, but to offer an alternative.
Krzysztof Piechowicz: Deno is an open-source project and is being developed very actively. The project was started in 2018 by Ryan Dahl. Currently, the project has over 150 contributors. Besides the release of the 1.0 version, there is a plan to provide a command-line debugger and built-in code linter to improve developer experience. Deno should also serve HTTP more efficiently.
JAXenter: What is the core message of your session at iJS?
Krzysztof Piechowicz: The goal of Deno is not to replace Node.js, but to offer an alternative. Some of the differences are quite controversial and it’s hard to predict if they will format in a correct way. I recommend that all Node.js programmers keep an eye on this project. I’m not sure if this project will be a success, but it’s a great opportunity to observe how Node.js could have been implemented differently.
JAXenter: Thank you very much!
Deno – a better Node.js? What do you think?

Your views in the comments ...

Javascript and it's reputation for a new tool everyday.
I pity JS guys sha. There's always a new framework each week, a new feature each month and a new addition each year. The progress is too fast which is a good and a bad thing at the same time

(1) (2) (of 2 pages)

(Go Up)

Sections: politics (1) business autos (1) jobs (1) career education (1) romance computers phones travel sports fashion health
religion celebs tv-movies music-radio literature webmasters programming techmarket

Links: (1) (2) (3) (4) (5) (6) (7) (8) (9) (10)

Nairaland - Copyright © 2005 - 2024 Oluwaseun Osewa. All rights reserved. See How To Advertise. 105
Disclaimer: Every Nairaland member is solely responsible for anything that he/she posts or uploads on Nairaland.