Welcome, Guest. Please login or register.
March 28, 2024, 03:24:29 am

ballp.it is the community forum for The F Plus.

You're only seeing part of the forum conversation. To see more, register for an account. This will give you read-only access to nearly all the forums.

Topic: Thread.setTitle("Programmers Anonymous");  (Read 60651 times)

Ashto

  • Paid
  • I don't even know anymore
    • 676
    • 43
Thread.setTitle("Programmers Anonymous"); #120
For my latest project, I'm trying to drop jQuery in favor of just regular JS, and part of the process involves moving from $.getJSON() to fetch(). However, I'm trying to fetch the json data from HTTPS to HTTP, which throws an error. I can set the call mode to 'no-cors', but then all I get is an opaque response, likely because the HTTPS server isn't set up to handle the request. Is there any way to make fetch() work? I assume it has to be possible since $.getJSON() works just fine. I could just make the source use HTTPS as well to get around the whole issue, but I'm trying to make it so that the code will work no matter where it's being run from (basically, is it common practice to make HTTPS a hard dependency?)

Edit: nevermind, did a deep dive into how JSONP works, and how jQuery automates the process behind the scenes. I've learned how to append the script into the head tag to pull it's info.
« Last Edit: November 18, 2018, 09:58:06 pm by LaserSeusan »

Tupocky

  • egg
  • Paid
  • egg
  • 3
  • 1
Thread.setTitle("Programmers Anonymous"); #121
I'm in a "concepts of programming languages" class, and the past few weeks have been entirely on this language, Standard Meta Language. Using it is kinda like coding exclusively in command-line Python, but with the added bonus of being a functional language from 1983. I think at this point in my education I can justifiably say "why the hell am I learning this, and when will this ever be useful?"

Ambious

  • Guest
Thread.setTitle("Programmers Anonymous"); #122
TIL that with "Git Extensions" you can stage discrete lines for commits rather than entire files if you want to. Made splitting up the GIANT commit I had for my month long project into subject commits much easier.
Also the more I use C# the more I discovered how great it really is.

Ashto

  • Paid
  • I don't even know anymore
    • 676
    • 43
Thread.setTitle("Programmers Anonymous"); #123
Got my first interview request! I'm going to be cramming and preparing for interviews as much as possible over the next couple of days (haven't confirmed on an interview date). There's a few things that might work against me: 1) I don't have a relevant degree (Graphic Design, not Computer Science), and 2) I've never used Vue.js, which is something they're really looking for. I'm basically going in on the premise that I can easily apply my current degree's skills to match their needs, and plan to be upfront about not knowing Vue but willing to self-teach (already started with the basics, seems fairly straight-forward and not too different from React!). Do you guys have any advice on these things, or anything in general?

Emperor Jack Chick

  • he/him
  • Ridiculist
  • Metal tyrant from hell
  • 3,193
  • 666
Thread.setTitle("Programmers Anonymous"); #124
today i was reverse engineering a test from another team in order to access some arcane APIs and encountered the a GET call titled "get website". being the intrepid sort that I am, I called it and received a 6.2k line JSON object back containing, presumably, the website. the very next call in the repo is called "update website", which is a POST request that submits a 6.2k line JSON object to a very similar URL. They did, however, change about 20 fields or so. as this is tangentially related to the work i'm doing, i explored around to see if this was relevant to the test that's being run, and no, it doesn't actually have any effect. HOORAY!!!

Ambious

  • Guest
Thread.setTitle("Programmers Anonymous"); #125
today i was reverse engineering a test from another team in order to access some arcane APIs and encountered the a GET call titled "get website". being the intrepid sort that I am, I called it and received a 6.2k line JSON object back containing, presumably, the website. the very next call in the repo is called "update website", which is a POST request that submits a 6.2k line JSON object to a very similar URL. They did, however, change about 20 fields or so. as this is tangentially related to the work i'm doing, i explored around to see if this was relevant to the test that's being run, and no, it doesn't actually have any effect. HOORAY!!!
jack chick, January 05, 2019, 12:58:47 am

This is how security breaches are born.
Back when I was working in retail I found a similar call on a competing company's website that basically gave me access to all their products and pricing, and so I made a scraping tool for our sales reps to be able to match prices on the fly.

EYE OF ZA

  • some people's reactions such as the fuck,the hell,wtf, or what the hell
  • Paid
  • I have a problem and then I have another problem
    • 2,572
    • 162
Thread.setTitle("Programmers Anonymous"); #126
Good: I'm learning PHP as I work on building my own portfolio website.

Bad: "//The tag array is sorted alphanumerically by default."  The tag array, after thirty minutes of breaking half the web page, turns out to not be sorted alphanumerically, or, indeed, at all.

Emperor Jack Chick

  • he/him
  • Ridiculist
  • Metal tyrant from hell
  • 3,193
  • 666
Thread.setTitle("Programmers Anonymous"); #127
Hey, question. Anyone super familiar with the builder design pattern?  (my project is in Java)

Basically: I have a class with ~30 fields, and an inner public builder class. The build() method of the inner class returns a new instance of the parent class and passes in an instance of itself. the parent class has a private constructor which assigns the fields collected by the inner class to the private fields on the parent. One of my coworkers has  requested that I move the initialization of those fields out of the private parent constructor and into the build() method between instantiating the new parent and returning it.

