u/roznak - 1050 Archived Voat Posts in v/programming - Page 11
u/roznak
  • home
  • search

u/roznak

302 posts · 748 comments · 1050 total

Active in: v/programming (1050)

  • ‹‹‹
  • ‹‹
  • ‹
  • 9
  • 10
  • 11
  • ›
  • ››
  • ›››
Comment on: How to Write Simple Bootloader Tutorial with int 10h, int 16, int 19h using NASM (Netwide Assembler)

But he actually shows you the very core of what the BIOS is without the theoretical noise and too many abstract descriptions you have to go through.

Putting a simple line on, the screen is just allocate memory for the text you want to show, assign the pointer to one register, the character count to the other register and call Int 10h

No crazy C libraries to load, straight to the core.

1 10 Aug 2015 21:57 u/roznak in v/programming
Comment on: Comparing C to machine language

Buy by analyzing the underlying assembly code can deduce how your compiler is creating the assembly language.

It has been a while since I touched C++ but back then I suddenly realized that only the first 4 parameters are passed on as register memories, the fifth is pushed onto the stack. So if you wanted speed then any method you call should be limited to 4 parameters.

0 10 Aug 2015 21:51 u/roznak in v/programming
Comment on: Comparing C to machine language

Nope but it directly translates to machine language almost 1 on 1.

2 10 Aug 2015 21:45 u/roznak in v/programming
Comment on: How to Write Simple Bootloader Tutorial with int 10h, int 16, int 19h using NASM (Netwide Assembler)

Everybody knows what a BIOS is, but almost nobody actually understand what it really means.

The clip has no sound and he probably has a Korean Windows, but the program he is writing is the very core of your OS and is using the BIOS.

BIOS is basically Int 10h, 16h, 19,..., and "INT" means "Interrupt"

An Interrupt (INT) is a jump to a table address at position 10h (16 decimal)

INT 10h --> points to the video card services. And parameters are passed by filling in the CPU registers "before" you call INT 10h

https://en.wikipedia.org/wiki/INT_10H

0 10 Aug 2015 03:24 u/roznak in v/programming
How to Write Simple Bootloader Tutorial with int 10h, int 16, int 19h using NASM (Netwide Assembler)
10 5 comments 10 Aug 2015 03:13 u/roznak (..) in v/programming
Comment on: Comparing C to machine language

In order to write very efficient code in C/C++ it is useful to understand how the C gets translated into machine code.

In a lot of cases your C/C++ code can work faster when you reorganize your C/C++ code to a point where it creates the most optimal assembly code.

7 10 Aug 2015 03:00 u/roznak in v/programming
Comparing C to machine language
83 20 comments 10 Aug 2015 02:55 u/roznak (..) in v/programming
Machine Code Instructions
27 9 comments 10 Aug 2015 02:54 u/roznak (..) in v/programming
Comment on: C++ Internals :: Memory Layout

Another tip for C++ developers: Who frees the memory?.

The rule I always had was: The one that allocates it, must also free it. That way there is no discussion who should clean it up and have memory leaks.

If you do have to transport one memory structure to another location to process it, clone it! You take up more RAM for your application but your code will be more predictable and secure.

2 05 Aug 2015 22:22 u/roznak in v/programming
Comment on: C++ Internals :: Memory Layout

The main issue that I always had was that some functions are 0 based others 1 based. And also should allocate for x string bytes or x+1 string bytes (because the 0 terminator also needs a place, or 2).

And then it gets worse with UTF-8, UTF-16 where you have a variable number of bytes depending on the characters you used.

I am happy that I do not develop in C++ anymore, C# is my favorite language.

0 05 Aug 2015 22:19 u/roznak in v/programming
Comment on: C++ Internals :: Memory Layout

Nice.

A tip for those c++ programmers.

Local variables are allocated on the stack. But once in a while as a C++ developer you make a mistake when you move one byte too far.

Normally you should get an access violation, but if 2 memory local allocations are near each other you could corrupt the next variable and you get random errors. The trick is to swap the place of these variables, that could trigger the access violations or other bugs and discover your bug.

1 05 Aug 2015 21:28 u/roznak in v/programming
Comment on: If someone with 5-10 years of experience in something, be it Java or a specific database, is called 'Senior'....

I am one of those guys that always avoided leadership. I have seen what happens, you become a leader and you lose the development touch. You changed from a developer into a politician. A couple of years down the road you lose touch with development reality.

0 30 Jul 2015 21:51 u/roznak in v/programming
Comment on: If someone with 5-10 years of experience in something, be it Java or a specific database, is called 'Senior'....

Yes I am exaggerating, but I have 3+ decades of software development experience. I don't count the years anymore.

