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
graph
Nov 22, 2006

aaag peanuts

keygen and kel posted:

i'm an excellent debugger though.

this was my saving grace at my last job

no more programming for me ever

Adbot
ADBOT LOVES YOU

Bloody
Mar 3, 2013

but for real my terrible thesis is like 80% c++ 17% java











and 3% julia :getin:

Ericadia
Oct 31, 2007

Not A Unicorn
I'm seeing his post right now

Shaggar
Apr 26, 2006

CamH posted:

my school uses a lot of java and it is a dumb language

this is what every student thinks until they graduate, get a job, and start learning to program.

Papes
Apr 13, 2010

There's always something at the bottom of the bag.
I'm a student and I think java is pretty cool. Much better than c++ which some of my classes have used.

CISADMIN PRIVILEGE
Aug 15, 2004

optimized multichannel
campaigns to drive
demand and increase
brand engagement
across web, mobile,
and social touchpoints,
bitch!
:yaycloud::smithcloud:
I woke with a start, bathed in cold perspiration. I was in my cubicle, at work. The last thing I remembered, I'd been going through the morning emails. Last night had been busy: patching the servers, plugging the latest security holes with bits of chewed bubble-gum, the usual routine.

OK, I shouldn't have dozed off, but I suppose that the effect of last night's cheap bourbon had begun to kick in. I'm only an occasional drinker, the kind of guy who goes out for a beer, and occasionally wakes a few days later in Saigon with a full beard.

As I pulled myself back to full wakefulness, my nerves tingled, sensing some evil presence, perhaps in the cubicle, veiled by the shadows. I glanced at my screen and then I noticed it.

"What's this? A new database? Where did that come from?"

I recoiled instinctively, as if a great cobra sat coiled on the keyboard. Dark forces seemed to be stirring. I shook my head.

"My nerves must be out of order!" I told myself. After all, what's the harm in a new database. I'll just keep a weather eye on the server and it'll be fine.

The phone rang. It was the SAN Admin, Mildred. She cut short the usual pleasantries, never a good sign. "How's the boy? What 'cha doin to my disks?" she hissed, as if I was personally doing her wrong.

Hell, it must be that new database. I played dumb. "I don't know what you're talking about Mildred. Which server is having trouble?" I tried to sound nonchalant, but my voice came out as a nervous squeak; the disks were her girls and they weren't happy.

"There are massive reads and writes going on. My girls are rattling like mice."

"I don't know, Mildred. There was a new app released last night, maybe that's it."

"Well, ya better find out, and fast. Don't you guys have any monitoring?"

Mildred knows how to make a guy feel small. "We're working on it," I lied, smooth as a grifter running twenties on a barman.

I put my feet on the floor, swabbed the back of my neck, and pulled the keyboard towards me. That poison snake of a database was bugging me. I did what I always do, go and shake down the historic records in the cache to see what falls out:


code:
SELECT	SUBSTRING(dest.text, (deqs.statement_start_offset / 2) + 1,
			(CASE WHEN (deqs.statement_end_offset = -1)
			      THEN LEN(dest.text) * 2
			      ELSE deqs.statement_end_offset
			 END - deqs.statement_start_offset) / 2 + 1), -- the query statement in the batch
					
		deqs.execution_count,
		deqs.total_elapsed_time,
		deqs.total_logical_reads,
		deqs.total_logical_writes,
		deqs.total_physical_reads,
		deqs.total_worker_time,
		deqs.min_elapsed_time,
		deqs.min_logical_reads,
		deqs.min_logical_writes,
		deqs.min_physical_reads,
		deqs.min_worker_time
		
FROM	sys.dm_exec_query_stats AS deqs
		CROSS APPLY sys.dm_exec_query_plan(deqs.plan_handle) AS deqp
		CROSS APPLY sys.dm_exec_sql_text(deqs.sql_handle) AS dest
		
ORDER BY deqs.execution_count DESC;
							
 
I pulled out the text of one the queries:
 SELECT OrgID 
 ,OfficeID 
 ,StartDate 
 ,EndDate 
 ,OtherID 
 FROM SpecialList 
 WHERE OfficeID = 42; 
