블로그 이미지
Every unexpected event is a path to learning for you. blueasa

카테고리

분류 전체보기 (2809)
Unity3D (865)
Programming (479)
Server (33)
Unreal (4)
Gamebryo (56)
Tip & Tech (234)
협업 (61)
3DS Max (3)
Game (12)
Utility (140)
Etc (98)
Link (32)
Portfolio (19)
Subject (90)
iOS,OSX (55)
Android (16)
Linux (5)
잉여 프로젝트 (2)
게임이야기 (3)
Memories (20)
Interest (38)
Thinking (38)
한글 (30)
PaperCraft (5)
Animation (408)
Wallpaper (2)
재테크 (18)
Exercise (3)
나만의 맛집 (3)
냥이 (10)
육아 (16)
Total
Today
Yesterday

동차좌표란?

동차좌표를 사전에서 찾아보면, '사영기하학에서 무한원점의 불편한점을 고려해서 보통의 점과 같이 취급하기 위함' 이라 적어뒀다. 외계어인가 -_-;

일단 동차란 같은 차원이란 뜻이다. 비동차(inhomogeneous, 非同次) 좌표계 에서 무한대는 ∞ 라는 기호를 이용해서 표시하는데, 다른 원소들과 달리 일반적인 수가 아니다. 이를 일반적인 수로 표현하기 위해 차수를 높여 좌표의 표현력을 늘리기 위해 등장한 개념이다.

다시 말해 현재 차원의 점을 더 높은 차원의 공간상의 직선에 사상(mapping) 시킨것이 동차 좌표이다. 2차원의 점 (1, 2)는 원점에서 출발해 (1, 2, 1)를 통과하는 모든 3차원 공간상의 좌표와 같으며, 이것이 동차좌표이다.

다음 표를 보자 

 inhomogeneous coordinate homogeneous coordinate 
 0 (0, 1) 
 -7/3 (7, -3)
 ∞ (1, 0)
 not a point (0, 0)
 (5, -7/3) (5, -7/3, 1)
 (∞, 0) (1, 0, 0)
 (0, ∞) (0, 1,0)
 (2, 3/4) (8, 3, 4)
 (-3∞, 2∞) (-3, 2, 0)
위와 같이 일반적인 수로 표현이 안되던 것이 동차좌표에서는 표현 가능하게 되었다.

좌표계에서 무한한 값인 방향을 뜻하는 벡터(vector)와 점(vertex)을 동차좌표를 이용해 구분 표시할수 있다. 마지막 요소가 0이면 벡터를, 0이 아닌 다른 값이면 점을 의미한다.


반응형

'Programming > Math' 카테고리의 다른 글

반사 벡터 ( Reflection Vector )  (0) 2012.05.16
투영 벡터 ( Projection Vector )  (0) 2012.05.16
[펌] 3D공간구조 기본충돌  (0) 2011.09.08
좌표계  (0) 2010.07.01
역행렬(Inverse Matrix)  (0) 2010.03.17
Posted by blueasa
, |





반차 쓴 보람이 있구나!!

반응형
Posted by blueasa
, |

C# 코드

[DllImport("StoreUI_ko_Http.dll", CharSet = CharSet.Auto)]
public static extern void GetPage(string url, out string data);

 

C++ 코드

__declspec(dllexport) void GetPage(BSTR url, BSTR* Result)
 {
         char* pBuffer = NULL;

         HttpConnectGet(url, &pBuffer);
 
         CComBSTR bstrResult = UTF8ToUNICODE(pBuffer);
        *Result = bstrResult.Detach();

        free(pBuffer);
  } 

 

WinXP 환경에서는 위의 코드가 정상적으로 동작하지만

 

Vista에서는 타입변환 오류가 발생되고 만다.

 

스트링 대신에 바이트 타입으로 하면 에러는 발생되지 않지만

 

한글의 경우 유니코드 환경에서 데이타가 다 깨져버린다.

 

해결 방법은 아래처럼 string을 IntPtr로 변경해서 처리하면 된다.

 

IntPtr 는 C#처럼 포인터를 지원하지 않는 어플리케이션과 데이터를 주고 받을때

 

사용하면 편리하다.

 

IntPtr는 C++에서 넘기는 스트링에 대한 포인터 주소값을 저장하게 된다.

 

C# 코드

[DllImport("StoreUI_ko_Http.dll", CharSet = CharSet.Auto)]
 public static extern void GetPage(string url, out IntPtr data);

 

IntPtr param = IntPtr.Zero;  // 초기값 할당 

GetPage("", param);             // C++ 함수 호출

string msg = System.Runtime.InteropServices.Marshal.PtrToStringAuto(param); //string 변환

 

C++ 코드

__declspec(dllexport) void GetPage(BSTR url, BSTR* Result)
 {
         char* pBuffer = NULL;

         HttpConnectGet(url, &pBuffer);
 
         CComBSTR bstrResult = UTF8ToUNICODE(pBuffer);
        *Result = bstrResult.Detach();

        free(pBuffer);
  } 