But software experience is not something you can accumulate. Lots of new technologies come out, and techniques that used to work great does not really work anymore in these times.

2 30 Jul 2015 21:22 u/roznak in v/programming
Comment on: If someone with 5-10 years of experience in something, be it Java or a specific database, is called 'Senior'....

In software more than 5 years of experience is irrelevant. The technology has advanced so much that the older techniques might even be worse than the newer ones.

What is important is that you demonstrate that you are up to date with the newest technologies.

10 30 Jul 2015 19:37 u/roznak in v/programming
Comment on: If someone with 5-10 years of experience in something, be it Java or a specific database, is called 'Senior'....

What then do you call someone who has been programming Java for 20 years, and who has been programming for decades before that?

Outdated!

28 30 Jul 2015 19:22 u/roznak in v/programming
Comment on: Hey I'm trying to start learning programming but i am having a hell of a time starting. Is there a correct pathway to starting the adventure that is programming?

Don’t get caught up in the latest trends. There is a lot of debate raging about which are the best framework or which is the hottest language.

That is so true. Time after time I see analyst and project mangers come up with yet another hype word and they actually think that that will safe the project. It didn't save it last time and the new hype words are not going to save the new project.

0 26 Jul 2015 21:40 u/roznak in v/programming
Comment on: Hey I'm trying to start learning programming but i am having a hell of a time starting. Is there a correct pathway to starting the adventure that is programming?

In software there is no correct path. There are always multiple paths and none will be correct.

The key things as a good developer will be:

  • Stop blaming bugs in your OS or some 3rd party component. You are the expert find a way around it that is user friendly.
  • Your database structure and the application you create are 2 different worlds. If your application is the spitting image of the database structure then your design will create the worst user experience in recorded history.
  • It is always a 24/7 learning process, and this for life.
5 26 Jul 2015 04:07 u/roznak in v/programming
Comment on: Developers that experienced project failures. I have some questions.

That is a very informative post.

1 25 Jul 2015 20:43 u/roznak in v/programming
Comment on: What's New for .NET 2015

.NET Core and ASP.NET 5 source being developed on GitHub

https://github.com/microsoft/dotnet

0 25 Jul 2015 18:38 u/roznak in v/programming
Comment on: What's New for .NET 2015

It means ASP.NET also on Mac and Linux.

0 25 Jul 2015 18:33 u/roznak in v/programming
What's New for .NET 2015
2 2 comments 25 Jul 2015 18:32 u/roznak (..) in v/programming
Comment on: Optimizing code: Local variables are your friend!

A lot of developers focus on the technology only, they lose the big picture what the software should do.

When their code grows it become on big pile of design patterns and one giant unmovable monolith that appears structured but no on dares to touch because you have to understand the complete project before you touch one bit.

Developers that develop for the solution, and kick out the guy that insists of using that design pattern because that is so cool, tend to create a structure that is easy adaptable, easy tested, easy debugged, user friendly and modular enough in design so that the testers can test each component independently.

He is not against design patterns, but he must first understand the design before he can choose the correct design pattern. And will even invent a new design pattern to fit his need.

I think you can compare it between developers that can see 2D and others that can see 3D. I not only see the 2D code but I also take into account the debugging, logging, testing, and how the user need to use it.

When I look at the Voat code, it is actually good but it is at the 2D level, it misses the 3D level needed to scale. I hope they look at this post and see the aha!

1 25 Jul 2015 16:17 u/roznak in v/programming
Comment on: Optimizing code: Local variables are your friend!

That is because you are fixed on technology and not on the solutions.

The focus is this part, not what was before.

var subverseUrl = new Uri(subVerse);
var commentsUrl = new Uri(subVerseComments);

It also makes logging way easier:

var subVerse=GetAndCheckSubVerse();;
var subVerseComments=GetAndCheckSubVerseComments(subVerse);
Logger.Writeline("subVerse: "+subVerse);
Logger.Writeline("subVerseComments: "+subVerseComments);
var subverseUrl = new Uri(subVerse);
var commentsUrl = new Uri(subVerseComments);

What comes before is not that important unless there is a bug in it or the variable name does not represent what it should be.

Also the last solutions is very efficient (memory and speed) (but you have to look at the IL code) and less likely to contain a bug. The last solution also exposed what the code is supposed to do and if not then you need to refactor that part. It makes your life way easier to turn this part into something reusable and even more easier to fix.

Edit:the examlke was somehow lost

0 25 Jul 2015 15:14 u/roznak in v/programming
Optimizing code: Local variables are your friend!
17 6 comments 25 Jul 2015 03:35 u/roznak (self.programming) in v/programming
Comment on: Old guys! What's your advice to younger developers?

