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
Search - "i love scripts"
-
*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/...53 -
I had to open the desktop app to write this because I could never write a rant this long on the app.
This will be a well-informed rebuttal to the "arrays start at 1 in Lua" complaint. If you have ever said or thought that, I guarantee you will learn a lot from this rant and probably enjoy it quite a bit as well.
Just a tiny bit of background information on me: I have a very intimate understanding of Lua and its c API. I have used this language for years and love it dearly.
[START RANT]
"arrays start at 1 in Lua" is factually incorrect because Lua does not have arrays. From their documentation, section 11.1 ("Arrays"), "We implement arrays in Lua simply by indexing tables with integers."
From chapter 2 of the Lua docs, we know there are only 8 types of data in Lua: nil, boolean, number, string, userdata, function, thread, and table
The only unfamiliar thing here might be userdata. "A userdatum offers a raw memory area with no predefined operations in Lua" (section 26.1). Essentially, it's for the API to interact with Lua scripts. The point is, this isn't a fancy term for array.
The misinformation comes from the table type. Let's first explore, at a low level, what an array is. An array, in programming, is a collection of data items all in a line in memory (The OS may not actually put them in a line, but they act as if they are). In most syntaxes, you access an array element similar to:
array[index]
Let's look at c, so we have some solid reference. "array" would be the name of the array, but what it really does is keep track of the starting location in memory of the array. Memory in computers acts like a number. In a very basic sense, the first sector of your RAM is memory location (referred to as an address) 0. "array" would be, for example, address 543745. This is where your data starts. Arrays can only be made up of one type, this is so that each element in that array is EXACTLY the same size. So, this is how indexing an array works. If you know where your array starts, and you know how large each element is, you can find the 6th element by starting at the start of they array and adding 6 times the size of the data in that array.
Tables are incredibly different. The elements of a table are NOT in a line in memory; they're all over the place depending on when you created them (and a lot of other things). Therefore, an array-style index is useless, because you cannot apply the above formula. In the case of a table, you need to perform a lookup: search through all of the elements in the table to find the right one. In Lua, you can do:
a = {1, 5, 9};
a["hello_world"] = "whatever";
a is a table with the length of 4 (the 4th element is "hello_world" with value "whatever"), but a[4] is nil because even though there are 4 items in the table, it looks for something "named" 4, not the 4th element of the table.
This is the difference between indexing and lookups. But you may say,
"Algo! If I do this:
a = {"first", "second", "third"};
print(a[1]);
...then "first" appears in my console!"
Yes, that's correct, in terms of computer science. Lua, because it is a nice language, makes keys in tables optional by automatically giving them an integer value key. This starts at 1. Why? Lets look at that formula for arrays again:
Given array "arr", size of data type "sz", and index "i", find the desired element ("el"):
el = arr + (sz * i)
This NEEDS to start at 0 and not 1 because otherwise, "sz" would always be added to the start address of the array and the first element would ALWAYS be skipped. But in tables, this is not the case, because tables do not have a defined data type size, and this formula is never used. This is why actual arrays are incredibly performant no matter the size, and the larger a table gets, the slower it is.
That felt good to get off my chest. Yes, Lua could start the auto-key at 0, but that might confuse people into thinking tables are arrays... well, I guess there's no avoiding that either way.13 -
Since I was little I was fascinated by club light shows I saw on TV shows. I just couldn't find out how they made light react to sound, which were two completely unrelated things to me back then. But I wasn't dumb and somehow figured out that if I hooked some low energy fairy lights to my amp and turned the bass up, they would lightup to the beat.
3 fried fairy lights and angry parents for to loud music later I swore to myself that I would someday build something that could light up my whole room and react to the music I was playing.
I started coding about the age 13 (turned 20 a month ago) with some old school bat scripts. But I wanted something that would generate a .exe so I googled and ended up installing Visual Studio Express (again angry parents for installing without asking) and started copying my first VB.Net program together. From there no one could stop me. I wanted to archive something with an application and googled until I found what I needed and learned to code this way.
I learned writing decent vb.net code and itvwas about this time I came into contact with IRC. I lurked arround there and this is were I came into contact with Linix servers, because I wanted to code IRC (eggdrop) bots, so I learned TCL and got used to Linux. Time passed and I ended uo being a Global OP on some network back then.
I did go further, coded Minecraft Mods, thus Java, changed back to C#, learned PHP and started setting things up on my VPS, Mails server, web server, etc.
Nowadays I work as a Systemadmin / Developer Hybrid, earning my first real money doing what I love to do and guess what? In the meantime I proved myself I can accomplish what I wanted as kid. I bought some Club LED DMX capital lights and programmed a controller for them which can control them in C#, but in a way I can run it on my raspi using mono. I also coded a client which runs on windows which uses some native libraries to calculate the dominant color of the shown picture in realtime (Handels 24fps 1080p) and uses the lights as ambient light, like you see them behind TVs sometimes.
The same app uses Bass.NET and an algorithm to dedect a beat in realtime and switches the light colors. Exactly what I wanted as akid, but better.
I can even control the lights via the new Google Assistant and/or Tasker.
Feels fcking good.
Some of my work lies on github among other, mostly trash: https://github.com/Kimmax - didn't updated there in a while tho.
I plan on writing a new free opensource plugin based modular home automatication server and pretty sure could use some helping hands..
I don't know why I wrote all this, just felt like it.
Also: first Rant
Please don't kill me for errors in the text, I'm to lazy to read through it again right now :P8 -
I have gotten into a bad habit of staying up late on my computer and then being too tired to go for a run in the morning.
So now my computer automatically shuts itself off at 10:00.
There’s some encouraging to go to sleep.5 -
Lead dev: Hey boss, you really do like Python right?
Me: No
Lead dev: Well it's cuz I was think....wait what? WTF do you mean no, you have automated a fuckload of BS with Python and we are still using it, why tf would you use Python if you don't like it?
Me: I like it enough for the automation scripts that we have and for parsing documents or generating glue scripts, its already installed in every server that we have, so testing bs in dev and then using them in prod is cake, it doesn't mean I LOVE python, I like it for what we use it.
Lead dev: Well ain't already bash and perl installed as well?
Me: Do you know bash and or perl?
Lead dev: No, don't you?....
Me: No......
L Dev: (using a Jim Carrey impersonation) WELLL ALLRIGTHY THEN! What is the other language that you used for X project?
Me: Clojure, do you remember that one?
* he said paren paren paren paren yes paren i space paren do close paren close paren etc etc
L Dev: (((((((yes (i (do)))))))) and nevermind, I'll get back to working more with Python
Me: das what I fucking thought esse6 -
Systemd, I fucking love you. When a service crashes, let's just keep it turned off, don't restart it on your own, no need for that. That's what statefulness means, right Poettering? Such an amazing init, well worth the quarter GB of code or however much it is now. And yes I know that the unit files can be edited to achieve that. But seriously, should I really have to do that for each individual service on each individual box, because systemd can't do it on its own?
That feeling when an init system is (relatively) decent at doing everything else it absorbed into itself, yet fucking sucks at being.. a goddamn init. Good game Poettering. Such an amazing init system you wrote there. God fucking dammit man.. how hard can it be? There's OpenRC and BSD's /etc/rc.conf which are literally mere kilobytes of scripts and they do both statefulness and parallelization (in case of OpenRC anyway) *excellently*. Yet systemd can't even do that much? Awesome. Great init. I love it.
Come fucking on man...20 -
veekun/pokedex
https://github.com/veekun/pokedex
It's essentially all meta you need to make a pokemon game, in csv files.
Afaik, they ripped the information from the original games, so you can be sure about their validity.
I love how it's easy to use, isn't some weird ass formatted wiki and even has scripts to load it into your database.
Me being a huge pokemon fan, that's the non plus ultra. -
Two things before this all:
- I fucking love gitlab so far
- I miss the fuzzy searching from sublime text, as vsCode still can't do it properly..
I was fed up with all the shitty overbloated git deployment scripts, sync scripts, automatic backup solutions and hosted git servers out there, so now my own solution is:
- remote git cloned local files
- local files are synced via dropbox, to easily edit them on any device
- all changes and deleted files are saved up to 1 year on dropbox
- remote has gitlab running and webhooks setup
- the webhooks point to my node scripts, which then rebase the code to its dedicated dev server
- daily server backup with 7 days roll
- cold storage backup each 30 days
Sounds like overkill, but from my experience, you really can't have enough places that have a backup, especially coldstorage backups.
My goal in general though is to have everything on my computer backupped and ready to go asap, if something happens.
I wanted to just use a virtual machine for development stuff, but that wouldnt be able to run on my laptop, so I need a more general solution, where I sync all configs and all projects across. (and have some sort of basic list of tools needed, so I dont need to remember them)
Found for example something for vscode to sync its settings and plugins via any sort of git, will give it a try in near future too.7 -
Today was a manic-depressive kind of day. Spent the morning helping some developers with getting their code to run a stored procedure to drop old partitions, but it wasn't working on their end. It was a fairly simple proc. But working with partitions is a little like working with an array. I figured out that they were passing the wrong timestamp, and needed to add +1 to delete the right partition. Got that sorted out, and things were good. Lunch time.
After lunch I did some busy work, and then the PO comes up at about 2PM and says he's assigned some requests to me. The first was just attaching some scripts. Easy. The second, the user wants a couple of schemas exported ... at 6PM. I've been in the office since 6:45AM.
While I'm setting up some commands to run for the data export, a BA walks up and asks if I'm filling in for another DBA who is out for a few weeks. Yep. There's a change request that hasn't been assigned, and he normally does the work. I ask when it's due. Well, the pre-implementation was supposed to be done in the morning, but it wasn't, and we're in the implementation window ... half way through. I bring up the change task, and look at. Create new schema and users. That's all it says. The BA laughs. I tell I need more to go on. 10 minutes later he sends an email with the information. There's only two hours left in the window, and I can only use half of it, because the production guys have to their stuff, and we're in their window. Now I'm irritated, because I'm new to Oracle, and it's an unforgiving mistress. Fortunately, another DBA says he'll do it, so that we can get it done in time. But can't work it either, because Dev DBAs don't have access to QA, and the process required access for this task. Gets shelved until the access issue is resolved. It's now after 4:15PM. I'm going to in traffic with that 6PM deadline.
I manage to get home and to the computer by 5:45PM. Log in. Start VPN. Box pops on screen. Java needs to update. I chose skip update. Box pops up again. It won't let me log in until Java is current. Passed.
I finally get logged in, and it's 6:10PM. I'm late getting the job started. I pull up Putty and log into the first box, and paste my pre-prepared command in the command line and hit error. Command not found. I'm tired, so it's a moment to sink in. I don't have time for this.
I log into DBArtisan and pull up the first data base, use the wizard to set the job, and off it goes. Yay. Bring up the second database, and have enter the connect info. Host not found. Wut? Examine host name. Yep, it's correct. Try a different method. Host not found. Go back to Putty. Log in. Past string. Launch. Command not found. Now my brain is quitting on me. Why now? It's after 6:30PM. Fiddle with some settings, reset $Oracle home. Try again. Yay. It works. I'm done. It's after 7PM.
There is nothing like technology to snatch the euphoria of a success away from you. It's a love-hate thing, but I wouldn't trade it for anything else. I'm done. Good night.3 -
love-hate relationship with Python semi-rant
The year is 2020.
I have already grown accustomed to the idea that in order to do ML without worrying too much about having to completely jump through hoops with the tech stack I have chosen that I would have to settle with Python, which I like.....for small scripts that don't do much other than piping data around or doing simple admin tasks, that is generally our use of Python at work.
For anything bigger I would prefer something else. Not because I find anything inherently horrible in Python, I find it to be a nice language overall, that has made it possible for many to find a passion inside of the world of development and possibly an interesting in overall engineering and computer science principles. Much respect Python, good game Guido VR, what you did changed the world.
But it is that damn whitespace that gets me, the need to use it as a way to properly write blocks, I just can't make myself like syntactical whitespace no matter what I do. I can do without static typing, shit I did it for the longest time with JS way tf before Node and Typescript were a thing, and I have done it before PHP's attempt at having type hints, which still leave much to be desired. Ruby(imho) the most elegant language around doesn't have it and that is fine really, it does not bother me as much, if mypy gets powerful and widely adopted enough it will then be a non-issue.
But another thing that the 4 languages i mentioned before have is non-existent syntactical whitespace......I just can't stand it.
So, why am I saying all of this nonsense? Today I wanted to recreate a conda environment and landed on the use of YAML............which has syntactic whitespace and I lost my shit.
I seldom bitch about languages and technologies, shit, I used VBScript before, not only did I get paid handsomely for it, but I fucking enjoyed it(probably cuz I am a masochist).
But two things I cannot abide: VBA and syntactic whitespace.
Once I get enough knowledge for it I will push for the same level of tooling in Python to be ported to Scala.
Thank you for coming to my whiny post about something as small as bitching about syntactic whitespace.8 -
I'm not much a fan of JavaScript. In fact, I am not very fond of any dynamic language, but JavaScript is one of my least favorites.
But this isn't about that. I use NodeJS for all of my web serving. Why would I do that? Am I a masochist? Yes.
But this isn't about that. I use NodeJS because having the same language on client and server side is something that web has never really seen before, not in this scale. Something I really really love with NodeJS is socket connections. There's no JSON parsing, no annoying conversion of data types. You can get network data and use it AS IS. If you transmit over socket using JSON, as soon as that data arrives on the server, it is available to use. It gets me so hard.
JavaScript is built to be single-threaded, and this is rooted deep into the language. NodeJS knows this isn't gonna work. And while there's still no way to multi-thread, they still try their best and allow certain operations (Usually IO) to run async as if you were using ajax.
With modern versions of the language, the server and client side can share scripts! With the inclusion of the import keyword, for the first time I have ever seen, client and server can use the same fucking code. That is mindblowing.
Syntax is still fluffy and data types are still mushy but the ability to use the same language on both sides is respectable. Can't wait for WebASM to go mainstream and open this opportunity up to more languages!10 -
I've kinda ghosted DevRant so here's an update:
VueJS is pretty good and I'm happy using it, but it seems I need to start with React soon to gain more business partnerships :( I'm down to learn React, but I'd rather jump into Typescript or stick with Vue.
Webpack is cool and I like it more than my previous Gulp implementation.
Docker has become much more usable in the last 2 years, but it's still garbage on Windows/Mac when running an application that runs on Symfony...without docker-sync. File interactions are just too slow for some of my enterprise apps. docker-sync was a life-saver.
I wish I had swapped ALL links to XHR requests long ago. This pseudo-SPA architecture that I've got now (still server-side rendered) is pretty good. It allows my server to do what servers do best, while eliminating the overhead of reloading CSS/JS on every request. I wrote an ES6 component for this: https://github.com/HTMLGuyLLC/... - Frankly, I could give a shit if you think it's dumb or hate it or think I'm dumb, but I'd love to hear any ideas for improving it (it's open source for a reason). I've been told my script is super helpful for people who have Shopify sites and can't change the backend. I use it to modernize older apps.
ContentBuilder.js has improved a ton in the last year and they're having a sale that ends today if you have a need for something like that, take a look: https://innovastudio.com/content-bu...
I bought and returned a 2019 Macbook pro with i9. I'll stick with my 2015 until we see what's in store for 2020. Apple has really stopped making great products ever since Jobs died, and I can't imagine that he was THAT important to the company. Any idiot on the street can you tell you several ways they could improve the latest models...for instance, how about feedback when you click buttons in the touchbar? How about a skinnier trackpad so your wrists aren't constantly on it? How about always-available audio and brightness buttons? How about better ports...How about a bezel-less screen? How about better arrow keys so you can easily click the up arrow without hitting shift all the time? How about a keyboard that doesn't suck? I did love touch ID though, and the laptop was much lighter.
The Logitech MX Master 3 mouse was just released. I love my 2s, so I just ordered it. We'll see how it is!
PHPStorm still hasn't fixed a couple things that are bothering me with the terminal: can't reorder tabs with drag and drop, tabs are saved but don't reconnect to the server so the title is wrong if you reopen a project and forget that the terminal tabs are from your last session and no longer connected. I've accidentally tried to run scripts locally that were meant for the server more than once...
I just found out this exists: https://caniuse.email/
I'm going to be looking into Kubernetes soon. I keep seeing the name (docker for mac, digitalocean) so I'm curious.
AWS S3 Glacier is still a bitch to work with in 2019...wtf? Having to setup a Python script with a bunch of dependencies in order to remove all items in a vault before you can delete it is dumb. It's like they said "how can we make it difficult for people to remove shit so we can keep charging them forever?". I finally removed almost 2TB of data, but my computer had to run that script for a day....so dumb...6 -
Ascended Anime Nerd
Got started with Dragonball Z when it first came stateside. Brother was borrowing fansubs of the Cell and Buu sagas back when people were wondering if Goku would ever finish Snake Road.
Around that time I started noticing some serious discrepancies between the broadcast translations and the fansubs, and so I decided to cut out the middleman—after all, how hard can it be to learn Japanese?—and did a search on AltaVista for a “kanji course”, turning up a course hosted by Rice University that taught basic Japanese using Magic Knight Rayearth and YuuYuu Hakusho.
Turns out the answer to the difficulty question is that anything van be simple to learn, if you don’t know it’s supposed to be hard. Especially if you embrace the parts everyone else dreads (falling in love with kanji, in my case).
Over the next nine months I ditched my Spanish class—and all my other classes, for that matter—to study Japanese in the computer lab. I was reviewing the lessons, playing JRPGs on SNES9X (stored on a ZIP disk, since every computer in the lab had a ZIP drive), and transcribing the scripts so I could transliterate and translate them thereafter. In a lab that went so far as to uninstall Minesweeper and Solitaire to discourage playing games on school computers, I had free reign to do so openly because the one time I got confronted for playing a game I had 150+ leaves of handwritten transcriptions to show them.
Long story short, by the time I took Japanese 101 9 months later it was like Hermione in Snape’s potions class, since I had already taught myself about 2 years’ worth of material. I then transferred out to a college that did a one-class-per-month “modular” system that basically allowed me to take 8 more Japanese classes full-time for the following year. By the time my exchange trip came up I was sofar ahead of the curriculum I was taking classes alongside the native Japanese students.
Running out of linguistic topics, I did an independent study on classical Japanese literature in its original, unmodernized grammar and orthography. A topic I’m still fairly active with 15 years later.3 -
procrastinating by getting drunk since 11:00 AM, and writing specs for my (hypothetical) language/os/platform.
feeling righteous retribution because the client made me be stressed for 3 hours due to an issue that THEY caused but for 3 hours the only info I had was "there's a critical blocker issue and we're convinced YOU caused it"
well... no... i did NOT cause the fact that you UPGRADED PHP DURING THE WEEKEND BEFORE MONDAY'S PRESENTATION TO CLIENT (while waiting for an urgent commit from me).
seriously.
also, germans. i've heard many times from other people that they're... basically racist towards us (slavic nations), thinking of us as untermensch, coal-miner peons, but I didn't realize their passive-aggressive covertly smug demanding attitude is due to this, I just assumed it's a reaction to me being incompetent.
so yesterday when we finished the call (in preparation for which I tried to switch to their "client demonstration" branch since that's where the error was, and I wanted a headstart on fixing it, ended up in a place that my today's whole-day task should be "rebuilding the DB into working condition", because there's about 10 "core" sql scripts in two different folders, which need to be run (in a very specific order, of course, which readme tells you, but what it tells you has been outdated at least for 3 months, of course), and
...THE MAIN CORE SCRIPT THAT IS THE FIRST TO RUN, THAT CREATES THE DB schema, HAS THREE SYNTAX-LEVEL typos which fail it mid-way...
...the joys of continuous deployment via scripts, I guess? I would love to challenge any person from them to screenshare to me, manual deployment of the current version from zero, and I would be willing to give the person 20% of my monthly salary if they would be able to do it within 20 minutes.
but... well...
the point is, i should be doing not entirely bullshit stuff.
but yesterday's 6 hours of being in "at full attention because it seems we fucked up" totally convinced me, that today I'm taking a break.
So I'm gonna go buy another 3 beers and continue writing the specs of my dream language/os/platform.19 -
Do you ever learn a particular technology, have something playing in the background and then associate the tech with that for-fucking-ever?
To me, when I was learning about Ruby on Rails I was watching Full Metal Alchemist Brotherhood for like the 5th time (I am a big FMA fan) and have thought of Rails to be associated with it forever. heck, even with just doing scripts in Ruby without rails I have always felt like I was doing alchemy or some shit.
Yeh I know, spot the weeb.
I don't give a shit I just love Ruby.7 -
I'm really not sure. When I was 7-8 years old, I liked to view source in IE, then I somehow managed to use Javascript in the browser. First only some dumb opening of windows. And I liked Batch, so I made some files for copying, backup and stuff.
Then I got to PHP during the years from some online tutorial about making dynamic websites. My website was more static than stone, but yeah, I did page loading with PHP! Awful experience anyway, because I had to install Xampp, get it work and other stuff. 11 years old or so. (and I used Xampp only as a fileserver between laptop and desktop later, because.. PHP4... just no.)
As 12 years old or so I experienced my first World of Warcraft (vanilla) on a custom server in an internet cafe and I thought it's a singleplayer game. When I found out that no, I googled how to make my own server (hated multiplayer back then and loved good games with huge storylines). Failed miserably with ManGOS, got something to work with ArcEMU. There I learned some C++ basic stuff, which I hoped would helped me to fix some bugs. When I opened the code I was like: "Suuure." and left it like that. I learned what a MySQL database is, broke it like four times when I forgot WHERE and still rather played with websites i.e. html, css, js and optionally php when I wanted to repair a webpage for the server. With a friend we managed to get the server work via Hamachi, was fun, the server died too soon. Then I got ManGOS to work, but there wasn't really any interest to make a server anymore, just singleplayer for the lore. (big warcraft fan, don't kick me :D )
I think it was when I was 13y.o. I went to Delphi/Pascal course, which I liked a lot from the beginning, even managed to use my code on old Knoppix via Lazarus(Pascal). At this age I really liked thoae Flash games which were still common to see everywhere. So I downloaded .swfs, opened and tried to understand it. Managed to pull some stuff from it and rewrite in Pascal. Nope, never again that crap.
About the same time I got to Flash files I discovered Java. It was kind of popular back then, so I thought let's give it a try. I liked Flash more. Seriously. I've never seen so much repetitiveness and stupid styling of a code. I had either IDE for compiling C++ or Pascal or notepad! You think I wanted my code kicked all over the place in multiple folders and files? No.
So back to Pascal. I made some apps for my old hobby, was quite satisfied with the result (quiz like app), but it still wasn't the thing. And I really thought I'd like to study CS.
I started to love PHP because of phpBB forums I worked on as 15 y.o. I guess. At the same time I think there was an optional subject at school, again with Pascal. I hated the subject, teacher spoke some kind of gibberish I didn't really understand back then at all and now I find it only as a really stupid explanation of loops and strings.
So I started to hate Pascal subject, but not really the lang itself. Still I wanted something simpler and more portable. Then I got to Python as hm, 17y.o. I think and at the same time to C++ with DevC++. That was time when I was still deciding which lang to choose as my main one (still playing with website, database and js).
Then I decided that learning language from some teacher in a class seriously pisses me off and I don't want to experience it again. I choose Python, but still made some little scripts in C++, which is funny, because Python was considered only as a scripting lang back then.
I haven't really find a cross-platform framework for C++, which would: a) be easy to install b) not require VisualStudio PayForMe 20xy c) have nice license if I managed to make something nice and distribute it. I found Unity3D though, so I played with Blender for models, Audacity for music and C# for code. Only beautiful memories with Unity. I still haven't thought I'm a programmer back then.
For Python however I found Kivy and I was playing with it on a phone for about a year. Still I haven't really know what to do back then, so I thought... I like math, numbers, coding, but I want to avoid studying physics. Economics here I go!
Now I'm in my third year at Uni, should be writing thesis, study hard and what I do? Code like never before, contribute, work on a 3D tutorial and play with Blender. Still I don't really think about myself as a programmer, rather hobby-coder.
So, to answer the question: how did I learn to program? Bashing to shit until it behaved like I desired i.e. try-fail learning. I wouldn't choose a different path.2 -
Tl;Dr Im the one of the few in my area that sees sftping as the prod service account shouldn't be a deployment process. And the ONLY ONE THAT CARES THAT THIS IS GONNA BREAK A BUNCH OF SHIT AT SOME POINT.
The non tl;dr:
For a whole year I've been trying to convince my area that sshing as the production service account is not the proper way to deploy and/or develop batch code. My area (my team and 3 sister teams) have no concept of using version control for our various Unix components (shell scripts and configuration files) that our CRITICAL for our teams ongoing success. Most develop in a "prodqa like" system and the remainder straight in production. Those that develop straight in prodqa have no "test" deployment so when they ssh files straight to actual production. Our area has no concept of continuous integration and automated build checking. There is no "test cases", no "systems testing" or "regression testing". No gate checks for changing production are enforced. There is a standing "approved" deployment process by the enterprise (my company is Whyyyyyyyyyy bigger than my area ) but no one uses it. In fact idk anyone in my area who knows HOW to deploy using the official deployment method. Yes, there is privileged access management on the service account. Yes the managers gets notified everytime someone accesses the privileged production account. The managers don't see fixing this as a priority. In fact I think I've only talk to ONE other person in my area who truly understands how terrible it is that we have full production change access on a daily basis. Ive brought this up so many times and so many times nothing has been done and I've tried to get it changed yet nothing has happened and I'm just SO FUCKING SICK that no one sees how big of a deal this. I mean, overall I live the area I work in, I love the people, yet this one glaring deficiency causes me so much fucking stress cause it's so fucking simple to fix.
We even have an newer enterprise deployment. Method leveraging a product called "urban code deploy" (ucd) to deploy a git repository. JUST FUCKING GIT WITH THE PROGRAM!!!!..... IT WAS RELEASED FUCKING 12 YEARS AGO......
Please..... Please..... I just want my otherwise normally awesome team to understand the importance and benefits of version control and approved/revertable deployments2 -
So I started working at a large, multi billion dollar healthcare company here in the US, time for round 2,(previously I wasn't a dev or in IT at all). We have the shittiest codebase I have ever laid eyes on, and its all recent! It's like all these contractors only know the basics of programming(i'm talking intro to programming college level). You would think that they would start using test driven development by now, since every deployment they fix 1 thing and break 30 more. Then we have to wait 3 months for a new fix, and repeat the cycle, when the code is being used to process and pay healthcare claims.
Then some of my coworkers seem to have decided to treat me like I'm stupid, just because I can't understand a single fucking word what they're saying. I have hearing loss, and your mumbling and quiet tone on top of your think accent while you stop annunciated your words is quite fucking hard to understand. Now I know english isn't your first language and its difficult, I know, mine is Spanish. But for the love of god learn to speak the fuck up, and also learn to write actual SQL scripts and not be a fucking script kiddie you fucking amateur. The business is telling you your data is wrong because you're trying to find data that exists is complex and your simple select * from table where you='amateur with "10years" experience in SQL' ain't going to fucking cut it. Learn to solve problems and think analytically instead of copy fucking pasta. -
I am in-fucking-love with myself and packages contributed to OSS communities!
TL;DR: inotify is great and I am lazy bitch so I wrote a script to kinda do my work
I took some time to write a script that takes a folder with images (Screenshots) and move them somewhere else with the last modify time as their new name (something like "Screenshot_DATE_TIME.png) because my current screenshot software for Windows (Lightshot) only saves their screenshots like this: Screenshot_<Incrementing Number>.
Once in a while I'd like to move those images away to "clean up" that folder, but I always have to create a new folder like "OLD" but that already exists so it becomes "OLD_1" which.. also existed up to "OLD_3" and I finally grew sick of it!
2ish hours later my Perl script now automatically gets triggered by inotify once a new file (Screenshot for that matter) is written or moved to the Screenshot folder and auto-fucking-matically moves it to the "new" folder with the new filename so I don't have the issue of having "OLD_1" .. "OLD_INFINITY" anymore.
Little things / scripts like these really make me feel good about what myself and my coding skills (I know, this is a somewhat trivial task but still a great experience)2 -
Try to finish some of the projects I've started in 2018. Right now I have a todo list text file, along with multiple written lists (the written ones are more focused on a single project normally).
-Finish the startpage I've been doing off and on for at least a month now. I ended up making a lot of it command based (just need to write the scripts for the commands..). I had a little config menu but I just got tired of it and the text box is autofocus anyways, so I figured I'd make it command focused.
-Nice little root safety script as I call it. I've made very stupid mistakes as root before. I once made a typo and ran "chmod --recursive 644 /" while half asleep. I believe I was trying to run that on the current directory I was in, but as you know, the . and / are right next to each other. Basically the script would see what you're doing and echo "you're about to do x, are you sure that's what you want to do?". Something I know I could knock out in a day, but I've been putting it off for at least a year now.
-Compiling notification. I saw something similar once a few years ago, and it was so fucking cool. I remember it being a Mac, and it had a notification that would basically tell you how many files and shit you had left to compile if you were building something. Kinda want to build something for polybar.
-FUCKING RUBBER DUCK DEBUGGING TO THE EXTREME! This one was inspired by a comment someone made once months ago. Might have been here, or reddit, or in real life, not sure. Basically a big ass fucking rubber duck with LEDs in it that will like glow red if your code wouldn't compile (I think Visual Studio has like an automatic error detecting thing in there?? Maybe something similar if I can figure that out). Honestly not sure how the fuck I'd do this one, but I love the idea and I really want to fucking do it
There's more shit. These are just the main ones I want to attempt sometime in the near future. -
I've just started my new career with a job in IT operations and I love it. After my electrical engineering degree I fell into a job as a website manager for a small company, I self taught html and css and I knew from then that I had found a job that didn't feel like a job. I'm excited to learn everything I need to know to progress as far as I can go in this industry. In my first few weeks at this new job (where i have my own office!) I've self taught python to create automation scripts for live projects, currently up to my eyeballs trying to figure out how to change the VB code for an excel module.....Then there have been so many other projects and bugs and I love it! Any tips and advice is greatly appreciated!undefined new job first post newbie advice needed gimme more money bitch learning to code operations2
-
go fuck yourself with your fucking communities. i went into computing because i like being left alone. who are all those fucking freaks building their communities? this is capitalism mother fuckers, everybody in the world agreed on it, on each person being an independent individual doing their job to the best possible standard, instead these low-skill low-iq oversocialised sheeple started conglomerate into communities and brainwash everybody that this is what it is about. get stuffed alright. all my life i've been introverted, just leave me alone to write code alright? take my library i don't mind i'll take yours no strings attached, just push the code and forget about it. but no, all these degenerate morons without CS degrees have occupied our safe space, pushed us out of it and just can't get enough of using the buzzword "community-driven" "volunteers" volunteer my ass assholes you can't even make software nobody in real industry needs you because you have no skill at all you learn a bit of js which is any 14-15 yo can do and now think you're some kind of prodigies, unsung heros of humanity who selflessly bring the progress. nothing can be further from the truth - because of you we don't have real software, we don't have investment we don't get no respect everybody walks all over software engineers treating us like shit, there's an entire generation of indoctrinated parasitic scum that believes that software tools is grown for them on trees by some development teams that their are entitled to automatically, because some corporation will eventually support those big projects - yeah does it really happen though - look at svelte, the guy is getting 50k a year when he should be earning at least 500k if he had balls to start a real businesses, but no we are all fucking prostitutes, just slaving away for the army of people we never see. are you out of your mind. this shit should be fucking illegal alright it's modern day slavery innit bruh, if a company wants to pay their engineers to work on open source this is fine, i love open source like java or google closure compiler, but it's real software made by real engineers, but who are all these community freaks who can't spend a 10 seconds on stage in their shitty bogus conferences without ringing the "community" buzzer? you're not my community i fucking hate your guts you're all such dumb womenless imbeciles who justify their lack of social skill by telling themselves that you're doing good by doing open source in your free time - mate nobody gives a shit alrite? don't you want money sex power? you've destroyed everything that was good about good olde open source when it was actually fun, today young people are coerced into slavery at industrial scale, it's literally impossible to make a buck from software as indie unless you build something really big and good, and you can't build anything big without investment and who invests in software nowadays? all the ai "entrepreneurs" are getting fucking golden rained with cash while i have to ask for a 5$ donation? what the actual fuck? who sanctions this? the entire industry is in one collective psychotic delusion, spurred by microsoft who use this army of useful idiots to eliminate all hounour dignity of the profession, drive the abundance and bring about poverty of mind, character, as well as wallet as the natural state of things. fucking amatures of course you love your shitty little communities because you can't achieve anything on your own. you literally have no personality, just one homogenous blob of dumb degenerates who think and act all the same. there used to be a tool called adobe flash builder, i could just buy it, then open and make a web app, all from start to finish in one program, using tutorials of adobe experts on youtube, sure it might have had its pitfals but it was a product - today there's literally no fucking product to make websites. do you people get it? i can't buy a tool that i need to do my job and have to insult myself by downloading some shitty scripts from some shitty unemployed devs and hope my computer doesn't blow up in my face in the process because some freak went off his nut and uploaded some dodgy ass exploit on npm in his package. i really don't like. it's not supposed to be like that. good for me i build by own front/back end. this "community" insanity is just a symptom of industrial degeneration, they try to sell it to us like it's the "bright" communist future but things never been worst, i can't give a shit about functional programming alright i just need to get my job done mate leave me alone you add functional because you don't know how to solve the problem properly, e.g., again adobe flex had mxml where elements had ids and i could just program to id, it was alright but today all this unqualified morons filled the whole space after flash blew up and adobe execs axed flash builder instead of adapting it to js runtime, it was a crime against humanity that set us back to 1000s5
-
Situation: I have a love hate relationship with python due to the lack of types as I have in more established languages such as C#, Java and shit even TypeScript
Situation (cont): A rather large codebase that i have developed for multiple processes at work run on Python.
I don't hate it, I just don't absolutely love it, there is a lot of things to like about Python, but man I do have some conflicts with it, I have been facing out to use other solutions that feel scripty, such as the newer versions of C# with .net, but I would say that about 80% of our codebase runs on Python, the rest is PHP.
I am somewhat traditional in the way my programs run, I started with C++ and Java, then for whatever reason (I blame codecademy at the time) switched over to Ruby and Javascript, mostly Javascript. I do not remember how I found Python, I do remember learning it with an online tutorial, shit was easy to get started with.
My codebase running on Python is huge, and they do a lot from automation scripts, to data gathering and database management, never had I been bitten with the "oh noes is so slow" bug since my code is not Google level big, for everything else Python seems rather fast imho
I dunno, big time love hate relationship9 -
I am not sure if this is the best place for it, but let's go:
I am 35 years old and I always worked in the localization industry. I really love to code and I always developed small tools and scripts to help me and others at work, but now the company is going bad and it has the chance to close.
I was reckon if it would be a good idea to give development a try, besides my age and the lack of experience in a real development place. I am not even sure if I use programming good practices, as I always developed by myself.
Do you have any opinion about it?
Thank you so much!4 -
So this is the story of myself getting from hating vim to find it pretty good.
When i started fiddling around with linux i was literally overrun by vim. I mean how the fuck should i remember all these stupid commands.
So there we go ... nano was my favourite (and only) editor i used.
Everything was fine in my little nano world. I saw some colleague editing every damn thing in vim. I asked him "man what the fuck are you damn crazy"? And thats where till that moment the deepest conversation about an editor in my life began. He told me he could do that much with vim, its almost everywhere nowadays and a must for any admin.
So after letting him tell me about every thing you can do he promised me he is going to help me getting started quicker. And i must say boi vim is really awesome. But for "real" development i still use a ide. Although i find myself programming go, python or bash scripts entirely in vim and its not that bad.
So if you find your way through the deep shit of that single damn command input down there you can get a pretty decent editor.
Dont get me wrong i am forced to use nano sometimes, when i help some of friends with their servers or so and they litterally uninstalled vim because they were to frustrated.
So as i am started to go into the devops area you get more and more towards you have to edit a file on a server, or just tweak around before automating the shit out of it.
And i must say vim has become a solid alternative for me to a full blown ide, or any other text editor.
So yeah i am gone from freaking hating vim to using it almost everyday. But why some people out their treat vim like a religion is not understandable to me in any way.
So whats your story why do you hate/love vim? Or are you just like me a "happy user" that would switch to another editor anytime it would be a better fit?3 -
Inspired by my professor’s rant about people don’t know how to google stuffs, I made a scriptable script to solve all those issues. It’s a super smart script that shows detailed step by step solution of how to tackle down a problem
For those who doesn’t know, scriptable is a free app for Apple basically writing scripts that can be used, in JavaScript.
Here is the repo:
https://github.com/txstc55/...
Please try it out, you will love it, I promise
Disclaimer: I am not responsible for the ending of any relationship after using this script4 -
As my apt renovation is nearly completed it's time to get all the cool toys. And that's where I need your ideas :)
what should I get? What techie-stuff would you think is worth considering?
I for one have wet dreams about vacuuming robots. Not a roomba ofc [bcz it ties to Apple], smth else. I get that an opensource robot would be a pipe dream, but I'd love smth I could control via bash scripts [prolly via lan] at least. Some api would be nice :) . Any advices here? Cleaning quality should be way above 'okay'.5 -
I started because the first PC I owned ran on Windows NT and, even though I can't recall for the life of me what, something always broke but was fixable with some command lines. After finding out about Batch scripts my exploration instinct kicked in and I started to make a script for nearly anything (at one point I even had a script to start Firefox). From there on I stumbled over C++ and what can I say, I quit programmin four times before I found Python and fell in love with this beautiful, pointerless snake which led me on the way of becoming a programmer. So, long story short, a broken OS and all that free time you have during school if you always copy your Honework in breaks^^.
-
I really love freelancing and I'm getting a few projects here and there ,maybe once in a few months.but I'm currently studying so those few projects does financially reward me a bit. Is anyone here freelancing ,do you have any tips to get more projects.My projects are normally full Django applications and deployment, Web scraping scripts ,WordPress sites(yeah fml but some people want WordPress),Full websites with other various cms's.1