[출처] C#과 C++ DLL 간의 스트링 데이타 교환|작성자 옆집엉아

반응형

'Programming > C#' 카테고리의 다른 글

mouse_event (user32)  (0) 2012.05.21
keybd_event (user32)  (0) 2012.05.21
C# String을 C++ char로 변환  (0) 2012.05.14
Returning Strings from a C++ API to C#  (0) 2012.05.14
SendMessage C# -> C++ with String  (0) 2012.05.09
Posted by blueasa
, |



1
2
3
4
5
6
7
8
9
10
using System.Runtime.InteropServices;
 
String strHello = "Hello";
// IntPtr나 System::String^로 넘겨 주면 됨
IntPtr pStr = Marshal.StringToHGlobalUni(strHello );
 
// pStr  사용
 
// 사용 후 메모리 해제
Marshal.FreeHGlobal(pStr);
단순한 코드라 설명을 생략



반응형
Posted by blueasa
, |

1. Introduction.

1.1 APIs that return strings are very common. However, the internal nature of such APIs, as well as the use of such APIs in managed code, require special attention. This blog will demonstrate both concerns.

1.2 I will present several techniques for returning an unmanaged string to managed code. But before that I shall first provide an in-depth explanation on the low-level activities that goes on behind the scenes. This will pave the way towards easier understanding of the codes presented later in this blog.

2. Behind the Scenes.

2.1 Let’s say we want to declare and use an API written in C++ with the following signature :

char* __stdcall StringReturnAPI01();

This API is to simply return a NULL-terminated character array (a C string).

2.2 To start with, note that a C string has no direct representation in managed code. Hence we simply cannot return a C string and expect the CLR to be able to transform it into a managed string.

2.3 The managed string is non-blittable. It can have several representations in unmanaged code : e.g. C-style strings (ANSI and Unicode-based) and BSTRs. Hence, it is important that you specify this information in the declaration of the unmanaged API, e.g. :

[DllImport("<path to DLL>", CharSet = CharSet.Ansi, CallingConvention = CallingConvention.StdCall)]
[return: MarshalAs(UnmanagedType.LPStr)]
public static extern string StringReturnAPI01();

In the above declaration, note that the following line :

[return: MarshalAs(UnmanagedType.LPStr)]

indicates that the return value from the API is to be treated as a NULL-terminated ANSI character array (i.e. a typical C-style string).

2.4 Now this unmanaged C-style string return value will then be used by the CLR to create a managed string object. This is likely achieved by using the Marshal.PtrToStringAnsi() method with the incoming string pointer treated as an IntPtr.

2.5 Now a very important concept which is part and parcel of the whole API calling operation is memory ownership. This is an important concept because it determines who is responsible for the deallocation of this memory. Now the StringReturnAPI01() API supposedly returns a string. The string should thus be considered equivalent to an “out” parameter, It is owned by the receiver of the string, i.e. the C# client code. More precisely, it is the CLR’s Interop Marshaler that is the actual receiver.

2.6 Now being the owner of the returned string, the Interop Marshaler is at liberty to free the memory associated with the string. This is precisely what will happen. When the Interop Marshaler has used the returned string to construct a managed string object, the NULL-terminated ANSI character array pointed to by the returned character pointer will be deallocated.

2.7 Hence it is very important to note the general protocol : the unmanaged code will allocate the memory for the string and the managed side will deallocate it. This is the same basic requirement of “out” parameters.

2.8 Towards this protocol, there are 2 basic ways that memory for an unmanaged string can be allocated (in unmanaged code) and then automatically deallocated by the CLR (more specifically, the interop marshaler) :

  • CoTaskMemAlloc()/Marshal.FreeCoTaskMem().
  • SysAllocString/Marshal.FreeBSTR().

Hence if the unmanaged side used CoTaskMemAlloc() to allocate the string memory, the CLR will use the Marshal.FreeCoTaskMem() method to free this memory.

The SysAllocString/Marshal.FreeBSTR() pair will only be used if the return type is specified as being a BSTR. This is not relevant to the example given in point 2.1 above. I will demonstrate a use of this pair in section 5 later.

2.9 N.B. : Note that the unmanaged side must not use the “new” keyword or the “malloc()” C function to allocate memory. The Interop Marshaler will not be able to free the memory in these situations. This is because the “new” keyword is compiler dependent and the “malloc” function is C-library dependent. CoTaskMemAlloc(), and SysAllocString() on the other hand, are Windows APIs which are standard.

Another important note is that although GlobalAlloc() is also a standard Windows API and it has a counterpart managed freeing method (i.e. Marshal.FreeHGlobal()), the Interop Marshaler will only use the Marshal.FreeCoTaskMem() method for automatic memory freeing of NULL-terminated strings allocated in unmanaged code. Hence do not use GlobalAlloc() unless you intend to free the allocated memory by hand using Marshal.FreeHGlobal() (an example of this is give in section 6 below).

