Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Locked thread
Bloody
Mar 3, 2013

ground floor

Adbot
ADBOT LOVES YOU

Bloody
Mar 3, 2013

wingdings is pretty bad imo

Bloody
Mar 3, 2013


a good font. for idiots

Bloody
Mar 3, 2013

if theres one thing i want in a font its to make it even harder to distinguish (if x == 0) from (if x = 0)

Bloody
Mar 3, 2013

thats the sort of stupid rear end font you make when you first hear ligatures are a thing and you want to just smash characters together for literally no reason

Bloody
Mar 3, 2013

just use consolas nerds

Bloody
Mar 3, 2013

aoc in matlab is extremely easy
(through the first 2 days at least)

Bloody
Mar 3, 2013

Sapozhnik posted:

management is where they shuffle people off to in order to limit their ability to gently caress things up so you're safe m8

enjoy sitting in meetings for 3hrs a day lol

im averaging 20 hours of meetings a week lol and people are hesitant to admit that i am in management

Bloody
Mar 3, 2013

i do so little engineering at this point. when im not in meetings i spend like half of my time thinking about requirements and the other half herding cats

Bloody
Mar 3, 2013

[quote="AWWNAW" post="479272865"]
not even a nice solid poop. we’re talking loose and sparse and with strange unescaped elements
/quote]

Bloody
Mar 3, 2013

svn is terrible and the only interface is tortoisesvn which is also terrible

Bloody
Mar 3, 2013

redleader posted:

counterpoint: it's fine

literally nothing about tortoise is fine

Bloody
Mar 3, 2013

i dont understand dependency injection at all. somehow i can use this to switch between a testing and production database. somehow. at least my controllers now have a constructor that takes an interface instead of just creating the database access object themselves

can i just like di a connection string to my database thing and use that? somehow? i don't understand anything

Bloody
Mar 3, 2013

i bet i need factories

Bloody
Mar 3, 2013

apparently appsettings.json can somehow contain this poo poo and then there's like multiple versions of appsettings.json like there's already a appsettings.development.json so maybe i just specify it differently in there and it all just works?!

Bloody
Mar 3, 2013

Bloody posted:

apparently appsettings.json can somehow contain this poo poo and then there's like multiple versions of appsettings.json like there's already a appsettings.development.json so maybe i just specify it differently in there and it all just works?!

update: it all just works lmao

Bloody
Mar 3, 2013

Sapozhnik posted:

di isn't really what you want there unless it's to inject that config parameter into your database connection factory

idk if its what im even using but my configuration blob is now visible to my database so it is sorting itself out properly idk this thing is probably a mess of antipatterns and nonsense but it Works For Me

Bloody
Mar 3, 2013

Night Shade posted:

asp.net core has something like node_env in it, its default hosting templates load default values from appsettings.json, override with appsettings.$env.json, make config objects out of the result and register them in di

we have it set up to override from environment variables instead, which we set in a dockerfile

yeah ASPNETCORE_ENVIRONMENT can be used to select from {development, staging, production} which is v nice and what im doin now

Bloody
Mar 3, 2013

i have an asp.net webapi project but now im wishing i had some basic views that i could show to browsers. should i:
do a javascript in a html that hits my webapi endpoints and turn the json responses into pages (i do not know javascript)
add MVC controllers or whatever and do some MVVM stuff alongside my existing webapi controllers
somehow refactor my webapi controllers to return api responses or pages depending on http-accept headers or something?

Bloody
Mar 3, 2013

Shaggar posted:

if all you want is a html representation of your api install swashbuckle to generate a swagger-ui

this probably isn't the finished state of what i'm trying to do but this is extremely cool, good, and useful, thx

Bloody
Mar 3, 2013

Ciaphas posted:

crossposting from the gray forums, just in case

Apparently while coding in C# I don't have access to the Microsoft.CodeAnalysis.VisualBasic.Scripting namespace, and vice versa if I'm coding in VB.NET. I was thinking as a workaround for user scripts (see above; I have to support both of C# and VB syntax) if I detected VB I would internally convert it to equivalent C# before running it through CSharpScript. Any ideas on this front?

(e) I'm trying to google this but it's confused by VBScript being a thing :arghfist::saddowns:

deprecate VB

Bloody
Mar 3, 2013

Ciaphas posted:

but yeah if anyone knows a way to go from VB.NET code fragments to C# programatically, be it thru syntaxtrees or whatever, let me know 'cos it's gonna cost me a few weeks and some heartache if I can't :(

idk you can probably coerce roslyn into doing something useful

Bloody
Mar 3, 2013

hi so i have my database right and im accessing it from my application. right now i guess im doing some kinda repository pattern? i've got a giant rear end database class thats just a shitload of dapper stuff. it feels unwieldy? maybe gross and bad? idk? i guess the alternative is like active record kinda stuff but idk that doesnt sound so great either, particularly in terms of dependency injecting this poo poo around so i can test things?

what am i doing wrong in terms of database access patterns from this webapi project

Bloody
Mar 3, 2013

how do i decide where to split my repository classes

presumably "arbitrary" would be a poor choice

Bloody
Mar 3, 2013

i use pgadmin and its buggy and not great

Bloody
Mar 3, 2013

i wrote a program that is 3 concurrent loops running in their own threads to emulate some real time devices and now i want to unit test it but idk how because its just some poo poo in some loop {}s

Bloody
Mar 3, 2013

i guess refactor the guts of the loops into their own functions and then test the functions?? or something?

Bloody
Mar 3, 2013

cool cool cool. now what if my code relies on udp ports and the system clock heavily

Bloody
Mar 3, 2013

gonadic io posted:

How does it get data from external sources, and/or transmit its results. Those are the bits you need to mock/abstract so you can replace them with fake implementations for your tests

gets data over two different udp sockets in two different threads and shares data via rust channels wihth a third thread that transmits results to a third udp socket

Bloody
Mar 3, 2013

cinci zoo sniper posted:

my answer would be to write crude simulator of the system clock for the second part, but im not sure if thats right or feasible

yeah presumably rust has a usable way of mocking std::time or something

Bloody
Mar 3, 2013

yeah but idk if i want my tests to run in real-time like the application does

Bloody
Mar 3, 2013

a fun approach from a reddit comment (https://www.reddit.com/r/rust/comments/4m92vy/unit_testing_in_rust/d3u4ew6/):
code:
#[cfg(test)]
use mymock::UdpSocket;

#[cfg(not(test))]
use std::net::UdpSocket;
just crazy enough to work??!

Bloody
Mar 3, 2013


this is autogenerated code thats been run through an obfuscator, right? right? or maybe a really bad decompilation??? please?

Bloody
Mar 3, 2013

CPColin posted:

Impossible to tell, really.

who actually reads things

Bloody
Mar 3, 2013

rust is really really good and every day that i use it i wish my full-time job was using it

Bloody
Mar 3, 2013

current terrible programmer status: forking a component of the rust standard library

Bloody
Mar 3, 2013

i use queues for multithreaded producer-consumer stuff, am i loving up

Bloody
Mar 3, 2013

yeah its definitely a distinction idk if its a germane one or not

Bloody
Mar 3, 2013

unrelated, i unironically want to do open-source rust stuff but lol i really dont know what to do or to contribute to

Adbot
ADBOT LOVES YOU

Bloody
Mar 3, 2013

are mpsc queues bad

  • Locked thread