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 - "time formats"
-
Found this gem on GitHub:
// At this point, I'd like to take a moment to speak to you about the Adobe PSD format.
// PSD is not a good format. PSD is not even a bad format. Calling it such would be an
// insult to other bad formats, such as PCX or JPEG. No, PSD is an abysmal format. Having
// worked on this code for several weeks now, my hate for PSD has grown to a raging fire
// that burns with the fierce passion of a million suns.
// If there are two different ways of doing something, PSD will do both, in different
// places. It will then make up three more ways no sane human would think of, and do those
// too. PSD makes inconsistency an art form. Why, for instance, did it suddenly decide
// that *these* particular chunks should be aligned to four bytes, and that this alignement
// should *not* be included in the size? Other chunks in other places are either unaligned,
// or aligned with the alignment included in the size. Here, though, it is not included.
// Either one of these three behaviours would be fine. A sane format would pick one. PSD,
// of course, uses all three, and more.
// Trying to get data out of a PSD file is like trying to find something in the attic of
// your eccentric old uncle who died in a freak freshwater shark attack on his 58th
// birthday. That last detail may not be important for the purposes of the simile, but
// at this point I am spending a lot of time imagining amusing fates for the people
// responsible for this Rube Goldberg of a file format.
// Earlier, I tried to get a hold of the latest specs for the PSD file format. To do this,
// I had to apply to them for permission to apply to them to have them consider sending
// me this sacred tome. This would have involved faxing them a copy of some document or
// other, probably signed in blood. I can only imagine that they make this process so
// difficult because they are intensely ashamed of having created this abomination. I
// was naturally not gullible enough to go through with this procedure, but if I had done
// so, I would have printed out every single page of the spec, and set them all on fire.
// Were it within my power, I would gather every single copy of those specs, and launch
// them on a spaceship directly into the sun.
//
// PSD is not my favourite file format.
Ref : https://github.com/zepouet/...16 -
I'm trying to sign up for insurance benefits at work.
Step 1: Trying to find the website link -- it's non-existent. I don't know where I found it, but I saved it in keepassxc so I wouldn't have to search again. Time wasted: 30 minutes.
Step 2: Trying to log in. Ostensibly, this uses my work account. It does not. Time wasted: 10 minutes.
Step 3: Creating an account. Username and Password requirements are stupid, and the page doesn't show all of them. The username must be /[A-Za-z0-9]{8,60}/. The maximum password length is VARCHAR(20), and must include upper/lower case, number, special symbol, etc. and cannot include "password", repeated charcters, your username, etc. There is also a (required!) hint with /[A-Za-z0-9 ]{8,60}/ validation. Want to type a sentence? better not use any punctuation!
I find it hilarious that both my username and password hint can be three times longer than my actual password -- and can contain the password. Such brilliant security.
My typical username is less than 8 characters. All of my typical password formats are >25 characters. Trying to figure out memorable credentials and figuring out the hidden complexity/validation requirements for all of these and the hint... Time wasted: 30 minutes.
Step 4: Post-login. The website, post-login, does not work in firefox. I assumed it was one of my many ad/tracker/header/etc. blockers, and systematically disabled every one of them. After enabling ad and tracker networks, more and more of the site loaded, but it always failed. After disabling bloody everything, the site still refused to work. Why? It was fetching deeply-nested markup, plus styling and javascript, encoded in xml, via api. And that xml wasn't valid xml (missing root element). The failure wasn't due to blocking a vitally-important ad or tracker (as apparently they're all vital and the site chain-loads them off one another before loading content), it's due to shoddy development and lack of testing. Matches the rest of the site perfectly. Anyway, I eventually managed to get the site to load in Safari, of all browsers, on a different computer. Time wasted: 40 minutes.
Step 5: Contact info. After getting the site to work, I clicked the [Enroll] button. "Please allow about 10 minutes to enroll," it says. I'm up to an hour and 50 minutes by now. The first thing it asks for is contact info, such as email, phone, address, etc. It gives me a warning next to phone, saying I'm not set up for notifications yet. I think that's great. I select "change" next to the email, and try to give it my work email. There are two "preferred" radio buttons, one next to "Work email," one next to "Personal email" -- but there is only one textbox. Fine, I select the "Work" preferred button, sign up for a faux-personal tutanota email for work, and type it in. The site complains that I selected "Work" but only entered a personal email. Seriously serious. Out of curiosity, I select the "change" next to the phone number, and see that it gives me four options (home, work, cell, personal?), but only one set of inputs -- next to personal. Yep. That's amazing. Time spent: 10 minutes.
Step 6: Ranting. I started going through the benefits, realized it would take an hour+ to add dependents, research the various options, pick which benefits I want, etc. I'm already up to two hours by now, so instead I decided to stop and rant about how ridiculous this entire thing is. While typing this up, the site (unsurprisingly) automatically logged me out. Fine, I'll just log in again... and get an error saying my credentials are invalid. Okay... I very carefully type them in again. error: invalid credentials. sajfkasdjf.
Step 7 is going to be: Try to figure out how to log in again. Ugh.
"Please allow about 10 minutes" it said. Where's that facepalm emoji?
But like, seriously. How does someone even build a website THIS bad?rant pages seriously load in 10+ seconds slower than wordpress too do i want insurance this badly? 10 trackers 4 ad networks elbonian devs website probably cost $1million or more too root gets insurance stop reading my tags and read the rant more bugs than you can shake a stick at the 54 steps to insanity more bugs than master of orion 313 -
Gf: "Why are you such a typist"
Me: "I promise not to buy more keyboards with blue switches..."
Gf: "No, I mean like being racist or sexist, but you discriminate types"
Me: "Uhhh"
Gf: "You are always bitching about how awful date/time types are, with timezones, leap seconds and daylight savings"
Me: Face turns pale, thousand yard stare, vietnam-flashback to when I was writing a calendar scheduling/meeting/matching tool which used 3 databases, with timestamps in different formats, and web frontends for people in offices around the world.
Me, with a soft broken voice: "So?"
Gf: "You've been working on that palette tool this week, and you keep talking about how interesting all these colorspaces, white balances and conversion formulas are"
Me: 🤔5 -
Root has a deadline
I've been working on this CCPA ticket for awhile. Admittedly too long, but I'm new to the codebase and it's fucking sprawling. There has also been a lot of back-and-forth on the ticket.
Anyway, I've had a few blockers, such as how mailers work, the legal copy, where to put a admin-facing link to the dashboard, how to build the jira integration (and its creds), etc.
Quite awhile ago I asked Mr. Product, "Where should I put the ccpa dashboard link?" To which he responds: "I'll get you the answer today!" Awesome. Except he didn't. That day came and went without a peep. So, the next day I ask again: "Where should I put the ccpa dashboard link?" To which he responds: "I'll get you the answer today!" And that day comes and goes, too. I ask again, and you guessed it: "I'll get you the answer today." Repeat ad nauseam.
I also asked about the Jira integration and credentials. I got about the same treatment as above, but with a tiwst: they tell me to talk to / continue to bug Mr. H instead. Except Mr. H had been on PTO for weeks. Every time I ask, they keep referring me to him. A little over two weeks later (yesterday), I finally got a response from him. Yay! I was preoccupied with finishing the dashboard (which wasn't in the original ticket for some reason) so I didn't get a chance to look into it yet. After asking his boss three times, Mr. Product also finally (!!!) gave me a response on the link placement today, too! Though not directly: he discussed it with said boss in a group chat that I'm a part of, but never tagged me or told me directly. So, now I know where to put it (I think), but I have no idea how that area of the site is built (it's dynamic based on domain, login, and roles), so adding it will still be difficult.
The best part:
Today during standup, some lady I've only rarely seen before attends the meeting, doesn't say anything until the very end, and then announces that everything must be code-complete by tomorrow for release, and then promptly signs off.
For fuck's sake. I've had blockers on this for weeks, and now I need to finish it by fucking tonight?
I still don't know how to build the mailers (because translations and formats), nor how to actually send emails using them. I don't know how to modify the footer (dynamic, complex), how to add the admin-facing link (dynamic, complex), nor how build a Jira integration (haven't even looked yet). I just got unblocked on two of these fucking today. and it needs to be done and code reviewed by tomorrow?
No bloody way.
Maybe I should go back to my previous job. 😡rant root has a deadline traded my days for a pocketful of mumbles blockers deadlines nobody cares the boxer18 -
i am BEYOND pissed at google.
as some of you know, i recently got android studio to run on a chromebook (you read that right), but it being a chromebook and google being a protective fucktard of their crappy operating system, i had to boot into bios every time i started it.
when i was with some friends, i started up the chromebook, and left, after telling my friends how to boot the chromebook.
ten seconds and literally one press of the esc button later, he broke the entire thing.
but that's not what that rant was about, i honestly knew it would happen eventually (although, this wasn't the best time).
so now this screen pops up.
"chrome os is damaged or missing, please insert a usb recovery drive" or something like that.
well, i'll create one. simple enough.
no wait, this is google, just your average 750 billion dollar company who cares more about responsive design then a product actually responding.
i started to create the recovery usb. of course, chrome developers thought it would be a good idea to convert the old, working fine, windows executable usb recoverer, and replace with with a fucking chrome extension.
i truly hope someone got fired.
so, after doing everything fine with the instructions, it got to the part where it wrote the os image to the usb. the writing stayed at 0%.
now this was a disk thing, writing os's and shit, so i didn't want to fuck it up. after waiting ten minutes, i pressed 'cancel.'
i tried again many times, looked things up, and frantically googled the error. i even tried the same search queries on bing, yahoo, duckduckgo and ecosia because i had the feeling google secretly had tracked me over the past 7 years and decided to not help me after all the times i said google was a fucker or something similar.
google is a fucker.
after that, i decided to fuck with it, even if it formats my fucking c drive.
i got to the same point where the writing got stuck at 0% and proceeded to fuck. i start spamming random keys, and guess what?
after i press enter, it started.
what the fuck google?
1000s of people read the article on how to make the recovery drive. why not tell them to press the goddamn enter key?
i swear there are hundreds of other people in my same situation. and all they have to do is press one fucking key???
maybe tell those people who tried to fix the shit product you sold them.
fuck you google.9 -
Let me ask you something: why do most people prefer ms word over a simple plain text document when writing a manual. Use Markdown!
You can search and index it (grep, ack, etc)
You don't waste time formatting it.
It's portable over OS.
You only need a simple text editor.
You can export it to other formats, like PDF to print it!
You can use a version control system to version it.
Please! stop using those other formats. Make everyone's life easier.
Same applies when sharing tables. Simple CSV files are enough most of the time.
Thank you!!?!18 -
OCR (The exam board for my course) are fucking thick in the head when it comes to anything computing.
- I get a mark or two for saying open source software is worse than thier propritary counterparts
- ALL open source software forks must also be make open source. They spend so much time going over the legal stuff BUT HAVE NEVER HEARD OF OPEN SOURCE LICENCING!
- One exam paper had a not gate picture with 2 inputs...
- I have to differentiate between portable and handheld! YOU MEAN HANDHELD DEVICES ARE NOT PORTABLE!?!!?!?
- In level 2 education, OCR say 1 MB = 1024 KB - In level 3, they say 1 MB = 1000 KB, and 1 MiB = 1024 KiB, and expect you to differentiate. Why do you expect the wrong answer in level 2!?
- INFORMATION FORMATS AND STYLES ARE COMPLETELY DIFFERENT THINGS! If you look up synonyms for "style", "form" is there, and if you look up synonyms for "format", "style" is there.
- When asked for storage devices, I have to say "smartphone", "tablet", "desktop PC" - I mean yeah they store data but when you ask me for storage devices I will say "hard disk drive", "solid state drive", "SD card", etc. >.>
I could probably go on an on about this...
I sure do love being asked to copy-paste existing HTML/JS/CSS and being asked to just tweak it here and there, and then wait for other people's incompetence in copy-pasting... I sure do love being stuck with this sort of "education" ._.4 -
This feature I'm building requires crossing over to a second application for some actions (fair, this reduces repetition), but the method used for it is kind of ridiculous.
To keep with the existing patterns, I followed suit, and added two PATCH and a DELETE routes, wrappers, and calls. (Typical CRUD + de/reactivate).
But. This freaking halfassed HTTP model doesn't support anything but POST and PUT! wtf. (Also, the various IDs, naming schemes, and required json data/formats differ across view, controller, and endpoints. but whatever?)
Two and a half hours later, and the feature is done and works wonderfully. Four times the functionality of the previous incarnation, and the code is only about 25% longer! haha.
Ahh, I'm complimenting myself again. (but somebody has to, right? 😅)
but really, when i want to get something done i'm actually surprised at how quickly it all comes together. Even when I need to patch API Guy's madness.
(and this time I actually found someone else's code in the mess! It was actually worse!)
I suppose taking a day off yesterday did me some good.rant double entendres are the best rest after rest root compliments herself expanding someone else's crud1 -
spent 8 months building and customizing a vtiger database for work. tons of fun got it to a point where I have saved a ton of time for all the people that use the program. boss wants to have reports out of it each morning, so I showed him how to run reports and adjust entries. he didn't like the formatting of the report. so I set up the report to export to excel and took another 2 hours building a macro that formats the way he likes and prints the report for him. he used to take a month filling out paper work to get a report, now all he has to do is open a favorite on his web browser, make 3 clicks Then open an excel and type ctrl+r and it's done. he tells me it seems too complicated and is considering going back to the paper method...so frustrating.2
-
I had spent the last year working on a online store power by woocommerce with over 100k products from various suppliers. This online store utilized a custom API that would take the various formats that suppliers offer their inventory in and made them consistent. Now everything was going swimmingly initially, but then I began adding more and more products using a plug-in called WP all import. I reached around 100k products and the site would take up to an entire minute to load sometimes timing out. I got desperate so I installed several caching plugins, but to no avail this did not help me. The site was originally only supposed to take three to four months but ended up taking an entire year. Then, just yesterday I found out what went wrong and why this woocommerce website with all of these optimizations was still taking anywhere from 60 to 90 seconds to load, or just timing out entirely. I had initially thought that I needed a beefier server so I moved it to a high CPU digitalocean VM. While this did help a little bit, the site was still very slow and now I had very high CPU usage RAM usage and high disk IO. I was seriously stumped the Apache process was using a high amount of CPU and IO along with MYSQL as well. It wasn't until I started digging deeper into the database that I actually found out what the issue was. As I was loading the site I would run 'show process list' in the SQL terminal, I began to notice a very significant load time for one of the tables, so I went to go and check it out. What I did was I ran a select all query on that particular table just to see how full it was and SQL returned a error saying that I had exceeded the maximum packet size. So I was like okay what the fuck...
So I exited my SQL and re-entered it this time with a higher packet size. I ran a query that would count how many rows were in this particular table and the number came out to being in the millions. I was surprised, and what's worse is that this table belong to a plugin that I had attempted to use early in the development process to cache the site. The plugin was deactivated but apparently it had left PHP files within the wp content directory outside of the actual plugin directory, so it's still executing scripts even though the plugin itself was disabled. Basically every time I would change anything on the site, it would recache the whole thing, and it didn't delete any old records. So 100k+ products caching on saves with no garbage collection... You do the math, it's gonna be a heavy ass database. Not only that but it was serialized data, so when it did pull this metric shit ton of spaghetti from the database, PHP then had to deserialize it. Hence the high ass CPU load. I had caching enabled on the MySQL end of things so that ate the ram. I was really desperate to get this thing running.
Honest to God the main reason why this website took so long was because the load times made it miserable to work on. I just thought that the hardware that I had the site on was inadequate. I had initially started the development on a small Linux VM which apparently wasn't enough, which is why I moved it to digitalocean which also seemed to not be enough, so from there I moved to a dedicated server which still didn't seem to be enough. I was probably a few more 60-second wait times or timeouts from recommending a server cluster to my client who I know would not be willing to purchase it. The client who I promised this site to have completed in 3 months and has waited a year. Seriously, I would tell people the struggles that I would go through with this particular site and they would just tell me to just drop the site; just take the money, just take the loss. I refused to, this was really the only thing that was kicking my ass. I present myself as this high-and-mighty developer like I'm just really good at what I do but then I have this WordPress site that's just beating the shit out of me for a year. It was a very big learning experience and it was also very humbling as well, it made me realize that I really don't know as much as I think I might. It was evidence that there is still so much more to learn out there, I did learn a lot from that experience especially about optimizing websites the different types of methods to do that particular lonely on the server side and I'll be able to utilize this knowledge in the future.
I guess the moral of the story is, never really give up. Ultimately things might get so bad that you're running on hopes and dreams. Those experiences are generally the most humbling. Now I can finally present the site that I am basically a year late on to the client who will be so happy that I did not give up on the project entirely. I'll have experienced this feeling of pure euphoria, and help the small business significantly grow their revenue. Helping others is very fulfilling for me, even at my own expense.
Anyways, gonna stop ranting. Running out of characters. If you're still here... Ty for reading :')7 -
I really enjoy my old Kindle Touch rather than reading long pdf's on a tablet or desktop. The Kindle is much easier on my eyes plus some of my pdf's are critical documents needed to recover business processes and systems. During a power outage a tablet might only last a couple of days even with backup power supplies, whereas my Kindle is good for at least 2 weeks of strong use.
Ok, to get a pdf on a Kindle is simple - just email the document to your Kindle email address listed in your Amazon –Settings – Digital Content – Devices - Email. It will be <<something>>@kindle.com.
But there is a major usability problem reading pdf's on a Kindle. The font size is super tiny and you do not have font control as you do with a .MOBI (Kindle) file. You can enlarge the document but the formatting will be off the small Kindle screen. Many people just advise to not read pdf's on a Kindle. devRanters never give up and fortunately there are some really cool solutions to make pdf's verrrrry readable and enjoyable on a Kindle
There are a few cloud pdf- to-.MOBI conversion solutions but I had no intention of using a third party site my security sensitive business content. Also, in my testing of sample pdf's the formatting of the .MOBI file was good but certainly not great.
So here are a couple option I discovered that I find useful:
Solution 1) Very easy. Simply email the pdf file to your Kindle and put 'convert' in the subject line. Amazon will convert the pdf to .MOBI and queue it up to synch the next time you are on wireless. The final e-book .MOBI version of the pdf is readable and has all of the .MOBI options available to you including the ability for you to resize fonts and maintain document flow to properly fit the Kindle screen. Unfortunately, for my requirements it did not measure-up to Solution 2 below which I found much more powerful.
Solution 2) Very Powerful. This solution takes under a minute to convert a pdf to .MOBI and the small effort provides incredible benefits to fine tune the final .MOBI book. You can even brand it with your company information and add custom search tags. In addition, it can be used for many additional input and output files including ePub which is used by many other e-reader devices including The Nook.
The free product I use is Calibre. Lots of options and fine control over documents. I download it from calibre-ebook.com. Nice UI. Very easy to import various types of documents and output to many other types of formats such as .MOBI, ePub, DocX, RTF, Zip and many more. It is a very powerful program. I played with various Calibre options and emailed the formatted .MOBI files to my Kindle. The new files automatically synched to the Kindle when I was wireless in seconds. Calibre did a great job!!
The formatting was 99.5% perfect for the great majority of pdf’s I converted and now happily read on my Kindle. Calibre even has a built-in heuristic option you can try that enables it to figure out how to improve the formatting of the raw pdf. By default it is not enabled. A few of the wider tables in my business continuity plans I have to scroll on the limited Kindle screen but I was able to minimize that by sizing the fonts and controlling the source document parameters.
Now any pdf or other types of documents can be enjoyed on a light, cheap, super power efficient e-reader. Let me know if this info helped you in any way.4 -
Fuck you apple, and fuck your god damn shitty documentation.
Working with NFC enabled passes, their documentation says "payload max is 64 bytes"
What they ACTUALLY fucking mean is 64 ascii characters.
Also, the way they handle date time formats is fucked. They say they support W3C formats (iso) but what they actually mean is, they support a half assed version of a subset of it.
I told their chief engineer over a phone call and his response;
"I agree, our documentation is lacking"... HOW ABOUT YOU FUCKING UPDATE IT!
Also, how they handle json is just bad.7 -
Tomorrow I will be on a long train trip again so here goes!
My last train project is http://jsrant.com and people seem to enjoy it. Every time I am mentioned in a rant related to it people also mention the idea of a similar application but for in the terminal. So I intend to build that tomorrow.
To build the best thing for you I want to ask you some questions:
- What operating system are you running?
- Why (or how) would you like to use a devrant terminal reader?
- Why would you NOT want to use a devrant terminal reader?
- Would your use-case required obfuscated output? (Hiding it from someone)
- If so, what formats do you use on a daily basis or are you most comfortable with?
- Anything else you would like to mention or for me to consider?
I will be developing the larger part of this tomorrow, but the sources will be made available to the public.9 -
Fuck my company. Let the technology people work with technology.
I work at a small company who constantly brings in people who are absolutely useless. The project manager requires me to take items out of azure Dev-ops into an excel because he will not take the time to understand how a board works. The business analyst hands bullshit requirements in formats which no one but him can understand under the pretense that the Devs and architect can ask him when they feel like it. The CEO wants a power-point which again the technical teams have to prepare for him because the project manager or BA will not have time for it. However they make sure to gut the estimates handed over by the Dev team and introduce unfeasible deadlines.
Meanwhile the client has zero problems as the work still somehow gets done due to people in the Dev team overextending. Goddam leeches wasting mine and my teams time doing bullshit.8 -
I never thought to I'd say this about an open-source project, but if I wanted to single out an unbeatable case of "Bad Design", and the manifestation of the term "Redundancy Hell", It is definitely Calibre.
Single job: To keep some e-book files + some metadata.
What it does in brief: In a single dir as your library; From metadata stored IN each file; It generates subdirs <author_name>/<title_name>(<some_numerical_id>), copies the e-book file there, generates a jpg cover from the first page and also stores it there, generates an xml file to support legacy e-book formats (but it generates it anyway even for pdfs), which contains all the same metadata for the file, including title, author and href for the cover, and also stores it there. And then, all the same metadata for all books is stored in a metadata.db in the library root folder. I don't know if there is more data stored/used somewhere in a more obfuscated way.
Not too much to ask: Change some author/title/any single field.
What is done: 💩🌋
It is so helpful, it does all the stuff by itself or its plugins; you don't have to touch anything. But it also has this amazing ability to fuck everything up without even being touched. I mean WHAT THE FUCK WERE YOU THINKING? WHAT KIND OF A FUCKING DESIGN IS THIS? A FUCKING FRACTAL?
Literally, If I had listed all my books on physical papers with a real life pen, It would take me less time that I've already wasted on unfucking the regular disasters. Fuck you and your arrogant responses to issues. -
How deep does the rabbit hole go?
Problem: Convert numpy array containing an audio time series to a .wav file and save on disk
Error 1:
Me: pip install "stupid package"
Console: Can't pip, behind a proxy
Me: Finds workaround after several minutes
Error 2:
Conversion works, but audio file on disk doesn't work
Encoding Error only works with array of ints not floats
BUT I NEED IT TO BE FLOATS
Looks for another library
scikits.audiolab <- should work
Me: pip --proxy=myproxy:port install "this shit"
Command Line *spits back huge error*
Googles error <- You need to install this package with a .whl file
Me: Downloads .whl file <- pip install "filename".whl
Command Line: ERROR: scikits.audiolab-0.11.0-cp27-cp27m-win32.whl is not a supported wheel on this platform.
Googles Error <- Need to see supported file formats
Me: python -c "import pip; print(pip.pep425tags.get_supported())"
Console: AttributeError: module 'pip' has no attribute 'pep425tags'
Googles Error <- Use another command for pip v10
Me: python -c "import pip._internal; print(pip._internal.pep425tags.get_supported())"
Console: complies
Me: pip install "filename".whl
Console: complies
Me: *spends 30 minutes to find directory where I should paste .dll file*
Finds Directory (was hidden btw), pastes file
Me: Runs .py file
Console: from version import version as _version ModuleNotFoundError: No module named 'version'
Googles Error <- Fix is: "just comment out the import statement"
Me: HAHAHAHAHAHA
Console: HAHAHAHAHA
Unfortunately this shit still didn't work after two hours of debugging, lmao fuck this7 -
This is the story of the API documentation.
Which btw I couldn't find on the producent's website anywhere. I had the pdf shared with me by a coworker.
I knew the api was fucked up the moment I looked at endpoint documentation.
GET params? WHERE, ORDERBY etc. Literally make a SQL select in a GET request.
Returned stuff? The whole thing. Not some DTO, you literally get everything you can get.
Eg if you get IP in your response, you get it in several formats: dotted form, as hex, and as int. In 3 different json fields.
Oh, and regarding IP - one would imagine you can use masks or prefixes for subnets, right? Nope. The only param you can use there is the subnet size. So you have to calculate the power of 2 every time you want to make a request.
That's from the endpoint documentation. But what about some general info on the API, before all that?
As I was looking for something, I decided to read that intro and general info about the API.
Okay, so there was a change log between API versions. "removed [endpoint which sounds like correct REST design], please use [this generic thing with SQL-like GETs]"... Several of them.
And there was also this sentence which said that the API is not restful, "it's REST-like". <facepalm>
If it was a bad attempt at REST API, I would let it go. But this sentence clearly showed they knew they did everything wrong. And the changelog showed they didn't stop there, they were actively making it worse.1 -
So for those of you keeping track, I've become a bit of a data munger of late, something that is both interesting and somewhat frustrating.
I work with a variety of enterprise data sources. Those of you who have done enterprise work will know what I mean. Forget lovely Web APIs with proper authentication and JSON fed by well-known open source libraries. No, I've got the output from an AS/400 to deal with (For the youngsters amongst you, AS/400 is a 1980s IBM mainframe-ish operating system that oriiganlly ran on 48-bit computers). I've got EDIFACT to deal with (for the youngsters amongst you: EDIFACT is the 1980s precursor to XML. It's all cryptic codes, + delimited fields and ' delimited lines) and I've got legacy databases to massage into newer formats, all for what is laughably called my "data warehouse".
But of course, the one system that actually gives me serious problems is the most modern one. It's web-based, on internal servers. It's got all the late-naughties buzzowrds in web development, such as AJAX and JQuery. And it now has a "Web Service" interface at the request of the bosses, that I have to use.
The programmers of this system have based it on that very well-known database: Intersystems Caché. This is an Object Database, and doesn't have an SQL driver by default, so I'm basically required to use this "Web Service".
Let's put aside the poor security. I basically pass a hard-coded human readable string as password in a password field in the GET parameters. This is a step up from no security, to be fair, though not much.
It's the fact that the thing lies. All the files it spits out start with that fateful string: '<?xml version="1.0" encoding="ISO-8859-1"?>' and it lies.
It's all UTF-8, which has made some of my parsers choke, when they're expecting latin-1.
But no, the real lie is the fact that IT IS NOT WELL-FORMED XML. Let alone Valid.
THERE IS NO ROOT ELEMENT!
So now, I have to waste my time writing a proxy for this "web service" that rewrites the XML encoding string on these files, and adds a root element, just so I can spit it at an XML parser. This means added infrastructure for my data munging, and more potential bugs introduced or points of failure.
Let's just say that the developers of this system don't really cope with people wanting to integrate with them. It's amazing that they manage to integrate with third parties at all...2 -
So, I departed for a month long Erasmus in Portugal and got to work for an education related business. From day 1, all my tasks consisted in transcribing data from paper to excel sheets, and then using that data for various different tasks. It became obvious that I wouldn't have had much programming to do by default, so I started creating a series of Python scripts to automate part of my work or aid me in some bothersome areas of it, and what at first seemed a grueling series of boring and repetitive work soon actually became fun. From this point on I challenged myself to make the scripts better and better under as many aspects as possible. I eventually ended up concluding all my daily tasks in a matter of 15 to 30 minutes everyday, as that's the time it took to adapt the scripts to the new document formats of the day :P Jokes aside, this truly proves a point though: small businesses like this one, that very much depend on manual labor for tasks that can easily be automated by 50 lines of code, truly would benefit from a prepared IT and development team, and it shocked me to see how little these guys know, and are even afraid at times, about innovative techniques to speed up work substantially. Truly a great and humbling experience for very young devs like me :)2
-
The first time I was able to create a solution to a problem I had.
It wasn't some super-difficult problem, but the code worked, and I got my first jolt of satisfaction in a long, long time. And more importantly, I wrote it with my own two hands.
It was a Slack slash command and it takes a task number, sends it my server that creates a query for our Redmine, formats the returned data and posts it back to Slack. It only took a few hours to implement (mostly because I was unfamiliar with Slack's API), and while only a few people uses it frequently, I still get a small amount of satisfaction whenever someone mentions it. -
The feature was to parse a set of fairly complex xml files following a legacy schema. Problem was, the way this was done previously did not conform to the schema so it was a guideline at best, which over the course of many years snowballed into an anarchy where clients would send in whatever and it was continuously updated per case as needed. They wanted to start enforcing their new schema while phasing out the old method.
The good news is that parsing and serialization is very testable, so I rounded up what I could find of example files and got to work. Around the same time I asked our client if they had any more examples of typical cases we need to deal with, and sure enough a couple of days later I receive a zip with hundreds of files. They also point out that I should just disregard the entire old set since they decided to outright cut support for it after all if it makes things simpler. Nice.
I finish the feature in a decent amount of time. All my local tests pass, and the CD tests pass when I push my branches. Once we push to our QA env though and the integration tests run, we get a pass rate of less than 10%.
I spend a couple of days trying to figure out what's going on, and eventually narrow it down to some wires being crossed with the new vs. old xml formats. I'm at a loss. I keep trying to chip away at it until I'm left with a minimal example, and I have one of those lean-back moments where you're just "I don't get it". My tests pass locally, but in the QA environment they fail on the same files.
We're now 3 people around my workstation including the system architect, and I'm demonstrating to the others how baffling and black magic this is. I postulate that maybe something is cached in my local environment and it's not actually testing the new files. I even deleted the old ones.
"Are you sure you deleted the right files?"
"Duh of course -- but let me check..."1 -
Anyone who formats their code manually is a fuck there I said it.
Also stop using a tool that has no contextual understanding of your code. You're wasting more so much fucking time trying to guess shit that an ide would automatically know and doing stuff that an ide would automatically do.4 -
Our favorite ticket system blokes are back with a big fat update for their software.
What changed?
All workflows are fucked because everything is somewhere else suddenly!
Half of the features suddenly stopped working!
Variable formats in forms have been changed from {} to [] without reason, migration or warning! Sorry, {Username} ¯\_(ツ)_/¯
Half-assed features that don't work half of the time have also been added!
Fucking great!
Who beta tests this shit? Nobody?2 -
semi dev related(later half)
A common and random thought I have:
A lot of units that humans use are either needlessly arbitrary or based on something weird. Like Fahrenheit. That shit is weird! 0°F is the freezing point of a water and salt solution. What a weird fucking thing to use!
But also, I like Fahrenheit more. Probably because it's what I was raised with and switching is tedious (though I'm trying. I'd like to use metric more), but also because one degree F is a smaller, more precise change. You can describe more accuracy without decimals.
On the other hand I prefer metric for length. Centimeters, and centimeters are way more precise and way less confusing than inches and .... 1/8th inches? Who the fuck decided on 1/8ths?!
Which brings me to my common thought:
If you look at a Unix timestamp, you can approximate somewhat when it happened. Knowing the current timestamp and a few reference points you can see RELATIVELY what a epoch stamp translates to. A few days ago, an hr ago, 2014ish.
This leads me to think that if we actually taught from a young age to think in epoch as a unit (not as a replacement to normal date formats but as a secondary at first) that we could just naturally read epoch time in the same manner we read dates like "28/01/2006 14:24:10 UTC"
In your brain you automatically know how old you were when that timestamp happened. What grade/job and where you lived at the time. What season it was. You know how far into the day it was, a little before lunch (or after or whatever, your time zone will vary). Now try with 1138458250. I can usually get roughly the year, and month if I really think about it, but that's it. And it takes much more effort
I'm sure there's other units we could benefit from but epoch is the one that usually brings this to mind for me.13 -
WHY THE FUCK ARE CODECS STILL A THING?
Have we as a society not moved on and found like the 4/5 "good enough" movie formats. Fucking bullshit needing me to download VLC for the first time in years -.-
AND WHY THE FUCK ARE CODECS ON SALE ON MICROSOFT STORE???? WHAT?9 -
I just spent 2-3 hours writing a python script to make it easier to format solving system of equations through Gaussian elimination easier. It takes a matrix, then allows the user to perform row operations on it, and then it formats every operation done into LaTeX.
Alternatively, I could have spent that time actually working on the assignment it was meant to help me with, and probably finished 3/4 of it.1 -
1. The power you have with it.
With that, I mean solving your own or someone else's issues.
Be it automation, parsing weird formats, or anything else, it can usually be achieved by coding something for the task.
2. The logic (when compared to humans).
Unlike humans, code does what it's told to do. Us humans, well, we often misinterpret things. Code, however, usually has a single meaning.
3. How things can be improved over time.
Finding a way do something faster and implementing it is really satisfying.4 -
I had a discussion about SAAS and microtransactions with another dev. They are a little bit younger than me. The trend toward this in games and android apps were discussed. We found that we both avoid software which employs these business models.
We cannot be the only 2 people who avoid products employing these common business models. So I wonder what demographic pays for these services and products? I am to the point that if my kid asks to buy something in a game, I tell them that we will get rid of the game if they keep asking.
The only time I have paid for SAAS is when there is extraordinary perceived value. Quickbooks for small business is one such product (way cheaper than an accountant). Another is the Xbox game pass. So apparently for the game pass I am in the demographic.
Do we not like it because it is new? Or is it a kind of sleazy business tactic? I dunno. I would rather pay up front for most things. I feel like SAAS will be employed in software with proprietary file formats which require a subscription to even get to your data. Vendor lock-in.10 -
So my team started creating an in-house wiki for all information about our products, methods, scrum, documentation etc. From the beginning we had settled on doing everything in English instead of native language just in case we get a foreign student intern or simply a foreign employee... And now it looks to me that nobody but my team leader and I care about it: half of the documents are either fully native (especially from other part of the team who work on a different project, they have probably never gotten the memo of language choice to start with) or the documents are in some weird-ass combination of English-native which is even worse imo.
I really don't understand why my own team doesn't adhere to the decision though: we're all at least reasonably educated and our country focuses heavily on using English as second language so that should be no big barrier. And why would you want inconsistent documents/code?!
And this is not the first time people don't stick to what is decided for things like formats and language... Getting a bit tired of it tbh...5 -
I spent a lot of my time as a little kid playing video games and typing on my old computer. Somehow I found GameMaker (6 or 7, I think) and started pumping out little games with the free version. I didn't like the drag and drop stuff so I learned GML (GameMaker Language).
A few years later someone gave me a PHP book and while I never actually learned anything from it, it did get me interested in learning a real programming language (not GML).
Around this time Minecraft became popular, and with a lot of YouTube videos I got a grasp on Java, and a little C++/C#.
Tinkering around in scripting languages finally lead me to JavaScript which of course introduced me to HTML and CSS.
I loved how quickly a website could me created compared to a compiled program, so I started spending most of my time learning Web Technologies.
And that leads me to where I am today. By this point I've spent over half of my life programing in various languages and formats and I've loved every bit of it! -
Why the fuck is midnight 00:00 and midday 12:00? Every other hour is the same for Am and Pm in 12 hour time. I can’t find any explanation other than all of humanity being unable to count.
All date/time libraries must encounter this bullshit. There are so many similar levels of bullshit with everything related to time handling. Time zones, stamp formats, minimum intervals overflows are all so fucked.14 -
My DEV Story
After reading it, make a favor by ++d
Thought to be a software engineer in future
Learnt Python's basic modules, AI, and some ML
After getting intermediate in python, I started learning Java as my second language but could not do it because of JDK 8. Now don't ask me why.
Then, just stepped into game development with unity and C#, having a basic knowledge of C# with no experience in making a game myself. This is called ignorant.
After getting no success, I started learning PHP and got the chance to make a website having no content ;)
But it cannot meet my requirements
Soon I got content that AdSense regards as no content, no problem
I started learning Flask, a module in python for making web applications.
It took me 1 month to complete my website, which can convert file formats.
The idea for deploying it to the server
Sign Up to DigitalOcean
Domain Name from GoDaddy (I know NameCheap is better but got some offer from it)
Made a VPS for what I have to pay $5/month
Deploy my Flask App using WSGI server
This is the worst dev experience
.
.
.
.
Why in all the tutorial, they only deploy a flask app which displays Hello World only and not anything else
WSGI or UWSGI Server does not give us permission to save any file or make any directory in it
Every time........ERROR
Totally Fucked Up
Finally, it works on localhost with port 80
I know this is not the professional way to host a website but this option was only left.
What can I do
Now, I cannot issue a free SSL certificate through Let's Encrypt because **Error 98 Address Already In Used**
The address was port 80 on which my Flask App was running
Check it out now - www.fileconvertex.com8 -
New feature request that could be unecessary by client just sticking to one of 4 different very similar input formats instead of many off the cuff formats, that conflict and i cant guess let alone a computer. But i present an outline idea of the solution with his specs
I didnt complain just told him what needs to change and what our constraints will be how the info is interpretted etc
Client says "dont spend time on code for that feature.. stick to other original work for now" ! omg hes getting it! Sweet. I only wasted an hour this time, and if he does want the feature, we have an agreed spec for it. We can get back to handling the customer level shit and maybe he can make some more money finally.
Scope creep plus 0, me plus one. Scope creep still in thr lead by a lot. Oh well. Still, this guy is getting more tolerable -
Dear fucking MicroSoft,
I really like the C# language, but the default System types have some little fucks up.
Like, if the DateTime.ToString() accepts "HH" to display hours with leading 0, WHY THE FUCK DOESN'T TimeSpan.ToString()?
Truly yours,
ZioCain6 -
I tried to make some SP using the syntax and formatting that visual studio outputs when making a SSRS report. I thought it was nice.
It formats the code in a standard way and transforms stuff like "join" to "INNER JOIN" and "left join" to "LEFT OUTER JOIN ".
When the team reviewed the code they were like WTF?! This syntax is horrible, it can't be understood. You did this?
*Me with my red face*...
I just said. You know what? I am going to go back to the old school syntax if you prefer. I just thought it was better.
Yeah... You really should go back to old school syntax.
---
Keep in mind that the old school syntax is annoying to me... No formatting at all and basic instructions are not in larger upper case.
Anyway, I thought it was nice tbh. I still think it is. And it is definitely better to me in some way.
What bothers me most is that they want to improve their coding. They say they want to be more standard and it seems every time you want to make a change it's not a good idea because "everything is already written that way". And when you don't make a change, "you should have change it"... Well sorry I was just copying the old style.
Anyways , it's not that important. I do get their point. Sometimes.1 -
I had to do a modular deduplication project that could read, parse and clean up the data.
The data? Personal information: Name, Surname, phone, address and more.
Imagine the zip code in any of the following formats: ####AA, #### AA. Names with and without dashes. Address with(out) spaces, dashes, underscores etc. as well as typos! Now clean it up, and dedup.
But what files have priority over another? What data is newer? How to process address changes?
Deadline: 2 moths, impossible deadline for a (at the time - 4 years ago - rookie developer)
Anyway, night before the deadline, code was running somewhat (Java) and was able to get a Regexed address cleanup of about 70 - 80%.
My boss comes in to check the progress, sits me down next to him and says: Not good enough, let's do it together tonight, it was 4pm, day normally ends at 5pm.
No thank you, I can't do that. if you don't want this code, then I can't meet your deadline.
bye -
Working along side another consultant house for a client, we have our shit ready weeks ago for integration testing (as was the deadline) against the other guys. We tell them we are ready, but we need them to be ready too, there are some tricky format things and we basically let them spec it out since they integrate further down the line.
They come _NOW_ way over deadline with change requests in message formats, like MOTHERFUCKER, IM ON MY WEEKEND NOW. We KNEW the client wanted it ready next week, thats why we were ready in time. You are not gonna cost me my weekend.
(is what i wanted to say, the devs on the other team are super nice and just absolutely overloaded with work which i cannot help them with)
One thing is certain, tonight my internet access mysteriously dissappears and wont open until monday morning. Such a shame -
Date pickers!
After several decades of web development and even longer time to experiment with electronic UI on other devices, why is there no consistent best practice and everyone tries reinventing the weel to choose their own set of problems and annoyances?
The root cause, obviously, is using Gregorian calendar and localized display and input format in the first place, so there is no way to make a data unambiguous without a graphical calendar. Who even came up with any of those 9/10/11 formats and why?
So we need to use date pickers and make the users spend several minutes clicking, swiping or scrolling to enter their birthday - past at least one decade - and a booking date - in the near future - using the same interface with the same presets.
But users compare different offers, so they will use different sites, so they will have to handle different date pickers on different sites in a short period of time and carry unnecessary mental load.11 -
trying to figure out why this folder is allowing restricted files formats to run, and finding nothing but 'It's a windows folder' what the hell internet DX my school runs windows and it's in that directory children aren't allowed to mess with, of course it's a damn windows folder, but how can I stop them from running viruses accidentally in that folder without causing windows to stop working
Back to god damn research
Thank you for your time -
The problem with LibreOffice is that is some respects, you get what you pay for. Like number formats that just get dropped every time you reload a spreadsheet.
Still, it's worth more than the price. Unlike GIMP, where even free is too expensive (used it for a few days, but I admit that spending time on it was my own fault).3 -
Starting Out In Web Development (again)
The Question
I am looking for some suggestions on tools or frameworks to look into for a hobby project I wanted to try. I have always felt that _time_ is quite interesting so I was going to knock something up to present the current time in a lot of formats (All the ISOs I can find, GPS Time, Week Numbers, Mian Calendars, Metric Time, etc).
My Background
It has been a while since I did anything much with website related bits. Long ago I wrote HTML (4 or XHTML I think) out but hand for simple things. I added a little JavaScript to do a rollover image substitution. At some point I also did some JavaServerPages (JSP).
In the non-web world;
* I am quite good at C & C+
* I am OK with Go, Python, Ruby, BASH
* I can cobble together JavaScript, Java, JSP and a bunch of other things but I will be a bit slow and doing a lot of "online research" to aid me.
-----
Any suggestions are very welcome. Also if you know of similar existing sites I would be interested to see how others have chosen to present things.