3. Sample Code.

3.1 In this section, based on the principles presented in section 2, I shall present sample codes to demonstrate how to return a string from an unmanaged API and how to declare such an API in managed code.

3.2 The following is a listing of the C++ function which uses CoTaskMemAlloc() :

extern "C" __declspec(dllexport) char*  __stdcall StringReturnAPI01()
{
    char szSampleString[] = "Hello World";
    ULONG ulSize = strlen(szSampleString) + sizeof(char);
    char* pszReturn = NULL;

    pszReturn = (char*)::CoTaskMemAlloc(ulSize);
    // Copy the contents of szSampleString
    // to the memory pointed to by pszReturn.
    strcpy(pszReturn, szSampleString);
    // Return pszReturn.
    return pszReturn;
}

3.4 The C# declaration and sample call :

[DllImport("<path to DLL>", CharSet = CharSet.Ansi, CallingConvention = CallingConvention.StdCall)]
[return: MarshalAs(UnmanagedType.LPStr)]
public static extern string StringReturnAPI01();

static void CallUsingStringAsReturnValue()
{
  string strReturn01 = StringReturnAPI01();
  Console.WriteLine("Returned string : " + strReturn01);
}

3.5 Note the argument used for the MarshalAsAttribute : UnmanagedType.LPStr. This indicates to the Interop Marshaler that the return string from StringReturnAPI01() is a pointer to a NULL-terminated ANSI character array.

3.6 What happens under the covers is that the Interop Marshaler uses this pointer to construct a managed string. It likely uses the Marshal.PtrToStringAnsi() method to perform this. The Interop Marshaler will then use the Marshal.FreeCoTaskMem() method to free the character array.

4. Using a BSTR.

4.1 In this section, I shall demonstrate here how to allocate a BSTR in unmanaged code and return it in managed code together with memory deallocation.

4.2 Here is a sample C++ code listing :

extern "C" __declspec(dllexport) BSTR  __stdcall StringReturnAPI02()
{
  return ::SysAllocString((const OLECHAR*)L"Hello World");
}

4.3 And the C# declaration and usage :

[DllImport("<path to DLL>", CharSet = CharSet.Ansi, CallingConvention = CallingConvention.StdCall)]
[return: MarshalAs(UnmanagedType.BStr)]
public static extern string StringReturnAPI02();

static void CallUsingBSTRAsReturnValue()
{
  string strReturn = StringReturnAPI02();
  Console.WriteLine("Returned string : " + strReturn);
}

Note the argument used for the MarshalAsAttribute : UnmanagedType.BStr. This indicates to the Interop Marshaler that the return string from StringReturnAPI02() is a BSTR.

4.4 The Interop Marshaler then uses the returned BSTR to construct a managed string. It likely uses the Marshal.PtrToStringBSTR() method to perform this. The Interop Marshaler will then use the Marshal.FreeBSTR() method to free the BSTR.

5. Unicode Strings.

5.1 Unicode strings can be returned easily too as the following sample code will demonstrate.

5.2 Here is a sample C++ code listing :

extern "C" __declspec(dllexport) wchar_t*  __stdcall StringReturnAPI03()
{
  // Declare a sample wide character string.
  wchar_t  wszSampleString[] = L"Hello World";
  ULONG  ulSize = (wcslen(wszSampleString) * sizeof(wchar_t)) + sizeof(wchar_t);
  wchar_t* pwszReturn = NULL;

  pwszReturn = (wchar_t*)::CoTaskMemAlloc(ulSize);
  // Copy the contents of wszSampleString
  // to the memory pointed to by pwszReturn.
  wcscpy(pwszReturn, wszSampleString);
  // Return pwszReturn.
  return pwszReturn;
}

5.3 And the C# declaration and usage :

[DllImport("<path to DLL>", CharSet = CharSet.Ansi, CallingConvention = CallingConvention.StdCall)]
[return: MarshalAs(UnmanagedType.LPWStr)]
public static extern string StringReturnAPI03();

static void CallUsingWideStringAsReturnValue()
{
  string strReturn = StringReturnAPI03();
  Console.WriteLine("Returned string : " + strReturn);
}

The fact that a wide charactered string is now returned requires the use of the UnmanagedType.LPWStr argument for the MarshalAsAttribute.

5.4 The Interop Marshaler uses the returned wide-charactered string to construct a managed string. It likely uses the Marshal.PtrToStringUni() method to perform this. The Interop Marshaler will then use the Marshal.FreeCoTaskMem() method to free the wide-charactered string.

6. Low-Level Handling Sample 1.

6.1 In this section, I shall present some code that will hopefully cement the reader’s understanding of the low-level activities that had been explained in section 2 above.

6.2 Instead of using the Interop Marshaler to perform the marshaling and automatic memory deallocation, I shall demonstrate how this can be done by hand in managed code.