Don't get stuck maintaining code in a dying language. Change jobs if you have to, do what it takes to to keep your skills fresh. Nothing is sadder than a middle-aged guy with out-of-date skills looking for his next job.

I got trapped in that one. Delphi. Incredibly hard to get back on track on the language I originally preferred. When I joined that company, they had a Choice C# or Delphi (Because of the .NET potential). They stupidly decided fro Delphi because that is where they original code was written in.

I do get regular Delphi offers but I will only do it if it is a one way transition from Delphi to C#.

1 25 Jul 2015 02:35 u/roznak in v/programming
Comment on: Old guys! What's your advice to younger developers?

HR is not your friend.

Spot on!

6 25 Jul 2015 01:11 u/roznak in v/programming
Developers that experienced project failures. I have some questions.
2 4 comments 25 Jul 2015 00:59 u/roznak (self.programming) in v/programming
Comment on: Old guys! What's your advice to younger developers?

A question to the older guys: What is your thought about the "Garbage in, is Garbage out"?

1 25 Jul 2015 00:55 u/roznak in v/programming
Comment on: Old guys! What's your advice to younger developers?

A question to the older guys: Is there a natural selection that weeds out bad developers as you get older?

0 25 Jul 2015 00:39 u/roznak in v/programming
Comment on: Old guys! What's your advice to younger developers?

A question to the older guys: When you get older, does your passion for developing decreases?

2 25 Jul 2015 00:37 u/roznak in v/programming
Comment on: Old guys! What's your advice to younger developers?

Even if you never end up using it, the concepts surrounding it will almost always come in handy and will be applicable later.

This is so true. You always recycle the technology. You are better not because you are smarter, but because you have done it before and already know the pitfalls.

3 25 Jul 2015 00:35 u/roznak in v/programming
Old guys! What's your advice to younger developers?
24 36 comments 24 Jul 2015 23:46 u/roznak (self.programming) in v/programming
Comment on: Developing for speed: Know your hard disk.

No it is not C++ only, it is every language that gets influenced. The hard disk is the bottle neck no matter how fast the language generated code. It must wait for the hart disk data to be read or to be written.

I have the intention to put some graphs up, I am here testing my hard disks and I do notice one hard disk a completely flat curve, one that basically loses its read speed by half, and another one that also have a curve (lose read speed the further it gets) but more slowly. So by not filling your hard disk can actually double the processing speed, or from other point of view, filling your hard disk might slow your processing down by 50%.

I do not know about Java, but C# can escape its abstraction and can go screaming fast that almost gets as close as C++. With the benefits that your project can be developed in weeks instead of months. C++ can't go any faster because it is bound to Windows functions. C# can use these same windows functions that C++ can.

The C++ code can be better processor optimized however that microsecond it wins does not add up to the milliseconds it needs to read in 100 bytes.

In this comment I was focusing on hard disks. Understanding the hardware it has to work on can greatly improve performance.

0 22 Jul 2015 21:41 u/roznak in v/programming
Developing for speed: Know your hard disk.
1 3 comments 21 Jul 2015 20:03 u/roznak (self.programming) in v/programming
Comment on: Visual Studio 2015 released, watch the launch event (8:30am PT)

I do recall that with VS2013, the none-MSDN version was sneaked away.

0 21 Jul 2015 02:05 u/roznak in v/programming
Comment on: Computer Programming to be renamed Googling Stackoverflow

When I google stackoverflow I most likely end up in obsolete pages from a long dead Windows XP solution.

2 21 Jul 2015 00:18 u/roznak in v/programming
Comment on: Visual Studio 2015 released, watch the launch event (8:30am PT)

I already have a VS2013 pro, I just want the same as I use in companies so that my VS skills match what is needed in professional environment.

Previously the express version lacked the ability for plugins.

0 20 Jul 2015 20:56 u/roznak in v/programming
Comment on: Visual Studio 2015 released, watch the launch event (8:30am PT)

I have VS 2013 professional, without MSDN subscription because I have no desire to pay that much of money. What is the pricing of VS 2015 professional without MSDN subscription? And where can you find it?

I know that there is a community version that is free, but I had express editions before and those were seriously crippled. I just want the same tools that are used in the professional world to learn before the professional world start using the VS 2015.

0 20 Jul 2015 19:51 u/roznak in v/programming
Comment on: 4 Symptoms of Dysfunction in Software Teams

In cases where something is found that has a critical impact, there is space in the sprint to allow developers to address those issues, and pull less important things out of the sprint, and push them into the backlog.

That is something I have never seen happening. Encountering an issue that basically destroys your planning since you have no clue how long it will take to resolve, and actually introducing new items in the current plannings.