Whoa! What the heck is this app doing? This was lowest-common denominator T-SQL of the worst kind. Who writes queries like that? It's almost as if a machine was...and then it hit me like a lead slap to the back of the head. Didn't I hear someone in the lunchroom talking free and loose about the latest ORM?

Used with skill, Object Relational Mapping software is a great way to build the data access layer of an application. In careless hands, though, it's deadly. If these queries had Thompsons, there would have been blood all over the server room floor.

I wondered if they'd walked into the N+1 trap? I looked at another couple of queries...and there it was, like a great fat spider in the center of its malignant web:
code:
SELECT col1 
 ,col2 
 ,col3 
 FROM Table1 
 INNER JOIN Table2 
 ON Table1.ChildID = Table2.OtherID 
 WHERE tabl2.ParentID IN (@p1,@p2,@p3...@p99) 
There were more versions of all the queries with varying number of parameters of varying size. This particular query had a minimum run time of 900ms. It had been called 1,138 times in the last hour. What we had here was a bad dose of unparameterized, ad-hoc queries, causing every query to be compiled separately and placing untold CPU and memory stress on Millie's poor girls. No wonder she wasn't smiling.

I had better check the tables too. Just as I feared. Clustered indexes and logical constraints were conspicuous only by their absence. If you're using a relational storage engine, you have to work within its rules, and this object-oriented approach to tables was breaking as many rules as it could find.

I was clearly on a path to the Developers' Den, but I wasn't going alone this time. I called Mildred back.

"We're going to talk to the Dev Lead?" she asked in a voice quieter than I knew her capable of. A strange rattling noise echoed down the line, eerily reminiscent of her beaten-down disk drives. Her teeth were chattering with a nameless dread.


The Developers' Den

I met Mildred in the corridor, which had a smell of old carpet and furniture oil and the drab anonymity of a thousand shabby lives. Her smile was as faint as a fat lady's at a fireman's ball. The only way in to the Developers' Den was through a little sliding door that let those inside see who was trying to enter their space. It slid open a fraction, revealing a pair of eyes regarding us suspiciously.

"We need to talk about the data access layer for your new application."

"Who are you, the DBA? I thought you quit. Or maybe that was the guy before. It's a pity what happened to him…after he complained about our last application."

How could I forget? "Look, we just need to talk to the Dev Lead for a few minutes. I'm sure we can sort this out."

"He's busy. Just do what you usually do. Put a few indexes in the database."

I sighed. Why do devs think an index is the answer to all their problems?

"An index ain't going to cut it this time..." He was already sliding the door closed. "I hear you guys also have a few Access apps that need a lot of healing. Good luck with that!"

It was desperate but it got him where he lived. The door slid back open to reveal a face with as much expression as a cut of round steak and a similar complexion. The smell of old pizza and Nerf washed over us. Keyboards clattered away on a hundred laptops and desktops. There was a lot of forking, pulling, and merging going on in here, interrupted by an occasional piercing scream, as someone attempted a rebase. He led us to one of the Dev Lead's assistants.

"The DBA? I thought you quit," he sneered.

"Rumors of my demise seem to be exaggerated. Listen, your new app is beating on our database like a heavyweight contender smacking a palooka around the ring in a fixed fight."

"That's a real pity. Sounds like you need a few sticking plasters, or indexes as you like to call them." This guy had all the charisma of a plastic cup.

I counted ceiling tiles for a minute then leaned over his desk, knocking a Lego Millennium Falcon off its stand.

"No. An index won't help this time. This is a real code problem. And unless you want to spend the rest of your very short career putting in daily security requests for access to your dev database, get me to the Dev Lead! Now!"

Keyboards quieted all around the room. I heard mumbling and pointing and the phrase "...thought he quit...".

The developer fumbled with the Millennium Falcon, accidentally breaking off a missile launcher, before giving up and looking at me again. I hadn't known him long but I could tell that thinking was always going to be a bother to him.

"OK. Your funeral."