6.3 I shall use a new API which resembles the StringReturnAPI01() API which returns a NULL-terminated ANSI character array :

extern "C" __declspec(dllexport) char*  __stdcall PtrReturnAPI01()
{
  char   szSampleString[] = "Hello World";
  ULONG  ulSize = strlen(szSampleString) + sizeof(char);
  char*  pszReturn = NULL;

  pszReturn = (char*)::GlobalAlloc(GMEM_FIXED, ulSize);
  // Copy the contents of szSampleString
  // to the memory pointed to by pszReturn.
  strcpy(pszReturn, szSampleString);
  // Return pszReturn.
  return pszReturn;
}

6.4 And the C# declaration :

[DllImport("<path to DLL>", CharSet = CharSet.Ansi, CallingConvention = CallingConvention.StdCall)]
public static extern IntPtr PtrReturnAPI01();

Note that this time, I have indicated that the return value is an IntPtr. There is no [return : ...] declaration and so no unmarshaling will be performed by the Interop Marshaler.

6.5 And the C# low-level call :

static void CallUsingLowLevelStringManagement()
{
  // Receive the pointer to ANSI character array
  // from API.
  IntPtr pStr = PtrReturnAPI01();
  // Construct a string from the pointer.
  string str = Marshal.PtrToStringAnsi(pStr);
  // Free the memory pointed to by the pointer.
  Marshal.FreeHGlobal(pStr);
  pStr = IntPtr.Zero;
  // Display the string.
  Console.WriteLine("Returned string : " + str);
}

This code demonstrates an emulation of the Interop Marshaler in unmarshaling a NULL-terminated ANSI string. The returned pointer from PtrReturnAPI01() is used to construct a managed string. The pointer is then freed. The managed string remains intact with a copy of the returned string.

The only difference between this code and the actual one by the Interop Marshaler is that the GlobalAlloc()/Marshal.FreeHGlobal() pair is used. The Interop Marshaler always uses Marshal.FreeCoTaskMem() and expects the unmanaged code to use ::CoTaskMemAlloc().

7. Low-Level Handling Sample 2.

7.1 In this final section, I shall present one more low-level string handling technique similar to the one presented in section 6 above.

7.2 Again we do not use the Interop Marshaler to perform the marshaling and memory deallocation. Additionally, we will also not release the memory of the returned string.

7.3 I shall use a new API which simply returns a NULL-terminated Unicode character array which has been allocated in a global unmanaged memory :

wchar_t gwszSampleString[] = L"Global Hello World";

extern "C" __declspec(dllexport) wchar_t*  __stdcall PtrReturnAPI02()
{
  return gwszSampleString;
}

This API returns a pointer to the pre-allocated global Unicode string “gwszSampleString”. Because it is allocated in global memory and may be shared by various functions in the DLL, it is crucial that it is not deleted.

7.4 The C# declaration for PtrReturnAPI02() is listed below :

[DllImport("<path to DLL>", CharSet = CharSet.Ansi, CallingConvention = CallingConvention.StdCall)]
public static extern IntPtr PtrReturnAPI02();

Again, there is no declaration for interop marshaling (no use of the [return : ...] declaration). The returned IntPtr is returned as is.

7.5 And a sample C# code to manage the returned IntPtr :

static void CallUsingLowLevelStringManagement02()
{
  // Receive the pointer to Unicde character array
  // from API.
  IntPtr pStr = PtrReturnAPI02();
  // Construct a string from the pointer.
  string str = Marshal.PtrToStringUni(pStr);
  // Display the string.
  Console.WriteLine("Returned string : " + str);
}

Here, the returned IntPtr is used to construct a managed string from an unmanaged NULL-terminated Unicode string. The memory of the unmanaged Unicode string is then left alone and is not deleted.

Note that because a mere IntPtr is returned, there is no way to know whether the returned string is ANSI or Unicode. In fact, there is no way to know whether the IntPtr actually points to a NULL-terminated string at all. This knowledge has to be known in advance.

7.6 Furthermore, the returned IntPtr must not point to some temporary string location (e.g. one allocated on the stack). If this was so, the temporary string may be deleted once the API returns. The following is an example :

extern "C" __declspec(dllexport) char* __stdcall PtrReturnAPI03()
{
  char szSampleString[] = "Hello World";
  return szSampleString;
}

By the time this API returns, the string contained in “szSampleString” may be completely wiped out or be filled with random data. The random data may not contain any NULL character until many bytes later. A crash may ensue a C# call like the following :

IntPtr pStr = PtrReturnAPI03();
// Construct a string from the pointer.
string str = Marshal.PtrToStringAnsi(pStr);




반응형
Posted by blueasa
, |

파이썬 배우는 기념으로 만든 소스(.h, .cpp)의 줄 수 세는 프로그램.
현재 디렉토리를 포함한 모든 하위디렉토리에 속한 소스의 줄 수를 보여준다.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
# -*-coding:utf-8-*-
import os
 