But that is where I talk about the one free guy that is not bound to the sprint planning and can freely roam the project fixing things that would actually. You need a passionate free spirit in your team. This guy can fix issues before it happens and let the other developers focus on their tasks knowing that if they make a mistake that it will be caught in time.

You could of course wait until the test team to file a report, but that is a big waste of turnaround time and might actually not caught before a release months later. Hey look at this pointer that could become null one time or another, lets warn the guy that created this.

0 14 Jul 2015 23:03 u/roznak in v/programming
Comment on: 4 Symptoms of Dysfunction in Software Teams

The failures I have seen in most projects is because they do not understand what they must solve. Most developers and managers are fixated on design patterns and rules that they are killing the solution. Yes I know that the program looks like crap but at least look at the cool design patterns we used

0 14 Jul 2015 22:18 u/roznak in v/programming
Comment on: 4 Symptoms of Dysfunction in Software Teams

I understand the idea of SCRUM. It tries to mimic good developers. But the problem is that it tries too hard and actually kills the good developers and leave the bureaucrat developers in your team that follow the SCRUM rules to the letter.

  • SCRUM would probably work if you have one guy in that team that does not follow the planning. That guy will clean up the code and fix bugs.
  • SCRUM would also probably work when there is no fixed demo date set but is more relaxed. e.g. postpone the demo 1 or even 2 weeks later, because you want to make sure that your code has the minimal quality, before proceeding.
  • SCRUM would also work when you never show the progress graph to your developers; It is always depressing to see that you failed again to reach the target. It really kills moral after 2 or more sprints.
1 14 Jul 2015 22:11 u/roznak in v/programming
Comment on: 4 Symptoms of Dysfunction in Software Teams

I always hear the SCRUM doing wrong excuse, but I have never seen a SCRUM that actually succeeded.

I have seen people claim that SCRUM saved their work, but when you look at what they did, you ask yourself : How can you even remotely call this professional developing? And why on earth did it take 3 times more than without SCRUM?

1 14 Jul 2015 22:00 u/roznak in v/programming
Comment on: What programming language changed your outlook on creating software?

F# actually. I had to rewire my brain but I now develop more modular programs.

3 14 Jul 2015 21:56 u/roznak in v/programming
Comment on: 4 Symptoms of Dysfunction in Software Teams

Microsoft would be a good developer compared by the crap that I have seen being developed and sold as something very expensive because it was that hard to created.

1 14 Jul 2015 21:55 u/roznak in v/programming
Comment on: 4 Symptoms of Dysfunction in Software Teams

SCRUM creates massive prototype code and never time to clean up. It is a constant race against time exhausting your team. After one year your team is either burned out or left the company.

2 14 Jul 2015 21:51 u/roznak in v/programming
Comment on: 4 Symptoms of Dysfunction in Software Teams

The function of a company is to make money, not just to make great software.

Crappy software means crappy company.

1 14 Jul 2015 21:44 u/roznak in v/programming
Comment on: 4 Symptoms of Dysfunction in Software Teams

The engineers mention this to the group. The system wasn’t designed to go live, it doesn’t scale easily, it doesn’t have good exception handling, it doesn’t do any logging, it can’t be monitored, the list goes on. The engineers are overruled but promised to be given time to fix it up later.

Typical SCRUM. And afterwards they wonder why the project crashes and burns when fully deployed.

2 14 Jul 2015 21:42 u/roznak in v/programming
Comment on: Google's guide for becoming a Software Engineer

To be honest, you should not aim to become a developer at Google. You should aim to become a good developer for any company out there. And becoming a good developer also means breaking guidelines and rules when they obstruct your end goal.

The worst thing that can happen to any software project is when you destroy the imagination by rules, guidelines and bureaucracy. I actually don't want to work for Google at all, they became the evil company long time ago.

4 11 Jul 2015 01:30 u/roznak in v/programming
Comment on: Google's guide for becoming a Software Engineer

Code in at least one object oriented programming language: C++, Java, or Python

I always have to fight computer engineers that claim to program in OOP but in reality it is the biggest abuse of OOP I have seen. MFC is one such example, the biggest OOP disaster that I have ever witnessed but with the .NET framework they have it spot on.

1 11 Jul 2015 01:25 u/roznak in v/programming
Comment on: What back-end do sites like Voat and reddit use?

It is actually quit interesting that C# is used, it is one of the few languages I developed in that can scale enormously and have an incredible fast development cycle. And the .NET platform you can mix C++ with F# and VB and C# that each has its own specialty without need to jump through hoops.

1 11 Jul 2015 01:09 u/roznak in v/programming
  • ‹‹‹
  • ‹‹
  • ‹
  • 9
  • 10
  • 11
  • ›
  • ››
  • ›››

archive has 9,592 posts and 65,719 comments. source code.