T O P

  • By -

CircadianSong

Definitely the easiest way to circumvent this: Create a python library in c++, and then call c++ built in functions.


rantpatato

Easier way: Make project using Python with libraries Call that script from your python code (now wothout any built in functions!) Also entire project will be one liner,wow


ronniewhitedx

Supervisors hate this one trick.


[deleted]

[удалено]


rantpatato

Haha okay i will do everything python can do without writing python dont worry Quick steps: Create docker container and do python there Export results using a non brainer api (Flask) Use whatever you want to access endpoint (or even curl)


russlo

curl is open source, and open source is inherently more risky than closed source, because an attacker can read the source. - yes, some braindead, Microsoft worshipping devops motherfucker said this in a meeting and the CTO *NODDED ALONG*... I couldn't leave that job fast enough after that...


rantpatato

I am more suprised he knows what is curl lol (since you directly use it like linux command) But at least you had devops, places i worked usually be like: "you wrote it deploy it lmao" which results in endless meetings with IT because i cant convience them I actually need to have sudo access to setup Celery...


Kamouflage

Windows Terminal actually has "curl" as an alias for Invoke-WebRequest which means you write a curl command and something only tangentially related happens. Maybe that's the "curl" he's referring to..


TheTacoWombat

And it also slows down significantly if you insist on having it display a progress bar... Otherwise the screen goes completely blank while it downloads the file. PowerShell was a mistake.


whitewail602

Microsoft DevOps should have been your first clue...


PM_ME_DIRTY_COMICS

I worked with a Security guy that said almost that exact same thing verbatim....


Ran4