def count_line(filename):
    file    = open(filename)
    line_num    = 0
    while (file.readline()):
        line_num    += 1
    return line_num
 
def count_code_lines(dirname):
    file_line_list  = []
    filenames   = os.listdir(dirname)
    for filename in filenames:
        filename    = dirname + '\\' + filename
        if (os.path.isdir(filename)):
            file_line_list  += count_code_lines(filename)
        else:
            if ((len(filename) > len('.h') and filename[-2:] == '.h') or
                (len(filename) > len('.cpp') and filename[-4:] == '.cpp')):
                file_line_list.append((filename, count_line(filename)))
    return file_line_list
 
def get_dir_list(path):
    dir_list    = []
    if (os.path.isdir(path)):
        dir_list.append(path)
 
    header  = os.path.split(path)[0]
    if (header == ''):
        return dir_list
    else:
        dir_list    += get_dir_list(header)
 
    return dir_list
 
file_line_list  = count_code_lines('.')
 
dir_line_dict   = {}
 
for filename, line_num in file_line_list:
    dir_list    = get_dir_list(filename)
    for dir in dir_list:
        if (not dir in dir_line_dict):
            dir_line_dict[dir]  = 0
        dir_line_dict[dir]  = dir_line_dict[dir] + line_num
 
dirnames    = dir_line_dict.keys()
dirnames.sort()
 
for dirname in dirnames:
    print "%10d %s"%(dir_line_dict[dirname], dirname)

출력예 : 뭐, 대략 이런식

8388 .
 409 .\MemoryPool
 136 .\MemoryPool\profiler
 862 .\PicTest
 687 .\SimpleMFC
 403 .\SimpleMFC2
1627 .\SimpleTest
 142 .\SimpleTest2
  59 .\UDPClient
 155 .\UDPServer
 963 .\WebViewer
 112 .\cliWrap
  19 .\cppLib
2950 .\rvo_test
 136 .\rvo_test\profiler
 472 .\rvo_test\srv_cntr
2114 .\rvo_test\sti



반응형
Posted by blueasa
, |

높이맵 같은데서 늘어난 텍스쳐를 보정해줄 수 있는 테크닉. 정리 차원에서 포스팅 해봅니다. 
GPU Gems 3권에도 관련 내용이 수록되어있고, GPU Gems 3은 번역서도 나와있으니 참고해보면 될 듯.


nVidia GPU Gems 3 : http://http.developer.nvidia.com/GPUGems3/gpugems3_ch01.html
( 중후반 쯤의 1.5 Texturing and Shading 세션 )



GameDev.net : http://www.gamedev.net/blog/584/entry-2249767-tri-planar-textures-and-bump-mapping/
GameDev.net : http://www.gamedev.net/blog/979/entry-2250761-triplanar-texturing-and-normal-mapping/



반응형
Posted by blueasa
, |


Non-Blocking Algorithm.pdf



링크 : http://mango.dyndns.biz/data/Document/Non-Blocking%20Algorithm.pdf

반응형

'Programming > Algorithm' 카테고리의 다른 글

유도탄  (0) 2011.05.04
알고리즘의 설계  (0) 2010.04.14
Posted by blueasa
, |


링크 : http://curriq.com/course/18


스타트업이든 벤처든 기업에서든 이공대생, 특히 이공대 출신 개발자와 함께 일을 하는 문과생이 알아두면 좋을 법한 지침이나 행동 방향을 대략적으로 정리. 

우리 나라의 교육 과정이 이과와 문과를 일찍부터 나누다보니 여자와 남자의 사고방식과 행동 패턴이 다르듯 이공대 출신과 문과(상경출신 포함)출신의 사고방식과 행동 양식이 다른 경우가 많다. 특히 프로그램 관련 '개발'이라는 것을 전혀 경험하지 못한 혹은 매우 어설프게 경험한 문과생은 상황이 꽤 심각한 지경. 
그래서 생각나는대로 썼다. 오해하진 말자. 서로를 더 잘 이해하자고 쓰는 것이니. 

참고로 난 개발 안 한지 3년은 되었고 지금은 인터넷 서비스를 기획하는 스타트업 하는 사람이다. 개발자 정서를 잘 이해할 뿐 개발자는 아니다.



STEP1경험한다고 다 아는 것은 아니지만, 경험하지 못하면 절대 모르는 것도 있다.