He grabbed his phone. The response was quick. "He's down in Conference Room C. It's just...". We didn't wait to find out more.

Conference Room C

Anger and frustration can carry a man far, but on nearing the Dev Lead's inner sanctum I took stock. Maybe the devs were right; an index or three might prop things up well enough. Forced parameterization might just help too. I glanced at Mildred. The look in her eyes told me I couldn't let her girls down. It was time to stop compromising.

I shouldered on into Conference Room C. Around the room, little notes colored green and blue and pink fluttered faintly in the gentle breeze of the air conditioner. Don't let the pretty colors fool you; each of those pretty notes will become real code that can crush a database with one gentle waft of its bat-like wings.

We walked in, as inconspicuous as a tarantula on a slice of angel food. And there sat the Dev Lead, fingers flying across the keyboard while one of his flunkies watched.

"...and that will fix the object inheritance problem you were hitting. Now get out before I put you in charge of maintaining the source control and bug-tracking systems for the next project."

The flunky stumbled into us as he tried to leave. The Dev Lead glanced up. He smiled, as stiff as a frozen fish, and glanced to either side of the door.

That's when I noticed the code-droppers standing there, hulking, menacing developers, wearing Star Wars t-shirts and each with a paw full of pizza. I tried to ignore them as the Dev Lead started to speak.

"Ah, Joe Deebeeay. I heard you quit. Who is that with you? Mildred from the SAN team. Darling, come in and sit here next to me."

Mildred edged nervously around the conference table and perched herself right next to the Dev Lead. Suddenly my side of the table felt like the loneliest place in the world.

"What can I do for the database team?" He beamed magnanimously at Mildred, but his eyes were like steel when they turned on me, and his voice as cool as a cafeteria dinner.

Gulp. "The application that was installed last night, it's causing major problems with the database and the disks. I did a little investigation and it looks like you guys introduced an ORM for the data access layer."

At the mention of the ORM, his brow furrowed. Suddenly, I was a particularly large rattlesnake and he had his gun ready.

"Look, you know, I'm not going to have this 'ORMs are awful' conversation again."

I took a chance and interrupted, "Of course not. ORMs are extremely useful tools that..." I choked on my own words for a second "...facilitate the speed of software delivery. No question. Keep using the ORM."

The Dev Lead's jaw was hanging open and one of his code-droppers dropped his pizza on the floor. It bought me the time I needed.

"The problem is not the ORM; just a few small mistakes in the way it was implemented. The database that it created is a direct copy of the objects in the code. Your guys turned ORM into OOM and that's the issue."

He breathed softly, twisted one large hand around his knee and looked down at it. I took it as an excuse to go on.

"There are some places where this direct object storage works well and others where we need to adjust the storage to be a little more...relational. After that, we drop a few clustered indexes in the appropriate places and we're almost home and dry."

At the mention of indexes, there was an audible sigh of relief and the tension in the room lifted. Finally, I was acting like a proper DBA again. It seemed like as good a time as any to drop the bombshell.

"Of course, to make this work, we'll have to adjust some of the code to use stored procedures."

The final two words came out in a strangled whisper, about as welcome as a dead rat in the punch bowl at a classy dinner party.

The two code-droppers closed in menacingly, "Thanks for the advice. Now, here's some for you and your stored procedures..."

My time was almost up. "We'd only need to do this in one or two places. We could use your generated code for most of the CREATE, UPDATE, and DELETE queries, and those READ queries where it made sense. That's what the ORM does best. In other places, we'd just substitute straight T-SQL for the batch-mode processing that T-SQL is good at."

The Dev Lead lurched to his feet, practically knocking Mildred off her perch. My next words, possibly my last, came out in a frantic rush.

"Look, it's not as if this is premature optimization. Mildred and her girls, uh, I mean disks, are dying out there! This would eliminate the N+1 problem and many of the other issues with passing in hundreds of parameters."

By this time, the Dev Lead was round my side of the table. Suddenly, I missed feeling lonely. His outstretched arm appeared to be heading for my throat but at the last second diverted and went around my shoulder.

"You crazy kid!" I was older than he was, but decided not to argue the point.

