As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 11 years ago.
I Have been trying out different EXE packers recently. I tried out ASPack, UPX, mPress etc.. While trying out half a dozen packers, i observed that most of the packed EXE's can trigger false virus signatures. Even UPX is no exception. Still, my choice is UPX. Can anybody, please, suggest me what is the best possible compression / packing method available in UPX.?
I am quite satisfied with UPX --lzma myEXE.eXE
still, would love to hear for you people on this.
I am not comfortable with UPX --ultra --brute myEXE.EXE since it eats up hours to do the trick.
I used UPX a lot, and there was not a big difference between the versions.
The latest --lzma setting produces very good results, and --ultra --brute is indeed not worth the time spent. At best, 1% of better compression rate... you should better subsample your internal bitmaps or refactorize the code.
But, especially with Delphi applications, I do not use UPX any more. You spoke about anti-virus software false positive, and it is a huge problem. For instance, it sounds like if some "cheap" anti-virus software introduced very simple (and false) heuristic patterns, like "UPX+Delphi=potential malware" or "Delphi+size<300KB=potential malware".
If you try to submit such executable files to http://virustotal.com, you'll find out that about 8% of the anti-virus engines are doing such wrong guess.
I've seen some of my web sites flagged as "malware URI", because of this. I've seen some customers complaining about my deliveries to be infecting their computers. Not worth it.
To reduce the executable size, I therefore rely rather:
On embedding most resources (textual, bitmaps, even external dll) as .zip inside the .exe, and uncompress them on purpose;
On using our LVCL library, which is able to create some very small executable (if your UI needs are simple, e.g. for a setup or update program) - see here the latest source code for Delphi 5-2007.
Related
As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 10 years ago.
I need to develop an evaluation tool using C# that will run on the system for hours and then will show the overal performance of the system.
The system is supposed to run a service and we want to evaluate how this service is affecting the performance of the system. Will be great if I could use the performance counters that are available in "Windows Performance Monitor"... I'm not sure if there is any API available for developers to use them.
I was just looking for suggestions...
Thanks
If it were me, I'd use perfmon. The advantages are:
Well known data archiving model that offers multiple formats.
Existing tooling to slice and dice the data, including visualization.
Integrates with other systems if the client cares (ie lets them suck the data in to other performance tooling).
Someone else's code. :)
You can wrap perfmon and invoke it programatically if you want. Worst case just invoke it via the command line and start/stop collection that way.
Of course you can also expose your own performance counters for app specific stuff too. There are loads of APIs for this for just about every programming environment I can think of on Windows, including of course C#.
I would strongly suggest you use an existing option like automating the collection of WPM statistics.
otherwise C# may not be the best choice since hardware is almost completely abstracted away from the code by the runtime. additionally the application may require sufficient resources and time to contaminate your results. usually the performace cost between C++ and C# is neglible, but in this case could be a problem.
Good luck.
As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 10 years ago.
I need to develop a fairly scalable socket server for an HTML5 / Mobile based turn-based type game.
Time is a real factor in this as I need to prototype out something in 3 months. I have extensive (years) of experience in C# and zero experience in Node or Erlang which I've singled out as the perfect languages for this project. Unfortunately, both of those languages will have a lot of learning curve associated with them and things such as code quality, unit tests, maintainability I will have no experience with so I imagine the code will be of a poor quality.
How bad of a decision will it be to choose to go with C# for this project to save development time as I will have a lot more headaches with scalability and things down the line.
Is C# seriously considered viable for a modern web-app socket server?
A person can write bad code on any platform. Or good code. Yes you can write a very good low impact highly-scalable server in c#. But if this is the first such you've written (regardless of platform), chances are you'll fail to write it efficiently, and then conclude it was the platform's fault.
As an example, the web-socket server that drives instant updates here on SO/SE is written in c#, handles 60k+ connections, and barely registers as any CPU. But it was designed for that, with fully async network access, buffer-recycling, dedicated worker threads, etc.
Actually, if you are specifically looking for web-socket code, then .NET 4.5 on Windows 8 will include inbuilt web-socket support via HTTP.SYS (with managed wrappers, obviously), but it can be done manually. I could possibly even share the library we wrote to do it.
Short: Yes.
Long: c# is statically typed, and it's actually compiled to native code (on Windows) and the speed is simply awesome in my experience. Consider it like C++ with garbage collector :-) Value types + true generics make things much faster than e.g. Java, and I would consider it good enough, too.
Note that you should not get scared by benchmarks game, it uses Mono.
And if you would really get into trouble, you can do unsafe operations if you really need them. So no need to worry for the future.
As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 11 years ago.
We have a software which we use in-house for our day to day work.
It is like a customize CRM (sort of) and Bug Tracking software. We had a small team of 3 developers who had developed this software. Now this team is also working on other assignments.
Recently we are receiving a lot of request for adding functionality from users (who are our employees and all of them are developers working of different projects) in our firm. The original team that created this software does not have enough time to work on enhancing this software. So instead of spending a lot of time in updating as per request and the updating the executable of software for each user, we want to implement a programming/scripting solution that is if possible free and open source.
I was thinking of adding support for a language which is similar to C# to our application. This way the developers will add the features that they require on their own in their spare time if they really need a feature!
Can anyone point me to some such implementation already existing?
I don't know if I am taking the right decision or not regarding C# I would like to get opinion of experts on this also.
TIA
The framework already comes with a C# compiler you can use at execution time via CSharpCodeProvider.
You might want to look at the source code to Snippy, a small tool I wrote for C# in Depth - that compiles code on the fly, and can act as a reasonably simple introduction to CSharpCodeProvider.
I think I'd look at a scripting solution here; probably IronPython is the easiest to bundle and host, but others are available (including Javascript.NET, IronRuby, IronScheme, Boo, F#, etc)
As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 12 years ago.
I and some buddies have an argument here -
in which langauge is it safer by terms of writing a code that cannot be hacked?
by hacked I mean that after the code is encrypted, or turned into executable , it can be reversed enginered into some kind of intermidate code (like java byte code) , or even the real high level program code itself .
This agruments aruse in general because one of us is about to start a big software project,but he's afraid that his competitors will steal some of his very-efficient algorithams.
It would be nice if any of you could present some pros and cons for each langauge .
thanks.
I don't really get to work with Java so I'm more familiar with C#.
In C# (or other .net languages) you can use easy and free tools like Reflector to see ALL of the code written inside an executable or dll.
You can always try obfuscating the code with the most advanced tools, so this won't be revealed easily, but I'm pretty sure that if the code is worth enough for someone to hack/reverse-engineer, It WILL be, and it's just a matter of time till that happens!
Even with lower level languages like C/C++, if the code is worth it, the people interested will find out how it works.
Bottom line : EVERYTHING IS HACKABLE/REVERSE-ENGINEERABLE!
:)
Both Java and C# can be decompiled to (mostly) your original source code. In .Net you have Reflector, in Java you have DJ's Decompiler. It works both ways.
In the end, it doesn't really matter. If someone is determined, they can always dis-assemble your code and still get the "efficient algorithms". Any code readable by the CPU is readable by a human.
Since by "security" you seem to mean protection against reverse-engineering, your best bet is probably native code like C/C++... most interpreted languages are much easier to decompile than native code, although you can obfuscate them to make it harder.
As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 10 years ago.
My background has been generally new technology demonstrators, which, well... demonstrate the latest technology and how it can be of use to a clients company. They use it for internal demos etc.
Now my career has shiffed course a bit more into actual products, in particular software which runs in locations like museums as interactive pieces.
Clearly, although the technology demonstrators had to be well coded etc, there wasn't as much emphasis as there is on my current work, which has to work, be highly configurable, probably multi-ligual and run constantly, without restarts.
So my question is, now that I'm trying to up my coding quality and write more commercial applications, are there any books which discuss issues surrounding high quality commercial software?
I currently have a copy of Code Complete 2nd Edition, which is excellent, but just wondering if there's any better, possibly more focused titles out there?
Thanks a lot!
Andy.
** UPDATE **
After a suggestion from JosephH, I'm going to mainly be working with c# and .Net (possibly silverlight!), if this helps anyone! :)
You could try Working effectively with Legacy Code.
The title is slightly misleading - although it's a very good book at showing you ways to work with Legacy code, it's also good at showing you good and bad ways to do things, why it matters, and has a focus on producing testable code. (The author's definition of "Legacy code" is any code that doesn't have automated tests.) The examples are in C, C++ or Java.
(You might want to state what language and technologies you're working with to get more focussed answers.)