직관이라는 것과 관련한 고어군님의 좋은 글이 있다. http://blog.gorekun.com/1540 하고자 하는 말은 개발을 경험하지 못한, 혹은 어설프게 경험한(이공대 출신 입장에서는 입문도 하지 못한 수준) 문과생은 '개발'이라는 것을 제대로 이해하지 못할 확률이 매우 높다는 것이다. 개발자의 정서나 언어, 사고방식, 행동양식을 오해하거나 이상한 편견을 갖고 있을 가능성도 높다. 거꾸로, 이과를 나온 이공대 출신의 개발자는 문과 출신의 언어나 사고방식, 행동을 비합리적, 비효율적, 비논리적이라고 폄훼하는 경향이 좀 있다. 이것은 본인도 그렇게 느끼고 있다는 고백과 함께 문과출신이 '성급한 일반화'라고 얘기할 정도로 적은 비율은 아니라는 것을 경험을 바탕으로 밝혀둔다. 이하, 개발 경험이 아예 없거나 입문도 안 되는 수준의 문과 출신이 참고하면 좋을 사항들이다. 어디까지나 대체적으로 이럴 가능성이 높다는 얘기다. 참고: 컴퓨터를 잘 다루는 것과 개발 경험이 있는 것은 다른 문제다. 이미 만들어진 망치를 잘 쓰는 사람과 망치를 만드는 사람의 차이라고 생각하면 된다. Thanks: 오타 수정에 도움을 주신 Minhoryang님 감사합니다:-)




STEP2용어의 뜻을 제대로 이해하고 정확히 사용하려고 애써라 - 오해가 줄어든다.

스스로 잘 이해하지 못하는 용어를 써서 지시/회의 하거나, 처음 듣는 전문용어가 나올 때 아는 척하고 넘어가면 오해가 늘어나고 일이 꼬인다. 업계에서 쓰는 전문 용어는 그 뜻을 정확히 이해하려고 노력하고, 스스로 이해했다고 생각한 용어만 써서 대화하는 것이 좋다. 그래야 무시당하지 않고(대놓고 무시하진 않지만 잘 모르고 떠든다고 생각되면 발언 자체에 무게를 두지 않게된다), 오해해서 벌어지는 오버헤드도 줄일 수 있다. 웹개발과 관련된 일을 하는 문과 출신을 위한 참고 사항: http://www.slideshare.net/yongho/ss-11966428 웹개발과 관련해서 개발자가 쓰는 용어를 이해하면 좀 수월하다. 웹이 아닌 다른 분야도 마찬가지다. 이공대에서 배우는 것은 애매한 것이 별로 없다. 상황에 따라 이렇게도 쓰이고 저렇게도 쓰이는 용어는 없다고 보면 된다. 또는 같은 용어를 업계에 있는 사람이 서로 상이하게 정의하거나 새롭게 해석해서 쓰는 경우도 없다. 예를 들어 parallel processing과 concurrent processing 은 완전히 다른 얘기다. 영어 좀 한다고 사전적 의미로 '대충' 이해하면 안 되는 거다. 컴파일러와 인터프리터는 문과 출신이 볼 때는 그게 그거 아니냐고 할 수 있지만 이건 그냥 다른 거다. Replication도 copy보다 멋있어 보여서 쓰는 용어가 아닌거다. Javascript는 Java에 뭔가 더해진 것이 아니다. Shell은 조개 껍데기를 의미하는 것이 아니고, console은 물리적으로 존재하지 않을 수도 있으며, terminal은 정거장이 아니다. 각 분야마다 사전적인 의미와 다른 의미로 쓰이는 '미리 약속된 정의', 즉 터미놀로지(용어)가 있다. 이를 그들만의 '외계어'로 치부하지 말고 공부해라.



STEP3집중할 때 건드리지 마라.

특히, 코딩하고 있거나 뭔가 개발 문서나 매뉴얼, 책을 찾거나 읽고 있을 때 건드리지 마라. 진짜 어지간히 급하거나 중요한 일 아니면 냅둬라. 일단 집중에 성공하면 생산성이 엄청나게 향상된다. 거꾸로 집중하는 것을 방해하면 '다음에 집중할 마음이 생기기 전까지' 계속 딴짓을 할 가능성이 높아진다. 실제 개발자의 경험담도 참고 하고 http://kimeunseok.com/archives/51 왜 오피스에서 일이 안 되는지, 매니저와 미팅이 문제라고 주장하는 TEDx의 강연도 보고. http://www.ted.com/talks/lang/ko/jason_fried_why_work_doesn_t_happen_at_work.html 집중의 문제는 모두의 문제긴 하지만, 특별히 강조하는 이유는 '프로그래밍' 하는 사람들의 생산성은 '몰입'의 수준과 빈도에 매우 큰 영향을 받기 때문에 그렇다. 진짜로 제대로 집중하면 시간가는 것을 모르고 눈이나 허리 아픈 것도 모른다. '쉬엄 쉬엄 하라'는 말도 때와 장소가 있다. 괜히 신경써 준다고 하는 말이 훼방을 놓는 일일 수 있다. 모니터를 노려보며 코딩을 하고 있거나 매뉴얼/튜토리얼로 추정되는 문서를 보고 있을 때는 좀 냅둬라. (집중하는 척하는 거 아니냐고? 관심법이라도 있는거 아니면 그냥 냅둬라)



STEP4그들이 '쉽게 할 수 있다'라고 말하는 것은 실제로 '쉽다'는 뜻이 아니다.