He turned to a code-dropper, "Can you believe the brass on this kid? He walks in here and tells us how to run our show?" He paused, and then laughed. "I love it!" That was all that the muscle needed to hear and they joined in the laughter.

"OK, let's see what we can do, together, to save Mildred's girls."

Mildred managed a weak smile. We made plans for further meetings to establish mechanisms of communication between the teams and start the process of identifying the worst performing code. We turned to leave, but the Dev Lead had a parting shot.

"Oh, and Joe, I'll book a time for us to have a quiet word about those Access apps that are giving us trouble. It looks like the Access team might need a new member for a week or two."

I managed a weak smile too.

The Fix?

Mildred and I finally made it out of the Developers' Den. I had a full schedule of appointments and a lot to explain to the Fat Man. Mildred was grinning from ear to ear but then noticed the look on my face, "What's the matter, Joe? Apart from your impending stint in the Access asylum, we got everything we wanted."

"I dunno, Mildred. Time eats away at all good things, and some time real soon the devs are going to update that app, and their ORM will start messing again with the database. Your girls ain't safe yet."

The smile vanished from her face.

"Plus, once there's data in place, we can't just let the ORM create, drop, and alter tables, right in production. The Fat Man won't like it. He's funny that way."

Shaggar
Apr 26, 2006
tl;dr: orms write bad sql and developers don't understand data design. do not ever use orms. do not ever let ur developers design ur data.

double sulk
Jul 2, 2010

Shaggar posted:

this is what every student thinks until they graduate, get a job, and start learning to program.

im learning java

Shaggar
Apr 26, 2006
congrats. its pretty good.

DONT THREAD ON ME
Oct 1, 2002

by Nyc_Tattoo
Floss Finder
what cyberpunk actually is

double sulk
Jul 2, 2010

Shaggar posted:

congrats. its pretty good.

its gonna be in the context of android programming because gently caress web apps, but theres a lotta oop concepts you dont/shouldnt really use in plangs even if you can technically write w/them in "oop" style and i wanna get better at it

DONT THREAD ON ME
Oct 1, 2002

by Nyc_Tattoo
Floss Finder
does real java use the same awful infinitely nested brackets/paranthesis syntax that javascript uses?

CISADMIN PRIVILEGE
Aug 15, 2004

optimized multichannel
campaigns to drive
demand and increase
brand engagement
across web, mobile,
and social touchpoints,
bitch!
:yaycloud::smithcloud:

gucci void main posted:

its gonna be in the context of android programming because gently caress web apps, but theres a lotta oop concepts you dont/shouldnt really use in plangs even if you can technically write w/them in "oop" style and i wanna get better at it

i like oo very much because it made sense immediately.

Fuck them
Jan 21, 2011

and their bullshit
:yotj:

Shaggar posted:

tl;dr: orms write bad sql and developers don't understand data design. do not ever use orms. do not ever let ur developers design ur data.

I'm being told to use orms right now and it's like gently caress.

I'm doing a thing where I want an object to be made by a little console app nobody sees running behind the scenes, which is to be passed to a webservice (webapi - all of this is .NET/C# poo poo). The object is going to represent data from two tables on the desktop machine which is going to be put into identical tables on a db up in the website.

What I'm trying to figure out is the right way to do this so it's easier to go in and change things. Wouldn't the class itself handling the logic for "this value goes to this row right here" work fine? Then I'd just change poo poo in that class, and could leave the web service and console app alone if the tables change, since all they care about is transmitting that object.

Also I've never done web poo poo before and I'm in over my head but the boss said to do it so I'm like welp okay :downs:

The best poo poo is when I talk frankly about my workplace everyone in CoC said to literally leave. Everyone but myself is remote, theres no source control right now, my boss knows jack poo poo about development, the Sr dev is 500 miles away and the Web Guy works full time elsewhere and is a flake.

I'm too drat new for this poo poo. I actually need mentoring and someone to slap me on the head if I do something retarded so I don't get bad habits.

Cocoa Crispies
Jul 20, 2001

Vehicular Manslaughter!

