|
Hello all,
Can anyone advise some good books (eBooks) dedicated to asyncronous programming, problems around it ?
I mean there is a lot of sources describing for example, what is a semaphore but not when to use it and what problems one can face to.
I'm the programmer with Windows background but life brings me into RTOS world. I suppose AP is the common problem so any platform related book would be helpfull to me.
Thanks in advance,
Valery
|
|
|
|
|
|
I'm planning on writing an MP3 ripper, which can read
from audio CD ,then translate to MP3 format. But the
key is, I'm planning on Win 32 API, not .Net!! And it
will be written in C++.
I've been searching this topic for quite a while on
the codeproject, however, I can only find the similar
project using .Net in C# or VB.
However, I do think that Win 32 API will be much suited
for this project, or at least, it is my preference.
If you are looking for an article to write, this will be
excellent, or at least, considering a help for me.
Thanks.
-----------------------------
C++ without virtual functions is not OO. Programming with classes but without dynamic binding is called "object based", but not "object oriented".
|
|
|
|
|
We're considering purchasing Compuware's Devpartner. It impressed me. Looks like it has much better code reviewing than FxCop, and easier to add your own, and based on source code, not only reflection.
Also : Performance analisys (you can see for any line of code its average execution time and number of times executed)
Memory Analisys (how many objects of any type and average size)
Code coverage : which code did't run
Disributed appl analisys
Error detection
Does anyone know of something similar I should look at ?
Has anyone worked with it and what are your comments ?
|
|
|
|
|
Does anybody know of a Visual Studio add-in (or stand-alone) with which I can comment code, without modifying the code file itself. In a project environment, if you have a peer review system, you want to comment somebody elses' code, but you don't want to edit his source file for the following reasons :
1. You don't want to clutter his code with all the questions or suggestions you might have
2. You don't want to check out his code from something like Source Safe because you may not
or you cannot because somebody else is busy with the code
You can also potentially have a discussion thread linked to a line of code, and add help and MSDN links to a line of code, or any other links for that matter. You want to extend the TODO / HACK concept and link certain TODO's to future releases. To put all of that in the source code is will clutter it.
I think something like a seperate file which have the same name as the source code but with a different extension might be used. Sure, you will have problems to keep the comment file in step with the source code, because the only way you can link a comment to a code line is to use possibly the method name with a line number offset from the start of the method, in which case you will loose the link to the source code line if somebody changes the source code file independantly. But these problems should not cancel all the positives, especially if the methods are short, as they should be.
|
|
|
|
|
Hey,
I've just read your post. I think this is just a very good idea. I so often have been thinking about what is wrong with commenting? If I comment properly I end up with a source file that has got about 6 times the size as w/o comments. Sure enough, it doesn't affect the code itself, but if you're debugging or just browsing the code, the clutter gets annoying. And and here we go. That would be the perfect solution. I'll take this to bed with me. Don't actually know whether I have sufficient skills to write such tool, but will think about it anyway.
Have a good one!
Matthias
If eell I ,nust draw to your atenttion to het fakt that I can splel perfrectly well - i;ts my typeying that sukcs.
(Lounge/David Wulff)
www.emvoid.de
|
|
|
|
|
Folks,
The same (basic) idea has drifted through my mind as well...have any of you found such an item? I've never written a VS addin, but it can't be THAT hard. Anyway, if this is still interesting to either of you, let's talk about it somemore.
Bill
|
|
|
|
|
:-Ohave been learning a lot here, but nowhere does it give help on how to reconstruct a sample project. Once the files are downloaded, I don't know how the sample was put together--I have to read each file and figure it out, especially since I have an older version of VS.
Can someone write a procedure on how to make use of the samples posted?
|
|
|
|
|
can anyone send me source code for my project in CORE JAVA for "DEVELOPMENT OF LIBRARY MANAGEMENT SOFTWARE using core java"??
|
|
|
|
|
Hai All,
Please let me know if there is any articles that gives clear picture on the windows authentication in asp.net totally the security namespaces am getting lots of code samples on those but it is not clearer to me.
Please do let me know any article u ppl would have written.
Thanks
Ever Loving,
R. Senthil Kumaran
|
|
|
|
|
Hi All,
I've created a common sub procedure that can log the service status into Custom EventLog.
'********************************************************************<br />
' Process: ServiceLog<br />
' Input: LogSource, strLog, strType, EventID, Category<br />
' Output: Write into EventLog<br />
'********************************************************************<br />
Public Sub ServiceLog(ByVal logSource As String, ByVal strLog As String, ByVal strType As EventLogEntryType, ByVal EventID As Integer, ByVal category As Short)<br />
Dim logName As String = "My_Services Log"<br />
If Not EventLog.SourceExists(logSource) Then<br />
EventLog.CreateEventSource(logSource, logName)<br />
End If<br />
<br />
Dim MyLogAs New EventLog()<br />
MyLog.Log = logName<br />
MyLog.Source = logSource<br />
MyLog.WriteEntry(logSource, strLog, strType, EventID, category)<br />
End Sub<br />
My service was installed and run without error. When i check the EventLog, supposing that it should write into the my Custom Log["My_Service Log"],
but it wrote into the Application Log.
Any idea how to solve this?
Thanks...
Regards,
Sayhigh Soon, Junior Programmer
|
|
|
|
|
I believe that the Microsoft documentation is very misleading in this respect, or the 'custom log' was a direction in which they never headed.
I too wanted to create a 'custom event log' many years back, and was not EVER able to find a way in which to do it - I REALLY tried everything I could think of and wrote numerous test applications against the published API. I became convinced there are only THREE event logs EVER - Application, Security, and System.
Your best option is to effectively utilize writes to one of the existing three logs and to thoughtfully choose your SOURCE and CATEGORY, since you can easily sort the event log based upon these fields.
|
|
|
|
|
I do tried to edit the registry before..
i did it..but i'm not sure what is the steps to archieve that.
what i want to archieve is install windows services with the eventlog features without modifying the windows registry.
Anyway..thanks for ur valuable info..
|
|
|
|
|
I do this in VC++.
To create a new log file you create an entry in the registry. The log event service will see this and create the appropriate log file and entry in the event log manager. The one thing to watch for is the difference between the display and file names. If you want them to be different then you will have a race with the event log service. As soon as you create the display name entry you are racing to add the 'File' subkey entry before the event log service reads the change and creates the file based on the specified display name key. If you get there first then the service will use the specified 'File' key to create the file.
So, in the registry under HKEY_LOCAL_MACHINE create :
SYSTEM\CurrentControlSet\Services\EventLog\<display name="">
Then right away set the following keys :
REG_EXPAND_SZ File = %SystemRoot%\system32\config\<file name="">.evt
REG_DWORD MaxSize = 0x00080000 (524288)
REG_DWORD Retention = 0x00000000 (0)
Next you have to create and register a source ... after that everything should work.
...cmk
Save the whales - collect the whole set
|
|
|
|
|
I'm a budding programmer looking for vital threads. Learning language and using it are 2 different things although one MUST receive it before they can express it. Grasping the basic concepts of OOD and the languages (VB,C#,C++(concepts)), learning the system classes, .net and language functional constructs (gdi,reflection,diagnostics), etc. etc. , What is(are), the single best tools to use to convert ideas into code?
1. UML??
2. Keep reading??
3. Keep doing??
4. Usage of interfaces, events(delegates)??
5. A pad and a pencil??
Any thoughts to help steer me into coding effective design, architecture, OUTPUT!!! .....TIPS .. pLeAsE
Trane Lives (that's Coltrane)
THANX
ds
|
|
|
|
|
I advise you to read Refactoring by Martin Fowler. Uml and other things may be good. But I believe in iterative development. If you need something first build it however naive it can be. Then add to it, refactor it. I never build my inheritance classes at outset. I first build something, when I start to copy paste. I look for common parts to use in inheritance. Refactoring books teaches you how to this. Of course this is my opinion.
Education is no substitute for intelligence. That elusive quality is defined only in part by puzzle-solving ability. It is in the creation of new puzzles reflecting what your senses report that you round out the definition. Frank Herbert
|
|
|
|
|
But doing it this way, building it first; That's what I do now. You're saying, wing it from your knowledge, base, research, etc. tied with your coding logic...putting it together and then Refactor it. How do you take a heavy architecture, that you've now created (the mistakes of design you've now issued, not having the complete answer until you've reached the end) and re-make it into something light and elegant??
Does Refactoring allow you to pull out those 'guts', allowing redesign, without upsetting the wheel that pulls the applecart...(Breaking something that's not broken, just a little slow)
ds
|
|
|
|
|
Lets say this. You will learn while you are coding and designing. Your mistakes will teach you. For example I am in a project now. Which uses web services from a third party. This third party publishes web services which have same interface but they have diffrent names. I have tried to implement this using interfaces in my code. It worked but it was ugly and hard to change. I changed my code to use one abstract class and factory pattern. Now it is very easy to extend my design to accommadate other web services from this third party.
But first I have implemented one solution. Then I looked my solution and changed it. I have not arhictected last solution first. Of course you need some knowledge for this.
Of course you never have complete answer. If you do not need to expand that application leave it as it is. It is working. But you have to maintain and extend it. Then As I have done, refactor it to simple solution. Refactoring needs unit and other tests to see that you have not broken something without meaning. Refactoring does not mean only readable simple code. Refactoring means changing your code structure without changing its capability to simple structure. Think of this. You can cross ocean with a ship or airplane. Airplane is refactored solution. It accomplishes same thing but it is faster simpler in some places.
Education is no substitute for intelligence. That elusive quality is defined only in part by puzzle-solving ability. It is in the creation of new puzzles reflecting what your senses report that you round out the definition. Frank Herbert
|
|
|
|
|
...Your mistakes will teach you...
Persistance, tenacity, focus and self control, helping me to override my reactive frustrations which get the better of me, is key to my solutions too....
Thanx for your input
Any suggested readings, on refactoring?
ds
|
|
|
|
|
|
|
I nearly always make an interface for a class, because this keeps you thinking about what the class should do, rather than the implementation. Another advantage is that a class can be derived from multiple interfaces, so cunning class-hierachies are possible.
Develop, develop, develop....
Books: Design Patterns for C#!!!
Implement classes for Standard Things, Login, Database Access, Controls and implement them a common way, not specialized.
Split your project into logical items: Login, MdiForm, Menu {ToolBar, Treemenu, MainMenu}, Reports, MainInfo, InfoLists, Searching, New and Edit, .... Parts {Bureau, Production, ...} and split it. Most people think in a one-dimensional way (a simple line) but most programming things are Multi-Dimensional Tree-Structures!!! and trees aren't so simple to keep in mind...
You could also have a look at the Document-View Architecture in C++. There is shown how to split Data from the View of the Data.
I don't use UML because I just not used my time to learn a UML-Programm but if you can, use it!
Good luck!
Stefan Werdenberg, www.adwise.ch
|
|
|
|
|
Hi all,
Can anyone help me in giving some ideas for developing a firewall application
in vb.net
|
|
|
|
|
I understand from the on-line doc that designing a Windows Service with a GUI using C# and .NET is not possible, unless some unmanaged API are used ("Window station ?"). My aim is to have a notifyIcon associated with a Windows service: double-clicking the icon should pop up a window form with some degree of interaction: I managed to show the icon in the taskbar, no more than this.
Can anyone help ?
Thanks
Maurizio
|
|
|
|
|
In general you should avoid guis with services. Usually a service is just doing backend work. If you MUST have a GUI, and you can be sure the service doesn't need non tcp/ip network access (i.e. the service doesn't need to access network file shares), you can just set the service to run with the localsystem account and to interact with the desktop. In .NET, you can set these in the service process installer class. Otherwise you can just click the checkboxes in the SCM.
I think this will allow your GUI w/o having to muck with an unmanaged API.
Just out of curiosity as I've never come across such a scenario, why do you need the GUI to interact with the service? I'm not trying to second guess anything you're doing, I'm just curious for my own benefit.
Tim
|
|
|
|
|