'필요한 조건이 모두 갖춰져 있으면'이라는 말이 생략된 경우가 많다. 이것은 '내가 이와 관련된 논문이나 매뉴얼을 좀 읽어보고, 테스트할 시간을 좀 가져서 감을 잡는다면' 이라거나 '다른 일 없이 당분간 딱 이것만 하게 해 준다면' 이라거나 '여기서 추가되거나 중간에 수정되지 않는다면' 이라거나 '이걸 잘 아는 사람에게 물어볼 수 있다면' 이라거나 '마침 그와 관련된 책을 사놨는데 책 볼 시간을 좀 준다면' 이라거나 상황에 따라 다양한 말이 생략되어 있는 경우가 많다. 그들은 기본적으로 자존심이 있고, 잘 하는 것이 문제지 해서 안 되는 것은 별로 없다고 생각하는 경향이 있어서 '어렵지 않다'라는 말을 입버릇처럼 하곤 한다. 그렇게 말한다고 해서 실제로 난이도가 낮거나 쉽다는 뜻은 아니다. 그리고 그 일을 몇 시간, 혹은 며칠만에 끝낼 수 있다는 말도 아니다. 예전에 비슷한 것을 해 봤거나, 비슷하게 했던 사람을 안다거나, 비슷하게 한 것을 어디서 슬쩍 본 것 만으로도 그렇게 말할 수 있다. 쉽게 할 수 있다고 한다면 어떤 조건에서 얼마나 걸릴지 확인하도록 하자. 추가 팁: 간혹, '쉽다'고 말하고 정말로 '쉽게' 하는 경우가 있다. 그래서 비슷한 일을 '쉽다'고 인식하고 다음 번에도 '쉬운 일'로 간주하는 경우가 있다. 이것이 정말로 '쉬운 일'인지는 그 일을 해낸 사람의 능력과 스키마(배경지식)을 검토한 후에 판단할 일이다.



STEP5이공대생이 '하면 되겠죠'라고 말하는 것은 실제로 하면 된다는 뜻이 아니다.

이들이 말하는 '하면 되겠죠'는 '효율성이나 리소스를 생각하지 않고 어떻게든 되기만 해도 만족한다면' 이라는 말이 생략되어 있다. 주의할 부분은 조금 더 있는데, 이 말을 하는 상황과 어조가 꽤 중요하다. 이 말에는 약간의 빈정거림이나 무시, 혹은 자포자기나 자괴감이 포함되어 있을 확률이 높기 때문이다. 특히 평소에 Step 2의 '용어' 문제가 걸려서 이미 마음속으로 무시하고 있는 사람에게 이런 말을 하는 것이라면 상당한 수준의 경고로 받아들여야 한다. 그걸 어떻게 아냐고? 짧으면 한 두 주, 길면 몇 달간 얼마나 요구/지시 사항이 바뀌었고 결정이 번복되었고 했던 일을 갈아 엎었는지 짚어보면 바보가 아닌 이상 다 알거다.



STEP6생활 패턴이 불규칙한 경우가 많다.

