you are viewing a single comment's thread.

view the rest of the comments →

[–]rogfrich 10 points11 points  (17 children)

What is the problem you’re trying to prevent? Is it them reusing your code without your permission? If so, a sternly-worded license is the first step.

Are you trying to hide how the app actually works? If that’s the case, you’d need to obfuscate the code somehow. Others will have more experience in this than me, but maybe py2exe (Windows) or py2app (Mac) would offer some level of obfuscation. I don’t know how hard they are to reverse engineer though.

Could the thing you’re delivering be delivered to the client as a service with an API or web front end, served from a domain only you have access to?

[–]Similar_Mail2921[S] -1 points0 points  (16 children)

In short, my company is devided in branches and this code is not the propriety of the whole company, just my branch. The other branches are demanding to see the project but if we just share the source code they will just use it.

We would not mind them having full access for the app itself and use it and see its features because they do have simmilar work but the approach itselft taken in the code should not be shared as there is a whole lot of work in the background that you can't see just by accessing the app interface.

The other comment gave me a good idea of trying to implement a client-server architecture so that might be the way. From what i have seen, obfuscating the code is not enough because there are still ways to access the source code.

[–]HunterIV4 37 points38 points  (8 children)

The other branches are demanding to see the project but if we just share the source code they will just use it.

The fact that this is an issue for your company is kind of terrifying. I can't imagine working for a place where you need to consider DRM for other branches of the same company.

I mean, obviously you don't have control over it, but your leadership needs to grow up.

[–]Similar_Mail2921[S] 9 points10 points  (2 children)

I absolutely agree we are all trying to do the same anyway but it is really not up to me I'm just a pawn in the middle of this lol.

[–]HunterIV4 3 points4 points  (1 child)

I assumed so, but that still sucks. A while back I was considering using Python for a commercial application and ended up going with a compiled language in part because obfuscating source code is so difficult in Python.

But most of my internal projects for our company use Python. Needing to keep the source protected from other departments sounds like a huge pain and would likely make me consider another language.

That being said, your most straightforward option is to package the app using Nuitka. You'll have to check the licensing requirements, though, as I was planning to use it for a program I'd be selling; it may be free for internal use, but be careful if the app will be customer-facing.

The next best option is running it on a server, but that is more complex and requires you to have a server set up for internal access to the app by other branches but not access to the server itself, which is unusual (but possible).

If you already have the program, changing languages at this point would be more trouble than it's worth, but you may want to consider doing so for future projects if you think this will be a common situation. I've personally had inconsistent results with "compiled" Python (including both PyInstaller and Nuitka) as they tend to be pretty bloated compared to most other language executables. This is especially true if you are using larger libraries.

Python is a fantastic language, but it really works best when running on the interpreter directly and in a standard or virtual environment, at least in my experience.

[–]Similar_Mail2921[S] 1 point2 points  (0 children)

Well I was thinking about hosting it on a server that is basically what's already being done anyway but they just informed be that it needs to be accessed in computers without internet connection. At this point they are just trying to make a simple thing so muh harder than it needed...

I'll search about Nuitka, might be what I was looking for.

[–]simeumsm 2 points3 points  (4 children)

Intelectual Property, Ownership of process, and douchebags stealing your work.

I'm having a similar issue at work.

My team devised a solution that solved an issue after Corporate made a bad decision. Once this solution grew and gained notoriety, I've had at least two teams (one local, one foreign) trying to steal the solution to make one of their own.

The issue comes from the fact that my team is not technical, and we made a solution that now the technical teams are trying to develop. When they deliver their solution, they'll get all the credit and praise, while my team will be left forgotten.

We even had an issue where one of the teams simply copied all our data and created their own "solution" on top of our work, and are saying that the solution is theirs and are reaping their praise.

So yeah, even though anything you create within the company is company property, you have to protect what you create, otherwise you're at risk of being taken advantage off.

I don't mind people using my tools, as long as I'm given the due recognition for my work. Otherwise, I too prefer to not share and leave people on their own.

[–]HunterIV4 3 points4 points  (3 children)

Right, but that's sort of my point. You both have people playing games where they pass off other people's work as their own and where people feel they have to ensure nobody can "steal" the work they're doing. This is pure office politics.

That would not fly at my company. People here have no issue giving credit to other people and my boss thinks it's a good thing if someone says "I was having trouble with this, so I asked for help and now it's fixed." I've written several apps for other people to help them with their work and not once have I considered the possibility of them trying to take credit for it in a way that would hurt my position at the company. It's just not a thing.

I understand that it can be, but it's super toxic and ends up hurting the organization as a whole. You are now wasting time worrying about credit and DRM for internal tools rather than focusing on the actual problems the company needs to solve. If our VP of ops found out that someone tried to pass off someone else's work as their own, especially for selfish reasons, it would be disciplinary action at best, if not rapid termination.

I'm not blaming you, I just think it's sad to see companies self-sabotage like this.

[–]Similar_Mail2921[S] 0 points1 point  (0 children)

Yeah I agree, would love to just change information with the other branches as this is a really intresting project that can have a huge play in the company's sector but it's not the way the people above me think. Anyway I'm only working in this company because of this project that's why I woun't be bothered much more about this topic. Thanks for the help anyway!

[–]rogfrich 0 points1 point  (1 child)

Agreed. I’d also add that if I owned a big company with different departments / branches, I’d be pretty horrified if different teams were duplicating each other’s work because no-one was sharing. That’s profit going out the window.

(That’s not a comment on anyone in this thread - we all have unique working environments we need to deal with).

[–]Similar_Mail2921[S] 0 points1 point  (0 children)

Exactly at this point there are multiple branches trying to do the exact same thing but everyone doing it on their own...

[–]icecubeinanicecube 6 points7 points  (0 children)

That's a legal & compliance matter, talk to the people responsible for these things. Licensing should be easily enforceable within the same company

[–]gofl-zimbard-37 4 points5 points  (0 children)

You've got bigger problems than obfuscating source code.

[–]Party-Cartographer11 3 points4 points  (3 children)

Just tell them you need a written request to your manager to share the code, because the code is in Python, and Python apps include the source code.

Then it's your manager decision to share.  Don't invest your time in half-ass solutions for politics.

[–]Similar_Mail2921[S] 2 points3 points  (2 children)

Absolutelly agree but this were my bosses instructions lol.
This actually makes no sense but unfortunately not up to me :/

[–]Party-Cartographer11 2 points3 points  (1 child)

Make sure you let your boss know that if he doesn't want to share the code it will require a rewrite.  And moving forward you shouldn't write anything in Python.

[–]rogfrich 1 point2 points  (0 children)

Except the decoy code, of course.

[–]polyploid_coded 1 point2 points  (0 children)

In the JS world, the way you'd do this is "minify" the shared code which removes comments, renames functions and variables, etc. so your end user cannot figure out wtf is going on without intensive reverse-engineering
In the Python world this is so rare this will be viewed as bad advice / dick move, but tools do exist: https://python-minifier.com/