this post was submitted on 12 Oct 2024
73 points (95.1% liked)

Programming

17352 readers
311 users here now

Welcome to the main community in programming.dev! Feel free to post anything relating to programming here!

Cross posting is strongly encouraged in the instance. If you feel your post or another person's post makes sense in another community cross post into it.

Hope you enjoy the instance!

Rules

Rules

  • Follow the programming.dev instance rules
  • Keep content related to programming in some way
  • If you're posting long videos try to add in some form of tldr for those who don't want to watch videos

Wormhole

Follow the wormhole through a path of communities !webdev@programming.dev



founded 1 year ago
MODERATORS
 

Hi,

My question certainly stems from the imposter syndrome that I am living right now for no good reason, but when looking to resolve some issues for embedded C problems, I come across a lot of post from people that have a deep understanding of the language and how a mcu works at machine code level.

When I read these posts, I do understand what the author is saying, but it really makes me feel like I should know more about what's happening under the hood.

So my question is this : how do you rate yourself in your most used language? Do you understand the subtilities and the nuance of your language?

I know this doesn't necessarily makes me a bad firmware dev, but damn does it makes me feel like it when I read these posts.

I get that this is a subjective question without any good responses, but I'd be interested in hearing about different experiences in the hope of reducing my imposter syndrome.

Thanks

you are viewing a single comment's thread
view the rest of the comments
[โ€“] lohky@lemmy.world 6 points 3 weeks ago* (last edited 3 weeks ago) (2 children)

8/10 Server-side JavaScript

7/10 Ampscript

3/10 SQL

There is something about SQL that I can't get to click with me. I can run basic queries and aggregation, but I can never get nested queries to work right.

All of these also assume I have access to documentation. Without documentation, all of them are like a 2. ๐Ÿคท

[โ€“] houseofleft@slrpnk.net 6 points 3 weeks ago* (last edited 3 weeks ago) (1 children)

I have advice that you didn't ask for at all!

SQL's declarative ordering annoys me too. In most languages you order things based on when you want them to happen, SQL doesn't work like that- you need to order query dyntax based on where that bit goes according to the rules of SQL. It's meant to aid readability, some people like it a lot,but for me it's just a bunch of extra rules to remember.

Anyway, for nested expressions, I think CTEs make stuff a lot easier, and SQL query optimisers mean you probably shouldn't have to worry about performance.

I.e. instead of:

SELECT
  one.col_a,
  two.col_b
FROM one
LEFT JOIN
    (SELECT * FROM somewhere WHERE something) as two
    ON one.x = two.x

you can do this:

WITH two as (
     SELECT * FROM somewhere
     WHERE something
)

SELECT
  one.col_a,
  two.col_b
FROM one
LEFT JOIN two
ON one.x = two.x

Especially when things are a little gnarly with lots of nested CTEs, this style makes stuff a tonne easier to reason with.

[โ€“] lohky@lemmy.world 3 points 3 weeks ago (1 children)

I'm 100% going to try this, but I have a feeling that it isn't going to work in my application. Salesforce Marketing Cloud uses some pared-down old version of Transact-SQL and about half of the functions you'd expect to work just flat out don't.

The joys of using a Salesforce product.

[โ€“] houseofleft@slrpnk.net 3 points 3 weeks ago (1 children)

Oh boy, have fun! CTEs have pretty wide support, so you might be in luck (well at least in that respect, in all other cases you're still using saleforce amd my commiserations are with you)

[โ€“] lohky@lemmy.world 4 points 3 weeks ago

Salesforce just gives me the other kind of CTE.

[โ€“] FourPacketsOfPeanuts@lemmy.world 3 points 3 weeks ago (1 children)

I loathe debugging ampscript and anything to do with marketing cloud with a passion..

[โ€“] lohky@lemmy.world 1 points 3 weeks ago* (last edited 3 weeks ago) (1 children)

Wrap the Ampscript in an ssjs try/catch block and debug all your shit on a cloudpage. ;)

Everyone that works in SFMC for an extended period of time hates SFMC. Or at least has a love hate relationship with it. I think Salesforce is the most worthless company in existence and John Mulaney's anti-SF rant at Dreamforce brought a little light to my life.

I very rarely actually use Ampscript anymore. Almost everything is done in ssjs in my instance. Thank fuck I'm not consulting anymore and don't have to deal with other company's stuff.

[โ€“] FourPacketsOfPeanuts@lemmy.world 2 points 3 weeks ago (1 children)

I'm probably at about a 1/10 in ampscript. I just don't use it enough. I tried something like what you are describing but it didn't work very well. Trying to debug ampscript that runs in an email template at send time by copying into a cloud page and then trying to mimick the various properties only available at send time was just maddening. I can't comprehend how Salesforce bought such a buggy and poorly thought through piece of junk. It's a coin toss whether some of the main menus even load half the time. Ergh...

[โ€“] lohky@lemmy.world 1 points 3 weeks ago* (last edited 3 weeks ago)

Yeah, you still have to draw in all those values through lookups or just set the variables manually but if you keep getting a failed send or that shitty 500 error on a cloudpage, the try/catch block prevents it and will actually display the error. Should look something like this:

%%[ your AMPscript block goes here ]%%

SFMC is Salesforce's red headed stepchild. The product has been neglected into the ground and they keep shoehorning random shit into it then neglecting that, too. Ad Studio, Social Studio, and Interaction Studio were all different things they bought and slapped a coat of SF branded paint on then let die. It is such a weird product but EVERYONE has it and it gives me pretty good job security knowing how to make it function about half the time.