이는 집중력과도 연관되는데, 한 번 빠지면 타임 워프를 하듯 정신 없이 일을 하고, 체력이 받쳐주지 못해서 반나절 이상 죽어있고... 좀비처럼 멍해 있다가 다시 삘받아서 미친듯이 뭔가 하고... 그런 케이스가 많다. (그래서 좋은 개발자는 체력이 좋은 개발자일수도...) 물론 시간 관리가 잘 되는 케이스도 없지 않다. 뽀모도로 ( http://goo.gl/z359p )같은 시간 관리 기법을 쓰거나, 이에 준하는 자신만의 노하우가 있는 경우도 있다. 그리고 많은 개발자가 시간 관리를 잘 하려고 굉장히 애쓴다. 하지만 그런 노력과 별도로 그냥 일 자체가 몰입을 강제해서, 또는 대부분 본인이 어떻게 할 수 없는 마감시간의 심리적 압박 때문에 생활패턴이 불규칙해지는 경우가 더 흔하다. 대부분 집중될 때 일을 몰아서 하는 경향이 있고 집중이 안 되면 하고 싶은 마음이 들 때까지 다른 일을 하는 경우가 많다. 특히 현실 생활에서의 만족도나 하고 있는 일에서 재미가 떨어지면 자연스럽게 게임, 웹툰, 채팅, 각종 게시판 순회 방문, 영화/드라마/애니 감상 등으로 시간을 쓰게 된다. 간혹 인과관계를 거꾸로 해석하는 경우가 있는데, 저런 딴짓을 많이 해서 일을 안 하는 것이 아니라 일이 재미가 없으니까 딴짓을 많이 하는 거다.



STEP7노는 것처럼 보이는 것이 결론적으로는 자기계발인 경우가 자주 있다.

이공대 출신은 대부분 호기심이 왕성해서 뭔가 하나 잡히면 이리저리 가지를 쳐서 스스로 만족할 때까지 탐구하는 성향이 있다. 이것이 일과 조금이라도 관련이 있다면, 이들이 보내는 시간은 일종의 자기계발일 수 있다. 다만, 문외한이 보기에 그것을 판단하는 것이 애매할 수는 있다. 호기심을 해결하는 과정에서 새로운 도구를 익히거나 기술 트렌드를 따라가거나 없던 능력을 얻곤 한다. http://curriq.com/course/21 에서 '흔한 공대생의 생활'에 링크된 글을 몇 개 읽어보자. 위의 글을 읽고 '이게 뭔 쓸데 없는 짓이야' 라고 생각한다면 당신은 이공대 출신 개발자를 전혀 이해하지 못하는 것이나 다름없다. 개발에 몸담았던 사람이라면 '훗, 이 정도는 나도 할 수 있어. 오히려 이렇게 하는 것이 더 좋지' '오홍, 이런 방법도 있군, 이걸 응용하면 이런 짓도 가능하겠어' '헉, 능력자닷. 난 언제 저런 수준이 되지? 부럽다' 이런 호기심과 잉여로움이 개발자에게 꽤 중요하다. 사실 이런 호기심이 없거나 호기심을 해결할 수 있도록 하는 잉여시간/잉여력이 없으면 자기계발을 할 시간이 절대적으로 부족하다. 구글에서 20% 프로젝트 하고 그런 것이 심심해서 하는 거라고 생각하면 곤란하다.



STEP8좋은 개발자 만나면 고마워할 일이지 좋다고 부려먹을 생각만 하면 안 된다.

개발자의 능력은 천차만별이다. 그리고 개발자의 능력은 거짓말이 어렵다. 일당십, 일당백을 하는 능력자가 실제로 존재한다. 머리도 잘 돌아가고, 성격도 좋고, 경험도 많으면서, 절차탁마 하는 고수가 존재한다. 우연히라도 운이 좋아 이런 개발자랑 같이 일하게 되면 고마워하고 서로 만족할만한 결과물을 내려고 해야지 뽑아먹을 생각만 하면 안 된다. 일당십의 능력자를 평범하게 쓰면 기껏해야 2~3인 분의 일을 할 뿐이다. 받들어 모시라는 얘기가 아니라 소모시키지 않도록 해야 한다는 말이다. 잉여시간이 있기 때문에 일당십, 일당백의 능력을 발휘하고 그런 능력을 유지하는 것이다. 잉여시간을 일에 투입한다고 더 많은 일이 처리되진 않는다. 오히려 부족한 자기계발 시간, 마감 스트레스, 잦은 훼방 등으로 효율이 급격하게 떨어질 수 있다. 한 달에 한 사람의 개발자가 할 수 있는 일을 '1 맨먼쓰(M/M)' 이라고 표현한다. 이 말을 만든 사람은 아마 개발이라는 것을 경험하지 못한 사람일 것이다. 덧: M/M(맨먼쓰)는 한 달에 한 사람의 개발자가 할 수 있는 일이 아니라 한 달에 한 사람의 개발자가 투입됨을 나타낸다고 '리소스' 관점에서 지적해 주신 분들이 있었다. 성취한 결과물의 단위를 투입한 자원으로 환산할 때 사용하는 단위라는 것. 하지만 한 사람이 다섯달을 일한 5M/M과 다섯 사람이 한 달을 일한 5M/M이 차이가 없다고 생각하는 '사고방식'을 표현했다는 점에서 여전히 개발자를 이해하지 못한 말이다. '한 달에 한 사람의 개발자가 할 수 있는 일의 양'이라고 표현한 것은 실제로 M/M을 표현하거나 계산할 때 그렇게 생각하는 사람이 많기 때문입니다. 덧2: M/M은 일반적인 용어라 여러 곳에 사용된다. 하고자 한 말은 이 말이 '(소프트웨어) 개발'에는 적합하지 않은 용어라는 것이다. 혹시 오해 없기를!!


반응형
Posted by blueasa
, |

롯데마트에 왔는데 T와이파이존이 공개형과 폐쇠형이 있네요.

1. T wifi zone
이건 뭐 그냥 사용 가능하고

2. T wifi zone-secure
프로그램을 다운 받아서 설치해야 합니다


그럼 2번에 대한 설명 들어 갑니다

1. PC로 www.tworld.co.kr 에 회원 가입 후 로그인 합니다.
2. towrld > 고객센터 > T와이파이존
3. 중간에 보면 


mobileconfig 파일 다운로드 합니다. (PC에 저장된 상태)
4. 파일을 다운 받운후 자기 이메일로 전송 합니다.
5. 아피패드2 에서 이메일 여시고 참부 파일 실행 합니다.






 

6. 끝



출처 : http://blog.naver.com/nanoace1/30115548917

반응형
Posted by blueasa
, |