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 - "console log"
-
Went into Facebook's source code to update the colors from blue to green and black (don't judge me) and saw this in the console log lol. Didn't know people were that gullible...12
-
Reinstalled my dedicated server and realized (afterwards) that I just erased my entire openvpn/mysql auth setup and I don't have an entirely working copy.
FUCK.
Okay, nothing I can do about that afterwards, setup csf right away, monitored the auth log for a minute and noticed one ip which had just connected and found it weird somehow. Blocked the ip.
Then, one second later, as my console stopped responding and that ip address suddenly looked veeeery familiar, I realized I just blocked myself. (the blocks persist across reboots)
😐
Went to the control panel and hit the reinstall button. Confirmed, and two seconds later I realized I could just have connected to any of my own fucking vpn services to unblock myself.
What in the living fuck is wrong with me @_@30 -
Hey, Root? How do you test your slow query ticket, again? I didn't bother reading the giant green "Testing notes:" box on the ticket. Yeah, could you explain it while I don't bother to listen and talk over you? Thanks.
And later:
Hey Root. I'm the DBA. Could you explain exactly what you're doing in this ticket, because i can't understand it. What are these new columns? Where is the new query? What are you doing? And why? Oh, the ticket? Yeah, I didn't bother to read it. There was too much text filled with things like implementation details, query optimization findings, overall benchmarking results, the purpose of the new columns, and i just couldn't care enough to read any of that. Yeah, I also don't know how to find the query it's running now. Yep, have complete access to the console and DB and query log. Still can't figure it out.
And later:
Hey Root. We pulled your urgent fix ticket from the release. You know, the one that SysOps and Data and even execs have been demanding? The one you finished three months ago? Yep, the problem is still taking down production every week or so, but we just can't verify that your fix is good enough. Even though the changes are pretty minimal, you've said it's 8x faster, and provided benchmark findings, we just ... don't know how to get the query it's running out of the code. or how check the query logs to find it. So. we just don't know if it's good enough.
Also, we goofed up when deploying and the testing database is gone, so now we can't test it since there are no records. Nevermind that you provided snippets to remedy exactly scenario in the ticket description you wrote three months ago.
And later:
Hey Root: Why did you take so long on this ticket? It has sat for so long now that someone else filed a ticket for it, with investigation findings. You know it's bringing down production, and it's kind of urgent. Maybe you should have prioritized it more, or written up better notes. You really need to communicate better. This is why we can't trust you to get things out.
*twitchy smile*rant useless people you suck because we are incompetent what's a query log? it's all your fault this is super urgent let's defer it ticket notes too long; didn't read21 -
Hello Monday:
0.Arrive late due to traffic.(Apparently a car hit a cow crossing the road)
1. Try upgrading php5 to php7 and break stuff in the process and waste 2 hours fixing things.(Poor connection so ssh sessions hung occasionally)
2.PHP fixed,open Gmail and get over 100 emails from clients about the server being down(because of (0)).Ignore all.Find a snaglist of over 20 TODOs.
3.Open Android Studio, update to 2.3 and everything becomes broken.Each time i open it ,it crashes and i have to "Report to Google"
4.Spend the next 1 hour reinstalling AS.It finally works.
5.Open Project and the libraries are broken.Spend another hour upgrading build tools.
6.Leave SDK to update and decide to check my Google Cloud console.$50 bill pending.Shit.
7.Try XCode. Remember the project is still in Swift 2 and I have to upgrade it(Would take eternity).Immediately closes xcode.
8.Gives up on life and decides to log into Devrant.4 -
Very specific and annoying situation here:
- Working on a machine learning project with other people
- I'm on Linux, they use Windows
- We code in python
- We generally use vscode for development, and its python extension
I implement some basic neural networks with tensorflow, and add a bunch of logging for it. I test it on my machine and it works fine.
But, my group mates report that "after a few seconds the entire client hangs".
Apparently it only happens on Windows?
We start debugging the hell out of the code I implemented, added 20 log messages and sat there for a solid hour.
Until I make one very odd realization: the issue doesn't happen when I run the script in my terminal, instead of vscode with the debugger. So I try different debug settings, using an external terminal instead of vscode's built in debug console seems to fix it too.
And I make another observation: In the debug console, some messages don't seem to appear at all, while the external terminal shows them just fine.
So, turns out, that printing an epsilon character: “ε” (U+03B5), causes the entire thing to hang up.
It's the year 2020 and somehow we still can't do unicode.
I'm so done, what on earth.9 -
Interviewer: Here is the interview challenge. Tell me what the expected output is. You have 5 minutes.
** 100 line class with 4 async methods that contain if/thens nested 4 layers deep that call each other and log things to the console
Dev: Ok wow this is a bit of a maze to work through but I’ll try my best.
** 1 minute later of reading through the code
Interviewer: One minute has elapsed. There is now 4 minutes remaining.
Dev: Actually could you please not interject with time updates like that while I’m reading code? It makes the challenge harder than necessary. Just letting me know when the time is up would be fine.
Interviewer: Ok.
** ~2 minutes later trying to comb through this spaghetti mess
Interviewer: What do you think are you getting close to figuring it out?
Dev: …5 -
Javascript makes me want to flip
the table and say "Fuck this shit", but
I can never be sure what "this" refers
to.5 -
Trying to debug some webpage JavaScript with Edge.
Console window doesn't log anything before you open it.
You cannot copy-paste more than a single line from it.
You cannot search in it.
Fuck. Just FUCK.8 -
So, I was going to complain about JS being finicky and not making a damned bit of sense, but it turns out that it wasn't JS's fault. Not entirely, anyway. It was the halfassed JS minifier middleware (written by the legendary dev himself) that was breaking the JS while writing it to the page.
The original problem:
My code worked. I removed some comments. Big ol' block of //'s. And suddenly $() isn't a function. But if I call $(); at the top, it all works!
It turns out the "minifier" caused JS to think my code was chaining off the previous JS line in the rendering pipeline instead of being a separate statement. so all it really needed was a `;` at the start. What threw me, though, was the last line of the previous blob of (non-minified) JS was a comment, so it should be a separate statement, right?
But as it turns out...
```
console
// JS really is finicky.
.log('Sigh.');
```16 -
What features would you want in a logger?
Here's what I'm planning so far:
- Tagged entries for easy scanning of log file
- Support for indenting to group similar sequential entries
- Multiple entry types (normal, info, event, warning, error, fatal, debug, verbose)
- Meta entries, so the logger logging about itself, e.g. disk i/o failures.
- Ability to add custom entry types, including tag, log-level, etc.
- Customizable timestamp function
- Support for JS's async nature -- this equates to passing a unique key per 'thread'; the logger will re-write all the parent blocks for context, if necessary. if that sounds confusing, it's okay; just trust that it makes sense.
- Caching, retries, etc. in the event of disk i/o issues.
- Support for custom writers, allowing you to e.g. write logs to an API rather than console or disk.
How about these features?
- Multiple (named) logs with separate writers (console, disk, etc.)
- Ability to individually enable/disable writing of specific entry types. (want verbose but not info? sure thing, weirdo!)
- Multiple writers per log. Combined with the above, this would allow you to write specific entry types (e.g. error, warning, fatal) to stderr instead of stdout, or to different apis.
- Ability to write the same log entry to multiple logs simultaneously
What do you think of these features?
What other features would you want?
I'm open to suggestions!18 -
Boss: "So I'm taking the next week off. In the mean time, I added some stuff for you to do on Gitlab, we'd need you to pull this Docker image, run it, setup the minimal requirement and play with it until you understand what it does."
Me: "K boss, sounds fun!" (no irony here)
First day: Unable to login to the remote repository. Also, I was given a dude's name to contact if I had troubles, the dude didn't answer his email.
2nd day: The dude aswered! Also, I realized that I couldn't reach the repository because the ISP for whom I work blocks everything within specific ports, and the url I had to reach was ":5443". Yay. However, I still can't login to the repo nor pull the image, the connection gets closed.
3rd day (today): A colleague suggested that I removed myself off the ISP's network and use my 4G or something. And it worked! Finally!! Now all I need to do is to set that token they gave me, set a first user, a first password and... get a 400 HTTP response. Fuck. FUCK. FUUUUUUUUUUUUUUUUUUUCK!!!
These fuckers display a 401 error, while returning a 400 error in the console log!! And the errors says what? "Request failed with status code 401" YES THANK YOU, THIS IS SO HELPFUL! Like fuck yea, I know exactly how t fix this, except that I don't because y'all fuckers don't give any detail on what could be the problem!
4th day (tomorrow): I'm gonna barbecue these sons of a bitch
(bottom note: the dude that answered is actually really cool, I won't barbecue him)5 -
I previously worked as a Linux/unix sysadmin. There was one app team owning like 4 servers accessible in a very speciffic way.
* logon to main jumpbox
* ssh to elevated-privileges jumpbox
* logon to regional jumpbox using custom-made ssh alternative [call it fkup]
* try to fkup to the app server to confirm that fkup daemon is dead
* logon to server's mgmt node [aix frame]
* ssh to server directly to find confirm sshd is dead too
* access server's console
* place root pswd request in passwords vault, chase 2 mangers via phone for approvals [to login to the vault, find my request and aprove it]
* use root pw to login to server's console, bounce sshd and fkupd
* logout from the console
* fkup into the server to get shell.
That's not the worst part... Aix'es are stable enough to run for years w/o needing any maintenance, do all this complexity could be bearable.
However, the app team used to log a change request asking to copy a new pdf file into that server every week and drop it to app directory, chown it to app user. Why can't they do that themselves you ask? Bcuz they 'only need this pdf to get there, that's all, and we're not wasting our time to raise access requests and chase for approvals just for a pdf...'
oh, and all these steps must be repeated each time a sysadmin tties to implement the change request as all the movements and decisions must be logged and justified.
Each server access takes roughly half an hour. 4 servers -> 2hrs.
So yeah.. Surely getting your accesses sorted out once is so much more time consuming and less efficient than logging a change request for sysadmins every week and wasting 2 frickin hours of my time to just copy a simple pdf for you.. Not to mention that threr's only a small team of sysadmins maintaining tens of thousands of servers and every minute we have we spend working. Lunch time takes 10-15 minutes or so.. Almost no time for coffee or restroom. And these guys are saying sparing a few hours to get their own accesses is 'a waste of their time'...
That was the time I discovered skrillex.3 -
Hello, world!
Soo.. I am half way done with Pre-Release 10!
Woohoo!
However.. The update log is already as long as the full update log for the last update.. Which was twice as long as the log for the update before..
I'm Starting to notice a pattern.. XD
This is all good and well, but I feel as if I'm overworking myself. I'm getting stressed out, and I'm not spending near as much time with my girlfriend. 3: But, I'm having fun. I'm genuinely enjoying myself, and I'm making a ton of progress in such a short amount of time. I also have a new team member!
Idk.. I haven't done anything the past two days really. Work nor spending time with my girlfriend. I'm stressed, and I'm not sure what I should do. I'm sooper modivated to keep working, but I feel that my situation will only get worse.
---
Because I'm sure some of you will be interested ('cause my game is very popular in this community <3), here is the update list so-far. Do note that this is not the final list, and things will be added, and may be removed.
As you can see below, this update is mostly focussed around API's. Specifically Modding, and the new FileSystem. On top of this, I will *try* and tinker with the official Patreon API for Java and see if I can't intergrate that into my game. I'll also work on a ModManager, but I'm not sure if either of these will make it into this release. I also have plans for new Apps and Commands for this release, as well as working and polishing up existing Apps and Commands.
---
* Closing the game with X button (and other ways) now also calls preExitTasks()
+ Added AddonLoader. It's literally a Mod-Loader. (Your welcome :3) A tutorial coming soon, but just know that it's standard Java codeing and you simply need to drop the mod.jar into the game's addons/ directory.
++ Added "API" - This is a bunch of methods that are added for the Mods to use. These Methods likely wouldn't of been added othewise.
+ Added in-game FileSystems (Folder, files..)
++ Added FileNavigator API for traversing the in-game FileSystems
* Fixed a major bug with the "debug" command where you could no longer run any commands after enabling debug mode.
+ Added GameSave creation
+ Added System creation
+ New Save + localsystem are generated on startup
++ Added WindowBuilder API for creating Apps. This makes creating Apps much, much simpler, and is intended for not only us, but use in Mods.
* We re-wrote the Console Class from scratch, and turned it into an API for creating custom Terminal Apps. (Commands are now created using the Command Class and are then passed to Console and registered as either a Local or Global command)
++ Added Command API for creating commands. These commands execute Java code, much like a JavaFX Button would, on each call. You also get everything after the first [space] of the command that was passed, as a String.
* Re-wrote ALL previously implimented Apps.
* Re-wrote ALL previously implimented Commands.
+ Added "debugtest" command to test debug mode. (This just prints a totally boring random message, and you shouldn't try it.) [Note: This "command will not exist" when debug mode is false.]
+ Added "cd" command. ("cd ~" "cd .." "cd /home/folder" "cd etc" "cd /")
+ Added "cat" command. ("cat file" "cat /folder/file")
+ Added "mkdir" command.
+ Added "rm" command.
+ Added "dir" command.
If you're new and you have no clue what I'm talking about, here's the info page: https://trello.com/b/0bH2SjQf1 -
For some reason, when testing if a block of code is firing, I always do console.log('fart'); More often than not I forget to remove it before going to production. I feel good knowing that's out there on dozens of sites right now.8
-
This was some time ago. A Legendary bug appeared. It worked in the dev environment, but not in the test and production environment.
It had been a week since I was working on the issue. I couldn't pinpoint the problem. We CANNOT change the code that was already there, so we needed to override the code that was written. As I was going at it, something happened.
---
Manager: "Hey, it's working now. What did you do?"
Me: *Very confused because I know I was nowhere close to finding the real source of the problem* Oh, it is? Let me check.
Also me: *Goes and check on the test and prod environment and indeed, it's already working*
Also me to the power of three: *Contemplates on life, the meaning of it, of why I am here, who's going to throw out the trash later, asking myself whether my buddies and I will be drinking tonight, only to realize that I am still on the phone with my manager*
Me again: "Oh wow, it's working."
Manager: "Great job. What were the changes in the code?"
Me: "All I did was put console logs and pushed the changes to test and prod if they were producing the same log results."
Manager: "So there were no changes whatsoever, is that what you mean?"
Me: "Yep. I've no idea why it just suddenly worked."
Manager: "Well, as long as it's working! Just remove those logs and deploy them again to the test and prod environment and add 'Test and prod fix' to the commit comment."
Me: "But what if the problem comes up again? I mean technically we haven't resolved the issue. The only change I made were like 20 lines of console logs! "
Manager: "It's working, isn't it? If it becomes a problem, we'll work it out later."
---
I did as I was told, and Lo and Behold, the problem never occurred again.
Was the system playing a joke on me? The system probably felt sorry for me and thought, "Look at this poor fucker, having such a hard time on a problem he can't even comprehend. That idiotic programmer had so many sleepless nights and yet still couldn't find the solution. Guess I gotta do my job and fix it for him. I'm the only one doing the work around here. Pathetic Homo sapiens!"
Don't get me wrong, I'm glad that it's over but..
What the fuck happened?5 -
hello devranters,
been a while, past few weeks have been a painful one for me.
I finally got that second monitor and also built the small home server( I'll give details in another rant).
been a lot going on around me, there's a protest going on and a lot of young "unarmed" people including children killed, lots of gory images, all we were asking for was to stop police brutality, they're still shooting at people. it's a lot going on here. I can't even concentrate. I took some time off social media because all the bodies I was seeing was beginning to get into my head.
I really can't Express how I feel right now. we were expecting the international community(I really dont know who exactly) to come to our aid, lol
It's all over Twitter. images, videos, everything.
I just hope everything gets better.
the image is my new setup. I just log hello world on the console and that's all I do with it.
my table is basically two wooden slabs supported by textbooks on chairs(at last I found use for them since I never read them in school ). server is under the table.
keep us in your prayers. thanks7 -
A few days ago Aruba Cloud terminated my VPS's without notice (shortly after my previous rant about email spam). The reason behind it is rather mundane - while slightly tipsy I wanted to send some traffic back to those Chinese smtp-shop assholes.
Around half an hour later I found that e1.nixmagic.com had lost its network link. I logged into the admin panel at Aruba and connected to the recovery console. In the kernel log there was a mention of the main network link being unresponsive. Apparently Aruba Cloud's automated systems had cut it off.
Shortly afterwards I got an email about the suspension, requested that I get back to them within 72 hours.. despite the email being from a noreply address. Big brain right there.
Now one server wasn't yet a reason to consider this a major outage. I did have 3 edge nodes, all of which had equal duties and importance in the network. However an hour later I found that Aruba had also shut down the other 2 instances, despite those doing nothing wrong. Another hour later I found my account limited, unable to login to the admin panel. Oh and did I mention that for anything in that admin panel, you have to login to the customer area first? And that the account ID used to login there is more secure than the password? Yeah their password security is that good. Normally my passwords would be 64 random characters.. not there.
So with all my servers now gone, I immediately considered it an emergency. Aruba's employees had already left the office, and wouldn't get back to me until the next day (on-call be damned I guess?). So I had to immediately pull an all-nighter and deploy new servers elsewhere and move my DNS records to those ASAP. For that I chose Hetzner.
Now at Hetzner I was actually very pleasantly surprised at just how clean the interface was, how it puts the project front and center in everything, and just tells you "this is what this is and what it does", nothing else. Despite being a sysadmin myself, I find the hosting part of it insignificant. The project - the application that is to be hosted - that's what's important. Administration of a datacenter on the other hand is background stuff. Aruba's interface is very cluttered, on Hetzner it's super clean. Night and day difference.
Oh and the specs are better for the same price, the password security is actually decent, and the servers are already up despite me not having paid for anything yet. That's incredible if you ask me.. they actually trust a new customer to pay the bills afterwards. How about you Aruba Cloud? Oh yeah.. too much to ask for right. Even the network isn't something you can trust a long-time customer of yours with.
So everything has been set up again now, and there are some things I would like to stress about hosting providers.
You don't own the hardware. While you do have root access, you don't have hardware access at all. Remember that therefore you can't store anything on it that you can't afford to lose, have stolen, or otherwise compromised. This is something I kept in mind when I made my servers. The edge nodes do nothing but reverse proxying the services from my LXC containers at home. Therefore the edge nodes could go down, while the worker nodes still kept running. All that was necessary was a new set of reverse proxies. On the other hand, if e.g. my Gitea server were to be hosted directly on those VPS's, losing that would've been devastating. All my configs, projects, mirrors and shit are hosted there.
Also remember that your hosting provider can terminate you at any time, for any reason. Server redundancy is not enough. If you can afford multiple redundant servers, get them at different hosting providers. I've looked at Aruba Cloud's Terms of Use and this is indeed something they were legally allowed to do. Any reason, any time, no notice. They covered all their bases. Make sure you do too, and hope that you'll never need it.
Oh, right - this is a rant - Aruba Cloud you are a bunch of assholes. Kindly take a 1Gbps DDoS attack up your ass in exchange for that termination without notice, will you?5 -
!Rant
Now that's how I like my operating systems!
Found these earlier on when shopping and was too cowardly to take a picture in the shop and leave them there, so I bought them. They taste nice too.
Like most women, my wife has a sweet tooth and I've told her that these are special biscuits for developers and she can't have any unless she can code.
She's now doing a quick JS console log of 'hello world' in Chrome whilst I make the tea!3 -
Listened for about a half-hour yesterday to DevA ‘beat down’ DevB writing a console app for trying out a proof-of-concept idea he had.
DevB: “What’s the URL of the development server?”
DevA: “Why? What are you doing?”
DevB: “I’m needing to throw some messages to it so I can capture data for something I’m working on.”
DevA: “How are you calling the service?”
DevB: “I wrote a console app”
- you could almost hear the eye roll -
DevA: “A console app? Why in the world would you write a console app?”
DevB: “Oh..um..no reason. I just need log some test data for something I’m playing around with. How should I do it?”
DevA: “If it’s test data, you should have wrote a unit test. You see, unit tests …”
- yammer on and on for about 5 minutes about the virtues of unit tests…never really explaining anything -
DevB: “Yea, I’m not needing to test the result or anything. I just need to log some data.”
DevA: “Then you should use a unit test for that, not a console app. With a unit test, you’ll be able to validate the data. That’s what unit tests are for. Microsoft should have never put in console apps in Visual Studio. It just leads to bad coding practices.”
DevB: “Um…I don’t care. It’s a console app because I just need data…thanks anyway”
Today, DevC was talking to DevA
DevC: “Charlie is testing the order module, but there isn’t any test data. Do you still have the data generating script?”
DevA: “Oh yea, I’ll send him my console app that populates the database.”
It was all I could do from screaming “You stupid –bleep-er!! What the f–bleep-ck was all that yesterday?!”, but none of my business. Better to devrant about it than start a fight. -
Inspired by @shahriyer 's rant about floating point math:
I had a bug related to this in JavaScript recently. I have an infinite scrolling table that I load data into once the user has scrolled to the bottom. For this I use scrollHeight, scrollTop, and clientHeight. I subtract scrollTop from scrollHeight and check to see if the result is equal to clientHeight. If it is, the user has hit the bottom of the scrolling area and I can load new data. Simple, right?
Well, one day about a week and a half ago, it stopped working for one of our product managers. He'd scroll and nothing would happen. It was so strange. I noticed everything looked a bit small on his screen in Chrome, so I had him hit Ctrl+0 to reset his zoom level and try again.
It. Fucking. Worked.
So we log what I dubbed The Dumbest Bug Ever™ and put it in the next sprint.
Middle of this week, I started looking into the code that handled the scrolling check. I logged to the console every variable associated with it every time a scroll event was fired. Then I zoomed out and did it.
Turns out, when you zoom, you're no longer 100% guaranteed to be working with integers. scrollTop was now a float, but clientHeight was still an integer, so the comparison was always false and no loading of new data ever occurred. I tried round, floor, and ceil on the result of scrollHeight - scrollTop, but it was still inconsistent.
The solution I used was to round the difference of scrollHeight - scrollTop _and_ clientHeight to the lowest 10 before comparing them, to ensure an accurate comparison.
Inspired by this rant: https://devrant.com/rants/1356488/...2 -
I have been debugging for like hours trying to figure out the cause an unknown bug spoiling my UI by making my elements overlap.
I'm working on a Unit Converter that takes kWh and then converts to mWh. (Logical Conversion: 1000 kWh = 1 mWh).
Just an easy shit i thought, using Javascript I just passed the dynamically generated kWh value to a function that takes maximum of 6 chars and multiply it by 0.001 to get the required result but this was where my problem started. All values came out as expected until my App hits a particular value (8575) and outputs a very long set of String (8.575000000000001), i couldn't figure the cause of this until i checked my console log and found the culprit value, and then i change the calculation logic from multiply by 0.001 to divide by 1000 and it came out as expected (8.575)
My question is that;
Is my math logically wrong or is this another Javascript Calculation setback?13 -
Today, in the course of my job, I said...
FFS. I HATE WINDOWS.
It has begun.
Took me five minutes to ssh into the Linux EC2 and get the Jenkins agent installed, configured, and running. Half a fucking hour for Windows Server 2012.
1) Can't ssh to it, so I connect via AWS console... Which means I have to install MS Remote Desktop. WHATEVER. FINE. It's not like ssh is quick and easy or anything.
2) Can't just use the command line, run the .jar &, cntl-z, and bg then log off. Noooo. I have to install the unpacked binaries as a fucking SERVICE. FINE. WHATEVER.
I'm so glad we have a Windows guy that does most of this shit. I can't stand it.1 -
Going for an interview with them asking me to open console on their laptop and type a 1 liner in JavaScript that will make an array with indices being numeric values 1-20. Their machine doesnt want to work and never wanted to log in... So i do the following:
1.Pull out my phone
2.Open Thermux
3.Ask for wifi password
4.Install node on my phone and write the below attached code
Needless to say. I actually feel good about myself, i got the job and a good offer and the network password...6 -
Our Joomla-based site just got a redesign. The developer who did it did something wrong. Articles no longer are attached to their parent categories and are now all referenced at the root level in URLs.
I pulled up the 404 log and now see that some website or bot or whatever is hitting up each category for each article, which screws with our SEO 404 report in Google Search Console.
Which means I have to find a way to programmatically redirect every article within every category "up" a level to the root where each article is now found.
And I have no way of knowing which article belongs to which category anymore. Even if I did, a test shows that articles attached to categories still want to come up at the root level, not in their categories.
Joomla is G.A.R.B.A.G.E.3 -
Piddling, and trying to learn some game stuff. Very simple game stuff.
Example code:
if (level % 10 === 0...) {
speed += 0.3;
...
} else if (level % 5 === 0...) {
speed += 0.1;
...
}
But because Javascript, console log reads:
speed: 0.5 <-- this is the initial console log
speed: 0.6
speed: 0.8999999999999999
speed: 0.9999999999999999
Well done Javascript, well done.25 -
I like my log messages to indicate automatically where in the code something happened, so that I can easily identify where a message originated from while tracking down problems.
In C/C++ this is nice and easy - write a logging routine, wrap it in macros for the different log levels and have that automatically output __FILE__, __LINE__ etc.
I wanted to do something similar in NodeJS, as I'd found myself manually writing the file name in the log message and then splitting functionality out into new files and it became a mess.
The only way I found to be able to do this was to create an "Error" object and access the "stack" member of it. This is a string containing a stack backtrace, suitable for writing to console/file. I just wanted the filename/line/routine.
So I ended up splitting the string into lines, then for each of the lines, trimming the surrounding spaces (or tabs?), and parsing them to see if the stack entry is inside my logger module. The first entry outside of that module must therefore be the thing that called it, so I then parse out the routine or object and method, filename and line number.
It's a lot of clumsy work but the output is pretty neat. I just wish it were simpler!2 -
Today after longer vacation I came back to work.
Edit: wrote this rant long time ago, but never finished. Was too pissed.
Some easy meetings, then wanted to start on an easy job.
Just migrating some things from bash regex voodoo to proper tools like JQ.
Finished in roughly 1 h. Lovely.
Made some tea, ate some cookies.
Set up dev environment, found no documentation what so ever, got it running after half an hour.
Annoying, but ok.
Then I tried my scripts...
They worked... Except they didn't.
Console log empty, response code 200 with state: GENERATE_NO_FILES.
Eh. Fuck you. Just fuck you.
Fixed the logging configuration, which was broken since uhm... 2 years plus?
Well... Another half another hour gone...
Kinda pissed now.
Still script return failed...
Poking and trying to sprinkle debug all over that shit cause everything seems ... An incohesive, inconsistent diarrhea.
3 hours later...
Made the ticket to rewrite it.
I did nothing wrong at all.
The API just has no workflow at all. The
*seperate* API calls have to be in an **specific** order - as otherwise the generation will fail, as the prerequisites for the generation are not fulfilled.
Yeah. Completely logical. Especially not to give out any kind of warning or an error message like requirements not met, blablabla.
I drank that evening 2 six packs of beer. I was raging mad....
Then gave that shit to another manager, as I never want to touch that nuclear waste again....
How can someone be so brain damaged -.-1 -
This literally happened in my current team, and I'm not even an experienced dev yet.
Incident happened like this :
Our team is working on a RCP based on eclipse plugins, which has a headless mode and a GUI mode. Now, in the GUI mode, my manager cum architect thought there are no need of user log files (long story) because the user can see the info on screen, whereas in the headless mode, she wanted me to print the logs onto the console and a log file as well.
Now it just so happened that our team had got a recent addition as a replacement to our lead developer (she left the company) who claimed she had 3 years of expertise and a masters degree, and she was assigned a task. The task was to format a custom file we were generating out of the product (basically dumping info in a file) in a human-readable format. Miss new-addition-masters-degree decided it would be a very good idea to redirect the standard java output stream to a file output stream ( which she used for generating the formatted file ) but somehow never realized that she needed to reset the output stream back to standard output.
Consequences were devastating. I wrote the logic for the logger ( yes, apparently any available logging mechanism won't do it, again, long story ) and had it printing to a file in tmp directory. The logs seemed to be working fine initially but after a few logs, specifically from the point where the formatter started working, all the logs got printed in the formatted file. And this file was supposed to be used by our clients to develop something on top of it. Naturally, I got the heat of it and then naturally, worried and nervous and curious and in a frenzied state of mind, I started debugging.
When I got to the actual fault, I seriously could not decide whether to cry or laugh or call up miss masters and scream at her. I decided to ask her about what the hell she had written and her answer was most of it was written by the developer she replaced, so she didn't know it would cause this much problem. Anyway, I fixed the leak after that and averted the catastrophe.
And that, fellow devs, is the story of how I solved a crisis in my first year at corporate.1 -
This rant is about myself and anyone whos like me: using logs over a debugger
So, sometimes when I wanna quick check something or make sure, if and when something get's executed or I've ran into a Problem, I add a few log/print statements to check in console.
But I don't think about proper and helpful messages, since they aren't supposed to stay in code. So I often type what comes in my mind, like memes or song lyrics.
The last time this became a huge act, was Code review/ Prototype demonstration with Clients (which I didn't knew about, otherwise I would have removed them, I swear) and Boss and my Code printed "show bob and va...", "send nudes" and stuff... in loop... to stdout2 -
I already wrote this story in the comments to some other rant, still it's pretty funny.
So, i was modding my wii u by messing with system files, the only way to do this is to run an homebrew that hosts an ftp server so you can connect with your pc, the thing is, this server was not protected and allowed anonymous login, not an issue if you have a firewall.
BUT i had this console in the DMZ on the router for online play.
~You can see where this is going~
While doing stuff from my pc i started seeing a lot of entries on the console's log and i didn't understand why, i thought filezilla was doing some shit so i closed it but the log was still going, then i realized and quickly shut the server down.
Then i disabled the DMZ and went back to check what happened (unfortunately the log was only shown on screen and not saved, by closing the server i lost it) so looks like the attacker uploaded a lot of files with random names in pretty much every folder.
Due to the random names, I don't know which are system files and which attacker's files so i just kept them there. And today they should still be there.
--Random thinking--
What if the attacker also stole some files, he was hoping to get photos or valuable documents, but just got the console's system files and he thought something along the lines of "wtf is even this".
Also, how likely is that an ip scanner script gets to my ip in the 5 minutes i run the server, and (on the attacker side) how likely is to hack a server just to find out that's a wii u (the least successful console in the last generation)...
Moral of the story: double check your firewall if you are going to run an unprotected server.
That's it, stay safe :P2 -
> Mister BossDeveloper, I'm calling this method called "consoleLogger" and I'm not seeing anything in console, why is that happening?
> Mister IHateForALiving, it's redirected to some pm2.log file
The 180iq move: create a method, explicitly call it "PRINT TO CONSOLE" and make sure it doesn't print to console, ever.4 -
I'm not a beefy dude, But I consider myself as a terminator 🔫 because when I find a BUG I fucking console log the shit out of it !
-
Just started Online Banking at my bank. Checked how much money I have and what I can do on the website.
Afterwards I opened the dev tools and see that there is a js warning. So I open the console and the fucking first thing I see is: Loglevel set to INFO. WHAT THE FUCK?!?
Other things I found out:
API Endpoints are logged here. Two deprecation warnings for a function used. A warning about a deprecated service used.
The log level is now set to WARN. Several more deprecation warnings for the framework from before.
The fuck is this?12 -
yes, you absolute fucking asshat, i would like to do more than JUST LOG FUCKING PALETTE TO THE FUCKING CONSOLE
ANY METHODS EXPOSED BY THIS? ANY OTHER OPTIONS? OR YOU JUST GONNA SHOW THAT YOU CAN LOG OUT THIS OBJECT
https://github.com/Vibrant-Colors/...
retarded documentation will be the end of us all i swear to fucking god (or at least me)
though reap what you sow, js devs just as retarded as the language i conceed
i've never seen such a large README and learned so little of what the fuck is going on or how to actually use any of the options1 -
Client: Can you put all the add on products we sell into the MDSL (Master Daily Sales Log)
Why aren't you adding them to the new console system? It allows you to add them and tracks all actions on the sale.
Client: The Health Agents don't know how to do that, and I think the manger hasn't added them into the system....yup he didn't add them.
Me: So how are you tracking the addon products you are selling?
Client: I don't know. Can you just add them to the MDSL.
Me: I wrote the console system to replace the MDSL, why are you using the spaghetti code system I wrote 8 years ago?
Client: They like it better because of this one report they use.
Me: I rewrote that report for the new system and it even gives more info.
Client: But the owner doesn't trust it, because it shows conversions and sales instead of just sales.
Me: ...1 -
Attempting to deploy my web application using Heroku. It throws me error code H14 so I add scale web=1 to the web dyno per their documentation. I get this console log thrown at me after attempting to deploy.
I'm starting to get pissed. I may end up just dumping this and deploying my node.js/java application straight to my Linux server.
Edit: Or better yet start learning to use this Docker thing I keep hearing about.5 -
Anyone else add increasingly snarky or desperate comments and console log messages when things aren't working right? My messages are like watching a coder's mental breakdown slowly progress.
-
accurately estimates number of primes under k
from k=29, to k=232 (within +/- 1..2)
ceil(k-((phi/(1/((log(phi**(k-6), phi))/1))))/2)
Played with an alife I made.
And built a system to explore long chains of polynomials where the exponents were prime.
You can look at it if you like here:
https://pastebin.com/3trWAU7v
Don't blame me if your console explodes though!12 -
Dude GoogleAuth is pure nonsense magic. On one line you get your auth-instance from gapi.auth2.init..
But then you render the auth-button with a static method aka gapi.signin2.render (which has some kind of success and error handlers, but don't worry, they fire randomly, they won't help you debug this api mess)
SOME-FUCKING-HOW this static signin2.rendershit knows of your auth2 instance and it works. But actually it makes no sense and is just a big mess of api-calls. Google, get your shit together, this ain't pretty.
Oh and forget your informative console.log.. this shit will get erased everytime you try something because of "Navigated to https://accounts.google.com/o/...". why ever the fuck this clears the console even tho it doesn't affect the top window. So preserve that fucking log and drown in a mass of bullshit.
In the end, as it is with everything, it somehow works. But FFS that's some weird api design Google has going on..4 -
When adding line breaks to a string that get injected into a html view I always use \r\n instead of just \n. Cus I know one day some smart motherfucker will download one of my webpages with a console app and log out the html to the console to make sure it worked. And when that day comes.. I will have won.1
-
I give up. I am having trouble understanding Go lang *, & stuff.
attached code does print what fmt.Println has, but the function calling: FindByID is throwing invalid memory address or nil pointer when it attempts to use the result of the code.
Can someone please explain where I'm wrong?
Error log blames the line of "if" condition even though fmt does print its output to console16 -
Even if Microsoft has done considerably steps forward in recent years with dotnet core being an open source platform, it still retains a bit of its microsoftian dna. Let me make an example. Start a new test project with xUnit. It doesn't log to console. Decide to use the standard Microsoft.Extensions.Logging that should be the new, performant way of logging. It comes with 4 providers and **it doesn't log on file system**. Bottom line: all the complexity of a complex stack without the solution you were looking at the beginning. Resorting to thirdy party tools to do the job (serilog).2
-
Today has been a weird day. AWS us-east-1 region has been having huge issues for hours now, with the console and multiple services down or erroring out. My day has been an odd mix of twiddling my thumbs with nothing to do and trying to calm down angry people who are also twiddling their thumbs with nothing to do.
I'm tempted to just log off Slack and leave an auto-reply of "Can't fix it, no workaround, leave me alone" so I can go back to bed.4 -
i have not been able to get a single error message to show up for hours. not one console log or warning.
i’m ok.
……
mmmmmmmmMMMMM
AAAAAAAAAAAAUUGHJHGHHGCGGVBVVGFUCKIGNFUCKPIECEOFSHITAFGJHFD5 -
When you see: "Agreeing to the Xcode/iOS license requires admin privileges, please re-run as root via sudo." in the Jenkins console log and realize that XCode was updated.
-
Customer: your app is not returning all the objects in my bucket
Support: check console log 500 server error, ssh into box check logs exhausted memory limit.
Sudo vim /etc/php.ini search memory limit
Update to a high number restart Apache sit back and think fuck did I set it to high will it blow up my server.
Only time will tell!!! Sorted out the issue until the next user with millions of objects in their buckets -
Supposedly 2 years professional experiencd junior - console.log ("how do you like figure out what data is being passed In and what it looks like? is there some special tool you use when you are trying to get the types or correct nomenclature for the reference?") Me "I just log it to the console or use fiddler. " how do I do that?1
-
How should I name NPM package which works as console log for errors, but throws user to stack overflow page with error massage included in the link?
Found a meme here at DevRant in which this idea was presented, haha.13 -
> totally disable logging on console
> logging is redirected instead on some 1200 separated files (no, not "log files rotated through 1200 days"; every part of the program has its own log file, and there's 1200 of them)
> still, in all those files, none of them contains MY log; somehow it disappeared
Why some people even chose to become developers will always elude me2 -
Fuck you google for changing the filters in the chrome console. Before I could ignore warnings if they were fixed by another teammate in a diff branch. Now I have to go over 20 fucking lines of missing exports from a common lib file, which has 0 impact on my current work, because google decided to treat devs as retards.
If you dont know:
Before I could pick whichever outout I want (log, debug, warnings etc), and now I can only use "verbose", "info", "warnings" and "errors" 😡 -
I did an engineering quiz yesterday as a way of introducing a new database the school recently got access to. You had to sign up for the site.
- Passwords were max 20 characters (which is better than 10, but still, why???)
- You couldn't use special characters, but there was NO INDICATION ANYWHERE THAT THAT WAS THE CASE. It would just silently fail to log in. I had to open the browser console to figure out what wasn't working. FUCK -
wait..... can you auto indent console logs depending on their nesting in functions?
I just realised it can be hard to read console logs because say you do
log('here 1')
callFunction()
log ('here 2')
But callFunction does a bunch of logging, then your here1 and here2 become separated !
But if you could make console log automatically add a couple spaces for every level of nesting/scoping that would be ideal .. ? 👀12 -
Log points in chrome Dev tools
Cool feature to stop unwanted console message in chrome browser
https://developers.google.com/web/...1 -
!ng5
Out of nowhere my directive stops working... Didn't change anything there in die last weeks.😥
No console Errors and no console log entries i added.
Why? 😥 -
Since my question, in all likelihood, won't get answered on StackOverflow, I hope I can ask it here instead. I hope that's alright.
So, I am currently developing a Feathers + Nuxt boilerplate, and am using localStorage to store the jwt.
But I noticed if I set the localStorage with the jwt manually, it will act as if I'm logged in, bypassing the entire login-function. So I solved this by using an iframe with a script that clears localStorage (and log out the user, if logged in) when something changes in the localStorage (by using the eventListener "storage"). (I am also observing the iFrame if someone deletes it, in the console, and re-inserts itself).
My question is if this would carry any security risks? Like, would this be a bad thing to do, security wise? Is it alright to leave it alone and let users/visitors to set the jwt manually?9 -
Any advice for debugging a 520 error from Cloudflare?
I know this isn’t SO but Ive been having the toughest time finding a decent way to find the cause of a 520 error from Cloudflare.
I have a droplet of Digital Ocean running Apache 2.4X and randomly throughout the day I will get 520 errors in the browser’s Networking log.
Naturally, there’s nothing even noted in the Apache error log or access log. And Cloudflare has no logs on this in the console.
If I retry the request it will go through with no problem.
Anyone experienced something like this?5 -
NPM version : 10
React-Native Library : react-native-get-music-files
Installation :
npm i --save react-native-get-music-files
rnpm link
Things I Have Already Tried :
rnpm link react-native-get-music-files
react-native link
npm install
react-native run-android
REINSTALLING
MAKING A NEW PROJECT
Details :
Its documentation says add import com.reactlibrary.RNReatNativeGetMusicFilesPackage; but when automatically linking , it adds com.cinder72.musicfiles.RNReactNativeGetMusicFilesPackage;
Manually it is showing com.reactlibrary.RNReatN... is not found.
Automatically everything is working fine.
Error :
In the react-native-get-music-files/index.js
import { NativeModules, Platform } from 'react-native';
const { RNReactNativeGetMusicFiles } = NativeModules;
const MusicFiles = {
getAll(options){
return new Promise((resolve, reject) => {
if(Platform.OS === "android"){
RNReactNativeGetMusicFiles.getAll(options,(tracks) => {
resolve(tracks);
},(error) => {
resolve(error);
});
}else{
RNReactNativeGetMusicFiles.getAll(options, (tracks) => {
if(tracks.length > 0){
resolve(tracks);
}else{
resolve("Error, you don't have any tracks");
}
});
}
});
}
}
export default MusicFiles;
It says RNReactNativeGetMusic files is undefined.
I tried console log NATIVEMODULES and it shows nothing as RNReactNativeGetMusic or anything similar.2