Pillbug

2banks1swap.avi posted:

theres no source control right now, my boss knows jack poo poo about development, the Sr dev is 500 miles away and the Web Guy works full time elsewhere and is a flake.

yeah that's the part where you should leave

Fuck them
Jan 21, 2011

and their bullshit
:yotj:

Shaggar posted:

this is what every student thinks until they graduate, get a job, and start learning to program.

Ahahaha I've found out school taught me basically poo poo about how to program but boy howdy did I learn about algorithms and S->aBb.

Fuck them
Jan 21, 2011

and their bullshit
:yotj:

Cocoa Crispies posted:

yeah that's the part where you should leave

This is the part where I learn what it's like to be in hell (but get paid at least) and take that with me to the new job.

Interview tomorrow :toot:

double sulk
Jul 2, 2010

2banks1swap.avi posted:

I'm too drat new for this poo poo. I actually need mentoring and someone to slap me on the head if I do something retarded so I don't get bad habits.

but you see, every company needs senior developers

Janitor Prime
Jan 22, 2004

PC LOAD LETTER

What da fuck does that mean

Fun Shoe

Shaggar posted:

tl;dr: orms write bad sql and developers don't understand data design. do not ever use orms. do not ever let ur developers design ur data.

It was a good story though

Also there are no other choices when you don't have a DBA :(

Bloody
Mar 3, 2013

why can't i use orms

i loving hate dsls

uG
Apr 23, 2003

by Ralp
yep no way to use an ORM with an existing data source gotta have the developers design its schema! #yolo

uG
Apr 23, 2003

by Ralp
420 use ORMs every day

Shaggar
Apr 26, 2006

gucci void main posted:

its gonna be in the context of android programming because gently caress web apps, but theres a lotta oop concepts you dont/shouldnt really use in plangs even if you can technically write w/them in "oop" style and i wanna get better at it

idk much about android dev but im guessing u can use stuff like cxf for service communication which is cool.


2banks1swap.avi posted:

I'm being told to use orms right now and it's like gently caress.

I'm doing a thing where I want an object to be made by a little console app nobody sees running behind the scenes, which is to be passed to a webservice (webapi - all of this is .NET/C# poo poo). The object is going to represent data from two tables on the desktop machine which is going to be put into identical tables on a db up in the website.

What I'm trying to figure out is the right way to do this so it's easier to go in and change things. Wouldn't the class itself handling the logic for "this value goes to this row right here" work fine? Then I'd just change poo poo in that class, and could leave the web service and console app alone if the tables change, since all they care about is transmitting that object.

Also I've never done web poo poo before and I'm in over my head but the boss said to do it so I'm like welp okay :downs:

The best poo poo is when I talk frankly about my workplace everyone in CoC said to literally leave. Everyone but myself is remote, theres no source control right now, my boss knows jack poo poo about development, the Sr dev is 500 miles away and the Web Guy works full time elsewhere and is a flake.

I'm too drat new for this poo poo. I actually need mentoring and someone to slap me on the head if I do something retarded so I don't get bad habits.

lol owned.


uG posted:

yep no way to use an ORM with an existing data source gotta have the developers design its schema! #yolo

well you can but its still gonna write bad sql. use a statement mapper instead.

graph
Nov 22, 2006

aaag peanuts

2banks1swap.avi posted:

Ahahaha I've found out school taught me basically poo poo about how to program but boy howdy did I learn about algorithms and S->aBb.

faculty dont know how to program :ssh:

Fuck them
Jan 21, 2011

and their bullshit
:yotj:

graph posted:

faculty dont know how to program :ssh:

One guy literally made us turn everything in as a gigantic .java. We couldn't use multiple .java files. We couldn't even include a loving compilation script or a jar or anything.

His loving CV is a mile long and he's been on the boards of some important poo poo and literally sets curriculums for schools and travels all over the country to do so.

BONGHITZ
Jan 1, 1970

he just wants stuff to be easy to grade

just do what he wants, its like a real job then!

Fuck them
Jan 21, 2011

and their bullshit
:yotj:

