thread for computer programming ppl

Hah hah, actually that works for Edge but not in Chrome (weird) and then to add a new level of weird, when I put in the next bit of the lesson, params after the call to the server, e.g.

localhost:9000/api/courses?page=1&pageSize=10

it now trips CORS again.

Right.

Fixed it!! (@breakfast_t_england )

I had to go through the code of the express module and I can’t work out how to default this so I’ve had to add it to each individual response from the server but basically it’s just:

export function getAllCourses(req: Request, res: Response) {

    res.header("Access-Control-Allow-Origin","*").status(200).json(Object.values(COURSES));

}

you just add in a .header() for each one. Fucksake!

2 Likes

Anyone used Julia?

nope but heard a lot about it this week via work, as they (Julia computing) just got series A funding this week. how is it?

1 Like

I haven’t used it n that’s also why I was interested in hearing what other people know/think

1 Like

I can also barely write a line of code :grin:

Julia is dynamically typed, feels like a scripting language

Having just spent two weeks trying to understand a decade-old Rails app I cannot condone anyone writing anything even remotely complicated in anything that “feels like a scripting language.”

(I’ve never seen Julia code.)

2 Likes

Ohhh it’s for scientific computing, so I guess they’re going for a “high performance Python” type thing, which makes sense. I know a bunch of folk who’ve learned Rust just to speed up hot paths in Django apps.

1 Like

I saw that you can use unicode symbols in Julia which sounds like it should be cool but when the hell would you ever type out the unicode for, idk, alpha, when you could just write alpha out faster. Looks pretty at least. Maybe if you’ve got a fancy IDE it’s not so bad.

Presumably if you can use Unicode symbols then you can type directly in Chinese characters (and I would guess other languages too)? I mean that’s what I would interpret as the reasoning but I haven’t researched!

Trying to think what this would be IRL. A crocodile?

3 Likes

Singing The Philosopher’s Song on Everest?

1 Like

A lot of Unicode characters can be written by using \alpha and then tab to change that to the alpha character.

I had it working in jupyter notebooks and sublime and it works in the REPL too and it’s really great if you’re using formulas a lot where the value Greek letters represent are universally understood.

Only used Julia very briefly but I really liked what I saw - I was using mostly for statistical work coming from a python/r background.

Broadcasting functions with the dot syntax really clicked with me and the efficiency advantage over python meant I was able to rewrite some of my python scripts that work on large datasets to run in about 60% of the time.

2 Likes

Client has asked about ‘linking the orders to the courier (DPD)’ for their website. Don’t even know what that means. Or where I’d even start. What does he mean? An order gets placed and then it gets pushed into a DPD portal or something?

Pretty sure it’s beyond my ability anyway, guessing it would require some C# backend stuff.

Actually, just remembered what they sell. Yeah fuck off that’s not happening.

I would assume they just mean that if someone orders from your client and then goes to check the status of their order they’ll find a link there to the DPD order-tracking page. I guess your client is making their orders via some kind of API that gives that detail back.

We have a system using a very old version of NServiceBus and it’s not really using it that extensively so I’ve been asked to see if I can work out how to remove it. I’ve done some of the work but now I’m trying to understand what on earth I need to build into a windows service to achieve this. Holy shit, my head is going to explode.

We built their website and the ordering process all comes from the built-in ecommerce functionality that the CMS provides. So any API calls etc would need to be written as part of what they’re asking for, there’s nothing in place for it. Sounds like a big undertaking to me. I’m just a front-end dev (no other devs in the company), think it’s a bit beyond me.

1 Like

Oh sure, I didn’t mean to imply you would be able to do it, just what I understood. But I’ve seen that with a bunch of sites I’ve ordered from - direct links to the tracking site from whoever they use - so I’d guess that’s what they’re after. Sound like they need to speak to the backend (wayHEY) first.

1 Like

Ended up responsible for a Magento website (no experience of Magento, literally none) and its got an issue with the copies of emails not being sent to the site owner when an order is placed. The customer receives their email but nothing sent to the other specified recipients. Been on people per hour actually cba finishing this post it’s Friday night.