Details
-
AboutDevelopers, developers, developers,...
-
Skillsnocode
-
LocationDark part of the Earth
-
Github
Joined devRant on 4/18/2018
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
-
Custom image format update for anyone who is interested…
First blocks of data have been written and the colour table has been compressed from ~170KB to 30 bytes…
Now to decide on my preferred method for pixel indexing, RLE or no RLE… and how should one do the RLE…20 -
"Everything is possible, that’s what science is all about. No, that’s what’s being a Magical Elf is all about." - The Professor (on Futurama)
-
Today, for fun, I wrote prime number generation upto 1000 using pure single MySQL query.
No already created tables, no procedures, no variables. Just pure SQL using derived tables.
So does this mean that pure SQL statements do not have the halting problem?
Putting an EXPLAIN over the query I could see how MySQL guessed that the total number of calculations would be 1000*1000 even before executing the query in itself and this is amazing ♥️
I have attached a screenshot of the query and if you are curious, I have also left below the plain text.
PS this was a SQL problem in Hackerrank.
MySQL query:
select group_concat(primeNumber SEPARATOR '&') from
(select numberTable.number as primeNumber from
(select cast((concat(tens, units, hundreds)+1) as UNSIGNED) as number from
(select 0 as units union select 1 union select 2 union select 3 union select 4 union select 5 union select 6 union select 7 union select 8 union select 9) unitsTable,
(select 0 as tens union select 1 union select 2 union select 3 union select 4 union select 5 union select 6 union select 7 union select 8 union select 9) tensTable,
(select 0 as hundreds union select 1 union select 2 union select 3 union select 4 union select 5 union select 6 union select 7 union select 8 union select 9) hundredsTable order by number) numberTable
inner join
(select cast((concat(tens, units, hundreds)+1) as UNSIGNED) as divisor from
(select 0 as units union select 1 union select 2 union select 3 union select 4 union select 5 union select 6 union select 7 union select 8 union select 9) unitsTable,
(select 0 as tens union select 1 union select 2 union select 3 union select 4 union select 5 union select 6 union select 7 union select 8 union select 9) tensTable,
(select 0 as hundreds union select 1 union select 2 union select 3 union select 4 union select 5 union select 6 union select 7 union select 8 union select 9) hundredsTable order by divisor) divisorTable
on (divisorTable.divisor<=numberTable.number and divisorTable.divisor!=1)
where numberTable.number%divisorTable.divisor=0
group by numberTable.number having count(*)<=1 order by numberTable.number) resultTable;9 -
Ian Murdock, Debian creator, dead in shady circumstances this day, three years ago.
A days before we’ve seen some very strange tweets by him about the police violence, and then his Twitter was immediately gone. But internet remembers everything.
Good night sweet prince.
https://pastebin.com/dX3VSPkM1 -
So fucking apparently, you can text a phone through email! Yeah, TIL about something called sms gateways, which most mobile providers have, which allow you to essentially email the phone number, and have a text message delivered to that number. For example, I have MetroPCS so mine would be
6666666666@mymetropcs.com
Fucking amazing!8 -
Well shit.
Language features-wise Rust has a great edge over its main competitor(which seems to be Golang even though they can't really be competitors)
Rust has a better package manager with Cargo.
It also has better documentation. It also has
Wait for it...
....
A better website and a non retarded looking mascot.
TEE HEEEE9 -
Hello there, just couple of words about PHP. I've been develop on PHP more than 10 years, I've seen it all 3,4,5,{6},7. Yes PHP was not good in terms of engineering and patterns, but it was simple, it was the most simple language for web to start those days. It was simple as you put code into file, upload it via FTP and it works. No java servlets, no unix consoles, no nothing, just shared hosting account was enough to host site, or even application with database. As database everybody used to have mysql, again because its simple to start and easy to maintain. So PHP+MySQL became industry standard on Web during 00-2012, and continues in some way.
You can write HTML and logic inside single file, within php code, even more single file may content few pages, or even kind of framework. That simplicity and agility sticks everybody who wants to develop sites with PHP.
This is pretty much about why it is so popular.
Each good or wannabe PHP developer in an early days write its own framework or library (like in javascript this days because of nodejs)
Imagine that PHP has hadn't have package manager, developers used to have host packages on their own sites, then various packages catalog sites created, and then finally composer. A gazillions of php code had spread over internet, without any kind of dependency control. To include libraries to your projects you have to just write include, or require. Some developers do it better than others.
So what we have ? A lots of code, no repositories, zip archives with libraries, no dependency control.
Project that uses that kind of code are still alive even today, they are solid hose of cards, and unmaintainable of course.
And main question that I'm trying to answer is Why PHP is not good ?
- First is amount of legacy code which people copy and pasted into their project, spread it even more like a virus.
- Lack of industry standards at the beginning lead to a lots of bad practices among developers. PHP code usually smells.
open source php projects in early days was developed in same conditions so even in phpbb, phpnuke, wordpress, drupal used to have a lot of bad practices in their codebase. So php developers usually not study by another library, instead they write their own frameworks/libraries.
- "It works", - there are no strong business demands, on web development, again because lack of standards, and concerns.
This three things are basically same, they linked to each other and summarize of answer of why PHP have strong smells and everybody yelling against it.
Whats is with PHP nowadays ? Of course PHP today is more influenced by good practice of webdev. Composer, Zend, Laravel, Yii, Symphony and language it self became more adult so to say, but developers...
People who never tried anything except PHP are usually weaker in programming and ecosystem knowledge than people who tried something else, python, perl, ruby, c for instance.
Summary
PHP as any other programming language is a tool. Each tool has its own task. Consider this and your task requirements and PHP can be just good enough solution.
"PHP is shit" - usually you heard that from people who never write strong applications on PHP and haven't used any good tools like Symphony or Laravel.
Cheap developers, - the bigger community, the more chance to hire cheap developers, and more chance to get bad code. That can be applied on any other language.
PHP has professionals developers, usually they have not only php on scope.
That's all folks, this is very brief, I am not covering php usage early days in details, but this is good enough to understand the point.
Enjoy.8 -
AWS released their machine learning training portal for the public for free. You can get certified for 300$.
https://aws.amazon.com/de/blogs/...1 -
React native devs, I built a little video component that supports multiple videos, controls and captions. https://github.com/leksyib/...
hope you find it helpful! -
To anybody that didn't look through the entire chrome dev summit (lucky you and I don't blame you for it) - some very interesting gamified resources for css grid, service workers and flexbox:
- https://www.gridcritters.com/
- https://serviceworkies.com/
- https://mastery.games/p/...2 -
Just curious.
1. How you hosting at deep web?
2. Can your websites become listed in deep web? Why?
I just curious12 -
OH dear!
I wanted to do webdev backend in C++.
It was cumbersome so I decided to write a library that helps me and OH MY GOD. I have COMPLETELY changed C++ xDD
https://github.com/Wittmaxi/webcpp
(yes, the screenshot is ACTUAL C++ xD)48 -
Beating https://regexcrossword.com/ felt good.
But I have to admit: I could not beat the last one without breakpoint in the validation JS code. ;)
Being a web dev actually proved useful - free hinting system!5 -
Friendly reminder for travalers:
You can usually reset your free WiFi time at airport networks by clearing cookies :)10 -
*Now that's what I call a Hacker*
MOTHER OF ALL AUTOMATIONS
This seems a long post. but you will definitely +1 the post after reading this.
xxx: OK, so, our build engineer has left for another company. The dude was literally living inside the terminal. You know, that type of a guy who loves Vim, creates diagrams in Dot and writes wiki-posts in Markdown... If something - anything - requires more than 90 seconds of his time, he writes a script to automate that.
xxx: So we're sitting here, looking through his, uhm, "legacy"
xxx: You're gonna love this
xxx: smack-my-bitch-up.sh - sends a text message "late at work" to his wife (apparently). Automatically picks reasons from an array of strings, randomly. Runs inside a cron-job. The job fires if there are active SSH-sessions on the server after 9pm with his login.
xxx: kumar-asshole.sh - scans the inbox for emails from "Kumar" (a DBA at our clients). Looks for keywords like "help", "trouble", "sorry" etc. If keywords are found - the script SSHes into the clients server and rolls back the staging database to the latest backup. Then sends a reply "no worries mate, be careful next time".
xxx: hangover.sh - another cron-job that is set to specific dates. Sends automated emails like "not feeling well/gonna work from home" etc. Adds a random "reason" from another predefined array of strings. Fires if there are no interactive sessions on the server at 8:45am.
xxx: (and the oscar goes to) fuckingcoffee.sh - this one waits exactly 17 seconds (!), then opens an SSH session to our coffee-machine (we had no frikin idea the coffee machine is on the network, runs linux and has SSHD up and running) and sends some weird gibberish to it. Looks binary. Turns out this thing starts brewing a mid-sized half-caf latte and waits another 24 (!) seconds before pouring it into a cup. The timing is exactly how long it takes to walk to the machine from the dudes desk.
xxx: holy sh*t I'm keeping those
Credit: http://bit.ly/1jcTuTT
The bash scripts weren't bogus, you can find his scripts on the this github URL:
https://github.com/narkoz/...56 -
Anyone have experience with xamarin here? How is it? I never develop an android before so what’s your opinion about it24
-
woke up at 5am
no alarm clock was required
my fucking passion woke me up to get up and code.
i coded outside in my backyard
felt like cold war
it was night
it was dark
a depressing horror atmosphere
just like my whole life
2 hours later i started seeing sun
it was cold outside. alone. in the dark. my arms were freezing.
but 2 hours later i managed to code the feature. it worked.
3 hours have passed. im ripped. quentally.
doing it here. inside now. started the day happy. dropped bullshit from day before. cleanser of all toxicss.
fuck the past. the past will pull you down and kill you.
this. remember. always do not forget.7 -
https://quora.com/What-dont-people-...
Best explanation about the bullshit of dev work I've seen xD2 -
Have you ever realised that @dfox and @trogus have most of our addresses because of the swag store?
They know where we all live! They could just come to our houses any time they wanted!
I'm sorry, I just sent them mine so I just realised that 😂10 -
"This is not an application: it's a bug pretending to be an application." (This comment was left as an app review on Google Play Store)3