BONGHITZ posted:

he just wants stuff to be easy to grade

just do what he wants, its like a real job then!

Yeah...

I considered making some kind of script/program/w/e to take a bunch of java source files for something developed the normal, sane way, and cram it all into one .java for turning in.

Then I quit giving a poo poo and learned to lean on IntelliJ and vim plugins to navigate a huge source file.

X-BUM-RAIDER-X
May 7, 2008

Shaggar posted:

tl;dr: orms write bad sql and developers don't understand data design. do not ever use orms. do not ever let ur developers design ur data.

i just build raw unescaped strings and send them straight to the db

Nomnom Cookie
Aug 30, 2009



i use big data instead of sql so its not a problem for me

DONT THREAD ON ME
Oct 1, 2002

by Nyc_Tattoo
Floss Finder

Nomnom Cookie posted:

i use big data instead of sql so its not a problem for me

the orm cloud

Cocoa Crispies
Jul 20, 2001

Vehicular Manslaughter!

Pillbug

Nomnom Cookie posted:

i use big data instead of sql so its not a problem for me

hope you're mongo driver doesn't have bson escaping problems

jony ive aces
Jun 14, 2012

designer of the lomarf car


Buglord
mods namechange to m. bson

MeruFM
Jul 27, 2010
db design is not rocket science, an autistic kid can do a good enough job of it

1st rule of mongodb: write the same thing in 3 different documents

orms are great because table locks are scary

Cocoa Crispies
Jul 20, 2001

Vehicular Manslaughter!

Pillbug

MeruFM posted:

db design is not rocket science, an autistic kid can do a good enough job of it

1st rule of mongodb: write the same thing in 3 different documents

orms are great because table locks are scary

the first rule of mongodb is don't use mongo, it's unreliable garbage written by idiots that don't understand the cap theorem

if you're small, use postgres

if you're big, use cassandra or riak 'cause they actually make availability and parittion tolerance guarantees

http://aphyr.com/posts/284-call-me-maybe-mongodb

quote:

On the one hand, Mongo advocates usually tell me “but network partitions are exceedingly rare in practice.” Then I talk to Mongo users who report their cluster fails over on a weekly basis. One thing to keep in mind is that heavy load–like seasonal writes, recovering from a crash, or performing a rollback–can slow a node down to the point where other nodes declare it dead. This is a partition. I've seen my test cluster perform dozens of rollbacks as nodes go unavailable attempting to elect a new primary. You should probably instrument your cluster to watch for these events in production.

As we've discussed before, one option is simply to accept data loss. Not all applications need consistency.

At the same time, you should watch those rollback files. Sometimes they don't appear even though they're supposed to, and not all data types will actually be rolled back. Conflicts in capped collections, for example, appear to simply discard all data in the collection past the conflict point by design.

People use capped collections for distributed queues. Think about that for a minute.

Moreover, a rollback file doesn't give you enough information to actually reconstruct the correct state of the system–at least in general. It's just a snapshot of “some state” the database had to discard. Because there's no well-defined ordering for these writes, you'll have to decide what that means for your particular data structures. If you can structure your documents as CRDTs and write a merge function, you'll be able to safely merge. If there's no conflicting copy of the document in the database, and you never delete those kinds of documents, you can restore it automatically. Immutable records can always be recovered, too.

Finally, you can drastically reduce the probability of write loss by using WriteConcern.MAJORITY. This is gonna impose a big performance hit. That's another hallmark of more-available CP systems.

To recap: MongoDB is neither AP nor CP. The defaults can cause significant loss of acknowledged writes. The strongest consistency offered has bugs which cause false acknowledgements, and even if they're fixed, doesn't prevent false failures.

AWWNAW
Dec 30, 2008

And now babby's first thing-that-must-be-secure-and-will-go-into-production.

I've been playing with WebAPI and there's all kinds of stuff I've seen for POSTing data to it, or big bulk file uploads, or poo poo with Azure, and serialization with json or xml or whatever. That's all fine, but not exactly what I'm looking for.

