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 - "epoch"
-
On Thursday, May 20, 2088 9:55:59 PM, my life will be complete: Unix Epoch time will equal 0xdeadbeef.10
-
I've always found those "age++" rants to be annoying.
are you people storing age as an integer rather than as an epoch timestamp?! seems rather tedious to upkeep.
either way. another year down! (that's 31,536,000 seconds for those of you counting correctly.)6 -
Might be more of a self-rant.. We’re developing an application with token-based authentication.
It’s a big an complex authentication model and flow, which we wrapped up a month ago. All of us very proud of it.
All of a sudden none of it worked.
We debugged for days, there were no errors or anything to trace what was happening.
Today we realized that we set the expiration of the token to 20 years.
Aaaand the expiration time is later on converted to epoch.
Guess what happens when you try to use a value > 2 147 483 647 in C#? Stuff blows up, cuz that’s the limit of an int32.
So yeah, feels good having prepared for the Y2K38 bug already, even though we’ll be replaced by AI writing better software than my dumb ass by then.
(To be fair, it was hidden in Microsoft Owin, which could use some error handling and/or proper messages..) -
What was your most ridiculous story related to IT?
Mine was when I was quite small (11yo) and wanted a graphics card (the epoch of ATI Radeon 9800), looked at the invoice to know what kind of ports I had in the pc (did not open it), then proceeded to brat to my dad to get me a new GPU
So we where in Paris, we went to a shop, vendor asked me "PCI or AGP?" and said AGP.
Paris > London > Isle of Skye roadtrip followed, then as my dad brought me back home in Switzerland, we opened my pc...
And we couldn't fit the GPU in the basic old PCI port. My Dad was pissed. He frustratedly tried fitting the GPU in the PCI slot, but nope. (He's a software engineer though)
At least the GPU had 256 mb of ram :D
Gave it to my brother 6 months later at family gathering
To this day, my Dad still thinks I cannot handle hardware, although I have successfully built 10+ pc, and still cringes with a laughing smile when I talk to him about it haha
Ah well.1 -
Training Google's "efficient" net b7 be like epoch 1: ETA 6 hours
I come back in the afternoon and see this:2 -
CTO: We'll use epochs for any time related fields in our services.
After service integration...
Dev from producer team: Hey the time field is showing up as 1970 and not null in your table. That seems to be a bug.
Me: Code looks fine. We are converting epochs to timestamps here. Null is taken care by the library function itself.
The same dev: Actually we are sending zero instead of null values in that time field. But we'd want the end table to treat that as null.
Me: Why can't you send null then?
The dev: Actually avro doesn't support nulls. Hence the zero.
Me: WTF??????
Manager to me: Actually you need to convert them as null. Anyways, this is not a blocker and we can live with it for now.
END OF RANT
Why can't they fucking send it as null? And when I asked about the details, that particular event type doesn't require that field. Still the manager insists on sending that field for it.23 -
MTP is utter garbage and belongs to the technological hall of shame.
MTP (media transfer protocol, or, more accurately, MOST TERRIBLE PROTOCOL) sometimes spontaneously stops responding, causing Windows Explorer to show its green placebo progress bar inside the file path bar which never reaches the end, and sometimes to whiningly show "(not responding)" with that white layer of mist fading in. Sometimes lists files' dates as 1970-01-01 (which is the Unix epoch), sometimes shows former names of folders prior to being renamed, even after refreshing. I refer to them as "ghost folders". As well known, large directories load extremely slowly in MTP. A directory listing with one thousand files could take well over a minute to load. On mass storage and FTP? Three seconds at most. Sometimes, new files are not even listed until rebooting the smartphone!
Arguably, MTP "has" no bugs. It IS a bug. There is so much more wrong with it that it does not even fit into one post. Therefore it has to be expanded into the comments.
When moving files within an MTP device, MTP does not directly move the selected files, but creates a copy and then deletes the source file, causing both needless wear on the mobile device' flash memory and the loss of files' original date and time attribute. Sometimes, the simple act of renaming a file causes Windows Explorer to stop responding until unplugging the MTP device. It actually once unfreezed after more than half an hour where I did something else in the meantime, but come on, who likes to wait that long? Thankfully, this has not happened to me on Linux file managers such as Nemo yet.
When moving files out using MTP, Windows Explorer does not move and delete each selected file individually, but only deletes the whole selection after finishing the transfer. This means that if the process crashes, no space has been freed on the MTP device (usually a smartphone), and one will have to carefully sort out a mess of duplicates. Linux file managers thankfully delete the source files individually.
Also, for each file transferred from an MTP device onto a mass storage device, Windows has the strange behaviour of briefly creating a file on the target device with the size of the entire selection. It does not actually write that amount of data for each file, since it couldn't do so in this short time, but the current file is listed with that size in Windows Explorer. You can test this by refreshing the target directory shortly after starting a file transfer of multiple selected files originating from an MTP device. For example, when copying or moving out 01.MP4 to 10.MP4, while 01.MP4 is being written, it is listed with the file size of all 01.MP4 to 10.MP4 combined, on the target device, and the file actually exists with that size on the file system for a brief moment. The same happens with each file of the selection. This means that the target device needs almost twice the free space as the selection of files on the source MTP device to be able to accept the incoming files, since the last file, 10.MP4 in this example, temporarily has the total size of 01.MP4 to 10.MP4. This strange behaviour has been on Windows since at least Windows 7, presumably since Microsoft implemented MTP, and has still not been changed. Perhaps the goal is to reserve space on the target device? However, it reserves far too much space.
When transfering from MTP to a UDF file system, sometimes it fails to transfer ZIP files, and only copies the first few bytes. 208 or 74 bytes in my testing.
When transfering several thousand files, Windows Explorer also sometimes decides to quit and restart in midst of the transfer. Also, I sometimes move files out by loading a part of the directory listing in Windows Explorer and then hitting "Esc" because it would take too long to load the entire directory listing. It actually once assigned the wrong file names, which I noticed since file naming conflicts would occur where the source and target files with the same names would have different sizes and time stamps. Both files were intact, but the target file had the name of a different file. You'd think they would figure something like this out after two decades, but no. On Linux, the MTP directory listing is only shown after it is loaded in entirety. However, if the directory has too many files, it fails with an "libmtp: couldn't get object handles" error without listing anything.
Sometimes, a folder appears empty until refreshing one more time. Sometimes, copying a folder out causes a blank folder to be copied to the target. This is why on MTP, only a selection of files and never folders should be moved out, due to the risk of the folder being deleted without everything having been transferred completely.
(continued below)29 -
There is a place in Saint-Petersburg, Russia. A very, very weird place. Its name roughly translates to “The Board of Wards of the Russian Ministry of Defense”.
It’s an ultra-modern, beautiful facility situated near two most important (and evil) buildings of the Putin’s epoch — Gazprom Arena (a.k.a. Death Star, left bottom on the map), and Lakhta Center (a.k.a. The Oil Bottle, the tallest skyscraper in Saint-Petersburg), completing the trifecta of evil architecture. Its official governmental website is vague. Its objectives are unclear. You can’t enter it — it’s surrounded by water.
Their official mission is, and I quote: “Gender-based approach in education and gender role socializing of young women.”
It houses roughly 800 girls. It has no English Wikipedia page. Its Russian page says there is nothing quite like it anywhere in the world. It only accepts young girls as its students. Allowed visits from parents are rare. Girls aren’t seen much during “the training”.
They tell this place changes people. Mobile phones are strictly forbidden. They train, eat and sleep on site. They’re not allowed to leave.
Its reviews written on Yandex Maps (the go-to app for maps in Russia) are, again, vague and oddly positive. Mothers tell this facility is the best place to be for a young girl — they teach them “right”. The only extensive negative review tells of a girl that was able to get out because of “medical reasons”, and tells about how the on-site doctor wasn’t really allowed to do such a thing.
The facility is very secretive. Photos of girls published by them are eerie and highly curated. No one truly knows what happens there.
They are wrong, however. There _were_ places quite like it — they were called “Reich Bride Schools”, and they operated in Nazi Germany (https://en.wikipedia.org/wiki/...).
Welcome to the Putin’s harem.6 -
Model without conv2:
"I'm gonna be poor and miserable and barely give you .96 acc after much training."
Model with conv2:
"Ahoi! Look at me score .95 in the first epoch!"
😤11 -
MTP is complete garbage. I want mass storage back.
The media transfer protocol (MTP) occasionally discovers new creative ways of failure. Frequently, directory listings take minutes to load or fail to load at all, and it freezes up infinitely (until disconnected) when renaming an item, and I can not even do two things simultaneously.
While files are being moved, I can not browse pictures or watch videos from the smartphone.
Sometimes, files are listed with the date 1970-01-01 (Unix epoch) instead of their correct date. Sometimes, files do not appear at all, which makes it unsafe to move directories from the device.
MTP lacks random access. If I want to play a two-gigabyte 4K 2160p video and seek in the video, guess what: I need to copy it to my computer's local mass storage first because MTP lacks random access.
When transferring high numbers of files, MTP has to slooooowly enumerate (or "prepare" or "calculate the time of") them all, which might even take longer than mass storage would need for the entire process. This means MTP might start copying or moving the actual files when mass storage is already finished.
Today, the "preparing to move" process was especially slow: five minutes for around 150 files! How am I supposed to find out what caused this random malfunction?
MTP sometimes drives me insane. I want mass storage back, at least for the MicroSD memory card, which uses a widely supported file system.
Imagine a 2010 $100 Android phone is better at file transfer than a 2022 $1000 Android phone (or iPhone, for that matter).3 -
Spend literally two days trying to figure out why I have a 2 hour offset in my timezones for a lamp web app. This isn't even close to my first timezone rodeo.
Check logs, reset Apache/MySQL/PHP timezones in like 100 places. Use 3rd party server side and client side timezone libraries. Moment.js you say? Shit works like a charm... but is, of course, still two hours off.
MySQL is right. PHP is right. Apache is right. PHP libs are in place. Finally convert the entire damn project to use epoch time because I have a deadline, I have no more time to read backwater AWS docs and try to figure out why the hell this Ubuntu EC2 is fucked up, and I literally cannot figure out why in the hell the damn clock is off.
Several days later notice a variable in the main .config file... right in root... 2 hour timezone offset.
Fuuuuuuuuuuuuuuuuuuuuck.8 -
🎼Up and down
🎶 And all the way around
🎶 Crossentropy is a bitch
🎶 Epoch and loss are still the same
🎵
Edit: I left this rant open for half an hour. Finally figured that I should do one hot encoding and labeling doesn't exactly work out the way I was hoping it works out.
But hey, half an hour ago I was angry and desperate. So... ¯\_(ツ)_/¯14 -
"In this API you need to pass the epoch in user's timezone."
WTF!! can this world be any worse...... how many epochs are there in this world?4 -
DAYLIGHT SAVING!!
Up to this point, I was indifferent to the issue if it should be kept or not. My sleep schedule is fucked and non-routine anyway so one hour plus or minus doesn't play any role.
I got to a meeting scheduling problem, when I have 2 timestamps in variable timezones and want to calculate time difference. Both can have DST active. There is no algortihmic way to figure out. I checked SO and pytz and it's just a list of hardcoded dates when DST starts and ends. WHATHTEHELL.jpg
Not only we should abolish the DST, we should force the whole world into UTC/Zulu. And those, who refuse to adapt to UTC, will be forced to work with plain integer epoch dates.3 -
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 -
I'm learning swift and my forse test app is useless, but now i can see the actual Epoch value 😂😂😂😂2
-
That moment when gulp run is as long as one epoch when training my neural network. How did we arrive here?
-
Ooowww damn!!!!!!!!!...........I just updated this Samsung Galaxy Over The Air and I Can't root it.....2
-
Epoch 2/4
777/1054 [=====================>........] - ETA: 45:31 - loss: 2.6682
Screw you Keras model1 -
so i'm sitting here staring inwardly at the learning rate optimizer...
i think it works
but i find myself wanting to scream at the nuances of the method being hidden from me
I know its probably fairly simple.
i want to write my own.
i want to plot neat graphs that give me metrics at the learning results for each epoch showing how much closer the values are getting to the training data some neat spiral of values and lines and flashy too.
but i feel.
...welll
strangely lackluster and a tad paralyzed for some reason. partly because it feels like i've done this all before... sigh.
on the topic of things I already did.
https://en.wikipedia.org/wiki/...
can you believe they made this bullshit into A TV SHOW ? IN THIS WEIRD ASS HYPERSENSITIVE ENVIRONMENT ? THIS RAPE WEIRDOS WET DREAM ? 5 SEASONS AT LEAST.
GOD WHAT IS WRONG WITH THIS COUNTRY ? ITS EITHER ADULT MEN WATCHING RUGRATS OR THIS SHIT !2 -
Unix Epoch should have started in 2000, not 1970.
Those selfish people in the 1970 who made up the Unix epoch had little regard for the future. Thanks to their selfishness, the Unix date range is 1902 to 2038 with a 2³² integer. Honestly, who needs dates from 1902 to 1970 these days? Or even to 1990? Perhaps some ancient CD-ROMs have 1990s file name dates, but after that?
Now we have an impending year 2038 problem that could have been delayed by 30 years.
If it started on 2000-01-01, Unix epoch would be the number of seconds past since the century and millennium.13 -
How much of "unique" the string that is the current epoch in milliseconds converted to base 36 ?
I know it is not universal. But require such a bad luck to have collision no ?
I am gonna use it for "transaction" primary key. (Every time a user pay, it it a new trasantion).
Uuid are very long, i need to put this pk in qr-code later
Thoughts ?24 -
It was my first time doing an NLP task / implementing a RNN and I was using the torchtext library to load and do sentiment analysis on the IMDB dataset. I was able to use collate_fn and batch_sampler and create a DataLoader but it gets exhausted after a single epoch. I’m not sure if this is the expected behavior, if it is then do I need to initialize a new DataLoader for every epoch? If not is something wrong with my implementation, please provide me the correct way to implement the same.
PS. I was following the official changelog() of torchtext from github
You can find my implementation here
changelog - https://github.com/pytorch/text/...
My implementation - https://colab.research.google.com/d...