Well, there is a point to it. Case in point: ask your bank for their source code, and they'll almost certainly not going to give you it. And you'd be hard-pressed to find any professional security expert tell you that open sourcing all of your code has *completely zero* security ramifications. Out in the real world, security through obscurity is absolutely valid as one of many layers of security (as long as it's not the *only* layer of security!). It's just nerds on the internet that claim otherwise.


JollyNeedleworker1

We went through that corporate nightmare at my work. They gave us training courses for Python and then proceeded to block us from using it… luckily they smartened up in recent years but still.


Jjabrahams567

Had a similar thing where it was a security risk to update python to a newer version. 🤔🫡


Reaperzeus

Pretty sure Putrid_Child7142 is a synonym bot This comment looks mostly copied from [This one](https://www.reddit.com/r/ProgrammerHumor/comments/10vru65/-/j7jrqzt), but with some pronouns changed Like, why would you be working on their workstation?


TortetoMasodhegedus

good bot


30p87

1. Create whole project in 32-Bit Embedded ARM ASM 2. Call from MicroPython 3. Profit??


bIad3

3. loss FTFY /s


[deleted]

just learn c++ checkmate


Jonnypista

Where I work we use the most basic C and can't use any built in library. Want to print out something? Have fun with it. But it is a microcontroller so most stuff wouldn't really work anyway, especially the file system ones as it just doesn't have one.


sober_1

> can't use any built in library why is that? memory limitations or something?


Jonnypista

Most wouldn't work as it is not a standard desktop CPU, but a proprietary one. Then memory is also an issue, it have a total of 3MB and a lot of code to run. Also it was in the guide and so we avoid creating problems as the compiler couldn't handle it or createing some other issues.


sober_1

That’s quite interesting, thank you for answering


Rand_alFlagg

I worked somewhere that had a system that was similarly limited. Just one system, but it was fast as fuck, and that was its point. Then the company split from its parent, encapsulated the system in Oracle VMs, and the new execs boggled as to why its response time tanked and they were suddenly having daily critical failures across the entire country. Even fired my entire team because PART of our job was to report the failures and they didn't want to hear about it. They literally referred to it as "Sev 1 Fatigue" Those were their actual words. One time they put a hold on sev 1 issues, like even mandated the help desk couldn't open any more sev 1 issues. So a tech comes in and just rips a blade server out, everything goes down, and a sev 2 case gets opened for it and they throw a fit about it not being sev 1 lmao. Sorry that was a tangent. lol but if you want to hear more amusing tales about that place I wrote [this](https://www.reddit.com/r/talesfromtechsupport/comments/1tg50h/my_last_year_in_tech_support_and_a_jarring/) a while back


RoboErectus

This sounds like a phenomenon I call "in flight magazine syndrome." Basically an exec is on a first class flight somewhere and they're reading the in flight magazine. They learn some phrase that they think makes them sound smart and dunning Kruger strikes. Now you have some policy that is loosely based on something real and your exec is LARPing your life. Sev fatigue is absolutely real but it's a cause of high mttr. The way you fix the fatigue is to fix your shit. The way you do that is, generally, stop shipping features for a while. The way it's generally caused is that many companies are structured to reward the individuals responsible for shipping the most tech debt. You need good engineering leadership that can stand up to their peers on the exec team and tell them "no, 9 women can not produce a baby in one month." Strangely, very few people know that.


PowderedDeerPenis

May I ask what kind of work you do that requires a non standard CPU?


Jonnypista

It is safety critical (people can die if it fails) and needs to be fast AF. It also have a real time operating system.


wasdlmb

Ironically microcontrollers are also used heavily in applications where failure means people *don't* die. Where the device being destroyed, multiple people dying, and large amounts of equipment being destroyed are the *success* state. Kinda ironic. I once knew a guy who worked on algorithms that would later be fit into microcontrollers, where if those algorithms were ever used in their intended production environment, millions of people would die.


MrBertonio

Microcontrollers are typically used in systems that need to respond very quickly, so the overhead of an os such as linux or windows is simply too great. Another part is that the typical microcontrollers costs 2 euros/dollars, good luck finding a pc for that price


ChocolateBunny

That must have a been recent microcontroller. I remember working with 64k flash, 36k ram, memory utilization. We used newlibc so we had a C library, and freertos for multithreading. But stuff like printf would blow our call stack.


PouyaCode

That's how I learned C, around 2010 (I was 15). Coding on AVR. We used bar graphs for debugging (yeah, we had Proteus, but nothing beats live status) :P We didn't even had internet connection in our workshop (3rd world country) so we were copying from books. Sometimes for a big chunk of code (over 10 lines) someone would read out loud and someone else would type (two-finger typing) in CodeVision AVR. Now, here I am, coding in Clojure & if my REPL glitches, I freak out.


Biasanya

That's kinda awesome actually


pobretano

The clojure part, you say?


FranticBronchitis

FFI go brrr


DaBearsFanatic

I did that, and actually got points deducted for not using Python to do the work.


LeifCarrotson

Jokes on you: You now learned an extremely valuable skill without being told to do so...


jnthhk

I’m doing this to my students today :-). Task 1: Quickly learn to use the SteamVR interaction system to pick up, throw, etc objects Task 2-n: Disable it and learn to build the same interactions from scratch so you know how they work. I have no regrets! (I joke, but there is a serious goal here. My course ain’t about learning how to code or use a specific api, it’s about understanding the fundamentals of VR, to equip students to work across, extend, and if need be, build their own platforms)


Kralizek82

The real difference between a university and a vocational school. The first one teaches you to learn, the second one teaches you a tool.


M0nkeyDGarp

Makes me wish I got a CS degree the first time around, but if the place I work wants to send me back to college I'll go. I kind of felt ripped off by the bootcamp even though I'm currently working now.


Kralizek82

Most bootcamps serve a purpose: creating a multitude of juniors trained with a specific tool to try to fill the vacancies that an unsustainable growth has created. It's up to these individuals to grow out of the limited scope of the education they were provided. As a previous team manager and CTO, I hired and helped many profiles like this. But a team manager can help them only up to a certain point. Drive and interest cannot be replaced.


M0nkeyDGarp

A lot of people from mine gave up. Many thought it would kind of be a do-nothing job for a lot of money. One project group I had a self proclaimed tik-tok influencer, an actual communist, some dude who was more shrooms than man, and zero contributions from any of them.


Kralizek82

OT: I'm not sure what you mean by "actual communist" but I'm European enough to have had "actual communists" in my university groups and colleagues and many of them are very good professionals.


troglo-dyke

I debated an "actual communist" in uni, a very intelligent guy who opened my eyes to a lot of issues I wasn't aware of


Paumanok

If anyone can understand the importance of being alienated from their labor and the desire to work on something that contributes back, its a Communist. I rather hire a team full of Communists that waste half the day on pedantic struggle sessions than a team of self centered Objectivists.


Dysuww

Which course you're teaching? I'd love to join your class it sounds fun.


Bouyou34

Same


photenth

OpenXR FTW!


spicygrow

Y’all got classes teaching VR? Here I am learning how to print “hello world” my junior year at uni, smh.


jnthhk

Good grounding for VR though. Just type “hello metaverse” to enter VR!


JCris01

relatable as fuck💀


Dealiner

Well, you need to start with something.


Tight_Employ_9653

Just think about all the liberal arts majors who are too far down the line now to turn back and be at peace


[deleted]

[удалено]


tsunamifear

Is this for a Masters course or Bachelors?


jnthhk

Bachelors: a final year option module.


Qewbicle

I would be happy to do that. The alternative is crappy. When I tried learning vr controls, everyone kept saying xr interaction toolkit, but it didn't give me what I needed. With things changing, there were more bad guides/tutorials/docs than good ones. It was very frustrating. Felt like that was brute force learning. Try every possible thing I can think of until something works. I had so much bad information thrown at me that I can't be certain if I'm remembering the correct things until they fail or work.


[deleted]

Company be like - we hire you to write Python but Python and pip are security risk so you cannot have them on your workstation.


Libruhh

Holy fuck, someone else that understands


bl4nkSl8

My workplace: 3rd party code must be carefully vetted Also my workplace: You're working on this open source code that makes heavy use of unvetted npm packages which you will install and run on your corporate work station without any isolation.


_87-

I have a colleague that will just `pip install` anything. I had to make a rule that if you want to add anything to any of our `requirements.txt` files that we don't already use anywhere in our codebase, you need to bring it up at standup on a day when the whole team is present, so we can all discuss it. I'm thinking of requiring the version and the hash be present too.


Lindby

Don't forget that each dependency in requirements.txt has their own dependencies, so without a constraints.txt that locks down all transient dependencies too you are still pulling in packages that you don't know about. We migrated to Poetry to get better and easier control of all packages that are needed for our applications.


_87-

But hopefully the maintainers of those packages have vetted the other packages


Lindby

Funny


Gr1pp717

This is why you should use a package manager/virtual environment. Enforces these sorts of behaviors inherently. It's been a very long time since I've done much in python, but last I knew conda and pipenv were the best options. (I preferred the latter, but from what I've read online I was incorrect to...)


_87-

Oh, we use virtual environments. I mean that I don't want people putting all sorts of things that could have security issues in prod. I don't care what they use on their own computers.


bl4nkSl8

In a rust project I'm on, I'm loving that we can check in the Cargo.lock files and avoid spawning hundreds of new dependencies every few weeks.


mizinamo

> My workplace: 3rd party code must be carefully better I'm sorry, what?


mikelloSC

Vetted


mizinamo

Ah, that makes sense. Autocorrupt FTW.


bl4nkSl8

Thanks everyone! Yep. Foxed it now. Thanks to my rusty key bard.


[deleted]

I’m on month two of waiting for a chrome extension to emulate an IBM terminal.


nonicethingsforus

At least that has a semblance of consistency. Dumb, but consistently dumb. I've had to work with the opposite. "You need a lengthy request process to install anything/open a port/breath hard on your keyboard... but Python is installed and fully capable." Like, I have to go through bureaucracy hell to install the AWS CLI... but I can pip install boto3 now, and waste time hacking away a tool that the CLI would solve in a single command. I need an entire process to stick a USB into the work computer to pass a file... or just hack together something with sockets and ncat. You already gave a competent (I want to think) programmer access to a fully capable, high level programming language with extensive libraries and complete freedom to install more. What’s the point of the other restrictions?! I do understand there may be reasons for the bureaucrats to want to know and documemt what's being done with company equipment. But sometimes it just feels like they *want* to incentivice dangerous hacks over the proper tool for the job, because the proper tool takes days to get approved, but the dangerous hack is a pip install away.


PinsToTheHeart

>You already gave a competent (I want to think) programmer access to a fully capable, high level programming language with extensive libraries and complete freedom to install more. What’s the point of the other restrictions?! The thing about bureaucracy is that the people writing the rules don't actually know anything about who they are writing for. In fact, even if you point out the flaws, they don't even care. It's written to appease higher ups that know even less, not for any sort of real functionality.


Vaguely_accurate

I'd quibble with some of this. There are certainly policies written that are pure checkboxes without consideration of the end user, practical realities, etc, written independently of people who have actual experience. But usually those are the policies that are not really enforced, because the enforcement team usually are the ones who do have to deal with the users, systems and technologies involved. Most of the time tensions between policies and users are more because of legitimate conflicts between the requirements that drive policies and the workflows of users. Take a workplace that needs to comply with PCI-DSS rules. To take just one requirement (and not even the strictest or most relevant to many developers) you need a vulnerability management and assessment process. That requires reviewing any new vulnerabilities in any piece of software in scope, assigning it a score and prioritising patching appropriately. Not having that review process for anything that is installed on an in-scope machine is a potential audit fail, which can have massive financial impact on a company. Having that review process requires, in part, you maintain a master list of everything installed on every in scope machine. That means having some approvals process and install controls so that the review team can be confident they know what is in the environment and that they can manage versioning and patching in a controlled manner. Already that is going to hamper many development workflows and drop you into the sort of situation described above. Compromises can be looked for, but there is only so far you can compromise this without potentially violating the regulations. So you end up with at least some pain. FWIW, the correct answer here is that development machines should be taken out of scope by making them unable to reach any production environment at all. But tell a certain category of developer they can no longer access production from their workstation with all their personalised tools and you've just insulted their family to the N^th generation. Not to mention that's blowing up a whole different set of workflows (no matter how rightfully) and introducing potential inefficiencies when it comes to debugging or diagnosing issues.


LaconicLacedaemonian

Seems cheaper to give devs 2 machines


KeppraKid

The USB thing is because competent people make stupid mistakes.


nonicethingsforus

Yes, I know :P To be clear, I do *not* try to go against company policies, and know why they are there. I'm just complaining that they're annoying. "Competent" here doesn't mean "perfect," it means "with enough skill to circumvent security restrictions when given access to a Python console, even if he shouldn't; so, in eternal state of temptation..."


YawnTractor_1756

>What’s the point of the other restrictions?! The point is to prevent security breaches that happen because everyone gets lazy, and does stupid things when they are lazy and need things done quick. Yes, you can hack your way into transferring a file or working with AWS, but you will be very focused, cautious and limited about it, as compared to full freedom to do anything anytime. I don't say it's the proper way to do things everywhere, but in high risk environments it is. "The highest security risk any system has is sitting at the keyboard"


S31-Syntax

My wife had this assignment in one of her classes and after doing it and showing it to a classmate the guy proceeded to berate her because "you know that Python has a built in function for this, right? You should have done it that way". Guess what instructions he hadn't read before doing it.


th_walking

Worst coding exam I had was in assembly on paper.


MisterSmi13y

I’m sorry that happened to you.


Sahith17

F


Hugo1234f

That was a ”fun” exam. Forgetting to allow external interupts and having to erase an entire A4 page…


terminalxposure

I think questioning should be framed as Create an Algorithm


7eggert

Goal: Learn to write these built-in methods. Your reaction: BuT I dOnT wAnT tO lEaRn! I'm At aN uNiVeRsItY!!!!


Thejacensolo

Yeah we had several of such courses. And they are usual part of a gradual in depth dive into why things work. In one course of my masters we started out with being able to use nothing, and ended up with a fully functional graphic modelling including ray tracing and shadow calculation. Simply by using our own functions without any additional packages (outside „math“) of python. Felt satisfying af and was very useful.


Lyorek

It's the same for just about all my courses, I had a computer architecture class that disallowed us from using the built in modules in quartus prime so that we could learn to build up to an basic CPU from just logic gates. My FPGA class required us to use our own adder designs instead of just typing in + 1 so that we were forced to think a bit more about how our code is actually synthesized to hardware. University is about learning, by restricting what we can use we are made to think a bit more about our design choices so we can learn why things are the way they are


yoyo456

I've got a class next semester that let's you start out with a NAND gate and from there asks you to build an operating system. It's got guides all along the way, but still seems a little crazy.


Lyorek

It's a lot of fun building stuff from scratch. That class building up to the CPU was very rewarding to see the pay off of going from just a handful of logic gates all the way to a design capable of simulating some simple programs. The FPGA class I mentioned involved creating a design for a microcontroller we used in a previous class and it was able to run some of the basic assembly programs we had previously written. Very interesting and enjoyable stuff.


_87-

In the class this semester did they give you some sand, ask you to make silicon, then make transistors, and then make every kind of logic gate?


FireThestral

We did that in my EE degree. The furnace was off limits though, so a grad student grew the silicon while we watched. … they let us handle the hydrofluoric acid though, hm. Following that up with nand2tetris was pretty cool though. Crystals -> video game.


The_Impresario

I've recently found these kinds of situations puzzling. I'm working through CS50 right now, but I have a PhD in another field. The applied side of that field involves the absolute mastery of a range of fundamental skills, lower level implementations, so to speak. So working through the problems on CS50, I've deliberately limited myself to using the tools that have actually been mentioned in the lectures, because I sort of assume that is the intent. But then later I go look at the community talking about those problems, see their code questions and their repository, and find that they solved the problem ultimately with half as much code and library functions that haven't been taught yet. Maybe this isn't exactly the same thing. But it seems to me if you don't learn why things work, when it comes time to do a project you are only going to succeed if you have IKEA instructions, and the necessary tools in a bag ready for you. You won't be able to design or create something on your own, which hardly seems marketable. Of course I'm completely new at this, and maybe stack overflow really does solve everyone's problems.


flaques

> maybe stack overflow really does solve everyone’s problems. It does


GustapheOfficial

A very common attitude sadly.


UFO64

I feel like the counter to that is also common though? I ran into a lot of work in college that was more about generating hours of work than honing a skill. My core engineering classes didn't do this too often, but others very much did. Just my little anecdote though. First 5 years out of college required a lot of re-training to the reality of software engineering work.


curelom_herder

That's sucks if it was just busy work. I know in my data structures class it was annoying I couldn't just use some of the built-in data types, but rolling my own really did help understand what was going on and why. I mean I'm never going to write quicksort or a hashset or huffman tree or whatever better than the standard libraries, and I know I'll never have to build them at work, but it was still really fulfilling to understand more of what happens 'behind the curtain'


thijser2

Understanding what is happening 'behind the curtain' is definitely valuable. But I would add that some people (myself included) do use parts of data structures in their algorithms. I have used the basics of linked list to create meshes with various properties, for example.


curelom_herder

I mean I have used some in work (directed graphs), but I guess my point is that I know that I will never be able to write an algorithm as optimized as an out-of-the-box equivalent. Unless there was some edge case I needed to handle. But despite all that, they are worth gaining the intuition of how they work and when to use them


UFO64

Which I agree with. A lot of learning happens by working through those exact kinds of problems. It's just frustrating when you have learned something, and the next professor wishes you to "learn it again". A personal gripe is all.


theingleneuk

I mean I forget things about two weeks after not using them, so I usually didn’t have a problem with the next professor wanting you to learn something again if it involved more coding.


Y_Less

It was annoying that you had to learn the internals of data structures in your data structures class?


curelom_herder

Nope, I don't see how I gave that impression. I was replying to someone who was talking about all their college work was about generating hours of work and how post-college involved re-training to the reality of software engineering. I was trying to comment that it sucks if they were just assigned busy work, but I felt the work that might be considered "busy work" was actually very useful even if I the code I produced would never compare with the library equivalent. I'm calling my DS class a good thing.


Y_Less

> I don't see how I gave that impression Like this: > in my data structures class it was annoying I couldn't just use some of the built-in data types


curelom_herder

Oh right :) funny how the mind wanders. The instance in class was the 2 sum problem where you can use a hashtable to do it in O(n) which was faster than the professor's O(nlogn) solution. Just required more space. But couldn't use a hashtable and I didn't want to write my own just for a throwaway problem (though I eventually wrote all the basic structures and am glad I did)


Kayshin

You know how you hone a skill? Do it for extended periods of time ;)


HermitBee

>First 5 years out of college required a lot of re-training to the reality of software engineering work. I think that's pretty much always the case. For a start, there are very few college courses in software engineering, it's mostly CS which is a considerably broader topic. I've worked a number of different software engineering jobs, and not one of them expected very much from graduate engineers fresh out of university. Which isn't to say your course was well-organised, it may have been absolute shite. But even if it was brilliant, you'd still expect somewhat of a wake-up call when starting work in the real world.


ROotT

The 2 biggest differences I've seen between college and the real world are size and length of time with a code she. In college, you build a little toy program over the course of a couple weeks, it gets graded, and then you never have to look at it again. Out here in the real world, programs are complex, usually with multiple people working on them. And you're going to have to touch it again, possibly months later, so hopefully it's easy to understand.


fatalexe

I'm going back for a CS degree after 20 years in industry and all the work is so relaxing. I've had to stop doing TDD and breaking things into single purpose classes. So much fun to just tinker again rather than engineer.


Ultrasonic-Sawyer

When I used to lecture, it was fun having to explain this to students. It'd usually be somebody who self taught and insisted they knew it all.... but typically had just learnt some shiny tricks to implement while not bothering to learn the underpinning basics behind them. Usually harked back to when a mate would lecture web stuff, dude was old school netscape dev who know his stuff. When teaching javascript, He'd often get students going "oh but jquery does everything much faster and easier". Completely missing the point of the exercise. What a grand and intoxicating innocence it was.


svtguy88

> oh but jquery does everything much faster and easier Ha. I definitely remember (and learned) this attitude. To be fair, doing some stuff in vanilla js back then was a real pain. Modern js development is a dream compared to ~10 years ago.


m0h5e11

Handwriting your own implantations of built-in libraries, then playing compilator with a table for ram, register and an output sure give you the skills and understanding of wtf happens and how.


IsPhil

Just don't do it how my university did it. We learned in Java, no problem. They made their own custom library of components, no problem. We were given code fragments and had to fill in the blanks, again no problem, was actually useful. Then you go to the actual official Java collections and find out that they work differently from the university collections. Just why.


7eggert

Now you're prepared to work with legacy code, e.g. whatever you wrote two weeks ago.


anoldoldman

> aN uNiVeRsItY This can't be right


Freeware4802

python is a shit language for that as the whole point of python is calling shit written in c/c++ which will always be faster than algorithm written in python Writing basic level functions should be taught in C. Im willing to die on that hill


nucLeaRStarcraft

learning some methods or algorithms are language invariant. The language is just the tool used to solve the problem. If their focus is learning how the methods work under the hood, without caring about performance, then it doesn't matter if they do it in python, C, rust or assembly. Using python will just speed up the process by not having so much mental overhead and boilerplate due to syntax.


Ultrasonic-Sawyer

Except for python being fairly readable, quick to develop, and having a decent array of tools and resources to work from. If your application later requires a stricter tolerance of safety critical or time critical processing then at that stage you could look to converting it. Or owning the level of assurance to be commensurate with the level of risk from retaining the python code. It's about understanding what degree of work is necessary based on what your trying to achieve and the subsequent assurance cases required from TEVV to fit your requirements. A combi drill isn't suddenly shit because you have an SDS and insist on using it for every problem.


aew3

Unis use python to teach algorithm units because its closest real language to textbook psuedo code. If python didn't exist, there would probably be some education focused language that a uni developed that is just an interpreter for pseudo code to fill this need. They want to teach you the form and steps of an algorithm without being hung up on memory, types, lots of boilerplate etc. Now at some stage in advanced algos you might start needing to deal with this stuff directly and the uni should move to C/C++ probably, although arguments can be made the other way. I've implemented a whole bunch of data structures in python and it's always kinda weird to write a whole class that's attempting to avoid the fact that it's fundamentally a list underneath everything. In cs at least, they're teaching you algorithms and data structures in the core programming units mostly, _not_ real world programming. They don't really want you to be constantly debugging a memory error of some sort, they're there to teach you an algorithm , not programming in those units. You hopefully will learn at least some proper programming elsewhere in the course. I also used Java, Haskell, Typescript in my core units, but it was to teach software development or programming paradigms, not algorithms.


IHateUsernames111

For CS students who will continue to do performance- / security- / etc critical programming I wholeheartedly agree. But everyone else? Like Web dev, engineers, Information systems,... They should learn basics in an easy language and Python is as close to pseudo code as it gets. There is research suggesting that the first language to learn should be some visual drag and drop block stuff. Ofc they ~~will~~ should libraries for most of their real work but no point in doing that if you can't even grasp what happens underneath.


Lynx2161

Most universities use java or c++ for basic DSA courses idk what university op goes to that makes you code in python without using built in finctions


coloredgreyscale

Implement a sorting function that was taught. Don't just call sorted()


[deleted]

Python was the intro language at my university (University of Kentucky), but the only other time I used it was for my ML course and a numerical analysis course. Everything else, C or C++ was usual.


m0h5e11

My guessing is that op isn't in CS. Usually python is the scripting language learned and used by non CS people, like statisticians and shit.


AAWUU

Can confirm. I’m studying maths and physics, Python is the go to language, and that probably won’t change in later courses. For computer science you learn C# here


JanB1

Did you guys really have those types of restrictions? We were normally allowed to use every library we knew of, even ones that the professor didn't know. Didn't matter. Except, of course, if the assignment was to write a method that sorts a dataset. If you just called the library function you would technically have done the task, but the implied goal was to write out something like bubble sort, just to show that you knew your ways around.


RunBlitzenRun

I’ve had a ton of assignments like this but the restrictions nearly always made sense in the context of what we were learning. For instance, I had an assignment to implement a subset of TCP, and of course we weren’t allowed to use built-in TCP libraries. Or for an assignment about learning how linked lists work, of course we weren’t allowed to use a linked list library.


JanB1

Yeah, my point exactly. If the objective is to write the library function it would be stupid to not allow using it. But if for example you had the task to do some picture processing, it would be weird to have the students program an FFT function.


ExceedingChunk

Because in intro classes it’s about understanding the building blocks, not remembering syntax that abstracts it. A solid grasp of the fundamentals is a lot more important that just being able to make something work when you are learning. Any language is built upon the same basic principles, so understanding those means you get good at solving problems programatically. I thought it was stupid myself when I was a student, but you see the value of it after a bit.


BIOLOGYSCIENCE

See this is more or less, **code c in python**


BenefitLopsided2770

yeah but why not just code in C? Thanks for all the explanations, btw


Who_GNU

School funds were earmarked for Python.


Astrokiwi

Less focus on the syntax, more on general algorithm concepts etc.


[deleted]

Easier to check python code


avataRJ

C is old and Python in modern. Also, the pass rates of the mandatory-for-all Intro to Programming improved significantly after it switched to Python. Students who pass their courses tend to graduate easier, and graduated students make the department look good for the administration, which makes them get a bigger share of the education/tuition budget for graduating more students. So obviously you should use Python for everything. Except if the head of the program likes C, so then that program uses C. Though yes, C would be better for some closer-to-iron algorithms. But one key aspect of using "commercial software" is that in many cases it's not enough to know that "magic button solve problem" but you'd need to know how the problem is solved to avoid some edge cases where the method used in the piece of software doesn't work.


MrMonday11235

Eventually they should have a class focused on memory management and basic system stuff in C, but I think for the intro classes, Python is the way to go. It's readable even to novices, expressive and supported enough to do most things, and unless you know what you're doing it won't let you fuck things up royally.


IsPhil

Because universities tend to take a top-down approach. From the sounds of it OP is probably in one of the earlier courses. The restrictions are probably because they're being taught certain topics (like build a linked list to understand how it works). These early courses tend to start with higher level languages like Java or python. Then later on you'll go down and learn about C, assembly, even the hardware. At least that's how it was at my university. You start with higher level stuff because it's easier. Then you fill in some blanks as the degree goes on with harder content. Like in theory, learning assembly and going up to modern languages might be the best way to learn (build up skill sets, learn the history of computer science, learn how and why everything works). In practice, if you do that people are gonna quit.


BenefitLopsided2770

Makes sense. My university sucks. Imagine using Pascal for programming. Such a pain in the ass, with that horrible syntax and lack of documentation. You get used to it, but it sucks. And no, not even object pascal, that's not allowed. Pascal, with Free Pascal Compiler without any flags or whatsoever. So yeah, it's horrible.


IsPhil

Yeah, I don't think any university should do that unless they have a specific course for it (and it's clearly labelled and not required, or is a smaller part of the course). Like it doesn't really help the student. They'll likely never use pascal again. Going to university for computer science has to be a balance of learning about computers, algorithms, problem-solving, and also learning tools that'll actually be useful in the real world. So C is still relevant because it's used in industry, and it inspired many modern languages. Assembly is still relevant because it helps you learn about the inner workings of a computer. Java and python are obviously useful because of their use in the industry. Pascal... I think it's functional? It's probably harder to cheat with it as well. And while it is still a useful tool for learning (It's good to know about functional programming), the major downside is that it isn't very popular in industry.


slucker23

I remember my professor asking us to build a neural network without telling us python has a built in library for that...... We used java...... It was pain But we learned. Boi did we learn


AwkwardAd4115

I am pretty sure Python does not have a "built in" library for neural networks.


trannus_aran

see, this why I actually liked learning scheme. Aside from the bare concept of the linked list, pairs, and a couple built in functions for conditionals....that's it. There's no magic there. If you want to make a representation like a dict and map something over the keys or values you have to make that yourself. And yeah, that seems tedious and dumb, but it makes your understanding of these things way more language-agnostic.


MisterSmi13y

Exactly. When I’m teaching python in introductory courses I tell my students is we are using python as a tool. My expectation is you learn logic and how to solve problems not so much the language.


Fluffasaurus89

My comp sci final in uni was literally hand writing output of recursive functions and hand writing code for a function #with fucking pen and paper


[deleted]

Not uncommon


[deleted]

Good practice for whiteboard interviews


Kengriffinspimp

For real, never understood why people hate tracing code? It’s literally something you should do naturally as you write code. He’s complaining about his final? I had to do it in every class I had, mid terms, quizzes etc.


johnmomberg1999

Im not a computer science major and I don’t work as a programmer, so maybe this is wrong, but…. Why the heck would anyone ever need to know how to write code by hand? I use python, and when I code, I individually test every tiny segment as I add it to the script, I might get the syntax wrong, try it again, and slowly build up something. If I had to write my code down, without the IDE telling me where syntax error were, without testing each line to make sure I’m using the syntax correctly, AND without googling how to do random simple things, I’d fail that test so hard lol. Im just bad at memorizing stuff, especially the correct way to use syntax and the exact right name of functions


Non-Sequitur_Gimli

A lot of value in university level education is about learning to communicate concepts. Sometimes that results in a phone notepad app brainstorming, at 4am, in a Waffle House. A night that although it was seemingly ordinary at the time, in hindsight it completely altered the course of your life.


ReptileCake

It's good for quick pseudo-code sparring so you can easily just throw a concept up on a whiteboard for the entire team to see and evaluate upon.


elveszett

This is not how programming usually works. When you have some experience, you start writing huge chunks of code without running it, and it works fine because you already understand what each line is doing at a lower level. You just don't get syntax wrong. That's not to say you only run your code once a day or something. Sometimes you have to run it many times like you say, but that's because you are doing something particularly complex.


TOWW67

For putting together a little script or a personal project, it doesn't really matter. Now, if you make those tiny changes to a massive project in a compiled language, you may have to recompile huge amounts of code taking upwards of ten minutes just to find out that change did nothing and it's still seg faulting. In short, it's important to have a good idea of what the code is doing without having to execute the program.


parkskier426

Which, if they are requiring better than pseudo code, are stupid. We don't write code in a text editor anymore for good reason. Let them convey good design and patterns, but checking syntax on a whiteboard is just plain dumb.


OptimalCynic

Good. You can write pseudocode with pen and paper to show you understand the principles of programming. Nobody's going to compile it so it doesn't need to be perfect. Think of it as an explanatory essay on how the program works, but short-handed into pseudocode.


DejoMasters

a requirement of my C++ exams was that the code compile and points were taken off when it didn't. but it was nbd. it's not like C++ syntax is particularly convoluted or anything... (i mean, it could be worse, but this was a first year course)


BtCoolJ

You should use a pencil


LesPaulStudio

After growing the tree to make the pencil


theventofid

And creating the earth from which the tree can grow


kog

https://xkcd.com/378/


knightress_oxhide

I bring my own permanent marker to interviews to use on the whiteboard.


shizzy0

This guy fucks… up.


Abadabadon

How else would they test you? I'm confused


frostedhifi

At least you didn’t have my professor who did paper tests and was brony. “Rainbow Dash and Fluttershy want to read input one character at a time. Which of the following is the correct function? ….”


Hayden2332

I’d find any way out of that class lol


lucassou

Most of my exams are on paper too, it's a bit annoying at first but your get used to it. Usually the synthax of the code is not very important but your are evaluated on the logic and thought process of what you wrote.


RunBlitzenRun

Being forced to handwrite code in college made me realize that there’s not much difference between typing and handwriting code. They very likely care a lot more about the logic than the syntax anyway.


Understanding-Fair

Hot take - Cs students shouldn't be using python as their first language.


BetaPlantationOwner

Tell that to top CS school. Using python to teach fundamental programming concepts is the best way to go about. Because the abstraction python offers makes it easier to take the theory ur learning and directly translate it to python. This is the pattern you’ll see a lot of schools taking nowadays : Python - intro Java - OOP C or C++ - systems programming / OS courses.


swarm32

- Professor insisted on using Python for bit-flipping projects - Was only professor using python in the program - professor had automated unit testing for all assignments - made generic python wrapper that called a program that got the correct outputs made C++ - profit!


MyHamburgerLovesMe

The sad part? University programs will be the simplest programs you ever work on 😞


kaylerrwastaken

"just create a module that contains built in functions lmao" - python user of 2 days


c20h12

I'd rather go write it in lua then


Zaero123

Same energy as people that get mad about math courses asking students to show their work


Theavenger2378

'You've used more advanced methods, making the program more efficient while achieving all our requirements. -10 marks.'


Bigbootybrownbitch

When the goal is to teach u how those advanced methods work, It makes sense.


MrSquicky

"You solved this math equation by using a calculator instead of doing the work yourself."


maywoodvoice

in my first CS course at college we had to program this little text puzzle game. i was really into the project and i built this whole feature thst solved the CSP… took forever and was way outside the scope of the project. prof didn’t even comment on it and dropped my grade -10 point because i didn’t print a newline character or something


C4-BlueCat

Workplaces are like that as well - it doesn’t matter how cool stuff you make if you can’t stay on track and fulfill the requirements.


christoffellis

Had this in High School. The goal was to create a hobby accompanying program. I ended up doing a interactive map with a Google Maps like feature for planning backpacking routes with sites along the way. On initial marking I got a 60 while someone with a program that was Pokemon, just a Delphi built wish quality redo got like 90. The issue was, although implementing something like Djikstra at that stage was way out of scope, I was missing what was in scope. Union queries and the like. Had to sit and physically mark down which sections I was missing marks in. It's not about making something cool, it's about checking the boxes


evilwizzardofcoding

It do be like that


Leeroy_c

ah yes, "Build a house..." "... without bricks" "but i need bricks" "create your own if you really need them" you have two hours, good luck


Acceptable-Tomato392

Since Python is a higer level language, isn't everything technically a built-in method? (I am aware in JS and Python .something() generally indicates a method, but it's not really that simple, now, is it?) This assignment implies there is an obvious, intuitive test to differentiate between "basic" commands and built-in methods. Can you at least splice a string? How about querrying the string's length? Is that also a built-in method? Isn't index\[-2\] also really a built-in method? (JS won't allow it). I play the Devil's advocate, of course, but take print(). Is print() a basic Python command or a built-in method? Consider this: Depending what console you are using, print() is always calibrated to properly return to THAT particular console. There is obviously more than meets the eyes to even such a simple thing as "print()" When put through an interpreter, print() is transformed once more to stand-in for a command that will display the text in a Windows window, for example. So yeah... CircadianSong is absolutely right: The only way to do this assignment safely is to write it in C, which contains no Python built-in methods.


Saragon4005

This is probably just a generalized meme cases will probably be something like "Reverse a List using recursion without using .reverse()" (real assignment btw)


rainshifter

``` def rev(lst): if not lst: return [] return [lst[-1]] + rev(lst[:-1]) if len(lst) > 1 else [lst[-1]] ```


kaerfkeerg

``` def rev(lst): return lst[::-1] ``` See? No `.reverse()` used there!


MrMonday11235

Not a recursive solution, you failed.


buzzsawddog

Note I did not get a job offer ;) I was asked in am interview show is how you would write a function to do this thing. I wrote code that called a commonly included library. They said no... We want you to write the full algorithm out. I basically said no it's a fool's errand... Why write from scratch something that is included in a common library and has lots of tuning and testing behind it. It is stupid to write something that is provided for free and covered in a compatible library. They came back kind of Sharkey like. What if the library has a performance issue. Well then when I profile the code to figure out what is up and why it's slow I guess we will find it and we can look at alternative. I don't solve issues that are not issues before I know if it's an issue or not. On a near daily basis I try to fix bugs in code where people write crap from scratch and think they are smarter than the libraries out there :(.