What I AM looking for is a way to securely (as much as is reasonable) send small (a meg at most, honestly, and even that is big) send files from a C# console app to the WebAPI that I'm developing, and XML/JSON serialization just makes the stubble on the back of my neck raise up. Can I REALLY send rows from two tables that contain checking account/CC numbers securely if it's done through some kind of encryption layer? How do I call that?

What I want to know is what kind of connection I can pick to put into the WebAPI's controller that would be good for having sql rows or data tables or serialized lists of objects that would be easy to set up for the WebAPI, the console app that's sending the stuff, and not be a pain to test or debug and log. The senior guys here have said line by line is better than a datatable, so I'm going to do that unless a goon here gives me a good reason not to.

I'm glad to be able to play around like this, but I'm still green as poo poo, and it's making me a little paranoid of security, honestly. I've done desktop stuff with C#/.NET and am very comfy with that, and I've done some VERY minimal WebForm stuff. This is all very new to me and I feel lost and like I'm easily going to gently caress something up, bad, if I don't cross my t's and dot my i's over and over.

uG
Apr 23, 2003

by Ralp
what do you think https is lol step ur cj game up

DONT THREAD ON ME
Oct 1, 2002

by Nyc_Tattoo
Floss Finder
if it's a console app why not just use ssh or public key encryption??

awfya

PuTTY riot
Nov 16, 2002

AWWNAW posted:

And now babby's first thing-that-must-be-secure-and-will-go-into-production.

I've been playing with WebAPI and there's all kinds of stuff I've seen for POSTing data to it, or big bulk file uploads, or poo poo with Azure, and serialization with json or xml or whatever. That's all fine, but not exactly what I'm looking for.

What I AM looking for is a way to securely (as much as is reasonable) send small (a meg at most, honestly, and even that is big) send files from a C# console app to the WebAPI that I'm developing, and XML/JSON serialization just makes the stubble on the back of my neck raise up. Can I REALLY send rows from two tables that contain checking account/CC numbers securely if it's done through some kind of encryption layer? How do I call that?

What I want to know is what kind of connection I can pick to put into the WebAPI's controller that would be good for having sql rows or data tables or serialized lists of objects that would be easy to set up for the WebAPI, the console app that's sending the stuff, and not be a pain to test or debug and log. The senior guys here have said line by line is better than a datatable, so I'm going to do that unless a goon here gives me a good reason not to.

I'm glad to be able to play around like this, but I'm still green as poo poo, and it's making me a little paranoid of security, honestly. I've done desktop stuff with C#/.NET and am very comfy with that, and I've done some VERY minimal WebForm stuff. This is all very new to me and I feel lost and like I'm easily going to gently caress something up, bad, if I don't cross my t's and dot my i's over and over.

if its not over the internet https it w/ a domain cert and call it a day if ur even gonna go that far. also the infosec guys would prob be willing to help u out or at least look over what ur doing and give u a thumbsup if ur worried ab it

Silver Alicorn
Mar 30, 2008

𝓪 𝓻𝓮𝓭 𝓹𝓪𝓷𝓭𝓪 𝓲𝓼 𝓪 𝓬𝓾𝓻𝓲𝓸𝓾𝓼 𝓼𝓸𝓻𝓽 𝓸𝓯 𝓬𝓻𝓮𝓪𝓽𝓾𝓻𝓮
hey I forgot this thread existed and it's tl;dr so here's my masters thesis on why ~pointers are hard~

a pointer is a variable that stores a location in memory. ok, that part is easy

you "dereference" a pointer by using the * operator. not too hard but the terminology is a little unintuitive

oh you have some code that expects a pointer but you need to pass a variable? fine! pass it with the address-of & operator

still pretty simple on the surface, but hey this spaghetti code is using pointers and & and you don't know why they use one here and another there and oops you need a pointer here but you don't have one and oops you dereferenced that variable which isn't a pointer &c &c

it's a simple concept but bad commenting and handwavey documentation really trips up new programmers

Adbot
ADBOT LOVES YOU

JawnV6
Jul 4, 2004

So hot ...
nah people just think they can cheat on the mental model

  • Locked thread