The question is: Does this matter? Is there any real tangible gain here aside from not having to pass an argument? The person making the request hasn't explained why he wants this beyond "the way you're doing it is Bad".  Guy is also kinda dumb so I'm not really inclined to listen to him.

Lemon

  • Whatever happened to Freedom of Speech?
  • Administrator
  • ...IT'S NOW THE MASH!
  • 4,127
  • 421
Thread.setTitle("Programmers Anonymous"); #128
This seems like the right place to bring this up:

Trying an experimental redesign of the code block. First attempt was to mimic the Apple ][e color scheme.

https://github.com/AhoyLemon/ballpit/issues/50

If you have a preference on how you'd like to see it, let me know. Keeping in mind that I'm not gonna do syntax colors - whatever it ends up being, it'll be monochrome.

Lemon

  • Whatever happened to Freedom of Speech?
  • Administrator
  • ...IT'S NOW THE MASH!
  • 4,127
  • 421
Thread.setTitle("Programmers Anonymous"); #129
Ignore me, testing something.

javascript
alert('hi');

Ambious

  • Guest
Thread.setTitle("Programmers Anonymous"); #130
Hey, question. Anyone super familiar with the builder design pattern?  (my project is in Java)

Basically: I have a class with ~30 fields, and an inner public builder class. The build() method of the inner class returns a new instance of the parent class and passes in an instance of itself. the parent class has a private constructor which assigns the fields collected by the inner class to the private fields on the parent. One of my coworkers has  requested that I move the initialization of those fields out of the private parent constructor and into the build() method between instantiating the new parent and returning it.

The question is: Does this matter? Is there any real tangible gain here aside from not having to pass an argument? The person making the request hasn't explained why he wants this beyond "the way you're doing it is Bad".  Guy is also kinda dumb so I'm not really inclined to listen to him.
jack chick, February 15, 2019, 12:41:17 am

It only matters if any of the fields is meant to be read only, and even then your way is better. It also depends on how the inheritance relationship is implemented - but it doesn't REALLY tangibly matter.
Most design patters are highly theoretical anyway and only exist to make different coders remain internally consistent, and especially in languages like Java and C# it doesn't really matter.

Ambious

  • Guest
A lot of people here dabble in code.
Let's share our experiences and bitch about how much we hate it but can't stop doing it anyway.
I'll go first:

My name is Ambious and I've spent my entire evening programming my first Python app.

WHO THE FUCK INVENTED THIS MESS!?
IT HAS ALL THE SYNTAX CONSISTENCY OF VISUAL BASIC!!!
AHHH!!! HOW IS THIS SHIT SO POPULAR!?
Ambious, July 01, 2016, 04:20:08 pm

This post did not age well.
Given the choice of language to perform scripting operations nowadays I'd pick Python over anything.
I still prefer C# for OOP, as Pyhton's OOP is extremely bad and feels like it was tacked on as an afterthought, but yeah Python is great and I was wrong.

I'm hoping to code something with some picky requirements, so I'm wondering if anyone has recommendations.

Basically, I want to make a simple app that I'll be using at work. Any language/frameworks I use are going to have to be portable, since I can't really install things on work PCs. Additionally, it'll have to be easy to run on different computers, so it can't have any dependencies that aren't easily bundled into the app itself.

I'm considering just using html and javascript, but I'll want to save/load files (probably just json data) and I feel like an html "app" would have too much friction with that, although I've never really done a lot of javascript so I could be wrong.

I'm pretty familiar with Python, and I can install a portable Python version on my own PC to do my development. Would something like py2exe make it easily runable on other PCs? I've never really used it before.

Is there anything else I should consider?
Darkly, March 16, 2019, 01:44:07 pm

I think you'd be best to go with Node.js
It's very portable (unlike Python, the packages are per-project so they go with you), and it's cross - platform and versatile.
.

Ambious

  • Guest
I think you'd be best to go with Node.js
It's very portable (unlike Python, the packages are per-project so they go with you), and it's cross - platform and versatile.
Ambious, March 16, 2019, 02:04:06 pm

I tried node.js for another unrelated project once, and I was turned off from it when I tried installing node-sass but couldn't without admin privileges.

I might give it another shot though. It seems pretty attractive as long as it works in my environment.

Edit: after playing with node some more, I think that plus electron may actually be exactly what I need!
Darkly, March 16, 2019, 02:15:25 pm

Yeah Electron is great for cross-platforming. Good luck!

Lemon

  • Whatever happened to Freedom of Speech?
  • Administrator
  • ...IT'S NOW THE MASH!
  • 4,127
  • 421
Based on what you're describing, I agree with Electron. It's incredibly portable, you end up with a small executable that you can run anywhere.

Just be careful about entering npm hell. Just cause you're making an electron app doesn't mean you need to start out with 4Gb worth of dependencies. Start as slim as you can.
.

Turtle

  • [F+][F+][F+][F+][F+][F+][F+][F+][F+][F+][F+][F+][F+][F+][F+][F+][F+]
  • Paid
  • 496
  • 69
Oh jesus christ I didn't even notice the far right line fuck what