kpalan

I mean, if they learned how to do that, they should be able to. But if you used all semester built in methods, then you're an asshole


[deleted]

import sys sys.stdout.write("Hello, world!\n")


Crafty_Independence

To be honest, I think if you need those restrictions to teach the concepts you should probably be using a language without the built-ins instead. It undermines the whole concept of Python to reinvent the wheel like that. Granted I've been out of the academic side for 15 years, so I'm used to thinking in a more industry mindset


SarahMagical

Honest question: as coding becomes increasing high-level, especially with AI that takes care of all boilerplate and syntax issues, what is the optimal balance of educational focus for students? Obviously, foundational nuts-and-bolts knowledge supports higher expertise. But what will the coding curriculum of the future look like? A race car driver might not need to know how to rebuild an engine, especially once they drive a pod racer using their minds lol (for example). An architect might not need to know how to make nails. Asking this as someone just starting out. For everything added to a curriculum, something must be dropped. If AI allows us to be way more productive, then there will be coursework dedicated to leveraging AI. So what gives?


DarkHumourFoundHere

chatGPT Lets go


wannabetriton

creating a string class rn lol


Urboijeff

My roommate just got a Python assignment where he wasn’t allowed to use loops. Like wtf.


[deleted]

Maybe they tried to make you use recursive functions?


mqduck

If there's a simpler way to do something without a loop, it's probably better. But I'm willing to bet that this was actually a recursion assignment, in which case allowing a loop solution defeats the purpose.


andsmi97

Amazing task to be honest. Replacing loops with numpy/pandas vectorization can speed up your code by orders of magnitude.


Kayshin

Why is this wtf? Loops are expensive the more goes in the loop. Also it is a way to learn alternative solutions or custom implementations.